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 7D6A945B00 for ; Thu, 10 Oct 2024 11:17:57 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E44A240671; Thu, 10 Oct 2024 11:17:54 +0200 (CEST) Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2092.outbound.protection.outlook.com [40.107.223.92]) by mails.dpdk.org (Postfix) with ESMTP id BDECE40614; Thu, 10 Oct 2024 11:17:48 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=XiMW7ng5iWEGbGwB8s5pJSTB8HssdMJIN6ksrMlWhCsvv2ZaVDv/ItH+VwVWE0mAxpszpJNm3BsHXVRIM+FwxEpnljEv8XEVFfAQ0pxbG0PIi+kfsjnabmOqOkWmavFyCzcoZeUuRaRMg5uGfWnQyRsss+xAia3LYjtjjhyGf14zs/8wH3NlToAFO+16QtaYtVKE9GkXUDAWnim35ZV+EndEvFzfiieDweEPP6Wxg7H/sBr4fsB+022NwP4/5w1MiqejZQgvKpU/Yhwzguyz7GSUUHiAoMlGMd+BtDPF0mD9KjeUNCB39aiLN+1kiKicNUayrA4jcqn99TKkZsTISw== 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=xKpIMuyiJa63K4pHNvPDdQpbPqW5u5ESGwAtf4tu/wA=; b=VPf9FY3SUPIVAHHhWZox4kw0LAKi5QzBdfLVgzupG5qQSO5BwzoJZkl4fT5IR4TxfvGu4QljqEqrajaZzZT+kKL6lGGILP2XEFFESHLc11PdxKJ4urMplh9A6oLNq1CfxxJ8EFyponRrDGdDXzZ6h29phj4F94YurHxfjXr9Vyh7i7rg1gHm+VShh1CRw4JCPS25d/8tt7iHSL9K/SgqbAGHNeddkjZfbcd8sX5Fewp6tx8nuIUwAQY60MOC62Yn5A/44BtS2PMiTOixxgSd3cWQcBYdxiflTd1thzFgL3nQkfOetFELjXoJAaXgss5dXN3d+u91fgopKgCgntEVaQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=corigine.com; dmarc=pass action=none header.from=corigine.com; dkim=pass header.d=corigine.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=corigine.onmicrosoft.com; s=selector2-corigine-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=xKpIMuyiJa63K4pHNvPDdQpbPqW5u5ESGwAtf4tu/wA=; b=Qyd4EmWS+P1gAWRvZpPxWI8TW3o+haE/frmjjy6NnDhtToyL9h2dRuA7s8EwDjua0U1KtN/ia9PcjguPFAnr5/IKQDZrNPEcEdU1KXUqznbGfEYQJlcHERFIjRsaM/8iEmJkDxHUO6LTeI9Kln66hiGh/pKoR4RgjBoYt/KxhNY= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=corigine.com; Received: from SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) by MW3PR13MB3980.namprd13.prod.outlook.com (2603:10b6:303:5c::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8048.18; Thu, 10 Oct 2024 09:17:47 +0000 Received: from SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::b900:5f05:766f:833]) by SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::b900:5f05:766f:833%5]) with mapi id 15.20.8026.020; Thu, 10 Oct 2024 09:17:47 +0000 From: Chaoyong He To: dev@dpdk.org Cc: oss-drivers@corigine.com, Chaoyong He , stable@dpdk.org, Long Wu , Peng Zhang Subject: [PATCH 05/10] net/nfp: fix problem caused by configure function Date: Thu, 10 Oct 2024 17:17:11 +0800 Message-Id: <20241010091716.3631747-6-chaoyong.he@corigine.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20241010091716.3631747-1-chaoyong.he@corigine.com> References: <20241010091716.3631747-1-chaoyong.he@corigine.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: TP0P295CA0060.TWNP295.PROD.OUTLOOK.COM (2603:1096:910:3::15) To SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR13MB5545:EE_|MW3PR13MB3980:EE_ X-MS-Office365-Filtering-Correlation-Id: 2851465e-d394-46a0-f393-08dce90c67cb X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|366016|376014|52116014|1800799024|38350700014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?4i6FaOGcMyD/htNry//6PB0SOMYQS9WwXBURPVOBBnO8eEYGbMgVsM5jueCF?= =?us-ascii?Q?yFx0YOhbsJWEyYPBUuB4MDeBcxmafmNcgOMS3G2u2z/AD/sKhstrZfRkexlV?= =?us-ascii?Q?5++cfGalXNzToW71C7FDV5V5UJ+rzFGBBqaYHRzg/lNsXnxPq13bzUHH/o73?= =?us-ascii?Q?tcuzU/hI3yPieDkgk683pZOiggh4AOrFdduNG7Jg/IdAD1h1r7AnUslIlsLV?= =?us-ascii?Q?Vfvu3npYdtCxtP4F3bdcjI8FPohp2SiGGrwFc8zTeZqnECCca1q1oYfZ7z/i?= =?us-ascii?Q?hcU6wwRb6bkWhNFe7/2VQ6REc1uPmQ2Mx8rs+4xfjfPpy9BnP8uW9DQZ4abs?= =?us-ascii?Q?bmx2jRjQkbT7T7R80OU/XCOYGkM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ascii?Q?D0tBtUaMwp7+DMTARZWVr4jqmyKOnNYRWKJJl0yZuK0SPON7HYAAHzqwWf53?= =?us-ascii?Q?NxcXkFrsMA4nbZElLY0afdStlDtbmQ1cTU2o6pTU4OKE+g=3D=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR13MB5545.namprd13.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(366016)(376014)(52116014)(1800799024)(38350700014); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?ntTvlBskcPUJXBiLRYTtqfQCXxtXNuY65TWznAIRtQpupgz5CoL/QGRb3C++?= =?us-ascii?Q?tt70GT4lQIdHSJhXMkF+LcPWiVxxTn74eykiyK7p5h9uuHnvOI8EoYsRA4GA?= =?us-ascii?Q?O428Q1ZMcH8Q1lBAL7Y3AoGU2M7EgXWlkKA965DOsu2iYlZvgMtjdyCvyogS?= =?us-ascii?Q?TQBcUefJFPweLHc/4SRvqF0LVakAb46sRjb8vGxt8KM0XTaP8BHS55DEfBB1?= =?us-ascii?Q?GJTXNzHismR8fHn3shSXDcfs1AAu9GYgfzxGZlf85jXB3ixTXBhEXmlqPTWy?= =?us-ascii?Q?xV0ZSvsgozo0i9/K8bCXAgIBjeQ1UmtioXhBg+uK4PUuxEkdP9Rf/JKh0Vw/?= =?us-ascii?Q?czLDEWt24hA9Ew3eNDZesWg4oQwPIFOp+dWhexmeeSJ6oT/ko7hN1DQlHp3i?= =?us-ascii?Q?919XoIeFffsAxHdfH1Np8udhoiIl1tjeJ2Vhb06yYBOkz8BqcFSu6mkg0zKy?= =?us-ascii?Q?yWGy3SBERJ2+rX9g+owbzW9+N+lKcOVIT9hZVzyooo1rGP/frB9TKHXDb8yB?= =?us-ascii?Q?Zo+JZgGvtqiOJz63ak+J0/xn+ZKkP6QRqgKlQz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KpUdvML6xnlx+xW0SUpsDiXB7P2pd5tzoylg/109AK2Ow/BXAuC2eGu?= =?us-ascii?Q?Xh0oGqsgIwbFWDxi+szJ8AK1sIRZhD7GoNIXTFcdcBqcZReOF+NCfX32h7zF?= =?us-ascii?Q?XlFPgGnVtxHJOxZXtrJiLJzoivVTR9LQO1ChQwIN9IqfFf04S3CqI1kNAFIt?= =?us-ascii?Q?Pw=3D=3D?= X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2851465e-d394-46a0-f393-08dce90c67cb X-MS-Exchange-CrossTenant-AuthSource: SJ0PR13MB5545.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Oct 2024 09:17:47.1794 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: fe128f2c-073b-4c20-818e-7246a585940c X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: AlFf2olq/7L1yahnRCeKUezrtdG8drpYQD3SvXYpV+l8FeICnxzrUrLeyiMaOTEd9WBMDLlRG9dX1UwWM0xToWY5KqLDfDpQRzW6RXSWXYM= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW3PR13MB3980 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 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") Cc: stable@dpdk.org Signed-off-by: Chaoyong He Reviewed-by: Long Wu Reviewed-by: Peng Zhang --- drivers/net/nfp/nfp_ethdev.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/drivers/net/nfp/nfp_ethdev.c b/drivers/net/nfp/nfp_ethdev.c index 405386e882..2fe6b1a292 100644 --- a/drivers/net/nfp/nfp_ethdev.c +++ b/drivers/net/nfp/nfp_ethdev.c @@ -527,26 +527,36 @@ nfp_net_start(struct rte_eth_dev *dev) static int nfp_net_set_link_up(struct rte_eth_dev *dev) { + int ret; struct nfp_net_hw *hw; struct nfp_net_hw_priv *hw_priv; hw = dev->data->dev_private; hw_priv = dev->process_private; - 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 (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; struct nfp_net_hw_priv *hw_priv; hw = dev->data->dev_private; hw_priv = dev->process_private; - 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 (ret < 0) + return ret; + + return 0; } static void -- 2.39.1