[dpdk-stable] patch 'net/bnxt: fix enabling/disabling interrupts' has been queued to LTS release 18.11.3
Kevin Traynor
ktraynor at redhat.com
Wed Aug 28 15:42:03 CEST 2019
Hi,
FYI, your patch has been queued to LTS release 18.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 09/04/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/76685b9d3646e39745e5bb7f19c6ba682d26b779
Thanks.
Kevin Traynor
---
>From 76685b9d3646e39745e5bb7f19c6ba682d26b779 Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil at broadcom.com>
Date: Wed, 17 Jul 2019 16:11:35 +0530
Subject: [PATCH] net/bnxt: fix enabling/disabling interrupts
[ upstream commit ae2d19da02a95739e98554a42f2fce99b66be103 ]
1. Disable interrupts in dev_stop_op()
2. Enable interrupts in dev_start_op()
3. Clean queue intr-vector mapping in dev_stop_op() and thus
fix a possible memory leak.
Fixes: c09f57b49c13 ("net/bnxt: add start/stop/link update operations")
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil at broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde at broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur at broadcom.com>
---
drivers/net/bnxt/bnxt_ethdev.c | 17 ++++++++++++++++-
drivers/net/bnxt/bnxt_irq.c | 2 --
2 files changed, 16 insertions(+), 3 deletions(-)
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 2c18b3732..3235bcd4a 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -646,4 +646,5 @@ static int bnxt_dev_start_op(struct rte_eth_dev *eth_dev)
goto error;
+ bnxt_enable_int(bp);
bp->flags |= BNXT_FLAG_INIT_DONE;
return 0;
@@ -685,4 +686,11 @@ static void bnxt_dev_stop_op(struct rte_eth_dev *eth_dev)
{
struct bnxt *bp = eth_dev->data->dev_private;
+ struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(eth_dev);
+ struct rte_intr_handle *intr_handle = &pci_dev->intr_handle;
+
+ bnxt_disable_int(bp);
+
+ /* disable uio/vfio intr/eventfd mapping */
+ rte_intr_disable(intr_handle);
bp->flags &= ~BNXT_FLAG_INIT_DONE;
@@ -692,4 +700,12 @@ static void bnxt_dev_stop_op(struct rte_eth_dev *eth_dev)
}
bnxt_set_hwrm_link_config(bp, false);
+
+ /* Clean queue intr-vector mapping */
+ rte_intr_efd_disable(intr_handle);
+ if (intr_handle->intr_vec != NULL) {
+ rte_free(intr_handle->intr_vec);
+ intr_handle->intr_vec = NULL;
+ }
+
bnxt_hwrm_port_clr_stats(bp);
bnxt_free_tx_mbufs(bp);
@@ -3518,5 +3534,4 @@ skip_ext_stats:
goto error_free_int;
- bnxt_enable_int(bp);
bnxt_init_nic(bp);
diff --git a/drivers/net/bnxt/bnxt_irq.c b/drivers/net/bnxt/bnxt_irq.c
index 8ea17793e..fc60839ae 100644
--- a/drivers/net/bnxt/bnxt_irq.c
+++ b/drivers/net/bnxt/bnxt_irq.c
@@ -59,5 +59,4 @@ void bnxt_free_int(struct bnxt *bp)
if (irq) {
if (irq->requested) {
- rte_intr_disable(&bp->pdev->intr_handle);
rte_intr_callback_unregister(&bp->pdev->intr_handle,
irq->handler,
@@ -124,5 +123,4 @@ int bnxt_request_int(struct bnxt *bp)
rte_intr_callback_register(&bp->pdev->intr_handle, irq->handler,
(void *)bp->eth_dev);
- rte_intr_enable(&bp->pdev->intr_handle);
irq->requested = 1;
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2019-08-28 14:32:33.392395055 +0100
+++ 0028-net-bnxt-fix-enabling-disabling-interrupts.patch 2019-08-28 14:32:31.647957226 +0100
@@ -1 +1 @@
-From ae2d19da02a95739e98554a42f2fce99b66be103 Mon Sep 17 00:00:00 2001
+From 76685b9d3646e39745e5bb7f19c6ba682d26b779 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ae2d19da02a95739e98554a42f2fce99b66be103 ]
+
@@ -12 +13,0 @@
-Cc: stable at dpdk.org
@@ -23 +24 @@
-index 3f46065c8..91a2ca558 100644
+index 2c18b3732..3235bcd4a 100644
@@ -26,3 +27,3 @@
-@@ -780,4 +780,5 @@ static int bnxt_dev_start_op(struct rte_eth_dev *eth_dev)
- eth_dev->rx_pkt_burst = bnxt_receive_function(eth_dev);
- eth_dev->tx_pkt_burst = bnxt_transmit_function(eth_dev);
+@@ -646,4 +646,5 @@ static int bnxt_dev_start_op(struct rte_eth_dev *eth_dev)
+ goto error;
+
@@ -32 +33 @@
-@@ -819,4 +820,11 @@ static void bnxt_dev_stop_op(struct rte_eth_dev *eth_dev)
+@@ -685,4 +686,11 @@ static void bnxt_dev_stop_op(struct rte_eth_dev *eth_dev)
@@ -44 +45 @@
-@@ -826,4 +834,12 @@ static void bnxt_dev_stop_op(struct rte_eth_dev *eth_dev)
+@@ -692,4 +700,12 @@ static void bnxt_dev_stop_op(struct rte_eth_dev *eth_dev)
@@ -57 +58 @@
-@@ -3992,5 +4008,4 @@ skip_init:
+@@ -3518,5 +3534,4 @@ skip_ext_stats:
@@ -64 +65 @@
-index 61f7498a5..6c4dce401 100644
+index 8ea17793e..fc60839ae 100644
More information about the stable
mailing list