[dpdk-stable] patch 'net/bnxt: remove useless prefetches' has been queued to stable release 19.11.6

luca.boccassi at gmail.com luca.boccassi at gmail.com
Tue Nov 17 12:13:47 CET 2020


Hi,

FYI, your patch has been queued to stable release 19.11.6

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

Thanks.

Luca Boccassi

---
>From 59e5c312456c883711f0f629beb818779b6912a7 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen at networkplumber.org>
Date: Wed, 4 Nov 2020 09:03:10 -0800
Subject: [PATCH] net/bnxt: remove useless prefetches

[ upstream commit 1ef8c6290c86caef6cc588c8737450383a59338a ]

Prefetching only helps performance if it is done several 100
instructions before the actual use. The purpose of the prefetch
is to read ahead, it doesn't help if the next instruction
will block.

The code in the bnxt driver was doing these unnecessary prefetches.

Fixes: 2eb53b134aae ("net/bnxt: add initial Rx code")

Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
Acked-by: Lance Richardson <lance.richardson at broadcom.com>
Acked-by: Ajit Khaparde <ajit.khaparde at broadcom.com>
---
 drivers/net/bnxt/bnxt_rxr.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c
index 136f0a2742..5271d02366 100644
--- a/drivers/net/bnxt/bnxt_rxr.c
+++ b/drivers/net/bnxt/bnxt_rxr.c
@@ -301,7 +301,6 @@ static inline struct rte_mbuf *bnxt_tpa_end(
 	mbuf = tpa_info->mbuf;
 	RTE_ASSERT(mbuf != NULL);
 
-	rte_prefetch0(mbuf);
 	if (agg_bufs) {
 		bnxt_rx_pages(rxq, mbuf, raw_cp_cons, agg_bufs, tpa_info);
 	}
@@ -475,8 +474,6 @@ static int bnxt_rx_pkt(struct rte_mbuf **rx_pkt,
 	if (mbuf == NULL)
 		return -EBUSY;
 
-	rte_prefetch0(mbuf);
-
 	mbuf->data_off = RTE_PKTMBUF_HEADROOM;
 	mbuf->nb_segs = 1;
 	mbuf->next = NULL;
@@ -625,7 +622,6 @@ uint16_t bnxt_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
 	/* Handle RX burst request */
 	while (1) {
 		cons = RING_CMP(cpr->cp_ring_struct, raw_cons);
-		rte_prefetch0(&cpr->cp_desc_ring[cons]);
 		rxcmp = (struct rx_pkt_cmpl *)&cpr->cp_desc_ring[cons];
 
 		if (!CMP_VALID(rxcmp, raw_cons, cpr->cp_ring_struct))
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-17 11:13:13.527322715 +0000
+++ 0013-net-bnxt-remove-useless-prefetches.patch	2020-11-17 11:13:12.877115723 +0000
@@ -1 +1 @@
-From 1ef8c6290c86caef6cc588c8737450383a59338a Mon Sep 17 00:00:00 2001
+From 59e5c312456c883711f0f629beb818779b6912a7 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 1ef8c6290c86caef6cc588c8737450383a59338a ]
+
@@ -14 +15,0 @@
-Cc: stable at dpdk.org
@@ -24 +25 @@
-index e375b31ed8..fdbe6f71ea 100644
+index 136f0a2742..5271d02366 100644
@@ -27 +28 @@
-@@ -306,7 +306,6 @@ static inline struct rte_mbuf *bnxt_tpa_end(
+@@ -301,7 +301,6 @@ static inline struct rte_mbuf *bnxt_tpa_end(
@@ -35 +36 @@
-@@ -734,8 +733,6 @@ static int bnxt_rx_pkt(struct rte_mbuf **rx_pkt,
+@@ -475,8 +474,6 @@ static int bnxt_rx_pkt(struct rte_mbuf **rx_pkt,
@@ -44 +45 @@
-@@ -867,7 +864,6 @@ uint16_t bnxt_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
+@@ -625,7 +622,6 @@ uint16_t bnxt_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,


More information about the stable mailing list