[PATCH vhost v7 4/6] virtio: vring_create_virtqueue: pass struct instead of multi parameters
Eric Farman
farman at linux.ibm.com
Mon Apr 1 12:07:26 PDT 2024
On Thu, 2024-03-28 at 16:03 +0800, Xuan Zhuo wrote:
> 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 the vring can access the config from driver directly.
>
> If parameters from the transport, we squish the parameters to a
> structure. That will be helpful to add new parameter.
>
> Signed-off-by: Xuan Zhuo <xuanzhuo at linux.alibaba.com>
> Acked-by: Johannes Berg <johannes at sipsolutions.net>
> Reviewed-by: Ilpo Järvinen <ilpo.jarvinen at linux.intel.com>
> Acked-by: Jason Wang <jasowang at redhat.com>
> ---
> arch/um/drivers/virtio_uml.c | 14 +++++---
> drivers/s390/virtio/virtio_ccw.c | 14 ++++----
> drivers/virtio/virtio_mmio.c | 14 ++++----
> drivers/virtio/virtio_pci_legacy.c | 15 ++++----
> drivers/virtio/virtio_pci_modern.c | 15 ++++----
> drivers/virtio/virtio_ring.c | 57 ++++++++++++----------------
> --
> drivers/virtio/virtio_vdpa.c | 21 +++++------
> include/linux/virtio_ring.h | 51 +++++++++++++-------------
> 8 files changed, 101 insertions(+), 100 deletions(-)
Acked-by: Eric Farman <farman at linux.ibm.com> # s390
More information about the linux-um
mailing list