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 4C68245CE3 for ; Mon, 11 Nov 2024 07:39:17 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 43F9A4067A; Mon, 11 Nov 2024 07:39:17 +0100 (CET) Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2089.outbound.protection.outlook.com [40.107.244.89]) by mails.dpdk.org (Postfix) with ESMTP id C6B1A4067A for ; Mon, 11 Nov 2024 07:39:15 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=GRs3cGk+LPanbo/FiW3prD9E1AShYL9QItZ3jzVZ7QFEW0f4JVW7dxDIIJq5+PKr7cPTEdIHA5M4yEq6OFN5kvlxq10S+3SiE0cTqceepT23xBBt5Vl5NpdFr9ZlyTzW0diV4kmUPLGGtItNer6AeXPfcZMTRvExxSpkkSMQbvVltWzr04I6QZzQJfzAzHbpGgQ/6Vq0CSjK8BFsMp0buobu0tU5RyQuxgULZ0eWL0P+DMfVMMVyJPsNYgP6D+QLU2psAAbsfWY4Lf0EP6+4ynjpqrbWTJ72lS5dangCO3su3TjvVQ+BziPne/oCw/xNAAKOrJIja+d3Ns9/sMkRtg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Qm33dixaQXmk1rYB17CTOqB6GV6wpLx7Qgf+uEvTIUo=; b=dzjTSNgrwz8hPza0bI2z28Y5o2Rc1pIAcedO1nCXN18r52XLeBe+aqx07w3MixWzDGKElJApawcvi7JeT5qZGlLCVm0FChmPBM3A6T+UC8/lpTzKmYkFAfBV0edv79Zvv5E0vO1KK3Gw+gub1TDL7GAPzDVQjJ4w7YtcWJpnv1lOvRncpC04eiPpdi8wdrm9uKdVGDBA7qwiM8kbt4L3zDQlNl3v7FllThA0AKs0ZEmLpZWOC2JQXHnrKvMPhRlF7uOfXsN1XPQHUpa0QtVevvtNfLJUpmnUWEEd5Txadu9BO1c3MfPbODs/1OhNOWALBN9AFDFWOSTIQ8BvfGKZag== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=corigine.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Qm33dixaQXmk1rYB17CTOqB6GV6wpLx7Qgf+uEvTIUo=; b=DEU2dABiT0SVa9m/wGK6eMNs0xGunbjtcg1rrdcpXuzmhCSUVh091S7zBgC6Kis5mjcQIMr+kBp0gjMWkXVJZx368npiInlHKMf554KkNr8kCtF5lX4Z/Dici3jPxs1EFLKmQ9fUxV3sREEodUZkFXXGk9MW8mbTAX7nSWuvxc8HyTAvqwgUrLU033dmhOn9RTIyiLE/cxVIgLmX2HHGF3GQWi6fFL/b1Aow4WYGa9IawxlLsbFWv2mDA5t4etwKwMsngoqD0AByEoy+PK/RHTdvL75zYP3L9k3ngAQN93cZsLm6ZUOhWsjTA1vmCpxcJ5LtDDUYmnIM05sxy6pXXA== Received: from SN7PR18CA0011.namprd18.prod.outlook.com (2603:10b6:806:f3::19) by DM4PR12MB6280.namprd12.prod.outlook.com (2603:10b6:8:a2::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8137.29; Mon, 11 Nov 2024 06:39:12 +0000 Received: from SN1PEPF0002636A.namprd02.prod.outlook.com (2603:10b6:806:f3:cafe::d0) by SN7PR18CA0011.outlook.office365.com (2603:10b6:806:f3::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8137.27 via Frontend Transport; Mon, 11 Nov 2024 06:39:12 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by SN1PEPF0002636A.mail.protection.outlook.com (10.167.241.135) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8158.14 via Frontend Transport; Mon, 11 Nov 2024 06:39:12 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Sun, 10 Nov 2024 22:39:00 -0800 Received: from nvidia.com (10.126.231.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Sun, 10 Nov 2024 22:38:57 -0800 From: Xueming Li 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 23.11.3 Date: Mon, 11 Nov 2024 14:28:24 +0800 Message-ID: <20241111062847.216344-99-xuemingl@nvidia.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241111062847.216344-1-xuemingl@nvidia.com> References: <20241111062847.216344-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.231.35] X-ClientProxiedBy: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN1PEPF0002636A:EE_|DM4PR12MB6280:EE_ X-MS-Office365-Filtering-Correlation-Id: 00213bd4-9827-43d9-2d83-08dd021b8de0 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|376014|36860700013|82310400026; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?Gb6LT1+bCmY9NPCXvy6dpmUAJah/kbQsD+iC3duqfsKk2EaadCLz8dP/zRrI?= =?us-ascii?Q?4Ro0+OnKKyIYPxOvur9YPRXwr/GAbWB1a/C6hTEIfxoxCc7fKbOJ1j33VKG7?= =?us-ascii?Q?FsTYZa8vJfXdMfYvfz6P7ozq26l8iOJkvjW6FB2E/081I8b76WXNQD/vIYlh?= =?us-ascii?Q?AV/lxd/eq8a3qzOIYsFI3e4RSX6RjWxp17RIFXJLUHJ+ItpN8t1ZKoTyWxpZ?= =?us-ascii?Q?7I+eP8DgQ5uqRRgjKxzQf7CqhVqYCpgffuJQHEzsvbfcuFCf9n1mDorqJgJc?= =?us-ascii?Q?MPLq/wxyCkeGvo8EbfbdMopLulTeNeG05UKYMiLNT9Iwpj++ZQMrxzcFaBdk?= =?us-ascii?Q?x9UzTDdJAa3wP51GgOC7EmYGCmpjzqxs1NQx/uqeWdV8A4WaMxnbmndX7bui?= =?us-ascii?Q?R1RD2aMTqy7v4af1nO0uCx8tdxxTLrqrzech2uQXbsXAgKERidNd/8i4lPYo?= =?us-ascii?Q?/qKX9f34iQkkxl1LqfnxKN12xqhS/gxDD/LS5War0tw4ns9WMp96I2tuM56b?= =?us-ascii?Q?/Ft/cyz4L1tvoPDgULTvUSLfy2m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ispam-Report: CIP:216.228.117.161; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge2.nvidia.com; CAT:NONE; SFS:(13230040)(1800799024)(376014)(36860700013)(82310400026); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Nov 2024 06:39:12.2880 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 00213bd4-9827-43d9-2d83-08dd021b8de0 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.161]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: SN1PEPF0002636A.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB6280 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 23.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 11/30/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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging This queued commit can be viewed at: https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=882c4f80f60bf33988eb31bf85d6104e7461be6d Thanks. Xueming Li --- >From 882c4f80f60bf33988eb31bf85d6104e7461be6d 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 Cc: Xueming Li [ 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 | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/drivers/net/nfp/nfp_ethdev.c b/drivers/net/nfp/nfp_ethdev.c index 7495b01f16..e704c90dc5 100644 --- a/drivers/net/nfp/nfp_ethdev.c +++ b/drivers/net/nfp/nfp_ethdev.c @@ -201,30 +201,40 @@ error: static int nfp_net_set_link_up(struct rte_eth_dev *dev) { + int ret; struct nfp_net_hw *hw; hw = dev->data->dev_private; 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, hw->nfp_idx, 1); + ret = nfp_eth_set_configured(dev->process_private, hw->nfp_idx, 1); + if (ret < 0) + return ret; + + return 0; } /* Set the link down. */ static int nfp_net_set_link_down(struct rte_eth_dev *dev) { + int ret; struct nfp_net_hw *hw; hw = dev->data->dev_private; 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, hw->nfp_idx, 0); + ret = nfp_eth_set_configured(dev->process_private, hw->nfp_idx, 0); + if (ret < 0) + return ret; + + return 0; } static uint8_t -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-11-11 14:23:09.547676450 +0800 +++ 0098-net-nfp-fix-link-change-return-value.patch 2024-11-11 14:23:05.252192837 +0800 @@ -1 +1 @@ -From 0ca4f216b89162ce8142d665a98924bdf4a23a6e Mon Sep 17 00:00:00 2001 +From 882c4f80f60bf33988eb31bf85d6104e7461be6d Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit 0ca4f216b89162ce8142d665a98924bdf4a23a6e ] @@ -10 +12,0 @@ -Cc: stable@dpdk.org @@ -17,2 +19,2 @@ - drivers/net/nfp/nfp_ethdev.c | 14 ++++++++++++-- - 1 file changed, 12 insertions(+), 2 deletions(-) + drivers/net/nfp/nfp_ethdev.c | 18 ++++++++++++++---- + 1 file changed, 14 insertions(+), 4 deletions(-) @@ -21 +23 @@ -index 4b31785b9f..ef1c2a94b7 100644 +index 7495b01f16..e704c90dc5 100644 @@ -24 +26 @@ -@@ -527,26 +527,36 @@ error: +@@ -201,30 +201,40 @@ error: @@ -30 +31,0 @@ - struct nfp_net_hw_priv *hw_priv; @@ -33 +33,0 @@ - hw_priv = dev->process_private; @@ -35,2 +35,7 @@ -- 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); + 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, hw->nfp_idx, 1); ++ ret = nfp_eth_set_configured(dev->process_private, hw->nfp_idx, 1); @@ -49 +53,0 @@ - struct nfp_net_hw_priv *hw_priv; @@ -52 +55,0 @@ - hw_priv = dev->process_private; @@ -54,2 +57,7 @@ -- 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); + 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, hw->nfp_idx, 0); ++ ret = nfp_eth_set_configured(dev->process_private, hw->nfp_idx, 0); @@ -62 +70 @@ - static void + static uint8_t