From: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
To: Jiri Pirko <jiri@resnulli.us>
Cc: mst@redhat.com, jasowang@redhat.com, eperezma@redhat.com,
parav@nvidia.com, feliu@nvidia.com, hengqi@linux.alibaba.com,
virtualization@lists.linux.dev
Subject: Re: [PATCH virtio v2 00/19] virtio: consolidate vq info args of find_vqs()
Date: Thu, 4 Jul 2024 19:33:29 +0800 [thread overview]
Message-ID: <1720092809.2040446-1-xuanzhuo@linux.alibaba.com> (raw)
In-Reply-To: <20240704064350.1097716-1-jiri@resnulli.us>
Do you know this: http://lore.kernel.org/all/20240424091533.86949-1-xuanzhuo@linux.alibaba.com
This seems to do the same thing. That works in process.
Thanks.
On Thu, 4 Jul 2024 08:43:31 +0200, Jiri Pirko <jiri@resnulli.us> 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.
>
> 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().
>
> ---
> v1->v2:
> - added forgotten VIRTIO_SND_VQ_MAX for array size in virtio_card.c
> - s/virtio_queue_info/virtqueue_info/
> - fixed comments for struct virtqueue_info
> - rebased on top of recent code changes (virtio_fs.c)
> - see individual patches changelog for more details
>
> 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 | 48 ++++++++-------
> drivers/virtio/virtio_pci_common.h | 3 +-
> 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, 238 insertions(+), 302 deletions(-)
>
> --
> 2.45.2
>
next prev parent reply other threads:[~2024-07-04 11:37 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-04 6:43 [PATCH virtio v2 00/19] virtio: consolidate vq info args of find_vqs() Jiri Pirko
2024-07-04 6:43 ` [PATCH virtio v2 01/19] caif_virtio: use virtio_find_single_vq() for single virtqueue finding Jiri Pirko
2024-07-04 6:43 ` [PATCH virtio v2 02/19] virtio: make virtio_find_vqs() call virtio_find_vqs_ctx() Jiri Pirko
2024-07-04 6:43 ` [PATCH virtio v2 03/19] virtio: make virtio_find_single_vq() call virtio_find_vqs() Jiri Pirko
2024-07-04 6:43 ` [PATCH virtio v2 04/19] virtio: introduce virtio_queue_info struct and find_vqs_info() config op Jiri Pirko
2024-07-04 7:47 ` Michael S. Tsirkin
2024-07-04 9:42 ` Jiri Pirko
2024-07-04 11:06 ` Jiri Pirko
2024-07-04 11:28 ` Michael S. Tsirkin
2024-07-04 13:00 ` Jiri Pirko
2024-07-04 14:17 ` Michael S. Tsirkin
2024-07-04 6:43 ` [PATCH virtio v2 05/19] virtio_pci: convert vp_*find_vqs() ops to find_vqs_info() Jiri Pirko
2024-07-04 6:43 ` [PATCH virtio v2 06/19] virtio: convert find_vqs() op implementations " Jiri Pirko
2024-07-05 7:43 ` Michael S. Tsirkin
2024-07-08 7:26 ` Jiri Pirko
2024-07-04 6:43 ` [PATCH virtio v2 07/19] virtio: call virtio_find_vqs_info() from virtio_find_single_vq() directly Jiri Pirko
2024-07-04 6:43 ` [PATCH virtio v2 08/19] virtio: remove the original find_vqs() op Jiri Pirko
2024-07-04 6:43 ` [PATCH virtio v2 09/19] virtio: rename find_vqs_info() op to find_vqs() Jiri Pirko
2024-07-04 6:43 ` [PATCH virtio v2 10/19] virtio_blk: convert to use virtio_find_vqs_info() Jiri Pirko
2024-07-04 6:43 ` [PATCH virtio v2 11/19] virtio_console: " Jiri Pirko
2024-07-04 6:43 ` [PATCH virtio v2 12/19] virtio_crypto: " Jiri Pirko
2024-07-04 6:43 ` [PATCH virtio v2 13/19] virtio_net: " Jiri Pirko
2024-07-04 6:43 ` [PATCH virtio v2 14/19] scsi: virtio_scsi: " Jiri Pirko
2024-07-04 6:43 ` [PATCH virtio v2 15/19] virtiofs: " Jiri Pirko
2024-07-04 6:43 ` [PATCH virtio v2 16/19] virtio_balloon: " Jiri Pirko
2024-07-04 6:43 ` [PATCH virtio v2 17/19] virtio: convert the rest virtio_find_vqs() users to virtio_find_vqs_info() Jiri Pirko
2024-07-04 6:43 ` [PATCH virtio v2 18/19] virtio: remove unused virtio_find_vqs() and virtio_find_vqs_ctx() helpers Jiri Pirko
2024-07-04 6:43 ` [PATCH virtio v2 19/19] virtio: rename virtio_find_vqs_info() to virtio_find_vqs() Jiri Pirko
2024-07-04 11:33 ` Xuan Zhuo [this message]
2024-07-04 13:04 ` [PATCH virtio v2 00/19] virtio: consolidate vq info args of find_vqs() 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=1720092809.2040446-1-xuanzhuo@linux.alibaba.com \
--to=xuanzhuo@linux.alibaba.com \
--cc=eperezma@redhat.com \
--cc=feliu@nvidia.com \
--cc=hengqi@linux.alibaba.com \
--cc=jasowang@redhat.com \
--cc=jiri@resnulli.us \
--cc=mst@redhat.com \
--cc=parav@nvidia.com \
--cc=virtualization@lists.linux.dev \
/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).