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 1362D45B00; Thu, 10 Oct 2024 11:18:41 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A762F40662; Thu, 10 Oct 2024 11:18:02 +0200 (CEST) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2103.outbound.protection.outlook.com [40.107.94.103]) by mails.dpdk.org (Postfix) with ESMTP id 18E8A40678; Thu, 10 Oct 2024 11:17:58 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=DgPK3r8c7DFZjhsR2x6CwW7UnNnPSzmY5iN5C4qXvqeQxbID2Mib6tvkEBUwB/y+VpP3rkN4nTK6JaG+B4oiTwTvDjODO5zKf2YdnzcIFR4h/UHBR1G+DBKsRiYEVi8R7/2osIHJe12gTCqbjpZ6xAu/VQmZHB4Vc8OMyELmZbSLgEVANSJY6E+FMGetYGTN6mYv1r3G/0F3TeTMkSty6HcuGoEFhwRofhOofI1A7H++MWT2lajuGLJEZwrCNszYbckoRHVi1V8Mfdty3xZr8gk7hIxFmpp9fPCH9D+rrPSeEGRnuPcbdDujJeUynjz3D92cpqWxGKk2BDmd4GM1bw== 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=IboY87g8cir5Gpi0fEGbBLb1QBa5V/YeJ/VZWvMxDkE=; b=yjAhLNzlRphANsOHrHqvleiv4rJOjbqCfPrk++NYsivSYiQudgHZlOdfYiuTQ3jFfuRK1SdjstPwuINKeVjl7MQzQ5VhM2GLcm1y6ZzsMes//2LCF7yOw5ky51jjtB7O9wCise7U1pTxcfh3XIYlsgyuL1tZtie3bXh8GKobvR7h9F5T7cV8G/Sj4/m+oQ1XIdOqXb6MhjxQyXHhZcaSqoNyctFPBSfgBhh3V9k+yst+Ch3vBUxuHS9BEULACVtdSKQswt1nYdv52nNsvLhtXtTQLFpxK9GbrF4tfMGTLSH1DIhPqT9Ni8/+AKdgUkqbyp1MLwHwb4dX/5Mq3WVlZA== 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=IboY87g8cir5Gpi0fEGbBLb1QBa5V/YeJ/VZWvMxDkE=; b=cfjfhRrXuXwwGN231aglDfN5yVDpsnO6rzCRjOiR2BmbsloovN+mbjOWYQIpnPr8Gr18y0Xqj22VIkcokzMgFDlCLh3rRKJWJJoLV+P2mGxOFga2SKNgHTKRKdDY6TPmLZiZXbSI0fxCoWIG/3X7cGO/9SdHVAd2Bly57J32m4U= 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 SJ2PR13MB6117.namprd13.prod.outlook.com (2603:10b6:a03:4f8::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8048.16; Thu, 10 Oct 2024 09:17:54 +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:54 +0000 From: Chaoyong He To: dev@dpdk.org Cc: oss-drivers@corigine.com, Chaoyong He , zerun.fu@corigine.com, stable@dpdk.org, Long Wu , Peng Zhang Subject: [PATCH 08/10] net/nfp: fix problem caused by FEC set Date: Thu, 10 Oct 2024 17:17:14 +0800 Message-Id: <20241010091716.3631747-9-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_|SJ2PR13MB6117:EE_ X-MS-Office365-Filtering-Correlation-Id: e207b2b9-c902-4359-a30a-08dce90c6c13 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|366016|1800799024|376014|52116014|38350700014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?99phX5RcLfIQQNOcEv2UiiW2iN8P0hcygeag1XYyy7pagHm0BzPLPPor+obY?= =?us-ascii?Q?ayasnDiLHVHBRpGjIy0NCecA/duTHQbrO6k0BRDL8HYUormi4vpY+9e7Nowd?= =?us-ascii?Q?MtqK4R4iUJJoxMRlQ3951vE35Sij3W5IHwoA3y8xouznm4rTCxkDwD0cka+Q?= =?us-ascii?Q?Q5rb9tWMW4phsBFTBUtGI9+ZVfF2hUSlYeigE/uYDcikkWoGTzUcQWfYPPnh?= =?us-ascii?Q?z8PNgCoyyLc9eYB4aH4cE9+oIYGWPjvnTWrIDrv/0eZvlmEkDJ4rmm8Ejerv?= =?us-ascii?Q?48rML9hoPvuON6c4NlSqJjNXHXJxLmabYUQhX7mUi63s6vKLLnghfwIERSnv?= =?us-ascii?Q?e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AJNRnnQta2el812?= =?us-ascii?Q?txDKRxjod7x7dODJoHymXU/oskCmnW9pUH8PJCn/p/pBEHqG5indqm1AJhax?= =?us-ascii?Q?FCkeQeZRebWzsqnIgDgGPdV6F+8B6MfFVerHnZTPNzXBcA=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)(1800799024)(376014)(52116014)(38350700014); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?8b6/PNlzUk24MwAu/S6U9OEIwCKVBsPT6Fk4PgEMjtRJH6z6w1130g2aOaJ4?= =?us-ascii?Q?EjHT9U5LNjXilRntDKgKCAPdZk6CPs2kRaoMKyFjZV9pV+ZpZqVosHUhp6yv?= =?us-ascii?Q?5JkG6ap5KTO8jHvRPNWN3cQakhvEMxaI5/84g+L2nxuxOPzjjqgY743pL+u2?= =?us-ascii?Q?drtTNEeuG6EHEX9eBPK1KUHnOedX4/tDiPQ33VeqILtXLiXXSIlQZ7C2Zm3b?= =?us-ascii?Q?nYDJEJiJi+EnJsNE1UdgJQXvVEgS8n+jgjFbTaXoe32JuJ5wBAZIGlqfohxq?= =?us-ascii?Q?r1tFuGYGgEiRjmcc7JVLFBvZjS5ZgGNIAiigVDTTHjXkzZo0KHBdTNeUhJ6g?= =?us-ascii?Q?srAcid/elnIpYuVnZBMyYX8iglKGaV6VMu6MjcMbI7ih1mFaAOtJ3tdY9Lrf?= =?us-ascii?Q?gmmamJEudfa6k+jZbS9vfqutEBZDfngAKOI4/6T52K6wmunxTVFwfNc8CqOo?= =?us-ascii?Q?S6Rf9tqwOd4/5pkplHkC/5KKD9SIlWK5SBiqZB0u2TZ+z/oBHWkgwuUS62eo?= =?us-ascii?Q?rC4CTuP3bRInqkELKYdk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1udd8RzZmNgt?= =?us-ascii?Q?pXpkgOsghw06tVh1avr1fpxdpaP7DfQpFj86PzYh9btn/x9lvkpzobYaUh6P?= =?us-ascii?Q?F9B52YFlc3BNWwUTlEaoLH3Ny0eVwMIqqIWrkbnIBqNfz+WpygQQzumVZrhS?= =?us-ascii?Q?fGYKdzqyt2sxnBPL5n6Zblb8J8BzsEm++f6Ok52si1ymxojbFSAFK1b6q9CV?= =?us-ascii?Q?Sg=3D=3D?= X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: e207b2b9-c902-4359-a30a-08dce90c6c13 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:54.4487 (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: +pYjX7YjewB0HVshdHAbuRLNKDIqzMohZGLSFEUel6n+kw4zHlX2nKpyw+UEh8vJUsdeg+XnrEURPAEKdm2+yJhY3ScrN2c5g1TH1is0y1k= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ2PR13MB6117 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org The return value of 'nfp_eth_set_fec()' is three ways, the original logic considered it as two ways wrongly. Fixes: 37bd1b843a20 ("net/nfp: support setting FEC mode") Cc: zerun.fu@corigine.com Cc: stable@dpdk.org Signed-off-by: Chaoyong He Reviewed-by: Long Wu Reviewed-by: Peng Zhang --- drivers/net/nfp/nfp_net_common.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/net/nfp/nfp_net_common.c b/drivers/net/nfp/nfp_net_common.c index 5c3a9a7ae7..b986ed4622 100644 --- a/drivers/net/nfp/nfp_net_common.c +++ b/drivers/net/nfp/nfp_net_common.c @@ -2692,6 +2692,7 @@ int nfp_net_fec_set(struct rte_eth_dev *dev, uint32_t fec_capa) { + int ret; uint8_t idx; enum nfp_eth_fec fec; uint32_t supported_fec; @@ -2724,7 +2725,13 @@ nfp_net_fec_set(struct rte_eth_dev *dev, return -EIO; } - return nfp_eth_set_fec(hw_priv->pf_dev->cpp, eth_port->index, fec); + ret = nfp_eth_set_fec(hw_priv->pf_dev->cpp, eth_port->index, fec); + if (ret < 0) { + PMD_DRV_LOG(ERR, "NFP set FEC mode failed."); + return ret; + } + + return 0; } uint32_t -- 2.39.1