patch 'net/ena: fix fast mbuf free' has been queued to stable release 23.11.1

Xueming Li xuemingl at nvidia.com
Sat Apr 13 14:49:23 CEST 2024


Hi,

FYI, your patch has been queued to stable release 23.11.1

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 04/15/24. 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://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=2fa8497bd30eb130c45d8e6f3538f8e50b4102c2

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From 2fa8497bd30eb130c45d8e6f3538f8e50b4102c2 Mon Sep 17 00:00:00 2001
From: Shai Brandes <shaibran at amazon.com>
Date: Tue, 12 Mar 2024 20:06:50 +0200
Subject: [PATCH] net/ena: fix fast mbuf free
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit 89b081e154c5f81295014fd8b5b32193dd01b9cb ]

In case the application enables fast mbuf release optimization,
the driver releases 256 TX mbufs in bulk upon reaching the
TX free threshold.
The existing implementation utilizes rte_mempool_put_bulk for bulk
freeing TXs, which exclusively supports direct mbufs.
In case the application transmits indirect bufs, the driver must
also decrement the mbuf reference count and unlink the mbuf segment.
For such case, the driver should employ rte_pktmbuf_free_bulk.

Fixes: c339f53823f3 ("net/ena: support fast mbuf free")

Signed-off-by: Shai Brandes <shaibran at amazon.com>
Reviewed-by: Amit Bernstein <amitbern at amazon.com>
---
 drivers/net/ena/ena_ethdev.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
index dc846d2e84..1e138849cc 100644
--- a/drivers/net/ena/ena_ethdev.c
+++ b/drivers/net/ena/ena_ethdev.c
@@ -3117,8 +3117,7 @@ ena_tx_cleanup_mbuf_fast(struct rte_mbuf **mbufs_to_clean,
 		m_next = mbuf->next;
 		mbufs_to_clean[mbuf_cnt++] = mbuf;
 		if (mbuf_cnt == buf_size) {
-			rte_mempool_put_bulk(mbufs_to_clean[0]->pool, (void **)mbufs_to_clean,
-				(unsigned int)mbuf_cnt);
+			rte_pktmbuf_free_bulk(mbufs_to_clean, mbuf_cnt);
 			mbuf_cnt = 0;
 		}
 		mbuf = m_next;
@@ -3186,8 +3185,7 @@ static int ena_tx_cleanup(void *txp, uint32_t free_pkt_cnt)
 	}
 
 	if (mbuf_cnt != 0)
-		rte_mempool_put_bulk(mbufs_to_clean[0]->pool,
-			(void **)mbufs_to_clean, mbuf_cnt);
+		rte_pktmbuf_free_bulk(mbufs_to_clean, mbuf_cnt);
 
 	/* Notify completion handler that full cleanup was performed */
 	if (free_pkt_cnt == 0 || total_tx_pkts < cleanup_budget)
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-04-13 20:43:07.531356222 +0800
+++ 0083-net-ena-fix-fast-mbuf-free.patch	2024-04-13 20:43:05.037753879 +0800
@@ -1 +1 @@
-From 89b081e154c5f81295014fd8b5b32193dd01b9cb Mon Sep 17 00:00:00 2001
+From 2fa8497bd30eb130c45d8e6f3538f8e50b4102c2 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 89b081e154c5f81295014fd8b5b32193dd01b9cb ]
@@ -16 +18,0 @@
-Cc: stable at dpdk.org
@@ -25 +27 @@
-index 3157237c0d..537ee9f8c3 100644
+index dc846d2e84..1e138849cc 100644
@@ -28 +30 @@
-@@ -3122,8 +3122,7 @@ ena_tx_cleanup_mbuf_fast(struct rte_mbuf **mbufs_to_clean,
+@@ -3117,8 +3117,7 @@ ena_tx_cleanup_mbuf_fast(struct rte_mbuf **mbufs_to_clean,
@@ -38 +40 @@
-@@ -3191,8 +3190,7 @@ static int ena_tx_cleanup(void *txp, uint32_t free_pkt_cnt)
+@@ -3186,8 +3185,7 @@ static int ena_tx_cleanup(void *txp, uint32_t free_pkt_cnt)


More information about the stable mailing list