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

luca.boccassi at gmail.com luca.boccassi at gmail.com
Thu Dec 19 15:34:14 CET 2019


Hi,

FYI, your patch has been queued to LTS release 17.11.10

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/21/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.

Thanks.

Luca Boccassi

---
>From 6963f948b9281856e1b5f07377307090aa48d392 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 1a66dc3dbf..9e86c28b07 100644
--- a/drivers/net/fm10k/fm10k_rxtx_vec.c
+++ b/drivers/net/fm10k/fm10k_rxtx_vec.c
@@ -388,8 +388,15 @@ fm10k_rx_queue_release_mbufs_vec(struct fm10k_rx_queue *rxq)
 		return;
 
 	/* 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;
 
 	/* set all entries to NULL */
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-12-19 14:32:30.573730158 +0000
+++ 0107-net-fm10k-fix-mbuf-free-in-vector-Rx.patch	2019-12-19 14:32:26.245300601 +0000
@@ -1,13 +1,14 @@
-From 84fff3425b896a465a29b92a81aab563c07847cd Mon Sep 17 00:00:00 2001
+From 6963f948b9281856e1b5f07377307090aa48d392 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")
-Cc: stable at dpdk.org
 
 Signed-off-by: Xiao Wang <xiao.w.wang at intel.com>
 Signed-off-by: Anna Lukin <annal at silicom.co.il>
@@ -17,10 +18,10 @@
  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 45542bef30..d76dfd16fd 100644
+index 1a66dc3dbf..9e86c28b07 100644
 --- a/drivers/net/fm10k/fm10k_rxtx_vec.c
 +++ b/drivers/net/fm10k/fm10k_rxtx_vec.c
-@@ -359,8 +359,15 @@ fm10k_rx_queue_release_mbufs_vec(struct fm10k_rx_queue *rxq)
+@@ -388,8 +388,15 @@ fm10k_rx_queue_release_mbufs_vec(struct fm10k_rx_queue *rxq)
  		return;
  
  	/* free all mbufs that are valid in the ring */


More information about the stable mailing list