This pathset is splited from the
http://lore.kernel.org/all/20240229072044.77388-1-xuanz...@linux.alibaba.com
That may needs some cycles to discuss. But that notifies too many people.
But just the four commits need to notify so many people.
And four commits are independent. So I split that
Now, we pass multi parameters to find_vqs. These parameters
may work for transport or work for vring.
And find_vqs has multi implements in many places:
arch/um/drivers/virtio_uml.c
drivers/platform/mellanox/mlxbf-tmfifo.c
drivers/remoteproc/remoteproc_virtio.c
drivers/s390/virtio/virtio_ccw.c
Now, we pass multi parameters to vring_create_virtqueue. These parameters
may from transport or from driver.
vring_create_virtqueue is called by many places.
Every time, we try to add a new parameter, that is difficult.
If parameters from the driver, that should directly be passed to vring.
Then
As the refactor of find_vqs()/vring_new_virtqueue()/vring_create_virtqueue
the struct cfg/tp_cfg are passed to vring.
This patch refactors the vring by these structures. This can simplify
the code.
Signed-off-by: Xuan Zhuo
---
drivers/virtio/virtio_ring.c | 157 +++--
Just like find_vqs(), it is time to refactor the
vring_new_virtqueue(). We pass the similar struct to
vring_new_virtqueue.
Signed-off-by: Xuan Zhuo
---
drivers/platform/mellanox/mlxbf-tmfifo.c | 13 +---
drivers/remoteproc/remoteproc_virtio.c | 11 ---
drivers/virtio/virtio_ring.c