patches for DPDK stable branches
 help / color / mirror / Atom feed
* [PATCH v3 1/3] vhost: fix missing packets count reset when not ready
       [not found] <20250116095416.3655699-1-maxime.coquelin@redhat.com>
@ 2025-01-16  9:54 ` Maxime Coquelin
  2025-01-16 10:10   ` David Marchand
  2025-01-16 12:14   ` Chenbo Xia
  0 siblings, 2 replies; 3+ messages in thread
From: Maxime Coquelin @ 2025-01-16  9:54 UTC (permalink / raw)
  To: dev, david.marchand, chenbox; +Cc: Maxime Coquelin, stable

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v3 1/3] vhost: fix missing packets count reset when not ready
  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
  1 sibling, 0 replies; 3+ messages in thread
From: David Marchand @ 2025-01-16 10:10 UTC (permalink / raw)
  To: Maxime Coquelin; +Cc: dev, chenbox, stable

On Thu, Jan 16, 2025 at 10:54 AM Maxime Coquelin
<maxime.coquelin@redhat.com> wrote:
>
> 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>

Reviewed-by: David Marchand <david.marchand@redhat.com>


-- 
David Marchand


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v3 1/3] vhost: fix missing packets count reset when not ready
  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
  1 sibling, 0 replies; 3+ messages in thread
From: Chenbo Xia @ 2025-01-16 12:14 UTC (permalink / raw)
  To: Maxime Coquelin; +Cc: dev, david.marchand, stable



> 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>


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-01-16 12:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20250116095416.3655699-1-maxime.coquelin@redhat.com>
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 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).