[dpdk-stable] patch 'net/bnxt: enforce IO barrier for doorbell command' has been queued to LTS release 18.11.6

Kevin Traynor ktraynor at redhat.com
Tue Dec 3 19:26:36 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 12/10/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/a60ed73cd01caeaec580bedf3197e7a7b27f3bb2

Thanks.

Kevin.

---
>From a60ed73cd01caeaec580bedf3197e7a7b27f3bb2 Mon Sep 17 00:00:00 2001
From: Gavin Hu <gavin.hu at arm.com>
Date: Mon, 16 Sep 2019 19:27:18 +0800
Subject: [PATCH] net/bnxt: enforce IO barrier for doorbell command

[ upstream commit dda8e0e48723fc90e6222fcc1b04b94f240ae9b2 ]

The doorbell ringing operation requires a rte_io_mb immediately to make
the command complete and visible to the device before reading the
response, otherwise it may read stale or invalid responses.

Fixes: ca241d9a0952 ("net/bnxt: use I/O device memory read/write API")

Signed-off-by: Gavin Hu <gavin.hu at arm.com>
Acked-by: Ajit Khaparde <ajit.khaparde at broadcom.com>
---
 drivers/net/bnxt/bnxt_hwrm.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index 7e6209a55..a57e5cf36 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -121,4 +121,10 @@ static int bnxt_hwrm_send_message(struct bnxt *bp, void *msg,
 	bar = (uint8_t *)bp->bar0 + mb_trigger_offset;
 	rte_write32(1, bar);
+	/*
+	 * Make sure the channel doorbell ring command complete before
+	 * reading the response to avoid getting stale or invalid
+	 * responses.
+	 */
+	rte_io_mb();
 
 	/* Poll for the valid bit */
-- 
2.21.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-12-03 17:29:53.405272464 +0000
+++ 0027-net-bnxt-enforce-IO-barrier-for-doorbell-command.patch	2019-12-03 17:29:51.747750016 +0000
@@ -1 +1 @@
-From dda8e0e48723fc90e6222fcc1b04b94f240ae9b2 Mon Sep 17 00:00:00 2001
+From a60ed73cd01caeaec580bedf3197e7a7b27f3bb2 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit dda8e0e48723fc90e6222fcc1b04b94f240ae9b2 ]
+
@@ -11 +12,0 @@
-Cc: stable at dpdk.org
@@ -20 +21 @@
-index d7c33d21e..cdb6fa4f7 100644
+index 7e6209a55..a57e5cf36 100644
@@ -23 +24 @@
-@@ -147,4 +147,10 @@ static int bnxt_hwrm_send_message(struct bnxt *bp, void *msg,
+@@ -121,4 +121,10 @@ static int bnxt_hwrm_send_message(struct bnxt *bp, void *msg,



More information about the stable mailing list