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

luca.boccassi at gmail.com luca.boccassi at gmail.com
Mon Mar 18 16:38:57 CET 2024


Hi,

FYI, your patch has been queued to stable release 22.11.5

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

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/fd262a1e35203a71035baa9374a3fe05362bbedc

Thanks.

Luca Boccassi

---
>From fd262a1e35203a71035baa9374a3fe05362bbedc 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

[ 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 7345e480f8..2c4e3505d0 100644
--- a/drivers/net/ena/ena_ethdev.c
+++ b/drivers/net/ena/ena_ethdev.c
@@ -3030,8 +3030,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;
@@ -3100,8 +3099,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.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-18 12:58:39.558767567 +0000
+++ 0007-net-ena-fix-fast-mbuf-free.patch	2024-03-18 12:58:39.103344447 +0000
@@ -1 +1 @@
-From 89b081e154c5f81295014fd8b5b32193dd01b9cb Mon Sep 17 00:00:00 2001
+From fd262a1e35203a71035baa9374a3fe05362bbedc Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 89b081e154c5f81295014fd8b5b32193dd01b9cb ]
+
@@ -16 +17,0 @@
-Cc: stable at dpdk.org
@@ -25 +26 @@
-index 3157237c0d..537ee9f8c3 100644
+index 7345e480f8..2c4e3505d0 100644
@@ -28 +29 @@
-@@ -3122,8 +3122,7 @@ ena_tx_cleanup_mbuf_fast(struct rte_mbuf **mbufs_to_clean,
+@@ -3030,8 +3030,7 @@ ena_tx_cleanup_mbuf_fast(struct rte_mbuf **mbufs_to_clean,
@@ -38 +39 @@
-@@ -3191,8 +3190,7 @@ static int ena_tx_cleanup(void *txp, uint32_t free_pkt_cnt)
+@@ -3100,8 +3099,7 @@ static int ena_tx_cleanup(void *txp, uint32_t free_pkt_cnt)


More information about the stable mailing list