From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id E870945DB9 for ; Wed, 27 Nov 2024 18:22:26 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E2295402DE; Wed, 27 Nov 2024 18:22:26 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id F2D434069D for ; Wed, 27 Nov 2024 18:22:24 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1732728144; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=9tjNdlq+Zfi10HZCgPDCI71LLAqeGrXFQTCLWx05TzQ=; b=hXVErt2myx9WolhJQR1QYL/+ERo3ACIs6f1oMK2PDHPCORHudMQocmjHCBRv68tdB7mLal dapat0v367IemkIKYFr43h5VTPdMbD8J9KY6On/XhFDrwr/ig0SuZnLhqCICHK11Nw8GA1 kPLLOkVTNdwpO5yzAG8nCXUaoxuukBY= Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-98-8uRYgdXbP_mUm64wFpzsXA-1; Wed, 27 Nov 2024 12:22:19 -0500 X-MC-Unique: 8uRYgdXbP_mUm64wFpzsXA-1 X-Mimecast-MFC-AGG-ID: 8uRYgdXbP_mUm64wFpzsXA Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id AFE72195604F; Wed, 27 Nov 2024 17:22:17 +0000 (UTC) Received: from rh.redhat.com (unknown [10.39.192.52]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id A72C3300019E; Wed, 27 Nov 2024 17:22:15 +0000 (UTC) From: Kevin Traynor To: Chaoyong He Cc: Long Wu , Peng Zhang , Stephen Hemminger , dpdk stable Subject: patch 'net/nfp: fix link change return value' has been queued to stable release 21.11.9 Date: Wed, 27 Nov 2024 17:18:26 +0000 Message-ID: <20241127171916.690404-79-ktraynor@redhat.com> In-Reply-To: <20241127171916.690404-1-ktraynor@redhat.com> References: <20241127171916.690404-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: 9WrMCPXiIrjvzTTEZe4wvxVJch3dvL3TbKyb1xwK6xg_1732728137 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit content-type: text/plain; charset="US-ASCII"; x-default=true X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 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 Hi, FYI, your patch has been queued to stable release 21.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 12/02/24. 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 This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/f39ddff0693559f5d339ae9737e83b706842eb34 Thanks. Kevin --- >From f39ddff0693559f5d339ae9737e83b706842eb34 Mon Sep 17 00:00:00 2001 From: Chaoyong He Date: Sat, 12 Oct 2024 10:41:02 +0800 Subject: [PATCH] net/nfp: fix link change return value [ upstream commit 0ca4f216b89162ce8142d665a98924bdf4a23a6e ] The return value of 'nfp_eth_set_configured()' is three ways, the original logic considered it as two ways wrongly. Fixes: 61d4008fe6bb ("net/nfp: support setting link up/down") Signed-off-by: Chaoyong He Reviewed-by: Long Wu Reviewed-by: Peng Zhang Acked-by: Stephen Hemminger --- drivers/net/nfp/nfp_ethdev.c | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/drivers/net/nfp/nfp_ethdev.c b/drivers/net/nfp/nfp_ethdev.c index 84562d92fd..dfe629cdda 100644 --- a/drivers/net/nfp/nfp_ethdev.c +++ b/drivers/net/nfp/nfp_ethdev.c @@ -217,4 +217,5 @@ static int nfp_net_stop(struct rte_eth_dev *dev) { + int ret; int i; struct nfp_net_hw *hw; @@ -241,8 +242,10 @@ nfp_net_stop(struct rte_eth_dev *dev) if (rte_eal_process_type() == RTE_PROC_PRIMARY) /* Configure the physical port down */ - nfp_eth_set_configured(hw->cpp, hw->nfp_idx, 0); + ret = nfp_eth_set_configured(hw->cpp, hw->nfp_idx, 0); else - nfp_eth_set_configured(dev->process_private, + ret = nfp_eth_set_configured(dev->process_private, hw->nfp_idx, 0); + if (ret < 0) + return ret; return 0; @@ -253,4 +256,5 @@ static int nfp_net_set_link_up(struct rte_eth_dev *dev) { + int ret; struct nfp_net_hw *hw; @@ -261,8 +265,12 @@ nfp_net_set_link_up(struct rte_eth_dev *dev) if (rte_eal_process_type() == RTE_PROC_PRIMARY) /* Configure the physical port down */ - return nfp_eth_set_configured(hw->cpp, hw->nfp_idx, 1); + ret = nfp_eth_set_configured(hw->cpp, hw->nfp_idx, 1); else - return nfp_eth_set_configured(dev->process_private, + ret = nfp_eth_set_configured(dev->process_private, hw->nfp_idx, 1); + if (ret < 0) + return ret; + + return 0; } @@ -271,4 +279,5 @@ static int nfp_net_set_link_down(struct rte_eth_dev *dev) { + int ret; struct nfp_net_hw *hw; @@ -279,8 +288,12 @@ nfp_net_set_link_down(struct rte_eth_dev *dev) if (rte_eal_process_type() == RTE_PROC_PRIMARY) /* Configure the physical port down */ - return nfp_eth_set_configured(hw->cpp, hw->nfp_idx, 0); + ret = nfp_eth_set_configured(hw->cpp, hw->nfp_idx, 0); else - return nfp_eth_set_configured(dev->process_private, + ret = nfp_eth_set_configured(dev->process_private, hw->nfp_idx, 0); + if (ret < 0) + return ret; + + return 0; } -- 2.47.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-11-27 17:17:40.749683796 +0000 +++ 0079-net-nfp-fix-link-change-return-value.patch 2024-11-27 17:17:38.282269668 +0000 @@ -1 +1 @@ -From 0ca4f216b89162ce8142d665a98924bdf4a23a6e Mon Sep 17 00:00:00 2001 +From f39ddff0693559f5d339ae9737e83b706842eb34 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 0ca4f216b89162ce8142d665a98924bdf4a23a6e ] + @@ -10 +11,0 @@ -Cc: stable@dpdk.org @@ -17,2 +18,2 @@ - drivers/net/nfp/nfp_ethdev.c | 14 ++++++++++++-- - 1 file changed, 12 insertions(+), 2 deletions(-) + drivers/net/nfp/nfp_ethdev.c | 25 +++++++++++++++++++------ + 1 file changed, 19 insertions(+), 6 deletions(-) @@ -21 +22 @@ -index 4b31785b9f..ef1c2a94b7 100644 +index 84562d92fd..dfe629cdda 100644 @@ -24 +25,20 @@ -@@ -528,4 +528,5 @@ static int +@@ -217,4 +217,5 @@ static int + nfp_net_stop(struct rte_eth_dev *dev) + { ++ int ret; + int i; + struct nfp_net_hw *hw; +@@ -241,8 +242,10 @@ nfp_net_stop(struct rte_eth_dev *dev) + if (rte_eal_process_type() == RTE_PROC_PRIMARY) + /* Configure the physical port down */ +- nfp_eth_set_configured(hw->cpp, hw->nfp_idx, 0); ++ ret = nfp_eth_set_configured(hw->cpp, hw->nfp_idx, 0); + else +- nfp_eth_set_configured(dev->process_private, ++ ret = nfp_eth_set_configured(dev->process_private, + hw->nfp_idx, 0); ++ if (ret < 0) ++ return ret; + + return 0; +@@ -253,4 +256,5 @@ static int @@ -29,3 +48,0 @@ - struct nfp_net_hw_priv *hw_priv; -@@ -534,5 +535,9 @@ nfp_net_set_link_up(struct rte_eth_dev *dev) - hw_priv = dev->process_private; @@ -33,2 +50,9 @@ -- return nfp_eth_set_configured(hw_priv->pf_dev->cpp, hw->nfp_idx, 1); -+ ret = nfp_eth_set_configured(hw_priv->pf_dev->cpp, hw->nfp_idx, 1); +@@ -261,8 +265,12 @@ nfp_net_set_link_up(struct rte_eth_dev *dev) + if (rte_eal_process_type() == RTE_PROC_PRIMARY) + /* Configure the physical port down */ +- return nfp_eth_set_configured(hw->cpp, hw->nfp_idx, 1); ++ ret = nfp_eth_set_configured(hw->cpp, hw->nfp_idx, 1); + else +- return nfp_eth_set_configured(dev->process_private, ++ ret = nfp_eth_set_configured(dev->process_private, + hw->nfp_idx, 1); @@ -41 +65 @@ -@@ -541,4 +546,5 @@ static int +@@ -271,4 +279,5 @@ static int @@ -46,3 +69,0 @@ - struct nfp_net_hw_priv *hw_priv; -@@ -547,5 +553,9 @@ nfp_net_set_link_down(struct rte_eth_dev *dev) - hw_priv = dev->process_private; @@ -50,2 +71,9 @@ -- return nfp_eth_set_configured(hw_priv->pf_dev->cpp, hw->nfp_idx, 0); -+ ret = nfp_eth_set_configured(hw_priv->pf_dev->cpp, hw->nfp_idx, 0); +@@ -279,8 +288,12 @@ nfp_net_set_link_down(struct rte_eth_dev *dev) + if (rte_eal_process_type() == RTE_PROC_PRIMARY) + /* Configure the physical port down */ +- return nfp_eth_set_configured(hw->cpp, hw->nfp_idx, 0); ++ ret = nfp_eth_set_configured(hw->cpp, hw->nfp_idx, 0); + else +- return nfp_eth_set_configured(dev->process_private, ++ ret = nfp_eth_set_configured(dev->process_private, + hw->nfp_idx, 0);