[dpdk-stable] patch 'net/e1000: fix memory barrier usage in Tx' has been queued to LTS release 18.11.6

Kevin Traynor ktraynor at redhat.com
Fri Nov 22 15:41:31 CET 2019


Hi,

FYI, your patch has been queued to LTS release 18.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/29/19. 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-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/29152383a7bf8a055bf83c63da435337f9d681b3

Thanks.

Kevin.

---
>From 29152383a7bf8a055bf83c63da435337f9d681b3 Mon Sep 17 00:00:00 2001
From: Xiao Zhang <xiao.zhang at intel.com>
Date: Wed, 11 Sep 2019 01:41:18 +0800
Subject: [PATCH] net/e1000: fix memory barrier usage in Tx

[ upstream commit d6956e92390c8fb2fcbd0f3363169b88a012154c]

Use rte_cio_wmb instead of rte_wmb when writing TX descriptor since it's
CIO memory.
Replace rte_io_wmb and E1000_PCI_REG_WRITE_RELAXED with
E1000_PCI_REG_WRITE since it has rte_io_wmb inside, which will be more
clear.

Fixes: 1fc9701238ed ("net/e1000: fix i219 hang on reset/close")

Signed-off-by: Xiao Zhang <xiao.zhang at intel.com>
Reviewed-by: Gavin Hu <gavin.hu at arm.com>
Reviewed-by: Xiaolong Ye <xiaolong.ye at intel.com>
---
 drivers/net/e1000/em_rxtx.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/net/e1000/em_rxtx.c b/drivers/net/e1000/em_rxtx.c
index 951d1642c..322c98422 100644
--- a/drivers/net/e1000/em_rxtx.c
+++ b/drivers/net/e1000/em_rxtx.c
@@ -2050,11 +2050,10 @@ e1000_flush_tx_ring(struct rte_eth_dev *dev)
 		tx_desc->upper.data = 0;
 
-		rte_wmb();
+		rte_cio_wmb();
 		txq->tx_tail++;
 		if (txq->tx_tail == txq->nb_tx_desc)
 			txq->tx_tail = 0;
-		rte_io_wmb();
 		tdt_reg_addr = E1000_PCI_REG_ADDR(hw, E1000_TDT(i));
-		E1000_PCI_REG_WRITE_RELAXED(tdt_reg_addr, txq->tx_tail);
+		E1000_PCI_REG_WRITE(tdt_reg_addr, txq->tx_tail);
 		usec_delay(250);
 	}
-- 
2.21.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-11-22 14:36:57.594255630 +0000
+++ 0045-net-e1000-fix-memory-barrier-usage-in-Tx.patch	2019-11-22 14:36:55.233148517 +0000
@@ -0,0 +1,43 @@
+From 29152383a7bf8a055bf83c63da435337f9d681b3 Mon Sep 17 00:00:00 2001
+From: Xiao Zhang <xiao.zhang at intel.com>
+Date: Wed, 11 Sep 2019 01:41:18 +0800
+Subject: [PATCH] net/e1000: fix memory barrier usage in Tx
+
+[ upstream commit d6956e92390c8fb2fcbd0f3363169b88a012154c]
+
+Use rte_cio_wmb instead of rte_wmb when writing TX descriptor since it's
+CIO memory.
+Replace rte_io_wmb and E1000_PCI_REG_WRITE_RELAXED with
+E1000_PCI_REG_WRITE since it has rte_io_wmb inside, which will be more
+clear.
+
+Fixes: 1fc9701238ed ("net/e1000: fix i219 hang on reset/close")
+
+Signed-off-by: Xiao Zhang <xiao.zhang at intel.com>
+Reviewed-by: Gavin Hu <gavin.hu at arm.com>
+Reviewed-by: Xiaolong Ye <xiaolong.ye at intel.com>
+---
+ drivers/net/e1000/em_rxtx.c | 5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
+
+diff --git a/drivers/net/e1000/em_rxtx.c b/drivers/net/e1000/em_rxtx.c
+index 951d1642c..322c98422 100644
+--- a/drivers/net/e1000/em_rxtx.c
++++ b/drivers/net/e1000/em_rxtx.c
+@@ -2050,11 +2050,10 @@ e1000_flush_tx_ring(struct rte_eth_dev *dev)
+ 		tx_desc->upper.data = 0;
+ 
+-		rte_wmb();
++		rte_cio_wmb();
+ 		txq->tx_tail++;
+ 		if (txq->tx_tail == txq->nb_tx_desc)
+ 			txq->tx_tail = 0;
+-		rte_io_wmb();
+ 		tdt_reg_addr = E1000_PCI_REG_ADDR(hw, E1000_TDT(i));
+-		E1000_PCI_REG_WRITE_RELAXED(tdt_reg_addr, txq->tx_tail);
++		E1000_PCI_REG_WRITE(tdt_reg_addr, txq->tx_tail);
+ 		usec_delay(250);
+ 	}
+-- 
+2.21.0
+



More information about the stable mailing list