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 47424454B8 for ; Mon, 24 Jun 2024 03:57:58 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EE3B04066F; Mon, 24 Jun 2024 03:57:55 +0200 (CEST) Received: from NAM04-MW2-obe.outbound.protection.outlook.com (mail-mw2nam04on2093.outbound.protection.outlook.com [40.107.101.93]) by mails.dpdk.org (Postfix) with ESMTP id A046E4060F; Mon, 24 Jun 2024 03:57:51 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Yv1hCR9CtR5zJe8+KiOT9tuZewew0YiANkdhEzA3lgJ9kWTka0oG6ITrYG/52vygrq4kiBGNCgai+M+LyC1rNSBHSJCjer+HwDoIF0NG8MffmlXHbsxc/PrjT/tazrKVbJfyRhhPudAJOkl5zlT03zPkcbyb1B741LvR0iT/07aRUCUfDYFWM6bfgkHnazc3//dNiPboPUibf3L6E4nWO5lz1itvdZ9QKpYc6SKuViArwbx/fdyzcsiSyCafUUVRZlx+Rauv42SdSPPLW5IkuicQnzz4YJ+FdzuOgScnerqvV05xo4/Hxq6dITuN6S+s0hcS6czDP2RmwXOPQh4Naw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=2t2dl+ULqacAzkVES/zlU5i6MK3yZik0vuE6GqZuSa8=; b=dzlQ72arMdhgo4C1uykwo+WhsjZY3xNAxKFp66fEWiRUpNSRY/D0+PE+XB76CIB0Ta7mI+XhMh6+BkAJFyP+LvlQHlbQhc5mJSZ9yYhsgFnAsoOnw3Kmu+DFI0LO+2VScbLCf5mc0agxooofcXT+gGfJZhGm7smY6U7RDTqWY4j/bw+cc1giufXpsFaLrEpoidXdcJn2rPMMkUtFJR0G3AHHy5meCbBlNuVJS+urbEKZG23YsbYQSUu+pim8cff8/9ZcaKaD5ppWmIU96Jj9pzofbwSCWSbSpryUgtyhA1on7DKRDA5OrMgD0V8zBv4bxO8EcaaqY9u2GIwD0WUMBA== 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=2t2dl+ULqacAzkVES/zlU5i6MK3yZik0vuE6GqZuSa8=; b=YWhaOm4V+puqPY6eTMNTwzXtzDMac84ZzIbM9Z+jIgL3JfTCnrevfNN6MdoaWNcE/5oEufcBX6/O2rU6sGUFo4lE7rtz+ySNVGpf4Altm76r4TtHapisUmhxgtjLLYSlbfVKqtzS+X4nuR1A+a3kXQVeOrWqDLrXUzfa4T5rSFQ= 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 SA1PR13MB5443.namprd13.prod.outlook.com (2603:10b6:806:232::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7677.37; Mon, 24 Jun 2024 01:57:50 +0000 Received: from SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::b900:5f05:766f:833]) by SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::b900:5f05:766f:833%4]) with mapi id 15.20.7698.024; Mon, 24 Jun 2024 01:57:50 +0000 From: Chaoyong He To: dev@dpdk.org Cc: oss-drivers@corigine.com, Zerun Fu , stable@dpdk.org, Chaoyong He , Long Wu , Peng Zhang Subject: [PATCH 03/17] net/nfp: fix link status display problem Date: Mon, 24 Jun 2024 09:57:09 +0800 Message-Id: <20240624015723.3712898-4-chaoyong.he@corigine.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20240624015723.3712898-1-chaoyong.he@corigine.com> References: <20240624015723.3712898-1-chaoyong.he@corigine.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SJ0PR13CA0070.namprd13.prod.outlook.com (2603:10b6:a03:2c4::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_|SA1PR13MB5443:EE_ X-MS-Office365-Filtering-Correlation-Id: 9010f77b-fc88-45c1-ac09-08dc93f10d45 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230037|52116011|376011|1800799021|366013|38350700011; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?3IquUfFlHv+F1BVmjYtjNiSfbhoJ4XrGR5Zcxxst5VfMsiAOygWs18riMkxk?= =?us-ascii?Q?x9zmtG3QKkyxRqqEnvFDwhMS7S1kHg62Y0SrLRUT+UJK6W69ZGUUg83pmSfj?= =?us-ascii?Q?73/DrlUm7U8PYV+6dBeExbjUaYTunyZnhW7xeOeH+o+d8QNvppS/sK/mfQr6?= =?us-ascii?Q?zCXdYK7rzRbtkQzNbMC10LPYr2MDKXX+to8ubgyN1x9OOn5vP03CkAWuxE2D?= =?us-ascii?Q?1CaLs17iBQ2gN5ajjB5Bu5mpj2UwbY3yiO+b+nsNyvotkaNrCIFuxUowoAv6?= =?us-ascii?Q?Earq1NPvYlXzu68U93rxcPShugrFjHST8cTCQ2yMFD1SSeqQFeXjbxjHNx8D?= =?us-ascii?Q?s0v3cTSzN8bAecBUjQsD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G0BPZ7S2H8T?= =?us-ascii?Q?RYKaO/XrVtZcD8hDRH2XXOoqz4idihAOSbUZzesVM6xQn3f5MpoC7WMbcDPq?= =?us-ascii?Q?1WD7/p3+z5jXLUQoYYyu8wCxklauV93XPJHZtRj9IkbwWFkWhs1CukvUSu3X?= =?us-ascii?Q?eg37BXe/h1m18qc57Uaeh9o0buCQ2RN98gYbwEp/NxKMO5x8fw=3D=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR13MB5545.namprd13.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230037)(52116011)(376011)(1800799021)(366013)(38350700011); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?Qbh55RBGj8ZlLbyry4iUiN6LML/Y89HYpPj80oDw1nWg+RTDGnwpjzN/HylX?= =?us-ascii?Q?r0g4F72kvoZXZeL4uZnEDCUV9B1m98xMlrccs6MMetgAnDMhwBoBfY2ygFaR?= =?us-ascii?Q?BD779zULaJS7SobctpwTrhEqKzxKEFX0EllDc+wEIEiQyRBGExEwJemMh0UX?= =?us-ascii?Q?BeT67jGOXj7SLKkLJxsTMv/OupX0b1vA/sD9oq+ZW+c9EzT7bGgxkKt6RcRL?= =?us-ascii?Q?BQlWCo8tytAh8M6neeT6jAL609NCGHfh0ZPB3DpNVjbVFaU8nZ/GX7Qo5Wij?= =?us-ascii?Q?B+Ej5Sxtm/GOIx/MrM2b6ABkOKAy2YnuvL72ss5KrBe295ULdhZQBU06wnzU?= =?us-ascii?Q?y+Ms+PC9q8dy6pJ6hXqNVp8YTHYOp/mJAcvxKzFR5KqqsvdZTO6yE9j0n3CX?= =?us-ascii?Q?zbjFHEcI7LHR7ZYsrU8ke4NsSsGCg2k8oQoWpym8JKCg5yC5pvMPyfmj6vFf?= =?us-ascii?Q?Cx1Cu9chF7tLX8TWly7kdobegX0JXpkH0FSanW6OfEmceSkyqHvuajisqkUn?= =?us-ascii?Q?Ic6V2HFgCGstPh95vFqft/g/6MT5UESdc1aI7iHhDMkjGBPv/aulj+AjM0MK?= =?us-ascii?Q?Jc5wnG4GCjBB+yI5v440clU/krPx3lrCXBSUh5yuuixPXHEW/FHpQ46zvQPw?= =?us-ascii?Q?t3/U0dDVXzKb3KLfGwdA6KXnGJKLgjy798k51M8+YOZ4aYc9jJf5pBrVCNN9?= =?us-ascii?Q?Szx/RUjXCUuE9gz/XgH5KLB+j4rhWpR+fXUftSciieAWP3XnlcJnwvTBUT2H?= =?us-ascii?Q?FLpxoBlsaDbDIKOjlUPGjLIOtvvv2udyHqgjA4zVHiN8xK3aKUD9AtuaLTD/?= =?us-ascii?Q?3MSPDYijfmJK59KsarauJbVv4HvuAVhRPueqfJjl/epMuX1xgoVkqJrdFPIE?= =?us-ascii?Q?6B8ym+67RoDpb0UTEGDOkJeNLNTa85+oKd3YLkh8S7zB6N4QOOi7OHVJvJWb?= =?us-ascii?Q?R15A0fzfg2r8MKjbWgEBDB/KCsdNvVy8+ykGcESFokACweo3AB/PpZPVBmzX?= =?us-ascii?Q?DGRKxv6TMXxUv74xAQwuGb9cI2njpFbsfkovixkngULDQ6jFoEYckMC/sx5Z?= =?us-ascii?Q?46WRceX779SmXuTIKQ4zGFN/xGlO4qjIMYPI8sKa9rIvH/P1aokQvTjcibUJ?= =?us-ascii?Q?bbgYSbKCTVGqhNU1S3wgjpRz0gDt8fIYeCT1czd6qgs8cf+X2dOVD078H4S0?= =?us-ascii?Q?QltEViIGN1gxnBF2H8hIbnmcaujPy+g3zf8Y4KWuEsi2cda0UN6BnSEI/6ZM?= =?us-ascii?Q?zIzuijjP7hptn9UreRf5XTTXWFpiHAOwOika/6tahlEsiP43D7P8moYc8Nyb?= =?us-ascii?Q?5S667O4EQaBcrHoO3blQQ5sZcrnT+KVZXleRxRRx1zq5fN8BRBEI/t3/mA21?= =?us-ascii?Q?nND1xdbRJUu8mPVjaodlaptrM91TkmS+gHsObKr3NBfQ3DyW+9EwSZPRdgWP?= =?us-ascii?Q?JXWFd0q9yHJRRmOu2TQGZfR255hzGniUu0OYA5SFy/NRcG5L86DsvUTFnSsw?= =?us-ascii?Q?afmMbk0DU2yCsy7seNU5q+9cdyoYcr3XA7wlpiEFNeAr8UG2tPdzN6lqqF87?= =?us-ascii?Q?3jNXBittvIOMF5//wL5b2T6g0oJTfHUtKjphmj++htr4BJ+OxSytR3JykW8M?= =?us-ascii?Q?og=3D=3D?= X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9010f77b-fc88-45c1-ac09-08dc93f10d45 X-MS-Exchange-CrossTenant-AuthSource: SJ0PR13MB5545.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jun 2024 01:57:50.1482 (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: kGuPZfhyrYv+xPDUat6BL31mm8TUII2jEBG0cCgoR0zbngN9z8c+bPvAmnaLBJB2tixGz014PouV6R7II7FtqGdJfqAKwxmufHnuti/j7V0= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR13MB5443 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 From: Zerun Fu In the previous logic, the link status will shown as down wrongly whenever the call to 'nfp_eth_read_ports()' fail. Fix this by removing the exit logic when call to 'nfp_eth_read_ports()' fail and just giving a warning. Fixes: 8412feed3f26 ("net/nfp: modify link update function") Cc: stable@dpdk.org Signed-off-by: Zerun Fu Reviewed-by: Chaoyong He Reviewed-by: Long Wu Reviewed-by: Peng Zhang --- drivers/net/nfp/nfp_net_common.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/drivers/net/nfp/nfp_net_common.c b/drivers/net/nfp/nfp_net_common.c index fed8daa188..a6573ed45c 100644 --- a/drivers/net/nfp/nfp_net_common.c +++ b/drivers/net/nfp/nfp_net_common.c @@ -730,7 +730,7 @@ nfp_net_allmulticast_disable(struct rte_eth_dev *dev) return nfp_net_set_allmulticast_mode(dev, false); } -static int +static void nfp_net_speed_aneg_update(struct rte_eth_dev *dev, struct nfp_net_hw *hw, struct nfp_net_hw_priv *hw_priv, @@ -750,8 +750,7 @@ nfp_net_speed_aneg_update(struct rte_eth_dev *dev, if (pf_dev->speed_updated || aneg == NFP_ANEG_AUTO) { nfp_eth_table = nfp_eth_read_ports(pf_dev->cpp); if (nfp_eth_table == NULL) { - PMD_DRV_LOG(DEBUG, "Error reading NFP ethernet table."); - return -EIO; + PMD_DRV_LOG(WARNING, "Failed to update port speed."); } else { pf_dev->nfp_eth_table->ports[hw->idx] = nfp_eth_table->ports[hw->idx]; free(nfp_eth_table); @@ -773,8 +772,6 @@ nfp_net_speed_aneg_update(struct rte_eth_dev *dev, if (dev->data->dev_conf.link_speeds == RTE_ETH_LINK_SPEED_AUTONEG && eth_port->supp_aneg) link->link_autoneg = RTE_ETH_LINK_AUTONEG; - - return 0; } int @@ -790,11 +787,7 @@ nfp_net_link_update_common(struct rte_eth_dev *dev, hw_priv = dev->process_private; if (link->link_status == RTE_ETH_LINK_UP) { if (hw_priv->pf_dev != NULL) { - ret = nfp_net_speed_aneg_update(dev, hw, hw_priv, link); - if (ret != 0) { - PMD_DRV_LOG(DEBUG, "Failed to update speed and aneg."); - return ret; - } + nfp_net_speed_aneg_update(dev, hw, hw_priv, link); } else { /* * Shift and mask nn_link_status so that it is effectively the value -- 2.39.1