From: "Michael S. Tsirkin" <mst@redhat.com>
To: Xiong Weimin <xiongweimin@kylinos.cn>
Cc: "Jason Wang" <jasowangio@gmail.com>,
"Xuan Zhuo" <xuanzhuo@linux.alibaba.com>,
"Eugenio Pérez" <eperezma@redhat.com>,
virtualization@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] virtio-vdpa: Use queue id when setting vq affinity
Date: Tue, 4 Aug 2026 17:22:56 -0400 [thread overview]
Message-ID: <20260804172230-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <20260804092649.1344478-1-xiongweimin@kylinos.cn>
On Tue, Aug 04, 2026 at 05:26:49PM +0800, Xiong Weimin wrote:
> When optional queues are skipped, pass the compressed vDPA queue id to
> set_vq_affinity() so affinity is applied to the queue that was actually
> created.
>
> Signed-off-by: Xiong Weimin <xiongweimin@kylinos.cn>
explain what the problem is please. don't just hint.
> ---
> drivers/virtio/virtio_vdpa.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/virtio/virtio_vdpa.c b/drivers/virtio/virtio_vdpa.c
> index de2af696d..6bcf4567a 100644
> --- a/drivers/virtio/virtio_vdpa.c
> +++ b/drivers/virtio/virtio_vdpa.c
> @@ -352,7 +352,7 @@ static int virtio_vdpa_find_vqs(struct virtio_device *vdev, unsigned int nvqs,
> continue;
> }
>
> - vqs[i] = virtio_vdpa_setup_vq(vdev, queue_idx++, vqi->callback,
> + vqs[i] = virtio_vdpa_setup_vq(vdev, queue_idx, vqi->callback,
> vqi->name, vqi->ctx);
> if (IS_ERR(vqs[i])) {
> err = PTR_ERR(vqs[i]);
> @@ -360,7 +360,8 @@ static int virtio_vdpa_find_vqs(struct virtio_device *vdev, unsigned int nvqs,
> }
>
> if (has_affinity)
> - ops->set_vq_affinity(vdpa, i, &masks[i]);
> + ops->set_vq_affinity(vdpa, queue_idx, &masks[i]);
> + queue_idx++;
> }
>
> cb.callback = virtio_vdpa_config_cb;
> --
> 2.43.0
prev parent reply other threads:[~2026-08-04 21:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-04 9:26 Xiong Weimin
2026-08-04 21:22 ` Michael S. Tsirkin [this message]
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=20260804172230-mutt-send-email-mst@kernel.org \
--to=mst@redhat.com \
--cc=eperezma@redhat.com \
--cc=jasowangio@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=virtualization@lists.linux.dev \
--cc=xiongweimin@kylinos.cn \
--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
all inboxes | Powered by JetHome®