From: Shahed Shaikh <shshaikh@marvell.com>
To: <dev@dpdk.org>
Cc: <rmody@marvell.com>, <ferruh.yigit@intel.com>,
<GR-Everest-DPDK-Dev@marvell.com>, <stable@dpdk.org>
Subject: [dpdk-dev] [PATCH 2/5] net/bnx2x: fix interrupt flood
Date: Tue, 4 Jun 2019 11:53:49 -0700 [thread overview]
Message-ID: <20190604185352.28629-2-shshaikh@marvell.com> (raw)
In-Reply-To: <20190604185352.28629-1-shshaikh@marvell.com>
PMD sets up and clears the slow path interrupt status block in dev_start
and dev_stop flow and slow path interrupt status block DMA memory for
device is allocated in dev_configure flow.
This situation creates a state where, after dev_stop is called, and if
there is a slow path interrupt from device, PMD sees the old value of
status block consumer in dev_start flow, since DMA memory for status block
belongs to old configuration and dev_start will result in
new slow path interrupt status block configuration.
And since PMD fails to ack new slow path interrupt with correct status
block consumer value, device continues to trigger interrupt causing an
interrupt flood.
Fix is to create and destroy status block DMA memory in dev_start and
dev_stop flow instead of dev_configure and dev_close flow.
Fixes: 540a211084a7 ("bnx2x: driver core")
Cc: stable@dpdk.org
Signed-off-by: Shahed Shaikh <shshaikh@marvell.com>
---
drivers/net/bnx2x/bnx2x.c | 10 ++++++++++
drivers/net/bnx2x/bnx2x_ethdev.c | 10 ----------
2 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/drivers/net/bnx2x/bnx2x.c b/drivers/net/bnx2x/bnx2x.c
index 0698b1a8a..e9f05a73a 100644
--- a/drivers/net/bnx2x/bnx2x.c
+++ b/drivers/net/bnx2x/bnx2x.c
@@ -2401,6 +2401,9 @@ static void bnx2x_free_mem(struct bnx2x_softc *sc)
ecore_ilt_mem_op(sc, ILT_MEMOP_FREE);
bnx2x_free_ilt_lines_mem(sc);
+
+ /* free the host hardware/software hsi structures */
+ bnx2x_free_hsi_mem(sc);
}
static int bnx2x_alloc_mem(struct bnx2x_softc *sc)
@@ -2451,6 +2454,13 @@ static int bnx2x_alloc_mem(struct bnx2x_softc *sc)
return -1;
}
+ /* allocate the host hardware/software hsi structures */
+ if (bnx2x_alloc_hsi_mem(sc) != 0) {
+ PMD_DRV_LOG(ERR, sc, "bnx2x_alloc_hsi_mem was failed");
+ bnx2x_free_mem(sc);
+ return -ENXIO;
+ }
+
return 0;
}
diff --git a/drivers/net/bnx2x/bnx2x_ethdev.c b/drivers/net/bnx2x/bnx2x_ethdev.c
index 3063aea64..5dfd708ef 100644
--- a/drivers/net/bnx2x/bnx2x_ethdev.c
+++ b/drivers/net/bnx2x/bnx2x_ethdev.c
@@ -207,13 +207,6 @@ bnx2x_dev_configure(struct rte_eth_dev *dev)
return -ENXIO;
}
- /* allocate the host hardware/software hsi structures */
- if (bnx2x_alloc_hsi_mem(sc) != 0) {
- PMD_DRV_LOG(ERR, sc, "bnx2x_alloc_hsi_mem was failed");
- bnx2x_free_ilt_mem(sc);
- return -ENXIO;
- }
-
bnx2x_dev_rxtx_init_dummy(dev);
return 0;
}
@@ -294,9 +287,6 @@ bnx2x_dev_close(struct rte_eth_dev *dev)
bnx2x_dev_clear_queues(dev);
memset(&(dev->data->dev_link), 0 , sizeof(struct rte_eth_link));
- /* free the host hardware/software hsi structures */
- bnx2x_free_hsi_mem(sc);
-
/* free ilt */
bnx2x_free_ilt_mem(sc);
}
--
2.12.3
next prev parent reply other threads:[~2019-06-04 18:55 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-04 18:53 [dpdk-dev] [PATCH 1/5] net/bnx2x: fix packet drop Shahed Shaikh
2019-06-04 18:53 ` Shahed Shaikh [this message]
2019-06-04 18:53 ` [dpdk-dev] [PATCH 3/5] net/bnx2x: fix memory leak Shahed Shaikh
2019-06-04 18:53 ` [dpdk-dev] [PATCH 4/5] net/bnx2x: fix link inconsistent state Shahed Shaikh
2019-06-04 18:53 ` [dpdk-dev] [PATCH 5/5] net/bnx2x: fix supported max Rx and Tx descriptor count Shahed Shaikh
2019-06-05 5:17 ` [dpdk-dev] [PATCH 1/5] net/bnx2x: fix packet drop Rasesh Mody
2019-06-11 11:12 ` Ferruh Yigit
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190604185352.28629-2-shshaikh@marvell.com \
--to=shshaikh@marvell.com \
--cc=GR-Everest-DPDK-Dev@marvell.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.com \
--cc=rmody@marvell.com \
--cc=stable@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).