Message ID | 20241010091716.3631747-6-chaoyong.he@corigine.com (mailing list archive) |
---|---|
State | Superseded |
Delegated to: | Ferruh Yigit |
Headers |
Return-Path: <dev-bounces@dpdk.org> X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 53F0D45B00; Thu, 10 Oct 2024 11:18:19 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 96C314066D; Thu, 10 Oct 2024 11:17:53 +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 <chaoyong.he@corigine.com> To: dev@dpdk.org Cc: oss-drivers@corigine.com, Chaoyong He <chaoyong.he@corigine.com>, stable@dpdk.org, Long Wu <long.wu@corigine.com>, Peng Zhang <peng.zhang@corigine.com> 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: 4i6FaOGcMyD/htNry//6PB0SOMYQS9WwXBURPVOBBnO8eEYGbMgVsM5jueCFyFx0YOhbsJWEyYPBUuB4MDeBcxmafmNcgOMS3G2u2z/AD/sKhstrZfRkexlV5++cfGalXNzToW71C7FDV5V5UJ+rzFGBBqaYHRzg/lNsXnxPq13bzUHH/o73tcuzU/hI3yPieDkgk683pZOiggh4AOrFdduNG7Jg/IdAD1h1r7AnUslIlsLVVfvu3npYdtCxtP4F3bdcjI8FPohp2SiGGrwFc8zTeZqnECCca1q1oYfZ7z/ihcU6wwRb6bkWh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IP: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: ntTvlBskcPUJXBiLRYTtqfQCXxtXNuY65TWznAIRtQpupgz5CoL/QGRb3C++tt70GT4lQIdHSJhXMkF+LcPWiVxxTn74eykiyK7p5h9uuHnvOI8EoYsRA4GAO428Q1ZMcH8Q1lBAL7Y3AoGU2M7EgXWlkKA965DOsu2iYlZvgMtjdyCvyogSTQBcUefJFPweLHc/4SRvqF0LVakAb46sRjb8vGxt8KM0XTaP8BHS55DEfBB1GJTXNzHismR8fHn3shSXDcfs1AAu9GYgfzxGZlf85jXB3ixTXBhEXmlqPTWyxV0ZSvsgozo0i9/K8bCXAgIBjeQ1UmtioXhBg+uK4PUuxEkdP9Rf/JKh0Vw/czLDEWt24hA9Ew3eNDZesWg4oQwPIFOp+dWhexmeeSJ6oT/ko7hN1DQlHp3i919XoIeFffsAxHdfH1Np8udhoiIl1tjeJ2Vhb06yYBOkz8BqcFSu6mkg0zKyyWGy3SBERJ2+rX9g+owbzW9+N+lKcOVIT9hZVzyooo1rGP/frB9TKHXDb8yBZo+JZgGvtqiOJz63ak+J0/xn+ZKkP6QRqgKlQzSlhU3De69yIz3J098HCrFEzjP/8kKDOYWDeOupin2M8d/gSSVkpBjcf7zuLUlaTKe0mOXFoeGiSlS+bDiQ2+iU59ni4NP3iVbOiOuYFcIgJ53r/34o7I83JRZwn+uxx0Wtx3XgoY38xQHuoR0EVy3aU5nIX9GEkSe3dF7DCWFYXvzboZJ6gutx/QaPj23XqAEPSbbLBOEcWDkxmgRlH0kV1Mr4YIm8VMtdOV3iX7bAkoVT5got8TJYAw6d7l64kLPZnSyZxh7GUc+40MkFHSSYXCiNJBqu9n6I6lxPMFDQh55KqJEEpX65rSpJO7W2rQoFfHBJQ9ll9UADyhXeoMwhTsYveAI74KCSjGnmHF935TloblC8D+vxiOAxEajXtKCsNwkLHZ0GIWf9Gfc/Y2aR2V2PsTDBc5mvtFR0N3Ah53J7In0stk5QDSSf9VbUVDJ48QVmYSRsnRLaSqcIDTSE6G9hj179nd/56FXCnpzGwJ5/wKSz8noip3njoU4oN8xTH8PBw4DeSP271ObCIQMkHoDPZY8UaaiQ6sNoPwSHIF4vtgMCDCGdP88wlxMtDxEnqPPLIm1BE01pLyslCBVg1lkZ7rFFbW6hTl8buW3v58+gUheVRc0mhOW3aFKj8j1sENu+/KIpkkp0GC/TsTC3iYTZOGMcFXjtgGchaYXVu4+8PLbndrLT9Jat0FUDGD5XtWsF6+balgTX+P1wXbXi64k4f0HubK7IdClTAZd7jWKRvnBEEOJpgp+4vCfr1ZOdoxyH4fb2P+J1+qBywssU3g+POfqFZHEHaJvCiFFRZoCUzOSbJTOJQYE6LHMSyW0RrGZ5td1UH5j2DYVCF2+Cdhgcb0Lu5q6VaKpUdvML6xnlx+xW0SUpsDiXB7P2pd5tzoylg/109AK2Ow/BXAuC2eGuXh0oGqsgIwbFWDxi+szJ8AK1sIRZhD7GoNIXTFcdcBqcZReOF+NCfX32h7zFXlFPgGnVtxHJOxZXtrJiLJzoivVTR9LQO1ChQwIN9IqfFf04S3CqI1kNAFItPw== 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: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions <dev.dpdk.org> List-Unsubscribe: <https://mails.dpdk.org/options/dev>, <mailto:dev-request@dpdk.org?subject=unsubscribe> List-Archive: <http://mails.dpdk.org/archives/dev/> List-Post: <mailto:dev@dpdk.org> List-Help: <mailto:dev-request@dpdk.org?subject=help> List-Subscribe: <https://mails.dpdk.org/listinfo/dev>, <mailto:dev-request@dpdk.org?subject=subscribe> Errors-To: dev-bounces@dpdk.org |
Series |
modify some logic of NFP PMD
|
|
Checks
Context | Check | Description |
---|---|---|
ci/checkpatch | success | coding style OK |
Commit Message
Chaoyong He
Oct. 10, 2024, 9:17 a.m. UTC
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 <chaoyong.he@corigine.com> Reviewed-by: Long Wu <long.wu@corigine.com> Reviewed-by: Peng Zhang <peng.zhang@corigine.com> --- drivers/net/nfp/nfp_ethdev.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-)
Comments
On Thu, 10 Oct 2024 17:17:11 +0800 Chaoyong He <chaoyong.he@corigine.com> wrote: > 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 <chaoyong.he@corigine.com> > Reviewed-by: Long Wu <long.wu@corigine.com> > Reviewed-by: Peng Zhang <peng.zhang@corigine.com> Maybe refering to the return values in nfp_nsp_eth.c would be clearer but makes sense. Acked-by: Stephen Hemminger <stephen@networkplumber.org>
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