From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 012051B4B7 for ; Thu, 29 Nov 2018 14:21:43 +0100 (CET) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E7045793D3; Thu, 29 Nov 2018 13:21:41 +0000 (UTC) Received: from ktraynor.remote.csb (ovpn-117-230.ams2.redhat.com [10.36.117.230]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8A55B1001F50; Thu, 29 Nov 2018 13:21:39 +0000 (UTC) From: Kevin Traynor To: Ilya Maximets Cc: Anatoly Burakov , Qi Zhang , dpdk stable Date: Thu, 29 Nov 2018 13:20:05 +0000 Message-Id: <20181129132128.7609-5-ktraynor@redhat.com> In-Reply-To: <20181129132128.7609-1-ktraynor@redhat.com> References: <20181129132128.7609-1-ktraynor@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Thu, 29 Nov 2018 13:21:42 +0000 (UTC) Subject: [dpdk-stable] patch 'net/ixgbe: stop link setup alarm handler before start' has been queued to stable release 18.08.1 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: Thu, 29 Nov 2018 13:21:43 -0000 Hi, FYI, your patch has been queued to stable release 18.08.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 12/08/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. Kevin Traynor --- >>From 954374b97b5ef5ffe2be5ee8b85c5650fe6f16c7 Mon Sep 17 00:00:00 2001 From: Ilya Maximets Date: Thu, 8 Nov 2018 13:24:01 +0300 Subject: [PATCH] net/ixgbe: stop link setup alarm handler before start [ upstream commit 916193dda6fb400114c0ffc5615e74ca13d50720 ] We should stop alarm handler before resetting the HW to avoid concurrent device reconfiguration. Fixes: 0408f47ba4d6 ("net/ixgbe: fix busy polling while fiber link update") Signed-off-by: Ilya Maximets Tested-by: Anatoly Burakov Acked-by: Qi Zhang --- drivers/net/ixgbe/ixgbe_ethdev.c | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c index 0293022b2..6b04820da 100644 --- a/drivers/net/ixgbe/ixgbe_ethdev.c +++ b/drivers/net/ixgbe/ixgbe_ethdev.c @@ -2553,4 +2553,7 @@ ixgbe_dev_start(struct rte_eth_dev *dev) } + /* Stop the link setup handler before resetting the HW. */ + rte_eal_alarm_cancel(ixgbe_dev_setup_link_alarm_handler, dev); + /* disable uio/vfio intr/eventfd mapping */ rte_intr_disable(intr_handle); @@ -2735,6 +2738,4 @@ ixgbe_dev_start(struct rte_eth_dev *dev) goto error; - ixgbe_dev_link_update(dev, 0); - skip_link_setup: @@ -2772,4 +2773,10 @@ skip_link_setup: "before starting the port"); + /* + * Update link status right before return, because it may + * start link configuration process in a separate thread. + */ + ixgbe_dev_link_update(dev, 0); + return 0; @@ -5067,4 +5074,7 @@ ixgbevf_dev_start(struct rte_eth_dev *dev) PMD_INIT_FUNC_TRACE(); + /* Stop the link setup handler before resetting the HW. */ + rte_eal_alarm_cancel(ixgbe_dev_setup_link_alarm_handler, dev); + err = hw->mac.ops.reset_hw(hw); if (err) { @@ -5102,6 +5112,4 @@ ixgbevf_dev_start(struct rte_eth_dev *dev) ixgbevf_dev_rxtx_start(dev); - ixgbevf_dev_link_update(dev, 0); - /* check and configure queue intr-vector mapping */ if (rte_intr_cap_multiple(intr_handle) && @@ -5141,4 +5149,10 @@ ixgbevf_dev_start(struct rte_eth_dev *dev) ixgbevf_intr_enable(dev); + /* + * Update link status right before return, because it may + * start link configuration process in a separate thread. + */ + ixgbevf_dev_link_update(dev, 0); + return 0; } -- 2.19.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2018-11-29 13:11:35.150378059 +0000 +++ 0004-net-ixgbe-stop-link-setup-alarm-handler-before-start.patch 2018-11-29 13:11:34.000000000 +0000 @@ -1,13 +1,14 @@ -From 916193dda6fb400114c0ffc5615e74ca13d50720 Mon Sep 17 00:00:00 2001 +From 954374b97b5ef5ffe2be5ee8b85c5650fe6f16c7 Mon Sep 17 00:00:00 2001 From: Ilya Maximets Date: Thu, 8 Nov 2018 13:24:01 +0300 Subject: [PATCH] net/ixgbe: stop link setup alarm handler before start +[ upstream commit 916193dda6fb400114c0ffc5615e74ca13d50720 ] + We should stop alarm handler before resetting the HW to avoid concurrent device reconfiguration. Fixes: 0408f47ba4d6 ("net/ixgbe: fix busy polling while fiber link update") -CC: stable@dpdk.org Signed-off-by: Ilya Maximets Tested-by: Anatoly Burakov @@ -17,10 +18,10 @@ 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c -index c9e82d515..8148577f5 100644 +index 0293022b2..6b04820da 100644 --- a/drivers/net/ixgbe/ixgbe_ethdev.c +++ b/drivers/net/ixgbe/ixgbe_ethdev.c -@@ -2550,4 +2550,7 @@ ixgbe_dev_start(struct rte_eth_dev *dev) +@@ -2553,4 +2553,7 @@ ixgbe_dev_start(struct rte_eth_dev *dev) } + /* Stop the link setup handler before resetting the HW. */ @@ -28,14 +29,14 @@ + /* disable uio/vfio intr/eventfd mapping */ rte_intr_disable(intr_handle); -@@ -2732,6 +2735,4 @@ ixgbe_dev_start(struct rte_eth_dev *dev) +@@ -2735,6 +2738,4 @@ ixgbe_dev_start(struct rte_eth_dev *dev) goto error; - ixgbe_dev_link_update(dev, 0); - skip_link_setup: -@@ -2769,4 +2770,10 @@ skip_link_setup: +@@ -2772,4 +2773,10 @@ skip_link_setup: "before starting the port"); + /* @@ -46,7 +47,7 @@ + return 0; -@@ -5062,4 +5069,7 @@ ixgbevf_dev_start(struct rte_eth_dev *dev) +@@ -5067,4 +5074,7 @@ ixgbevf_dev_start(struct rte_eth_dev *dev) PMD_INIT_FUNC_TRACE(); + /* Stop the link setup handler before resetting the HW. */ @@ -54,14 +55,14 @@ + err = hw->mac.ops.reset_hw(hw); if (err) { -@@ -5097,6 +5107,4 @@ ixgbevf_dev_start(struct rte_eth_dev *dev) +@@ -5102,6 +5112,4 @@ ixgbevf_dev_start(struct rte_eth_dev *dev) ixgbevf_dev_rxtx_start(dev); - ixgbevf_dev_link_update(dev, 0); - /* check and configure queue intr-vector mapping */ if (rte_intr_cap_multiple(intr_handle) && -@@ -5136,4 +5144,10 @@ ixgbevf_dev_start(struct rte_eth_dev *dev) +@@ -5141,4 +5149,10 @@ ixgbevf_dev_start(struct rte_eth_dev *dev) ixgbevf_intr_enable(dev); + /*