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 26C44A04F0 for ; Thu, 19 Dec 2019 15:41:36 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1CAE31BFD5; Thu, 19 Dec 2019 15:41:36 +0100 (CET) Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) by dpdk.org (Postfix) with ESMTP id D74A11BFD5 for ; Thu, 19 Dec 2019 15:41:34 +0100 (CET) Received: by mail-wr1-f68.google.com with SMTP id y11so6229022wrt.6 for ; Thu, 19 Dec 2019 06:41:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=UwWZ5eEPvdUkX6qQxNAqvfAVLPuDSxk1BKCqFqPzPxs=; b=AtV9l9yQQDhKndykKJgc+E9NPJBYAWsg1bOOsLXnqlk4+5fhtEMfxCxR7WD23asO3d z2brNYBto2NoQY3rB5wXHuXHWjSg2Su0blDMub/6zXhbLwFyrifw6DKcO5Ryv4OSa0cm QFaOr/A7KPIoJff8zPz2i5O+vdtp1o/AMxzCRq/fsGgiCjE5M5AmwL8F1X9iacOaJhhF /Bh5OODYEF2mWlrZ2SZfQX4AUvfrKMw+u+48nJoQOSWtcOtIuP7ivsTy6pOVjJkX0OjA tEpcklOUEJO4UZwn5DHuTEJaJ5AsfdTT+a+VvabetIUjB7heGQ2p2mIxUGHMO1m6AhR7 1feA== 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=UwWZ5eEPvdUkX6qQxNAqvfAVLPuDSxk1BKCqFqPzPxs=; b=B55Z9SG0fI00tbwMqgIb0mDHj/aL2b/y/fePBqR0pyBdR+A3UaZ+Eap4kLRa2s023o Gt9i1K+01giGmukOUTppN/iRqt4jBboC+Z60oJLKCIQDHVeVoec3vS1Eo4Br6eR/bSP4 o7f8STmenra7Plv5yggC/A1EFHVqSl7WZ+/p3ufDsQoLj3VeYYGPAI6/ptg7ZwUHkihU FvXlaeTO4XJCQONQsTv1Cv5Yv3JOS+tj3Z5pG1gJmKnRZofx5t21yVHWlmeRCNHpe5mO 7BlBHUFOzknucWaljGOv4q2cmP7Os370bNglu9GFW7f1MsYVIBlpc6TG+zN8P6MjE4ML adRQ== X-Gm-Message-State: APjAAAXe+zQ41ihQazpffGhMk8B313JBwbWCGyWa4qlELN63ORqme2k3 MKN4AHfYpixC8+QLR4rMnzOmjFgHMxo= X-Google-Smtp-Source: APXvYqy8T1/jpZ7nXVg8SdZxsG4Yb9AGrS0bYVbPTI4fJW0Lxw/lNNfUQmnEveU1b9OGmPzihRA5KA== X-Received: by 2002:adf:f18b:: with SMTP id h11mr9430227wro.56.1576766494511; Thu, 19 Dec 2019 06:41:34 -0800 (PST) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id g9sm7071052wro.67.2019.12.19.06.41.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Dec 2019 06:41:34 -0800 (PST) From: luca.boccassi@gmail.com To: Xiao Zhang Cc: Wei Zhao , Xiaolong Ye , dpdk stable Date: Thu, 19 Dec 2019 14:34:20 +0000 Message-Id: <20191219143447.21506-113-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191219143447.21506-1-luca.boccassi@gmail.com> References: <20191219143447.21506-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/ixgbe: fix link status' has been queued to LTS release 17.11.10 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 17.11.10 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/21/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. Thanks. Luca Boccassi --- >From fe7eecb8ea669a195751b3112f06cb5c9d278ae8 Mon Sep 17 00:00:00 2001 From: Xiao Zhang Date: Tue, 29 Oct 2019 13:33:23 +0800 Subject: [PATCH] net/ixgbe: fix link status [ upstream commit 1ca05831b9be946001ebabba2b3fdb0456684d9a ] The link status for 82599eb got from link status register was not correct, check the enable/disable flag of tx laser when getting the link status, set the link status down if tx laser disabled since the tx laser flag could be set correctly when up/down the link status. Fixes: dc66e5fd01b9 ("net/ixgbe: improve link state check on VF") Signed-off-by: Xiao Zhang Reviewed-by: Wei Zhao Acked-by: Xiaolong Ye --- drivers/net/ixgbe/ixgbe_ethdev.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c index ca7109e6f0..8325d66f2f 100644 --- a/drivers/net/ixgbe/ixgbe_ethdev.c +++ b/drivers/net/ixgbe/ixgbe_ethdev.c @@ -2852,6 +2852,7 @@ ixgbe_dev_set_link_up(struct rte_eth_dev *dev) } else { /* Turn on the laser */ ixgbe_enable_tx_laser(hw); + ixgbe_dev_link_update(dev, 0); } return 0; @@ -2882,6 +2883,7 @@ ixgbe_dev_set_link_down(struct rte_eth_dev *dev) } else { /* Turn off the laser */ ixgbe_disable_tx_laser(hw); + ixgbe_dev_link_update(dev, 0); } return 0; @@ -4012,6 +4014,7 @@ ixgbe_dev_link_update_share(struct rte_eth_dev *dev, int link_up; int diag; int wait = 1; + u32 esdp_reg; link.link_status = ETH_LINK_DOWN; link.link_speed = 0; @@ -4047,6 +4050,10 @@ ixgbe_dev_link_update_share(struct rte_eth_dev *dev, return 0; } + esdp_reg = IXGBE_READ_REG(hw, IXGBE_ESDP); + if ((esdp_reg & IXGBE_ESDP_SDP3)) + link_up = 0; + if (link_up == 0) { rte_ixgbe_dev_atomic_write_link_status(dev, &link); if (ixgbe_get_media_type(hw) == ixgbe_media_type_fiber) { -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2019-12-19 14:32:30.814963251 +0000 +++ 0113-net-ixgbe-fix-link-status.patch 2019-12-19 14:32:26.285301395 +0000 @@ -1,15 +1,16 @@ -From 1ca05831b9be946001ebabba2b3fdb0456684d9a Mon Sep 17 00:00:00 2001 +From fe7eecb8ea669a195751b3112f06cb5c9d278ae8 Mon Sep 17 00:00:00 2001 From: Xiao Zhang Date: Tue, 29 Oct 2019 13:33:23 +0800 Subject: [PATCH] net/ixgbe: fix link status +[ upstream commit 1ca05831b9be946001ebabba2b3fdb0456684d9a ] + The link status for 82599eb got from link status register was not correct, check the enable/disable flag of tx laser when getting the link status, set the link status down if tx laser disabled since the tx laser flag could be set correctly when up/down the link status. Fixes: dc66e5fd01b9 ("net/ixgbe: improve link state check on VF") -Cc: stable@dpdk.org Signed-off-by: Xiao Zhang Reviewed-by: Wei Zhao @@ -19,10 +20,10 @@ 1 file changed, 7 insertions(+) diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c -index 9c386f5c99..30c0379d41 100644 +index ca7109e6f0..8325d66f2f 100644 --- a/drivers/net/ixgbe/ixgbe_ethdev.c +++ b/drivers/net/ixgbe/ixgbe_ethdev.c -@@ -2912,6 +2912,7 @@ ixgbe_dev_set_link_up(struct rte_eth_dev *dev) +@@ -2852,6 +2852,7 @@ ixgbe_dev_set_link_up(struct rte_eth_dev *dev) } else { /* Turn on the laser */ ixgbe_enable_tx_laser(hw); @@ -30,7 +31,7 @@ } return 0; -@@ -2942,6 +2943,7 @@ ixgbe_dev_set_link_down(struct rte_eth_dev *dev) +@@ -2882,6 +2883,7 @@ ixgbe_dev_set_link_down(struct rte_eth_dev *dev) } else { /* Turn off the laser */ ixgbe_disable_tx_laser(hw); @@ -38,16 +39,16 @@ } return 0; -@@ -4116,6 +4118,7 @@ ixgbe_dev_link_update_share(struct rte_eth_dev *dev, +@@ -4012,6 +4014,7 @@ ixgbe_dev_link_update_share(struct rte_eth_dev *dev, int link_up; int diag; int wait = 1; + u32 esdp_reg; - memset(&link, 0, sizeof(link)); link.link_status = ETH_LINK_DOWN; -@@ -4143,6 +4146,10 @@ ixgbe_dev_link_update_share(struct rte_eth_dev *dev, - return rte_eth_linkstatus_set(dev, &link); + link.link_speed = 0; +@@ -4047,6 +4050,10 @@ ixgbe_dev_link_update_share(struct rte_eth_dev *dev, + return 0; } + esdp_reg = IXGBE_READ_REG(hw, IXGBE_ESDP); @@ -55,8 +56,8 @@ + link_up = 0; + if (link_up == 0) { + rte_ixgbe_dev_atomic_write_link_status(dev, &link); if (ixgbe_get_media_type(hw) == ixgbe_media_type_fiber) { - intr->flags |= IXGBE_FLAG_NEED_LINK_CONFIG; -- 2.20.1