[dpdk-stable] patch 'net/fm10k: fix mbuf free in vector Rx' has been queued to LTS release 18.11.6

Kevin Traynor ktraynor at redhat.com
Tue Dec 10 15:59:34 CET 2019


Hi,

FYI, your patch has been queued to LTS release 18.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/16/19. 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/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/6f0f144c7c71253546580db6fceb3f0bd06de70a

Thanks.

Kevin.

---
>From 6f0f144c7c71253546580db6fceb3f0bd06de70a Mon Sep 17 00:00:00 2001
From: Xiao Wang <xiao.w.wang at intel.com>
Date: Fri, 25 Oct 2019 20:33:22 -0400
Subject: [PATCH] net/fm10k: fix mbuf free in vector Rx

[ upstream commit 84fff3425b896a465a29b92a81aab563c07847cd ]

There's a corner case that all the Rx queue mbufs are allocated but none
of them is used, this patch fixes mbuf free for this case.

Fixes: b6719f8a04bb ("fm10k: release mbuf for vector Rx")

Signed-off-by: Xiao Wang <xiao.w.wang at intel.com>
Signed-off-by: Anna Lukin <annal at silicom.co.il>
Reviewed-by: Xiaolong Ye <xiaolong.ye at intel.com>
---
 drivers/net/fm10k/fm10k_rxtx_vec.c | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/drivers/net/fm10k/fm10k_rxtx_vec.c b/drivers/net/fm10k/fm10k_rxtx_vec.c
index 45542bef3..d76dfd16f 100644
--- a/drivers/net/fm10k/fm10k_rxtx_vec.c
+++ b/drivers/net/fm10k/fm10k_rxtx_vec.c
@@ -360,6 +360,13 @@ fm10k_rx_queue_release_mbufs_vec(struct fm10k_rx_queue *rxq)
 
 	/* free all mbufs that are valid in the ring */
-	for (i = rxq->next_dd; i != rxq->rxrearm_start; i = (i + 1) & mask)
-		rte_pktmbuf_free_seg(rxq->sw_ring[i]);
+	if (rxq->rxrearm_nb == 0) {
+		for (i = 0; i < rxq->nb_desc; i++)
+			if (rxq->sw_ring[i] != NULL)
+				rte_pktmbuf_free_seg(rxq->sw_ring[i]);
+	} else {
+		for (i = rxq->next_dd; i != rxq->rxrearm_start;
+				i = (i + 1) & mask)
+			rte_pktmbuf_free_seg(rxq->sw_ring[i]);
+	}
 	rxq->rxrearm_nb = rxq->nb_desc;
 
-- 
2.21.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-12-10 14:49:43.023441154 +0000
+++ 0060-net-fm10k-fix-mbuf-free-in-vector-Rx.patch	2019-12-10 14:49:39.102456835 +0000
@@ -1 +1 @@
-From 84fff3425b896a465a29b92a81aab563c07847cd Mon Sep 17 00:00:00 2001
+From 6f0f144c7c71253546580db6fceb3f0bd06de70a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 84fff3425b896a465a29b92a81aab563c07847cd ]
+
@@ -10 +11,0 @@
-Cc: stable at dpdk.org



More information about the stable mailing list