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 9A314A0093 for ; Tue, 19 May 2020 15:16:30 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 91E001D96D; Tue, 19 May 2020 15:16:30 +0200 (CEST) Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by dpdk.org (Postfix) with ESMTP id 2A6D71D964 for ; Tue, 19 May 2020 15:16:29 +0200 (CEST) Received: by mail-wr1-f66.google.com with SMTP id v12so15812647wrp.12 for ; Tue, 19 May 2020 06:16:29 -0700 (PDT) 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=kJz+j0BgaQ8V6LXbTymrGj7aEUQ8Adot1QYWRkRTn88=; b=g8ts/ozzxGx+pZfAtwaZDUc1Ot99b4q46qqjFUwY/ueQYHhC+G+VRrEDpj7cSiAwvT bNFo0J8mW/YvG6UQrOMHZdNYSKMTp0DVSSQpiNxRpaVAEuu/XxuTnkqaNdilkWuqLFq3 xl1TTEpd4KgvDAdWTFfuvAU4X6nUU9t0LTOurr7LmZSCcIKgQ02mim4hwJRumH1+vRW5 4eguCmGJK1vHM32qmJkTA6qeC1nzemqnbKspHbYJZ740JGXezRlMgznRM2LBlNE844CX LYoNom1u0EEsbpl5iChvYbc9PEFOXQtVWSW7DbSveOVHk8S48kZ5+UZuU0ZPjzcD9Z/w XAwQ== 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=kJz+j0BgaQ8V6LXbTymrGj7aEUQ8Adot1QYWRkRTn88=; b=fCIYAZEDEzXJOM0cE87A797NY/+ugrWS/39abThyNT4V9ueS8JhNysidUnWbZ0OnwD zsbXwD0lNSOD6ZhWMGb0fCBNdvnHdSsnZKMA7UXWYT5wDPDdvqMRUC5Tl+ZF4XQ/m5Qz o4FLCDWjFPIXS5EDrs0g1TLwwWJs5tG/RVYCt0SLNKZNfMsvjb5C9xhcy0lpwrkUwsR8 /qpYULnbhe1/ibyvPH6U4gibsO9RWzfwN+149CVhpJZGI9/IgeUREBqJzTlX64vtFrbv NU6opUjVHv8a/fMMsjICVJSW82vhxeVI8sK92fAQHsJDCx0f/IMk5YbJZdJczqc7dHhe 3XxA== X-Gm-Message-State: AOAM531+7ISUNGhpE6kGUhwK+xpl364iSldeZE1BWRC1OuKxdnXrd/87 iWooHXYDB4OE9bjk9Up4y7M= X-Google-Smtp-Source: ABdhPJzsdlHt6F/GlbxX3iX2NtdqCsURMhcrm8f7g0IUXG2TC1cylhU/tvmefqUiDJSS2NuASWgkOg== X-Received: by 2002:a5d:6b83:: with SMTP id n3mr27694466wrx.213.1589894188930; Tue, 19 May 2020 06:16:28 -0700 (PDT) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id a74sm4150518wme.23.2020.05.19.06.16.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 May 2020 06:16:28 -0700 (PDT) From: luca.boccassi@gmail.com To: Phil Yang Cc: Lijian Zhang , Xiaolong Ye , dpdk stable Date: Tue, 19 May 2020 14:05:37 +0100 Message-Id: <20200519130549.112823-202-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200519130549.112823-1-luca.boccassi@gmail.com> References: <20200519125804.104349-1-luca.boccassi@gmail.com> <20200519130549.112823-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/ixgbe: fix link state timing on fiber ports' has been queued to stable release 19.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 stable release 19.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 05/21/20. 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 53038c47603c0998c117d416894bf63b46b77f24 Mon Sep 17 00:00:00 2001 From: Phil Yang Date: Fri, 8 May 2020 18:28:27 +0800 Subject: [PATCH] net/ixgbe: fix link state timing on fiber ports [ upstream commit d70a869db27871db90f86e108fdbb9a22fc6d8c7 ] In ixgbe_dev_link_update_share(), if the media type is fiber and the link is down, a flag (IXGBE_FLAG_NEED_LINK_CONFIG) is set. A callback to ixgbe_dev_setup_link_thread_handler() is scheduled which should try to set up the link and clear the flag afterwards. This flag works as a guard variable between threads. To avoid potential race condition between threads, set the IXGBE_FLAG_NEED_LINK_CONFIG flag only when there is no link thread running. Bugzilla ID: 388 Fixes: 819d0d1d57f1 ("net/ixgbe: fix blocking system events") Signed-off-by: Phil Yang Reviewed-by: Lijian Zhang Acked-by: Xiaolong Ye --- drivers/net/ixgbe/ixgbe_ethdev.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c index e0f59e307d..ce0c05fcc2 100644 --- a/drivers/net/ixgbe/ixgbe_ethdev.c +++ b/drivers/net/ixgbe/ixgbe_ethdev.c @@ -4277,9 +4277,13 @@ ixgbe_dev_link_update_share(struct rte_eth_dev *dev, if (link_up == 0) { if (ixgbe_get_media_type(hw) == ixgbe_media_type_fiber) { - intr->flags |= IXGBE_FLAG_NEED_LINK_CONFIG; ixgbe_dev_wait_setup_link_complete(dev, 0); if (rte_atomic32_test_and_set(&ad->link_thread_running)) { + /* To avoid race condition between threads, set + * the IXGBE_FLAG_NEED_LINK_CONFIG flag only + * when there is no link thread running. + */ + intr->flags |= IXGBE_FLAG_NEED_LINK_CONFIG; if (rte_ctrl_thread_create(&ad->link_thread_tid, "ixgbe-link-handler", NULL, -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-05-19 14:04:52.847816797 +0100 +++ 0202-net-ixgbe-fix-link-state-timing-on-fiber-ports.patch 2020-05-19 14:04:44.580654971 +0100 @@ -1,8 +1,10 @@ -From d70a869db27871db90f86e108fdbb9a22fc6d8c7 Mon Sep 17 00:00:00 2001 +From 53038c47603c0998c117d416894bf63b46b77f24 Mon Sep 17 00:00:00 2001 From: Phil Yang Date: Fri, 8 May 2020 18:28:27 +0800 Subject: [PATCH] net/ixgbe: fix link state timing on fiber ports +[ upstream commit d70a869db27871db90f86e108fdbb9a22fc6d8c7 ] + In ixgbe_dev_link_update_share(), if the media type is fiber and the link is down, a flag (IXGBE_FLAG_NEED_LINK_CONFIG) is set. A callback to ixgbe_dev_setup_link_thread_handler() is scheduled which should @@ -15,7 +17,6 @@ Bugzilla ID: 388 Fixes: 819d0d1d57f1 ("net/ixgbe: fix blocking system events") -Cc: stable@dpdk.org Signed-off-by: Phil Yang Reviewed-by: Lijian Zhang @@ -25,10 +26,10 @@ 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c -index cf5f1fe709..a4e5c539de 100644 +index e0f59e307d..ce0c05fcc2 100644 --- a/drivers/net/ixgbe/ixgbe_ethdev.c +++ b/drivers/net/ixgbe/ixgbe_ethdev.c -@@ -4281,9 +4281,13 @@ ixgbe_dev_link_update_share(struct rte_eth_dev *dev, +@@ -4277,9 +4277,13 @@ ixgbe_dev_link_update_share(struct rte_eth_dev *dev, if (link_up == 0) { if (ixgbe_get_media_type(hw) == ixgbe_media_type_fiber) {