patch 'net/mana: do not ring short doorbell for every mbuf alloc' has been queued to stable release 24.11.2
Kevin Traynor
ktraynor at redhat.com
Thu Feb 13 10:58:23 CET 2025
Hi,
FYI, your patch has been queued to stable release 24.11.2
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/17/25. 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
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/a40425158c1f36cdd57a3161ae6db9ef4ad63a10
Thanks.
Kevin
---
>From a40425158c1f36cdd57a3161ae6db9ef4ad63a10 Mon Sep 17 00:00:00 2001
From: Wei Hu <weh at microsoft.com>
Date: Thu, 6 Feb 2025 02:07:43 -0800
Subject: [PATCH] net/mana: do not ring short doorbell for every mbuf alloc
[ upstream commit 4e6a273d60c766a3697935319cf5bb00bd330704 ]
In the 32bit rx path, it rings short doorbell after receiving
one packet and allocating the new mbuf. This significantly
impacts the rx performance. Fix this problem by ringing the
short doorbell in batch.
Fixes: eeb37809601b ("net/mana: use bulk mbuf allocation for Rx WQEs")
Signed-off-by: Wei Hu <weh at microsoft.com>
---
drivers/net/mana/rx.c | 30 ++++--------------------------
1 file changed, 4 insertions(+), 26 deletions(-)
diff --git a/drivers/net/mana/rx.c b/drivers/net/mana/rx.c
index 0c26702b73..f196d43aee 100644
--- a/drivers/net/mana/rx.c
+++ b/drivers/net/mana/rx.c
@@ -122,4 +122,8 @@ mana_alloc_and_post_rx_wqes(struct mana_rxq *rxq, uint32_t count)
struct rte_mbuf *mbufs[MANA_MBUF_BULK];
+#ifdef RTE_ARCH_32
+ rxq->wqe_cnt_to_short_db = 0;
+#endif
+
more_mbufs:
batch_count = RTE_MIN(count, MANA_MBUF_BULK);
@@ -133,7 +137,4 @@ more_mbufs:
}
-#ifdef RTE_ARCH_32
- rxq->wqe_cnt_to_short_db = 0;
-#endif
for (i = 0; i < batch_count; i++) {
ret = mana_post_rx_wqe(rxq, mbufs[i]);
@@ -449,8 +450,4 @@ mana_rx_burst(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t pkts_n)
int polled = 0;
-#ifdef RTE_ARCH_32
- rxq->wqe_cnt_to_short_db = 0;
-#endif
-
repoll:
/* Polling on new completions if we have no backlog */
@@ -571,23 +568,4 @@ drop:
if (pkt_received == pkts_n)
break;
-
-#ifdef RTE_ARCH_32
- /* Always post WQE as soon as it's consumed for short DB */
- ret = mana_alloc_and_post_rx_wqes(rxq, wqe_consumed);
- if (ret) {
- DRV_LOG(ERR, "failed to post %d WQEs, ret %d",
- wqe_consumed, ret);
- return pkt_received;
- }
- wqe_consumed = 0;
-
- /* Ring short doorbell if approaching the wqe increment
- * limit.
- */
- if (rxq->wqe_cnt_to_short_db > RX_WQE_SHORT_DB_THRESHOLD) {
- mana_rq_ring_doorbell(rxq);
- rxq->wqe_cnt_to_short_db = 0;
- }
-#endif
}
--
2.48.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-02-12 17:29:40.485225668 +0000
+++ 0056-net-mana-do-not-ring-short-doorbell-for-every-mbuf-a.patch 2025-02-12 17:29:34.363946007 +0000
@@ -1 +1 @@
-From 4e6a273d60c766a3697935319cf5bb00bd330704 Mon Sep 17 00:00:00 2001
+From a40425158c1f36cdd57a3161ae6db9ef4ad63a10 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 4e6a273d60c766a3697935319cf5bb00bd330704 ]
+
@@ -12 +13,0 @@
-Cc: stable at dpdk.org
More information about the stable
mailing list