[dpdk-stable] patch 'net/bnxt: fix Rx buffer posting' has been queued to stable release 20.11.2

Xueming Li xuemingl at nvidia.com
Mon May 10 18:00:41 CEST 2021


Hi,

FYI, your patch has been queued to stable release 20.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 05/12/21. 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/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/b21daacf9276ae68625a2cf80ba02ba8ef831221

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From b21daacf9276ae68625a2cf80ba02ba8ef831221 Mon Sep 17 00:00:00 2001
From: Lance Richardson <lance.richardson at broadcom.com>
Date: Thu, 18 Mar 2021 15:52:13 -0400
Subject: [PATCH] net/bnxt: fix Rx buffer posting
Cc: Luca Boccassi <bluca at debian.org>

[ upstream commit bb4f70d275045647db78df48aa1f2456c37cf5fd ]

Remove early buffer posting logic from burst receive loop to address
several issues:
   - Posting receive descriptors without first posting completion
     entries risks overflowing the completion queue.
   - Posting receive descriptors without updating rx_raw_prod
     creates the possibility that the receive descriptor doorbell
     can be written twice with the same value.
   - Having this logic in the inner descriptor processing loop
     can impact performance.

Fixes: 637e34befd9c ("net/bnxt: optimize Rx processing")
Fixes: 04067844a3e9 ("net/bnxt: reduce CQ queue size without aggregation ring")

Signed-off-by: Lance Richardson <lance.richardson at broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde at broadcom.com>
---
 drivers/net/bnxt/bnxt_rxr.c | 3 ---
 drivers/net/bnxt/bnxt_rxr.h | 2 --
 2 files changed, 5 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c
index b28b7fb561..34de09fdc8 100644
--- a/drivers/net/bnxt/bnxt_rxr.c
+++ b/drivers/net/bnxt/bnxt_rxr.c
@@ -938,9 +938,6 @@ uint16_t bnxt_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
 		raw_cons = NEXT_RAW_CMP(raw_cons);
 		if (nb_rx_pkts == nb_pkts || nb_rep_rx_pkts == nb_pkts || evt)
 			break;
-		/* Post some Rx buf early in case of larger burst processing */
-		if (nb_rx_pkts == BNXT_RX_POST_THRESH)
-			bnxt_db_write(&rxr->rx_db, rxr->rx_prod);
 	}
 
 	cpr->cp_raw_cons = raw_cons;
diff --git a/drivers/net/bnxt/bnxt_rxr.h b/drivers/net/bnxt/bnxt_rxr.h
index 46c34e6e16..be5afcc8d1 100644
--- a/drivers/net/bnxt/bnxt_rxr.h
+++ b/drivers/net/bnxt/bnxt_rxr.h
@@ -37,8 +37,6 @@ static inline uint16_t bnxt_tpa_start_agg_id(struct bnxt *bp,
 #define BNXT_TPA_END_AGG_ID_TH(cmp) \
 	rte_le_to_cpu_16((cmp)->agg_id)
 
-#define BNXT_RX_POST_THRESH	32
-
 /* Number of descriptors to process per inner loop in vector mode. */
 #define RTE_BNXT_DESCS_PER_LOOP		4U
 
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:29.005180600 +0800
+++ 0093-net-bnxt-fix-Rx-buffer-posting.patch	2021-05-10 23:59:26.460000000 +0800
@@ -1 +1 @@
-From bb4f70d275045647db78df48aa1f2456c37cf5fd Mon Sep 17 00:00:00 2001
+From b21daacf9276ae68625a2cf80ba02ba8ef831221 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca at debian.org>
+
+[ upstream commit bb4f70d275045647db78df48aa1f2456c37cf5fd ]
@@ -18 +20,0 @@
-Cc: stable at dpdk.org
@@ -28 +30 @@
-index c72545ada7..7179c6cb30 100644
+index b28b7fb561..34de09fdc8 100644
@@ -31 +33 @@
-@@ -1018,9 +1018,6 @@ uint16_t bnxt_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
+@@ -938,9 +938,6 @@ uint16_t bnxt_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
@@ -37 +39 @@
--			bnxt_db_write(&rxr->rx_db, rxr->rx_raw_prod);
+-			bnxt_db_write(&rxr->rx_db, rxr->rx_prod);
@@ -42 +44 @@
-index a6fdd7767a..b43256e03e 100644
+index 46c34e6e16..be5afcc8d1 100644
@@ -45,3 +47,3 @@
-@@ -41,8 +41,6 @@ static inline uint16_t bnxt_tpa_start_agg_id(struct bnxt *bp,
- 	(((cmp)->agg_bufs_v1 & RX_PKT_CMPL_AGG_BUFS_MASK) >> \
- 		RX_PKT_CMPL_AGG_BUFS_SFT)
+@@ -37,8 +37,6 @@ static inline uint16_t bnxt_tpa_start_agg_id(struct bnxt *bp,
+ #define BNXT_TPA_END_AGG_ID_TH(cmp) \
+ 	rte_le_to_cpu_16((cmp)->agg_id)


More information about the stable mailing list