From: "Michael S. Tsirkin" <mst@redhat.com>
To: Jiri Pirko <jiri@resnulli.us>
Cc: virtualization@lists.linux.dev, jasowang@redhat.com,
xuanzhuo@linux.alibaba.com, eperezma@redhat.com,
parav@nvidia.com, feliu@nvidia.com, hengqi@linux.alibaba.com
Subject: Re: [PATCH virtio 00/19] virtio: consolidate vq info args of find_vqs()
Date: Wed, 3 Jul 2024 08:50:36 -0400 [thread overview]
Message-ID: <20240703084954-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <20240703123913.969202-1-jiri@resnulli.us>
On Wed, Jul 03, 2024 at 02:38:54PM +0200, Jiri Pirko wrote:
> From: Jiri Pirko <jiri@nvidia.com>
>
> Currently, virtio_find_vqs() and virtio_find_vqs_ctx() accept array of
> names, callbacks and ctx (in case of the second one) as separate args.
> That became inconvenient as the ctx addition showed.
>
> For virtio_net control queue, an indication of queue flavour (slow path)
> is going to be needed to be passed to PCI transport in order to
> assign vectors properly, another array added to virtio_find_vqs_ctx()
> arg list would not be nice and convenient.
>
> Instead, introduce a structure to carry vq callback, name and ctx. Pass
> array of these structures to virtio_find_vqs() and all the way down to
> transport find_vqs() op implementation.
>
> That allows to easily extend what needs to be passed down. Also, it
> makes the code a bit more cleaner. We get rid of separate
> virtio_find_vqs_ctx() helper.
>
> This patchset does the conversion in steps, using temporary _info() op
> and helper. Note they are renamed back.
Thanks a lot Jiri, looks very good.
Some minor comments.
> Patch #1 does one forgotten conversion to virtio_find_single_vq().
> Patches #2 and #3 do preparations for find_vqs_info() op introduction.
> Patch #4 introduces new op find_vqs_info() to replace find_vqs() it also
> introduces struct virtio_queue_info and virtio_find_vqs_info() helper.
> Patches #5 and #6 convert transports to implement find_vqs_info() op
> that accepts array of virtio_queue_info structs.
> Patch #7 converts virtio_find_single_vq() to use the new way as well.
> Patch #8 removes original find_vqs() op.
> Patch #9 renames find_vqs_info() to find_vqs() and completes first part
> of conversion this patches does.
> Patches #10-#17 convert virtio_find_vqs() and virtio_find_vqs_ctx()
> users to use new virtio_find_vqs_info() helper.
> Patch #18 removes no longer used virtio_find_vqs() and
> virtio_find_vqs_ctx() helpers.
> Patch #19 finalizes the conversion by renaming virtio_find_vqs_info()
> to virtio_find_vqs().
>
> Jiri Pirko (19):
> caif_virtio: use virtio_find_single_vq() for single virtqueue finding
> virtio: make virtio_find_vqs() call virtio_find_vqs_ctx()
> virtio: make virtio_find_single_vq() call virtio_find_vqs()
> virtio: introduce virtio_queue_info struct and find_vqs_info() config
> op
> virtio_pci: convert vp_*find_vqs() ops to find_vqs_info()
> virtio: convert find_vqs() op implementations to find_vqs_info()
> virtio: call virtio_find_vqs_info() from virtio_find_single_vq()
> directly
> virtio: remove the original find_vqs() op
> virtio: rename find_vqs_info() op to find_vqs()
> virtio_blk: convert to use virtio_find_vqs_info()
> virtio_console: convert to use virtio_find_vqs_info()
> virtio_crypto: convert to use virtio_find_vqs_info()
> virtio_net: convert to use virtio_find_vqs_info()
> scsi: virtio_scsi: convert to use virtio_find_vqs_info()
> virtiofs: convert to use virtio_find_vqs_info()
> virtio_balloon: convert to use virtio_find_vqs_info()
> virtio: convert the rest virtio_find_vqs() users to
> virtio_find_vqs_info()
> virtio: remove unused virtio_find_vqs() and virtio_find_vqs_ctx()
> helpers
> virtio: rename virtio_find_vqs_info() to virtio_find_vqs()
>
> arch/um/drivers/virt-pci.c | 8 ++-
> arch/um/drivers/virtio_uml.c | 12 ++--
> drivers/block/virtio_blk.c | 20 +++----
> drivers/bluetooth/virtio_bt.c | 13 ++--
> drivers/char/virtio_console.c | 43 ++++++-------
> drivers/crypto/virtio/virtio_crypto_core.c | 31 ++++------
> drivers/firmware/arm_scmi/virtio.c | 11 ++--
> drivers/gpio/gpio-virtio.c | 10 ++--
> drivers/gpu/drm/virtio/virtgpu_kms.c | 9 ++-
> drivers/iommu/virtio-iommu.c | 11 ++--
> drivers/net/caif/caif_virtio.c | 8 +--
> drivers/net/virtio_net.c | 34 ++++-------
> drivers/net/wireless/virtual/mac80211_hwsim.c | 12 ++--
> drivers/platform/mellanox/mlxbf-tmfifo.c | 10 ++--
> drivers/remoteproc/remoteproc_virtio.c | 12 ++--
> drivers/rpmsg/virtio_rpmsg_bus.c | 8 ++-
> drivers/s390/virtio/virtio_ccw.c | 13 ++--
> drivers/scsi/virtio_scsi.c | 32 ++++------
> drivers/virtio/virtio_balloon.c | 32 ++++------
> drivers/virtio/virtio_input.c | 9 +--
> drivers/virtio/virtio_mmio.c | 12 ++--
> drivers/virtio/virtio_pci_common.c | 49 ++++++++-------
> drivers/virtio/virtio_pci_common.h | 4 +-
> drivers/virtio/virtio_pci_modern.c | 5 +-
> drivers/virtio/virtio_vdpa.c | 13 ++--
> fs/fuse/virtio_fs.c | 22 +++----
> include/linux/virtio_config.h | 60 +++++++++----------
> net/vmw_vsock/virtio_transport.c | 16 ++---
> sound/virtio/virtio_card.c | 23 ++++---
> 29 files changed, 240 insertions(+), 302 deletions(-)
>
> --
> 2.45.2
next prev parent reply other threads:[~2024-07-03 12:50 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-03 12:38 [PATCH virtio 00/19] virtio: consolidate vq info args of find_vqs() Jiri Pirko
2024-07-03 12:38 ` [PATCH virtio 01/19] caif_virtio: use virtio_find_single_vq() for single virtqueue finding Jiri Pirko
2024-07-03 12:38 ` [PATCH virtio 02/19] virtio: make virtio_find_vqs() call virtio_find_vqs_ctx() Jiri Pirko
2024-07-03 12:38 ` [PATCH virtio 03/19] virtio: make virtio_find_single_vq() call virtio_find_vqs() Jiri Pirko
2024-07-03 12:38 ` [PATCH virtio 04/19] virtio: introduce virtio_queue_info struct and find_vqs_info() config op Jiri Pirko
2024-07-03 13:02 ` Michael S. Tsirkin
2024-07-03 13:23 ` Jiri Pirko
2024-07-03 12:38 ` [PATCH virtio 05/19] virtio_pci: convert vp_*find_vqs() ops to find_vqs_info() Jiri Pirko
2024-07-03 12:39 ` [PATCH virtio 06/19] virtio: convert find_vqs() op implementations " Jiri Pirko
2024-07-03 12:39 ` [PATCH virtio 07/19] virtio: call virtio_find_vqs_info() from virtio_find_single_vq() directly Jiri Pirko
2024-07-03 12:39 ` [PATCH virtio 08/19] virtio: remove the original find_vqs() op Jiri Pirko
2024-07-03 12:39 ` [PATCH virtio 09/19] virtio: rename find_vqs_info() op to find_vqs() Jiri Pirko
2024-07-03 12:39 ` [PATCH virtio 10/19] virtio_blk: convert to use virtio_find_vqs_info() Jiri Pirko
2024-07-03 12:39 ` [PATCH virtio 11/19] virtio_console: " Jiri Pirko
2024-07-03 12:39 ` [PATCH virtio 12/19] virtio_crypto: " Jiri Pirko
2024-07-03 12:39 ` [PATCH virtio 13/19] virtio_net: " Jiri Pirko
2024-07-03 12:39 ` [PATCH virtio 14/19] scsi: virtio_scsi: " Jiri Pirko
2024-07-03 12:39 ` [PATCH virtio 15/19] virtiofs: " Jiri Pirko
2024-07-03 12:39 ` [PATCH virtio 16/19] virtio_balloon: " Jiri Pirko
2024-07-03 12:39 ` [PATCH virtio 17/19] virtio: convert the rest virtio_find_vqs() users to virtio_find_vqs_info() Jiri Pirko
2024-07-03 13:11 ` Michael S. Tsirkin
2024-07-03 13:22 ` Jiri Pirko
2024-07-03 12:39 ` [PATCH virtio 18/19] virtio: remove unused virtio_find_vqs() and virtio_find_vqs_ctx() helpers Jiri Pirko
2024-07-03 12:39 ` [PATCH virtio 19/19] virtio: rename virtio_find_vqs_info() to virtio_find_vqs() Jiri Pirko
2024-07-03 12:50 ` Michael S. Tsirkin [this message]
2024-07-03 13:24 ` [PATCH virtio 00/19] virtio: consolidate vq info args of find_vqs() Jiri Pirko
2024-07-03 13:37 ` Michael S. Tsirkin
2024-07-04 11:38 ` Xuan Zhuo
2024-07-04 12:39 ` Michael S. Tsirkin
2024-07-04 12:55 ` Jiri Pirko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240703084954-mutt-send-email-mst@kernel.org \
--to=mst@redhat.com \
--cc=eperezma@redhat.com \
--cc=feliu@nvidia.com \
--cc=hengqi@linux.alibaba.com \
--cc=jasowang@redhat.com \
--cc=jiri@resnulli.us \
--cc=parav@nvidia.com \
--cc=virtualization@lists.linux.dev \
--cc=xuanzhuo@linux.alibaba.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).