From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 4DF13A0613 for ; Wed, 28 Aug 2019 15:43:22 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 402F11C206; Wed, 28 Aug 2019 15:43:22 +0200 (CEST) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 9F7EA1C247 for ; Wed, 28 Aug 2019 15:43:20 +0200 (CEST) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1A277693F5; Wed, 28 Aug 2019 13:43:20 +0000 (UTC) Received: from rh.redhat.com (ovpn-117-52.ams2.redhat.com [10.36.117.52]) by smtp.corp.redhat.com (Postfix) with ESMTP id F12B5194BE; Wed, 28 Aug 2019 13:43:18 +0000 (UTC) From: Kevin Traynor To: Kalesh AP Cc: Ajit Khaparde , Somnath Kotur , dpdk stable Date: Wed, 28 Aug 2019 14:42:03 +0100 Message-Id: <20190828134234.20547-27-ktraynor@redhat.com> In-Reply-To: <20190828134234.20547-1-ktraynor@redhat.com> References: <20190828134234.20547-1-ktraynor@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Wed, 28 Aug 2019 13:43:20 +0000 (UTC) Subject: [dpdk-stable] patch 'net/bnxt: fix enabling/disabling interrupts' has been queued to LTS release 18.11.3 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" 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 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 Signed-off-by: Ajit Khaparde Reviewed-by: Somnath Kotur --- 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@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