patch 'vhost: reset packets count when not ready' has been queued to stable release 23.11.4

Xueming Li xuemingl at nvidia.com
Tue Feb 18 13:34:00 CET 2025


Hi,

FYI, your patch has been queued to stable release 23.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
Please shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=d1e77f15819cfb99a5e655c0e36db6d3534efb21

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From d1e77f15819cfb99a5e655c0e36db6d3534efb21 Mon Sep 17 00:00:00 2001
From: Maxime Coquelin <maxime.coquelin at redhat.com>
Date: Thu, 16 Jan 2025 10:54:14 +0100
Subject: [PATCH] vhost: reset packets count when not ready
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit 8b96508af6021d868052545a76ef2ce5219b7702 ]

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

Signed-off-by: Maxime Coquelin <maxime.coquelin at redhat.com>
Reviewed-by: David Marchand <david.marchand at redhat.com>
Reviewed-by: Chenbo Xia <chenbox at nvidia.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 25adf94ffa..d81b518462 100644
--- a/lib/vhost/virtio_net.c
+++ b/lib/vhost/virtio_net.c
@@ -3601,6 +3601,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.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-02-18 19:39:00.932503295 +0800
+++ 0005-vhost-reset-packets-count-when-not-ready.patch	2025-02-18 19:39:00.408244086 +0800
@@ -1 +1 @@
-From 8b96508af6021d868052545a76ef2ce5219b7702 Mon Sep 17 00:00:00 2001
+From d1e77f15819cfb99a5e655c0e36db6d3534efb21 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 8b96508af6021d868052545a76ef2ce5219b7702 ]
@@ -12 +14,0 @@
-Cc: stable at dpdk.org
@@ -22 +24 @@
-index 2ac5bc29a3..d85c0c9d42 100644
+index 25adf94ffa..d81b518462 100644
@@ -25 +27 @@
-@@ -3632,6 +3632,8 @@ rte_vhost_dequeue_burst(int vid, uint16_t queue_id,
+@@ -3601,6 +3601,8 @@ rte_vhost_dequeue_burst(int vid, uint16_t queue_id,


More information about the stable mailing list