[dpdk-stable] patch 'net/nfp: fix barrier location' has been queued to LTS release 17.11.2

Yuanhan Liu yliu at fridaylinux.org
Sun Apr 22 17:09:09 CEST 2018


Hi,

FYI, your patch has been queued to LTS release 17.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 04/29/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 55c8d97724452f28558438ef6dafb2ff7d0c152c Mon Sep 17 00:00:00 2001
From: Alejandro Lucero <alejandro.lucero at netronome.com>
Date: Thu, 22 Feb 2018 11:30:39 +0000
Subject: [PATCH] net/nfp: fix barrier location

[ upstream commit f598e1a2d0e29293b924119c1b3cdd4e16756e95 ]

The barrier needs to be after reading the DD bit. It has not been
a problem because the potential reads which can not happen before
reading the DD bit seem to be far enough, so the compiler is not
rescheduling them. However, a refactoring could make this problem
to arise.

Fixes: b812daadad0d ("nfp: add Rx and Tx")

Signed-off-by: Alejandro Lucero <alejandro.lucero at netronome.com>
---
 drivers/net/nfp/nfp_net.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c
index f633a8df5..3cc3da6ee 100644
--- a/drivers/net/nfp/nfp_net.c
+++ b/drivers/net/nfp/nfp_net.c
@@ -1995,16 +1995,16 @@ nfp_net_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
 			break;
 		}
 
+		rxds = &rxq->rxds[rxq->rd_p];
+		if ((rxds->rxd.meta_len_dd & PCIE_DESC_RX_DD) == 0)
+			break;
+
 		/*
 		 * Memory barrier to ensure that we won't do other
 		 * reads before the DD bit.
 		 */
 		rte_rmb();
 
-		rxds = &rxq->rxds[rxq->rd_p];
-		if ((rxds->rxd.meta_len_dd & PCIE_DESC_RX_DD) == 0)
-			break;
-
 		/*
 		 * We got a packet. Let's alloc a new mbuff for refilling the
 		 * free descriptor ring as soon as possible
-- 
2.11.0



More information about the stable mailing list