patch 'net/virtio: fix mbuf count on Rx queue setup' has been queued to stable release 19.11.11

christian.ehrhardt at canonical.com christian.ehrhardt at canonical.com
Tue Nov 30 17:33:51 CET 2021


Hi,

FYI, your patch has been queued to stable release 19.11.11

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before December 10th 2021. 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/cpaelzer/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/9fa5eea192721c30d506a7a41db30efbbf7176b0

Thanks.

Christian Ehrhardt <christian.ehrhardt at canonical.com>

---
>From 9fa5eea192721c30d506a7a41db30efbbf7176b0 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

[ 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 421e4847e7..b6a89d59e7 100644
--- a/drivers/net/virtio/virtio_rxtx.c
+++ b/drivers/net/virtio/virtio_rxtx.c
@@ -1040,10 +1040,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.34.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-30 16:50:07.672013998 +0100
+++ 0027-net-virtio-fix-mbuf-count-on-Rx-queue-setup.patch	2021-11-30 16:50:05.610872209 +0100
@@ -1 +1 @@
-From b8d0a27842dc2a90f1bf341d1e5cbf0dfbc7c4e5 Mon Sep 17 00:00:00 2001
+From 9fa5eea192721c30d506a7a41db30efbbf7176b0 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b8d0a27842dc2a90f1bf341d1e5cbf0dfbc7c4e5 ]
+
@@ -12 +13,0 @@
-Cc: stable at dpdk.org
@@ -22 +23 @@
-index d0365ce4bf..8a48fba5cc 100644
+index 421e4847e7..b6a89d59e7 100644
@@ -25 +26 @@
-@@ -768,10 +768,11 @@ virtio_dev_rx_queue_setup_finish(struct rte_eth_dev *dev, uint16_t queue_idx)
+@@ -1040,10 +1040,11 @@ virtio_dev_rx_queue_setup_finish(struct rte_eth_dev *dev, uint16_t queue_idx)


More information about the stable mailing list