[dpdk-stable] patch 'net/virtio: fix mbuf count on Rx queue setup' has been queued to stable release 20.11.4

Xueming Li xuemingl at nvidia.com
Wed Nov 10 07:28:53 CET 2021


Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. So 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://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/24ae55b075d60fe8e0f4196108238e35c0b49a8f

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From 24ae55b075d60fe8e0f4196108238e35c0b49a8f Mon Sep 17 00:00:00 2001
From: Ivan Ilchenko <ivan.ilchenko at oktetlabs.ru>
Date: Fri, 20 Aug 2021 15:47:20 +0300
Subject: [PATCH] net/virtio: fix mbuf count on Rx queue setup
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit b8d0a27842dc2a90f1bf341d1e5cbf0dfbc7c4e5 ]

Rx queue setup finish function may report wrong number of
allocated mbufs in case of in-order feature. Fix the
function to not ignore allocation error and count only
successfully allocated number of buffers.

Fixes: e5f456a98d3c ("net/virtio: support in-order Rx and Tx")

Signed-off-by: Ivan Ilchenko <ivan.ilchenko at oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <andrew.rybchenko at oktetlabs.ru>
Reviewed-by: Maxime Coquelin <maxime.coquelin at redhat.com>
---
 drivers/net/virtio/virtio_rxtx.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virtio_rxtx.c
index 6cfdfc63c2..b5b99d19f8 100644
--- a/drivers/net/virtio/virtio_rxtx.c
+++ b/drivers/net/virtio/virtio_rxtx.c
@@ -776,10 +776,11 @@ virtio_dev_rx_queue_setup_finish(struct rte_eth_dev *dev, uint16_t queue_idx)
 				if (unlikely(error)) {
 					for (i = 0; i < free_cnt; i++)
 						rte_pktmbuf_free(pkts[i]);
+				} else {
+					nbufs += free_cnt;
 				}
 			}
 
-			nbufs += free_cnt;
 			vq_update_avail_idx(vq);
 		}
 	} else {
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:04.290749180 +0800
+++ 0049-net-virtio-fix-mbuf-count-on-Rx-queue-setup.patch	2021-11-10 14:17:01.804079970 +0800
@@ -1 +1 @@
-From b8d0a27842dc2a90f1bf341d1e5cbf0dfbc7c4e5 Mon Sep 17 00:00:00 2001
+From 24ae55b075d60fe8e0f4196108238e35c0b49a8f Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit b8d0a27842dc2a90f1bf341d1e5cbf0dfbc7c4e5 ]
@@ -12 +14,0 @@
-Cc: stable at dpdk.org
@@ -22 +24 @@
-index d0365ce4bf..8a48fba5cc 100644
+index 6cfdfc63c2..b5b99d19f8 100644
@@ -25 +27 @@
-@@ -768,10 +768,11 @@ virtio_dev_rx_queue_setup_finish(struct rte_eth_dev *dev, uint16_t queue_idx)
+@@ -776,10 +776,11 @@ virtio_dev_rx_queue_setup_finish(struct rte_eth_dev *dev, uint16_t queue_idx)


More information about the stable mailing list