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 0CA3B45B17; Sat, 12 Oct 2024 04:42:32 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2FC324065D; Sat, 12 Oct 2024 04:42:00 +0200 (CEST) Received: from NAM04-BN8-obe.outbound.protection.outlook.com (mail-bn8nam04on2130.outbound.protection.outlook.com [40.107.100.130]) by mails.dpdk.org (Postfix) with ESMTP id 10BA34066F; Sat, 12 Oct 2024 04:41:57 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=HYNjZBW0i7Dc7CSGnPYNkAlnavQfXrbsmTUNxIucy3vAfJAkyXEl5AbfZbI5pQ/4+74v1FBARepRu2pl8UVHxWXDfy4mAkjn2c367olotk25vx9XJqWeU7DkD4WlUwfq1dgH8bNLJvq7kZDzhXsaO+MBTuJWIIxt/DMBesV86JrTqPdMEBGTcjUU3LNe+jaN43qF+AV1i4SjtffA0K0KyHWXHRs9blkorbQv+oezLE9j9wpNiOaE/lzIXtPpnVdF2wkwlwSwpBnc9YitmUS6/rlxbP2D7wpzngRY0b8crub4QAIfWAgbQo40uxLWOpjePyTvy14Xapf0O2gqdp33mA== 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=GMKeVKgUircUcTChx6bPwoUv0quQwG0cPkPIbJqoIao=; b=bTuCsTUYM7efW7OxVEzUDmeaW1Ck1IdehHXdMc/BnmOdqyxTB1Tkznpe0vDoyFEj5Ad8X/ojMV3Yyegi8Ce34VYE5FXbl48LAUyknRhbVYBtIl1kKr2C/fJUFlo9ndNnuLE0fZ7pTCjTiwkDcDwJPw69STKuzb/gslpJnQLivVjCrK0DtJq7sUy5/CMqj0aZub4ZOCaJqkGfS8CwB525h1lGQ3IYkEIU/bxV0WLOVkhyLQIW0BjbVNyWI2l0ufGnsPc5ACdxUCCgzssCgoHvF4Twj8wcHjby8PnZnlQebCjc7TZ2VD9Ibf45RdwvlXzd9N5TNL1vHsZH6AOzr9gL2A== 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=GMKeVKgUircUcTChx6bPwoUv0quQwG0cPkPIbJqoIao=; b=Ynnj/in38KZuG1yK3tiuiZzpF4lGw7fuoF9oMYx554y4NMACNNpSI7rECOMARaJCiag6qq0ftwUhFF+VFPtZYHU7V7zbNVBAF/EwkZ4UoXjnS2S1+SKfsyP0eheON0Dqtyt3OLcWr+HQiYSlkEXcwIwosTxQrHj9bNZDQzEVJHA= 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 CO1PR13MB4902.namprd13.prod.outlook.com (2603:10b6:303:f0::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8048.21; Sat, 12 Oct 2024 02:41:55 +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.8048.017; Sat, 12 Oct 2024 02:41:55 +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 , Stephen Hemminger Subject: [PATCH v2 08/10] net/nfp: fix problem caused by FEC set Date: Sat, 12 Oct 2024 10:41:05 +0800 Message-Id: <20241012024107.3795935-9-chaoyong.he@corigine.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20241012024107.3795935-1-chaoyong.he@corigine.com> References: <20241010091716.3631747-1-chaoyong.he@corigine.com> <20241012024107.3795935-1-chaoyong.he@corigine.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SI2PR06CA0001.apcprd06.prod.outlook.com (2603:1096:4:186::21) To PH0PR13MB5568.namprd13.prod.outlook.com (2603:10b6:510:12b::16) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR13MB5545:EE_|CO1PR13MB4902:EE_ X-MS-Office365-Filtering-Correlation-Id: e017c87f-61a8-4c56-2559-08dcea676f4e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|376014|366016|52116014|1800799024|38350700014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?YQPBjMuc7r9cuBw4Pwk+qFrKWcnzE8NYVqLrEDs0ycae9iV2UJEClcgoX8C3?= =?us-ascii?Q?LNiKWw8wgrSVXK7rRC2UMcf4bc4abNjeSdUw2O0hcoWbZQLpO/V7dKDlkCBx?= =?us-ascii?Q?E2kj2bdGCAsZtwEWAj1NenYW60zMgCQxAvWNKDZexTfA4zQMEGtnUr4j2bLd?= =?us-ascii?Q?J6x9IUBcU/MNAVas0EIykrFbaiAxFjJm8R9PPyMovVRYu0qhJKKahOX4lz/W?= =?us-ascii?Q?6cyQ5m0bLMqyNLYTMoVI1ltlaOgpLeD3sdRnnJ1Y8cBlw3arO0IWO8I8J01T?= =?us-ascii?Q?e3By2I09sBgdcSBFRUDgmyOFinvo3oWVlG4NGS/4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eu0+VjM1bT3mqtrO2YvlVH3V6X9fXNzyLca5G/PXpUE6H0kx7hc?= =?us-ascii?Q?RcA5LVw5hbQ6yPJuXt7qUypRKilamd10EIfTFnPHaaGVmdOszA1of6Zr4j5V?= =?us-ascii?Q?pMzvYnOzEBjvOkBkbTXdxKAelzwE4dLlnRHbtGUG4840eg=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)(376014)(366016)(52116014)(1800799024)(38350700014); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?gpuyKPcLn6wQI61xBfDsHNdv/Z/tnZWdN2NIp+NA69sDBpQfyqbaJ733JP7s?= =?us-ascii?Q?wDOjhQItz7vu1jzeEl6XfkW09Iem2DG6cQgtpPVFtJp3CLP1aIBEHWePvr6v?= =?us-ascii?Q?x5DJCQ6wjTsM4AV9AVyvD+ZfHpVsMSUK0t9ZB9ld4IPDbJBKclgfRBp5uAvV?= =?us-ascii?Q?ZJ3oqKUKRR4g8fk0WAEdDDqzXhG6Ac82ZWAuOsD7YGt6m53qBeuQ78mY68d9?= =?us-ascii?Q?vg9pKT05b9VZqQ5434fpVz/a13PoeOr6XnY+3qUBOKSd9qqP1QXcAFPNj+K5?= =?us-ascii?Q?kssOFikW6+nFP5H7JMqsp6PiLHm5ljJVGBQW0q2UYj9Qebk/RtGAfosuvb7/?= =?us-ascii?Q?CQ9xwwCbs2Jv6mhY2tIvcZB+Cio1Av4K3buW32b1lqlL92tP2caSNuD3jeCq?= =?us-ascii?Q?22CoRAMZYQK7FPxmovrzUk7iPZI/RvTmPQqsZBn/EfTKYAt3qo0UZm4VLzHn?= =?us-ascii?Q?pPeJTYDXLm1RZKPGI38NL4PCUqa/UnCCZ25MRB5Xbpvw+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L4QFSPpCYmZosxlwjtaPhaHmHWPlibWMZ?= =?us-ascii?Q?/J6Jxaw+oGQVlMMjiGQrdi0mL74xkpbDXxMrJUH555bIXKW88T0UGt+hSmka?= =?us-ascii?Q?2sEeQn/m8MN7irQsuGjqP08mwlCRWPdH36mml7elNovpMir9xZtlCAywBcio?= =?us-ascii?Q?nAhwnt1dSER2ahPaih8sl9CaLsogIqsr7EyPRfHA4nMJzwYAPN/oICcUfn98?= =?us-ascii?Q?mA=3D=3D?= X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: e017c87f-61a8-4c56-2559-08dcea676f4e X-MS-Exchange-CrossTenant-AuthSource: PH0PR13MB5568.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Oct 2024 02:41:55.4279 (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: CMFdr4WtY9Jcbj6IPsGFJ7SGy2O6h0bBl8L/uaoNphISyqD6M1qQfaiAyoiPr+By1liPcSlnm50nXPG1snKfLJPxep1D7oP1HMYmw7bsZKw= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR13MB4902 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 Acked-by: Stephen Hemminger --- 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