From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) by dpdk.org (Postfix) with ESMTP id CBFD5239 for ; Mon, 15 Oct 2018 13:52:12 +0200 (CEST) Received: by mail-wr1-f68.google.com with SMTP id n1-v6so20961414wrt.10 for ; Mon, 15 Oct 2018 04:52:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=8Nc4IqKv7+yPbXmSMP1MhBgIMS5qD5oEzxk/XqxdMlM=; b=klcRjbnqLni7HCjaNjDMrFic1HpbpcGgrCz6dqs7C2S4AzCxsGlgTWwGXzKSeaW4Vr Ri0nUbqD66vW3nKnTw6nvqWRfzcRUbUnkU3lyWw7W8C2xk3YNvVLbPFn+ibIWOYC4jLW wiFwmV0eFNX448ZlUWPqcqVW/3JCMqRYbF5PNKp7QCxxic/800537Bypqfn812KHSCd5 VMYTC9pXt0CKl+rRCr6ergPrCTTd7vtj/MYBhjxio4atf+WPPb0m+ELe79pUWIT3RK6J csEZjtXhmeRKcx4ZB14tiHj1ASLc8nATzHK3jS3xYQ+SIX6g7Wo2TylA82Qg3UvVnKue Nb3w== X-Gm-Message-State: ABuFfoiKbKj4Yz6UnBOdTuSpq7OCVyorHlti2Cgz2LHk4FGSfoXsj9fQ 5bWe6U7/v56tfRW+9XqMG4s= X-Google-Smtp-Source: ACcGV62bNhrJ8SJA6LjnUmZHGefD3BLqQ4m8mV9U5xgvbSEIYcDJIwUbSgFdf81ZCoQ85JFQprGrsw== X-Received: by 2002:adf:e403:: with SMTP id g3-v6mr13477573wrm.96.1539604332431; Mon, 15 Oct 2018 04:52:12 -0700 (PDT) Received: from localhost ([2a01:4b00:f419:6f00:8361:8946:ba2b:d556]) by smtp.gmail.com with ESMTPSA id r134-v6sm6941197wmg.9.2018.10.15.04.52.10 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 15 Oct 2018 04:52:11 -0700 (PDT) From: Luca Boccassi To: Rasesh Mody Cc: dpdk stable Date: Mon, 15 Oct 2018 12:51:32 +0100 Message-Id: <20181015115144.27626-12-bluca@debian.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181015115144.27626-1-bluca@debian.org> References: <20181003162121.16364-1-bluca@debian.org> <20181015115144.27626-1-bluca@debian.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/bnx2x: fix call to link handling periodic function' has been queued to LTS release 16.11.9 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: , X-List-Received-Date: Mon, 15 Oct 2018 11:52:12 -0000 Hi, FYI, your patch has been queued to LTS release 16.11.9 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 10/17/18. 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. If the code is different (ie: not only metadata diffs), due for example to a change in context or macro names, please double check it. Thanks. Luca Boccassi --- >>From 87a99237fe9f9d2d00ce55c7d45670cda37edc69 Mon Sep 17 00:00:00 2001 From: Rasesh Mody Date: Sat, 29 Sep 2018 05:42:40 +0000 Subject: [PATCH] net/bnx2x: fix call to link handling periodic function [ upstream commit 0f6ebeee2402441b20e45ea27f0ff2a4fc2c165f ] If link handling periodic function is allowed to be called in interrupt context, the periodic function can get called too frequently and exhaust the retry credits to check link status. This change makes sure link handling periodic function is not called in interrupt context. Fixes: 540a211084a7 ("bnx2x: driver core") Signed-off-by: Rasesh Mody --- drivers/net/bnx2x/bnx2x_ethdev.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/bnx2x/bnx2x_ethdev.c b/drivers/net/bnx2x/bnx2x_ethdev.c index 794670f1ad..d3733f7a35 100644 --- a/drivers/net/bnx2x/bnx2x_ethdev.c +++ b/drivers/net/bnx2x/bnx2x_ethdev.c @@ -122,8 +122,11 @@ static __rte_unused void bnx2x_interrupt_handler(__rte_unused struct rte_intr_handle *handle, void *param) { struct rte_eth_dev *dev = (struct rte_eth_dev *)param; + struct bnx2x_softc *sc = dev->data->dev_private; + atomic_store_rel_long(&sc->periodic_flags, PERIODIC_STOP); bnx2x_interrupt_action(dev); + atomic_store_rel_long(&sc->periodic_flags, PERIODIC_GO); rte_intr_enable(&(dev->pci_dev->intr_handle)); } -- 2.19.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2018-10-15 12:48:34.930601744 +0100 +++ 0012-net-bnx2x-fix-call-to-link-handling-periodic-functio.patch 2018-10-15 12:48:34.561096017 +0100 @@ -1,8 +1,10 @@ -From 0f6ebeee2402441b20e45ea27f0ff2a4fc2c165f Mon Sep 17 00:00:00 2001 +From 87a99237fe9f9d2d00ce55c7d45670cda37edc69 Mon Sep 17 00:00:00 2001 From: Rasesh Mody Date: Sat, 29 Sep 2018 05:42:40 +0000 Subject: [PATCH] net/bnx2x: fix call to link handling periodic function +[ upstream commit 0f6ebeee2402441b20e45ea27f0ff2a4fc2c165f ] + If link handling periodic function is allowed to be called in interrupt context, the periodic function can get called too frequently and exhaust the retry credits to check link status. @@ -11,25 +13,26 @@ interrupt context. Fixes: 540a211084a7 ("bnx2x: driver core") -Cc: stable@dpdk.org Signed-off-by: Rasesh Mody --- - drivers/net/bnx2x/bnx2x_ethdev.c | 2 ++ - 1 file changed, 2 insertions(+) + drivers/net/bnx2x/bnx2x_ethdev.c | 3 +++ + 1 file changed, 3 insertions(+) diff --git a/drivers/net/bnx2x/bnx2x_ethdev.c b/drivers/net/bnx2x/bnx2x_ethdev.c -index ae2e60a060..0057843b5d 100644 +index 794670f1ad..d3733f7a35 100644 --- a/drivers/net/bnx2x/bnx2x_ethdev.c +++ b/drivers/net/bnx2x/bnx2x_ethdev.c -@@ -131,7 +131,9 @@ bnx2x_interrupt_handler(void *param) - - PMD_DEBUG_PERIODIC_LOG(INFO, sc, "Interrupt handled"); +@@ -122,8 +122,11 @@ static __rte_unused void + bnx2x_interrupt_handler(__rte_unused struct rte_intr_handle *handle, void *param) + { + struct rte_eth_dev *dev = (struct rte_eth_dev *)param; ++ struct bnx2x_softc *sc = dev->data->dev_private; + atomic_store_rel_long(&sc->periodic_flags, PERIODIC_STOP); bnx2x_interrupt_action(dev); + atomic_store_rel_long(&sc->periodic_flags, PERIODIC_GO); - rte_intr_enable(&sc->pci_dev->intr_handle); + rte_intr_enable(&(dev->pci_dev->intr_handle)); } --