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 8D2A841E29; Fri, 10 Mar 2023 07:26:28 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4E5AD42B71; Fri, 10 Mar 2023 07:26:18 +0100 (CET) Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2107.outbound.protection.outlook.com [40.107.92.107]) by mails.dpdk.org (Postfix) with ESMTP id 2BB9041144 for ; Fri, 10 Mar 2023 07:26:17 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lRFQotB9pdopP6XkEi33RcQ4WabaEuf22sACmiDp3IHQrOaVXvOKMqHIW3zGxYlZZc4QhyT2K300Axh4UZG3NsIggxC5rG+NfDF+uNoslcFMq+2NUA6SD5Qbn8fMRIpaxDZwmLuOn/K464UtI7aNEnbKpJZO8o/T2UYP/hSuUqwZopD60LNlf+YUHFjhd+9mGVYz1gvzCk8/REvqQDaWSZ9sXRHm9izUXM/tZzewZBR1DxOUxs97wVeU2fs+fLlx+WLtH+ZgrrwiZLhKLyHTVjtm7Woe1nFnmIE/EhU/a0XCPbkhBQueBHaCooYCwG2fs/APymU4NxMkkFfAOp6FHg== 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=MvzxUBHp9I3+fIhKY8Q+4HWSdxwFWpYLRBuID1woCz0=; b=W+47tVXfgH0fk/un8z0LYP+WgPT3Me0sl1ws7CZYW3CmN8Uha7kl60ubAEq6tWQ+r4SsfO93Xi16WB/maZkDDeQLEBlnr77PPvo/12ltRpGpFuQkK4tG0E6jq8wkk3qmXDUWJLfRLuqL7Js12vlscv3nxImgpb37nTbWeowAqZPcGl+wL12yWDfsOTq9h94vJP445aPk9jhVqy9asstKvpOiUYM029oWIJGPF/91sA+uUj0+7st4dj08RZmsCrfiFynt9DEsrnEbOkPNz712n1p/fUTJpxy88QeF1RhBtGgklDoLC9ANFz6AkuV57/LkGMaOnfnzjhR++EHJi0o65w== 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=MvzxUBHp9I3+fIhKY8Q+4HWSdxwFWpYLRBuID1woCz0=; b=auoPJx9xAJgwZ/Uxpvb4tnu4iD8Q9O9sI+KP8uw6lpnPm0vSrd+9N18214oSpdEaUWvBFS4Wvj9d57aygX6MwCVFLVCOERJSs6H3jAU/tH5cm07mKZz5bMk7Uliu8tWkHkqqjVCSjk6JT9OM3ypVmKpzM7ZR1CutMZ2mNa1I5iw= 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 PH7PR13MB5913.namprd13.prod.outlook.com (2603:10b6:510:158::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.17; Fri, 10 Mar 2023 06:26:15 +0000 Received: from SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::b19d:4343:f34f:a817]) by SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::b19d:4343:f34f:a817%3]) with mapi id 15.20.6178.017; Fri, 10 Mar 2023 06:26:15 +0000 From: Chaoyong He To: dev@dpdk.org Cc: oss-drivers@corigine.com, niklas.soderlund@corigine.com, James Hershaw , Chaoyong He Subject: [PATCH v2 2/2] net/nfp: write link speed to control BAR Date: Fri, 10 Mar 2023 14:25:42 +0800 Message-Id: <20230310062542.817107-3-chaoyong.he@corigine.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230310062542.817107-1-chaoyong.he@corigine.com> References: <20230221062955.34210-1-chaoyong.he@corigine.com> <20230310062542.817107-1-chaoyong.he@corigine.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: SI2PR06CA0007.apcprd06.prod.outlook.com (2603:1096:4:186::9) To SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR13MB5545:EE_|PH7PR13MB5913:EE_ X-MS-Office365-Filtering-Correlation-Id: 8bafc7ce-ca01-49b9-247c-08db213059f3 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: y1X8wLVYKjQkpd2vZ9u/VXVjfAuK05PZdjzsduOIjxnHyK3CBJy6rgE7S/Z7LvRASlQwIsdokEJqqmkHuhTMegzkfwhZJURqtzceNP895gRmxuMBPzegmcubVEyD9gksSzFjJ2wOZLgq5AQ/21F5ncPyZEpBVt1Vt0mXqGV33wN3+U7+jdYNa6zJgsdziJvINASvFm+NIUmCNpzkeA9JiX1LmVd09RIVIfkrV3bvkhy0FT3k2biLtuPFwrEVQM8eOjEahhwGORyZuNRymTIZnE3VxJaMuN3mHhLlIQA/RQD9j8CPQJqNcsqRSQtpd1x8kOVL9aoTclNXJh0aptuN0PUrWPMvv5t2SRwWWyhLkvyWHOaERAtRyCXDIouURoxFmSWJAS+ov5RZu7Lb+PcIAOqAAIimlgjznRVhndIf1lzVbQsjJsFHi/ouaBm0JODTqG/YGcDcLt3VZ1/RRwXRRMdHEwNqi0iCKvOYc7Qu17PEVa5Hcmf/LMyYdxOYN8OwmS1m8Fu+414OkiE0PDNIseRDQpRUp9Nc7vF4c3irgqKu6dflplAwNOgXL2nhNMHpBynG3ipguNfetiauvtd4dvjfWZit20S2YOEPa8k88FHaRkKk5WvE/Mmwg1Sz/yIjBwM9cs77FsUq/AREPVh4fOXi2O+6poWgixsNgcKIDRAqSQ0p4G/dgFU0DPBPD9QfQu3PqLYHyXrD/KvLO+I+6w== 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:(13230025)(4636009)(346002)(366004)(39840400004)(396003)(136003)(376002)(451199018)(54906003)(36756003)(478600001)(44832011)(66476007)(107886003)(6486002)(52116002)(316002)(5660300002)(8936002)(2906002)(66946007)(66556008)(6916009)(8676002)(4326008)(41300700001)(1076003)(6512007)(38350700002)(38100700002)(86362001)(186003)(6666004)(2616005)(6506007)(83380400001)(26005)(66574015); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?UmpuV3BlTHI1MGN0YXBSZ0ZpSUlUeERUWEVVbVpsRi9TV2tjTlM1ek9DZWM0?= =?utf-8?B?T1lpS2tCRDNRWXMzVFpLaWRhRGczeHorUjl1OEg0NGJOdmFQZzRkT3VxcU1S?= =?utf-8?B?S2VGbWtWbHlYWXB4OGZSZG9SQmpUNnFDVzVmMXhHc1dIenBBT1I3NmlPbkdm?= =?utf-8?B?RnlubVY5aVl5UXpGTDRyWmhDcjlqbnZSRWF5SkhFY0QzdUlDb1NKYm5JSFZE?= =?utf-8?B?WEpDdFdlL09YSlJVWHVmNkdmUFA5TnFYSTdPUTNkbU93K3l0aUU0YVIxdUdM?= =?utf-8?B?UWpBZWlaNDdmWWt6WjZvUTFRUndxMEFvb2xma2hVKzB2bUEvL3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2SitHdktCNXM5eHlRUy9IV0F6Mkc2cGN5cC8waVVRQ0Ix?= =?utf-8?B?ZGc9PQ==?= X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8bafc7ce-ca01-49b9-247c-08db213059f3 X-MS-Exchange-CrossTenant-AuthSource: SJ0PR13MB5545.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Mar 2023 06:26:15.6199 (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: DurJTK9mAv+ILXYjBIN/A79KHPexZs1UiEDEejo+9JgCsQj5/U5Bg3oWxDTH8HQLbhQD2VKMS03+1jtctPMs4IoVDWKdKDetSzS8pSekjso= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR13MB5913 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 From: James Hershaw Due to changes in the firmware for NFPs, firmware will no longer write the link speed of a port to the control BAR. In line with the behaviour of the kernel NFP driver, this is now handled by the PMD by reading the value provided by the NSP in the nfp_eth_table struct within the pf_dev of the port and subsequently writing this value to the control BAR. Signed-off-by: James Hershaw Reviewed-by: Niklas Söderlund Reviewed-by: Chaoyong He --- drivers/net/nfp/nfp_common.c | 104 +++++++++++++++++++++++------------ drivers/net/nfp/nfp_ctrl.h | 9 +++ 2 files changed, 77 insertions(+), 36 deletions(-) diff --git a/drivers/net/nfp/nfp_common.c b/drivers/net/nfp/nfp_common.c index 5d92b476e2..2261d955c8 100644 --- a/drivers/net/nfp/nfp_common.c +++ b/drivers/net/nfp/nfp_common.c @@ -52,6 +52,58 @@ #include #include +static const uint32_t nfp_net_link_speed_nfp2rte[] = { + [NFP_NET_CFG_STS_LINK_RATE_UNSUPPORTED] = RTE_ETH_SPEED_NUM_NONE, + [NFP_NET_CFG_STS_LINK_RATE_UNKNOWN] = RTE_ETH_SPEED_NUM_NONE, + [NFP_NET_CFG_STS_LINK_RATE_1G] = RTE_ETH_SPEED_NUM_1G, + [NFP_NET_CFG_STS_LINK_RATE_10G] = RTE_ETH_SPEED_NUM_10G, + [NFP_NET_CFG_STS_LINK_RATE_25G] = RTE_ETH_SPEED_NUM_25G, + [NFP_NET_CFG_STS_LINK_RATE_40G] = RTE_ETH_SPEED_NUM_40G, + [NFP_NET_CFG_STS_LINK_RATE_50G] = RTE_ETH_SPEED_NUM_50G, + [NFP_NET_CFG_STS_LINK_RATE_100G] = RTE_ETH_SPEED_NUM_100G, +}; + +static uint16_t +nfp_net_link_speed_rte2nfp(uint16_t speed) +{ + uint16_t i; + + for (i = 0; i < RTE_DIM(nfp_net_link_speed_nfp2rte); i++) { + if (speed == nfp_net_link_speed_nfp2rte[i]) + return i; + } + + return NFP_NET_CFG_STS_LINK_RATE_UNKNOWN; +} + +static void +nfp_net_notify_port_speed(struct rte_eth_dev *dev) +{ + struct nfp_net_hw *hw; + struct nfp_eth_table *eth_table; + uint32_t nn_link_status; + + hw = NFP_NET_DEV_PRIVATE_TO_HW(dev->data->dev_private); + eth_table = hw->pf_dev->nfp_eth_table; + + /** + * Read the link status from NFP_NET_CFG_STS. If the link is down + * then write the link speed NFP_NET_CFG_STS_LINK_RATE_UNKNOWN to + * NFP_NET_CFG_STS_NSP_LINK_RATE. + */ + nn_link_status = nn_cfg_readw(hw, NFP_NET_CFG_STS); + if ((nn_link_status & NFP_NET_CFG_STS_LINK) == 0) { + nn_cfg_writew(hw, NFP_NET_CFG_STS_NSP_LINK_RATE, NFP_NET_CFG_STS_LINK_RATE_UNKNOWN); + return; + } + /** + * Link is up so read the link speed from the eth_table and write to + * NFP_NET_CFG_STS_NSP_LINK_RATE. + */ + nn_cfg_writew(hw, NFP_NET_CFG_STS_NSP_LINK_RATE, + nfp_net_link_speed_rte2nfp(eth_table->ports[hw->idx].speed)); +} + static int __nfp_net_reconfig(struct nfp_net_hw *hw, uint32_t update) { @@ -111,6 +163,9 @@ nfp_net_reconfig(struct nfp_net_hw *hw, uint32_t ctrl, uint32_t update) PMD_DRV_LOG(DEBUG, "nfp_net_reconfig: ctrl=%08x update=%08x", ctrl, update); + if (hw->pf_dev != NULL && hw->pf_dev->app_fw_id == NFP_APP_FW_CORE_NIC) + nfp_net_notify_port_speed(hw->eth_dev); + rte_spinlock_lock(&hw->reconfig_lock); nn_cfg_writel(hw, NFP_NET_CFG_CTRL, ctrl); @@ -538,27 +593,15 @@ nfp_net_link_update(struct rte_eth_dev *dev, __rte_unused int wait_to_complete) { struct nfp_net_hw *hw; struct rte_eth_link link; - struct nfp_eth_table *nfp_eth_table; - uint32_t nn_link_status; - uint32_t i; + uint16_t nn_link_status; int ret; - static const uint32_t ls_to_ethtool[] = { - [NFP_NET_CFG_STS_LINK_RATE_UNSUPPORTED] = RTE_ETH_SPEED_NUM_NONE, - [NFP_NET_CFG_STS_LINK_RATE_UNKNOWN] = RTE_ETH_SPEED_NUM_NONE, - [NFP_NET_CFG_STS_LINK_RATE_1G] = RTE_ETH_SPEED_NUM_1G, - [NFP_NET_CFG_STS_LINK_RATE_10G] = RTE_ETH_SPEED_NUM_10G, - [NFP_NET_CFG_STS_LINK_RATE_25G] = RTE_ETH_SPEED_NUM_25G, - [NFP_NET_CFG_STS_LINK_RATE_40G] = RTE_ETH_SPEED_NUM_40G, - [NFP_NET_CFG_STS_LINK_RATE_50G] = RTE_ETH_SPEED_NUM_50G, - [NFP_NET_CFG_STS_LINK_RATE_100G] = RTE_ETH_SPEED_NUM_100G, - }; - PMD_DRV_LOG(DEBUG, "Link update"); hw = NFP_NET_DEV_PRIVATE_TO_HW(dev->data->dev_private); - nn_link_status = nn_cfg_readl(hw, NFP_NET_CFG_STS); + /* Read link status */ + nn_link_status = nn_cfg_readw(hw, NFP_NET_CFG_STS); memset(&link, 0, sizeof(struct rte_eth_link)); @@ -567,28 +610,17 @@ nfp_net_link_update(struct rte_eth_dev *dev, __rte_unused int wait_to_complete) link.link_duplex = RTE_ETH_LINK_FULL_DUPLEX; - if (hw->pf_dev != NULL) { - nfp_eth_table = hw->pf_dev->nfp_eth_table; - if (nfp_eth_table != NULL) { - link.link_speed = nfp_eth_table->ports[hw->idx].speed; - for (i = 0; i < RTE_DIM(ls_to_ethtool); i++) { - if (ls_to_ethtool[i] == link.link_speed) - break; - } - if (i == RTE_DIM(ls_to_ethtool)) - link.link_speed = RTE_ETH_SPEED_NUM_NONE; - } else { - link.link_speed = RTE_ETH_SPEED_NUM_NONE; - } - } else { - nn_link_status = (nn_link_status >> NFP_NET_CFG_STS_LINK_RATE_SHIFT) & - NFP_NET_CFG_STS_LINK_RATE_MASK; + /** + * Shift and mask nn_link_status so that it is effectively the value + * at offset NFP_NET_CFG_STS_NSP_LINK_RATE. + */ + nn_link_status = (nn_link_status >> NFP_NET_CFG_STS_LINK_RATE_SHIFT) & + NFP_NET_CFG_STS_LINK_RATE_MASK; - if (nn_link_status >= RTE_DIM(ls_to_ethtool)) - link.link_speed = RTE_ETH_SPEED_NUM_NONE; - else - link.link_speed = ls_to_ethtool[nn_link_status]; - } + if (nn_link_status >= RTE_DIM(nfp_net_link_speed_nfp2rte)) + link.link_speed = RTE_ETH_SPEED_NUM_NONE; + else + link.link_speed = nfp_net_link_speed_nfp2rte[nn_link_status]; ret = rte_eth_linkstatus_set(dev, &link); if (ret == 0) { diff --git a/drivers/net/nfp/nfp_ctrl.h b/drivers/net/nfp/nfp_ctrl.h index 75e4458a1b..244048796c 100644 --- a/drivers/net/nfp/nfp_ctrl.h +++ b/drivers/net/nfp/nfp_ctrl.h @@ -178,6 +178,15 @@ #define NFP_NET_CFG_STS_LINK_RATE_40G 5 #define NFP_NET_CFG_STS_LINK_RATE_50G 6 #define NFP_NET_CFG_STS_LINK_RATE_100G 7 + +/* + * NSP Link rate is a 16-bit word. It is no longer determined by + * firmware, instead it is read from the nfp_eth_table of the + * associated pf_dev and written to the NFP_NET_CFG_STS_NSP_LINK_RATE + * address by the PMD each time the port is reconfigured. + */ +#define NFP_NET_CFG_STS_NSP_LINK_RATE 0x0036 + #define NFP_NET_CFG_CAP 0x0038 #define NFP_NET_CFG_MAX_TXRINGS 0x003c #define NFP_NET_CFG_MAX_RXRINGS 0x0040 -- 2.39.1