From: Chenbo Xia <chenbox@nvidia.com>
To: Maxime Coquelin <maxime.coquelin@redhat.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
"david.marchand@redhat.com" <david.marchand@redhat.com>,
"stable@dpdk.org" <stable@dpdk.org>
Subject: Re: [PATCH v3 1/3] vhost: fix missing packets count reset when not ready
Date: Thu, 16 Jan 2025 12:14:58 +0000 [thread overview]
Message-ID: <BD6CC8B1-AE42-4ADA-90F7-C6FC594B4166@nvidia.com> (raw)
In-Reply-To: <20250116095416.3655699-2-maxime.coquelin@redhat.com>
> On Jan 16, 2025, at 17:54, Maxime Coquelin <maxime.coquelin@redhat.com> wrote:
>
> External email: Use caution opening links or attachments
>
>
> This patch fixes the rte_vhost_dequeue_burst return value
> when the virtqueue is not ready. Without it, a discrepancy
> between the packet array and its size is faced by the caller
> of this API when the virtqueue is not ready.
>
> Fixes: 9fc93a1e2320 ("vhost: fix virtqueue access check in datapath")
> Cc: stable@dpdk.org
>
> Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
> ---
> lib/vhost/virtio_net.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/lib/vhost/virtio_net.c b/lib/vhost/virtio_net.c
> index 69901ab3b5..a340e5a772 100644
> --- a/lib/vhost/virtio_net.c
> +++ b/lib/vhost/virtio_net.c
> @@ -3629,6 +3629,8 @@ rte_vhost_dequeue_burst(int vid, uint16_t queue_id,
> rte_rwlock_read_unlock(&vq->access_lock);
>
> virtio_dev_vring_translate(dev, vq);
> +
> + count = 0;
> goto out_no_unlock;
> }
>
> --
> 2.47.1
>
Reviewed-by: Chenbo Xia <chenbox@nvidia.com>
next prev parent reply other threads:[~2025-01-16 12:15 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-16 9:54 [PATCH v3 0/3] vhost: fix and improve dequeue error path Maxime Coquelin
2025-01-16 9:54 ` [PATCH v3 1/3] vhost: fix missing packets count reset when not ready Maxime Coquelin
2025-01-16 10:10 ` David Marchand
2025-01-16 12:14 ` Chenbo Xia [this message]
2025-01-16 9:54 ` [PATCH v3 2/3] vhost: rework dequeue paths error handling Maxime Coquelin
2025-01-16 10:10 ` David Marchand
2025-01-16 12:15 ` Chenbo Xia
2025-01-16 9:54 ` [PATCH v3 3/3] vhost: improve RARP handling in dequeue paths Maxime Coquelin
2025-01-16 10:12 ` David Marchand
2025-01-16 12:15 ` Chenbo Xia
2025-01-16 13:08 ` David Marchand
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=BD6CC8B1-AE42-4ADA-90F7-C6FC594B4166@nvidia.com \
--to=chenbox@nvidia.com \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=maxime.coquelin@redhat.com \
--cc=stable@dpdk.org \
/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).