[dpdk-stable] patch 'raw/ntb: fix write memory barrier' has been queued to stable release 19.11.1
luca.boccassi at gmail.com
luca.boccassi at gmail.com
Tue Feb 11 12:20:55 CET 2020
Hi,
FYI, your patch has been queued to stable release 19.11.1
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/13/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.
Thanks.
Luca Boccassi
---
>From 87e011e6ea1136a369c30763d5dcf331e51c5be5 Mon Sep 17 00:00:00 2001
From: Xiaoyun Li <xiaoyun.li at intel.com>
Date: Wed, 4 Dec 2019 23:19:16 +0800
Subject: [PATCH] raw/ntb: fix write memory barrier
[ upstream commit 657cd1370dccf15d8d61e49b7e751ccc7ae6a29b ]
All buffers and ring info should be written before tail register update.
This patch relocates the write memory barrier before updating tail register
to avoid potential issues.
Fixes: 11b5c7daf019 ("raw/ntb: add enqueue and dequeue functions")
Signed-off-by: Xiaoyun Li <xiaoyun.li at intel.com>
Reviewed-by: Gavin Hu <gavin.hu at arm.com>
Acked-by: Jingjing Wu <jingjing.wu at intel.com>
---
drivers/raw/ntb/ntb.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/raw/ntb/ntb.c b/drivers/raw/ntb/ntb.c
index ad7f6abfd3..dd0b72f8c5 100644
--- a/drivers/raw/ntb/ntb.c
+++ b/drivers/raw/ntb/ntb.c
@@ -683,8 +683,8 @@ end_of_tx:
sizeof(struct ntb_used) * nb1);
rte_memcpy(txq->tx_used_ring, tx_used + nb1,
sizeof(struct ntb_used) * nb2);
+ rte_wmb();
*txq->used_cnt = txq->last_used;
- rte_wmb();
/* update queue stats */
hw->ntb_xstats[NTB_TX_BYTES_ID + off] += bytes;
@@ -789,8 +789,8 @@ end_of_rx:
sizeof(struct ntb_desc) * nb1);
rte_memcpy(rxq->rx_desc_ring, rx_desc + nb1,
sizeof(struct ntb_desc) * nb2);
+ rte_wmb();
*rxq->avail_cnt = rxq->last_avail;
- rte_wmb();
/* update queue stats */
off = NTB_XSTATS_NUM * ((size_t)context + 1);
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:42.605694771 +0000
+++ 0109-raw-ntb-fix-write-memory-barrier.patch 2020-02-11 11:17:38.576004638 +0000
@@ -1,14 +1,15 @@
-From 657cd1370dccf15d8d61e49b7e751ccc7ae6a29b Mon Sep 17 00:00:00 2001
+From 87e011e6ea1136a369c30763d5dcf331e51c5be5 Mon Sep 17 00:00:00 2001
From: Xiaoyun Li <xiaoyun.li at intel.com>
Date: Wed, 4 Dec 2019 23:19:16 +0800
Subject: [PATCH] raw/ntb: fix write memory barrier
+[ upstream commit 657cd1370dccf15d8d61e49b7e751ccc7ae6a29b ]
+
All buffers and ring info should be written before tail register update.
This patch relocates the write memory barrier before updating tail register
to avoid potential issues.
Fixes: 11b5c7daf019 ("raw/ntb: add enqueue and dequeue functions")
-Cc: stable at dpdk.org
Signed-off-by: Xiaoyun Li <xiaoyun.li at intel.com>
Reviewed-by: Gavin Hu <gavin.hu at arm.com>
More information about the stable
mailing list