From: Jiri Pirko <jiri@resnulli.us>
To: virtualization@lists.linux.dev
Cc: mst@redhat.com, jasowang@redhat.com, xuanzhuo@linux.alibaba.com,
eperezma@redhat.com, parav@nvidia.com, feliu@nvidia.com,
hengqi@linux.alibaba.com
Subject: [PATCH virtio v2 01/19] caif_virtio: use virtio_find_single_vq() for single virtqueue finding
Date: Thu, 4 Jul 2024 08:43:32 +0200 [thread overview]
Message-ID: <20240704064350.1097716-2-jiri@resnulli.us> (raw)
In-Reply-To: <20240704064350.1097716-1-jiri@resnulli.us>
From: Jiri Pirko <jiri@nvidia.com>
Since caif uses only one queue, convert to virtio_find_single_vq()
helper which is made for this purpose.
Signed-off-by: Jiri Pirko <jiri@nvidia.com>
---
drivers/net/caif/caif_virtio.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/net/caif/caif_virtio.c b/drivers/net/caif/caif_virtio.c
index 99d984851fef..7fea00c7ca8a 100644
--- a/drivers/net/caif/caif_virtio.c
+++ b/drivers/net/caif/caif_virtio.c
@@ -646,9 +646,7 @@ static inline void debugfs_init(struct cfv_info *cfv)
/* Setup CAIF for the a virtio device */
static int cfv_probe(struct virtio_device *vdev)
{
- vq_callback_t *vq_cbs = cfv_release_cb;
vrh_callback_t *vrh_cbs = cfv_recv;
- const char *names = "output";
const char *cfv_netdev_name = "cfvrt";
struct net_device *netdev;
struct cfv_info *cfv;
@@ -675,9 +673,11 @@ static int cfv_probe(struct virtio_device *vdev)
goto err;
/* Get the TX virtio ring. This is a "guest side vring". */
- err = virtio_find_vqs(vdev, 1, &cfv->vq_tx, &vq_cbs, &names, NULL);
- if (err)
+ cfv->vq_tx = virtio_find_single_vq(vdev, cfv_release_cb, "output");
+ if (IS_ERR(cfv->vq_tx)) {
+ err = PTR_ERR(cfv->vq_tx);
goto err;
+ }
/* Get the CAIF configuration from virtio config space, if available */
if (vdev->config->get) {
--
2.45.2
next prev parent reply other threads:[~2024-07-04 6:43 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 ` Jiri Pirko [this message]
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 ` [PATCH virtio v2 00/19] virtio: consolidate vq info args of find_vqs() Xuan Zhuo
2024-07-04 13:04 ` 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=20240704064350.1097716-2-jiri@resnulli.us \
--to=jiri@resnulli.us \
--cc=eperezma@redhat.com \
--cc=feliu@nvidia.com \
--cc=hengqi@linux.alibaba.com \
--cc=jasowang@redhat.com \
--cc=mst@redhat.com \
--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).