[dpdk-stable] patch 'net/bnx2x: fix DMAE timeout' has been queued to LTS release 18.11.2
Kevin Traynor
ktraynor at redhat.com
Wed May 8 12:14:46 CEST 2019
Hi,
FYI, your patch has been queued to LTS release 18.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 05/13/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/bd288e305328130df81326c426b72cace4eaf4fd
Thanks.
Kevin Traynor
---
>From bd288e305328130df81326c426b72cace4eaf4fd Mon Sep 17 00:00:00 2001
From: Shahed Shaikh <shshaikh at marvell.com>
Date: Thu, 11 Apr 2019 18:47:40 -0700
Subject: [PATCH] net/bnx2x: fix DMAE timeout
[ upstream commit e166e0db8cf6c0e391a40f1a75a678bec930c970 ]
In some cases, DPDK application may send packets
while PMD is going through load or unload flow.
This causes firmware to access invalid/unallocated
memory to process transmit buffer. Which results in
error on PCI bus and chip further blocks access to host,
causing a DMAE timeout.
Fix this issue by installing dummy empty transmit and receive
handlers at the beginning of unload path (rte_eth_dev_stop())
and install actual transmit and receive handlers after successful
load of the PMD port (rte_eth_dev_start()). This way, application
won't be able to send packets while device is going through
load/unload flow.
Fixes: 540a211084a7 ("bnx2x: driver core")
Signed-off-by: Shahed Shaikh <shshaikh at marvell.com>
---
drivers/net/bnx2x/bnx2x_ethdev.c | 9 ++++-----
drivers/net/bnx2x/bnx2x_rxtx.c | 21 ++++++++++++++++-----
drivers/net/bnx2x/bnx2x_rxtx.h | 3 ++-
3 files changed, 22 insertions(+), 11 deletions(-)
diff --git a/drivers/net/bnx2x/bnx2x_ethdev.c b/drivers/net/bnx2x/bnx2x_ethdev.c
index d5328e8d9..fb44a71f2 100644
--- a/drivers/net/bnx2x/bnx2x_ethdev.c
+++ b/drivers/net/bnx2x/bnx2x_ethdev.c
@@ -213,4 +213,5 @@ bnx2x_dev_configure(struct rte_eth_dev *dev)
}
+ bnx2x_dev_rxtx_init_dummy(dev);
return 0;
}
@@ -242,9 +243,5 @@ bnx2x_dev_start(struct rte_eth_dev *dev)
}
- ret = bnx2x_dev_rx_init(dev);
- if (ret != 0) {
- PMD_DRV_LOG(DEBUG, sc, "bnx2x_dev_rx_init returned error code");
- return -3;
- }
+ bnx2x_dev_rxtx_init(dev);
bnx2x_print_device_info(sc);
@@ -261,4 +258,6 @@ bnx2x_dev_stop(struct rte_eth_dev *dev)
PMD_INIT_FUNC_TRACE(sc);
+ bnx2x_dev_rxtx_init_dummy(dev);
+
if (IS_PF(sc)) {
rte_intr_disable(&sc->pci_dev->intr_handle);
diff --git a/drivers/net/bnx2x/bnx2x_rxtx.c b/drivers/net/bnx2x/bnx2x_rxtx.c
index ca28aaccf..e5a2b25b5 100644
--- a/drivers/net/bnx2x/bnx2x_rxtx.c
+++ b/drivers/net/bnx2x/bnx2x_rxtx.c
@@ -312,5 +312,4 @@ bnx2x_dev_tx_queue_setup(struct rte_eth_dev *dev,
txq->tx_bd_head = 0;
txq->nb_tx_avail = txq->nb_tx_desc;
- dev->tx_pkt_burst = bnx2x_xmit_pkts;
dev->data->tx_queues[queue_idx] = txq;
if (!sc->tx_queues) sc->tx_queues = dev->data->tx_queues;
@@ -442,10 +441,22 @@ next_rx:
}
-int
-bnx2x_dev_rx_init(struct rte_eth_dev *dev)
+static uint16_t
+bnx2x_rxtx_pkts_dummy(__rte_unused void *p_rxq,
+ __rte_unused struct rte_mbuf **rx_pkts,
+ __rte_unused uint16_t nb_pkts)
+{
+ return 0;
+}
+
+void bnx2x_dev_rxtx_init_dummy(struct rte_eth_dev *dev)
+{
+ dev->rx_pkt_burst = bnx2x_rxtx_pkts_dummy;
+ dev->tx_pkt_burst = bnx2x_rxtx_pkts_dummy;
+}
+
+void bnx2x_dev_rxtx_init(struct rte_eth_dev *dev)
{
dev->rx_pkt_burst = bnx2x_recv_pkts;
-
- return 0;
+ dev->tx_pkt_burst = bnx2x_xmit_pkts;
}
diff --git a/drivers/net/bnx2x/bnx2x_rxtx.h b/drivers/net/bnx2x/bnx2x_rxtx.h
index 6ad4928c1..3f4692b47 100644
--- a/drivers/net/bnx2x/bnx2x_rxtx.h
+++ b/drivers/net/bnx2x/bnx2x_rxtx.h
@@ -75,5 +75,6 @@ int bnx2x_dev_tx_queue_setup(struct rte_eth_dev *dev, uint16_t tx_queue_id,
void bnx2x_dev_rx_queue_release(void *rxq);
void bnx2x_dev_tx_queue_release(void *txq);
-int bnx2x_dev_rx_init(struct rte_eth_dev *dev);
+void bnx2x_dev_rxtx_init(struct rte_eth_dev *dev);
+void bnx2x_dev_rxtx_init_dummy(struct rte_eth_dev *dev);
void bnx2x_dev_clear_queues(struct rte_eth_dev *dev);
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2019-05-08 11:05:06.067947504 +0100
+++ 0004-net-bnx2x-fix-DMAE-timeout.patch 2019-05-08 11:05:05.751934393 +0100
@@ -1 +1 @@
-From e166e0db8cf6c0e391a40f1a75a678bec930c970 Mon Sep 17 00:00:00 2001
+From bd288e305328130df81326c426b72cace4eaf4fd Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e166e0db8cf6c0e391a40f1a75a678bec930c970 ]
+
@@ -21 +22,0 @@
-Cc: stable at dpdk.org
@@ -31 +32 @@
-index bcb899a57..f85766c68 100644
+index d5328e8d9..fb44a71f2 100644
@@ -34 +35 @@
-@@ -214,4 +214,5 @@ bnx2x_dev_configure(struct rte_eth_dev *dev)
+@@ -213,4 +213,5 @@ bnx2x_dev_configure(struct rte_eth_dev *dev)
@@ -40 +41 @@
-@@ -243,9 +244,5 @@ bnx2x_dev_start(struct rte_eth_dev *dev)
+@@ -242,9 +243,5 @@ bnx2x_dev_start(struct rte_eth_dev *dev)
@@ -51 +52 @@
-@@ -262,4 +259,6 @@ bnx2x_dev_stop(struct rte_eth_dev *dev)
+@@ -261,4 +258,6 @@ bnx2x_dev_stop(struct rte_eth_dev *dev)
More information about the stable
mailing list