From patchwork Fri Oct 27 02:59:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaoyong He X-Patchwork-Id: 133453 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: 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 5C55C4320F; Fri, 27 Oct 2023 05:02:11 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 09FF142E00; Fri, 27 Oct 2023 05:00:57 +0200 (CEST) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2091.outbound.protection.outlook.com [40.107.220.91]) by mails.dpdk.org (Postfix) with ESMTP id 5B0E842DC1 for ; Fri, 27 Oct 2023 05:00:46 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dxzm7wB3NWYW6pDtWqKBp4FLUAHqy8mPPzHSeVGicSXsxfdgtcNVF4CBihbGTCbSDcs9jhMNyC4JGgcU3wBw8U1+49rlrtsnbTaBEvlxjChFwNHbDHTEYLVf4x+lS5bE4v8bKmaEYiN5dylif2jGTmKi3aChts4HqDf5U7jzUOKFCEAAYpY4z6edtWDWah9KcH8HzL9cukrFbGLuxkjV64fYmz1cfBV8Z8iQiASxLuKG7t3ULh+x9qXxhTYRANxXCdvWt2KPTQtq+hhauzDmjQ/exp0zGfGD12QS/SfHaGhgx3TGpeWNInfE/YZ6IWlQ11wpH7oJlQL1kI7Nhl3WDA== 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=6l4RrTx+p2ORCx6/L0mC61f/C1QnDjSNY/xqbz1YhyU=; b=SKVpLEtKzPYa/INVQg1PBs1b7Z9x/L0gcDUgS9pLv5d0gn7KkLRegXHXHNxArPOXuxFqIv5Vw9k84Tg4rPP1DRWKaJ1CArmNjd/cDl7NDXUOC97otcHIUiiUUs5acLcEUn99jgPyEVOOd6aHZ5vSCwNWR+zEO4Rv9c0OjeUNQexqUxkcmUhG9F0sBVOuXqm79R51Apg/Dpeaq95l3NtDmzohhU9pPDlWyk3A76Lp8YKI60wj88x42ZWxTnWwo9oqtScpPero+1nSDzyJMX/SkuTUQZdGW0E7pEt5hei6x4vcC5A2fL/vdCKqXrtnRD8rV6MEld5khPn6ZbYJHwy4xg== 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=6l4RrTx+p2ORCx6/L0mC61f/C1QnDjSNY/xqbz1YhyU=; b=BghQtopfR30QdpqtF/dJvOSjc1+kOoIuagxOc6Ug7zuf2c2q5DnZklCepZ8dj9c92L1x9WQ8HGWB4+1Hzt3PZjHHpULiImx2+MSNy+/zEuOuHzG+JEGC6b0Oq0Ri6ECXCYp6myR1uFsfNc+ulXEE+AiPz495aJ0fOFD6h5OsfYE= 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 DM6PR13MB4493.namprd13.prod.outlook.com (2603:10b6:5:1b9::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6907.33; Fri, 27 Oct 2023 03:00:43 +0000 Received: from SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::45b3:d83c:cff2:4a1b]) by SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::45b3:d83c:cff2:4a1b%6]) with mapi id 15.20.6933.022; Fri, 27 Oct 2023 03:00:43 +0000 From: Chaoyong He To: dev@dpdk.org Cc: oss-drivers@corigine.com, Chaoyong He , Long Wu , Peng Zhang Subject: [PATCH v4 10/24] net/nfp: change parameter of reconfig Date: Fri, 27 Oct 2023 10:59:47 +0800 Message-Id: <20231027030001.602639-11-chaoyong.he@corigine.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20231027030001.602639-1-chaoyong.he@corigine.com> References: <20231026064324.177531-1-chaoyong.he@corigine.com> <20231027030001.602639-1-chaoyong.he@corigine.com> X-ClientProxiedBy: BYAPR08CA0065.namprd08.prod.outlook.com (2603:10b6:a03:117::42) To SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR13MB5545:EE_|DM6PR13MB4493:EE_ X-MS-Office365-Filtering-Correlation-Id: 3e164df8-f435-4b58-53f9-08dbd698e8fc X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: vkQ95WQEqPeS9LEVOcXAYk+yF0/820/EDto2b5flsI0IDIGsSsnUemI7tT2x0k/1mTeXz5NehzSrWIORf4k1kWiBKVyRBUhFiy4xyKRBoTaURGsLGBKl+vCpsAtu2Bp1kHiHoCyeymmkFZWt4gcJAynw4xYqF7p7uJFer2XFrjPOWStZ1cvOZ1v7Llbja3WKjJgU8MF16kgHq82+soPNWeAq4VMTxTsZyu2pIM12nqlRKVZMQ9iotWpO1cJyJdsOQAxKdtaGmIRmTyyM9Nj2KRtsHJS7pxjM5Iei4NputPLCmjSKuTOGPc1cFiA156nQlkKzMdUc6xsEFuiWUIYYrlIoHeL97BZSr6AE3DvRe/mYjTtVQeZTpO/Y6NUa1Ds2OAe4rIco1RTBf4xdhgTblKZ0j4j5qd/PeTQrgZtCyb/NDXyp9+F8KeoJ0r5M/pZwrrnRh3UcRwCSmAezHfi/P+K92WjC2yBMVKmKoxq05uBcyJOdOZFaJ8+E8S7Cv0RwmtfgK64NzAef5xX77txxTEED6pnxTURvPR7vocfqZTyrmitK5blYZ05n8kmHv/EPP3vfwFdJRKuwz9TATaytDEaK9zqoCCWETSDFkTYLHI8WJasqm/WuUlKfubbHwDF/HpjOL6o820WzNAMOxYp2PhyhLPm3hSQ8Tg2XGjm/Z5A= 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:(13230031)(396003)(136003)(366004)(346002)(376002)(39840400004)(230922051799003)(186009)(1800799009)(64100799003)(451199024)(38350700005)(83380400001)(30864003)(4326008)(52116002)(2906002)(38100700002)(107886003)(44832011)(8936002)(26005)(2616005)(1076003)(36756003)(8676002)(54906003)(5660300002)(66476007)(6916009)(6506007)(316002)(6486002)(6512007)(41300700001)(66556008)(66946007)(86362001)(478600001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: WPyx4XJIsx5hweG152EUaFiSaga/IshrOfLTzJaZncpnA/HfQG0BmCVSzjrhAhTOTwcWWCBOAbisHMy2t+OsdSC9l7egLI6T5SKMxPo1KvDX3hNcnfHjBUH/GelL9lteSvC8R3p77u7MkpfsOOGpVxUwai2Np+TzslWsEpVm7zsR6rVAkr3i7uiNNwFQxD9v1ct0MYDHNeMVK7hUTD/W8oAZqPY+f5qw5EiOOS0XZ+WhJEIkFBW16VzDE8HWWv6LdGTdf/8CYg4OhMbTExwGXM6vqCguoCsXQB2fZ86S3PPtw+Xayf7f0iyryBK09z56lErDm1w9wSCAEL+QG/Vc7aEjDWu+VhvUCcXhyLOcdPME+lH6NLmv3G3BkizK1Jz3uax1HfyxV9QVlLn6i+RZe2Q7geFyotV3F9OwKPjeutj4VC4hnztqTGg1ik5pr95xTj6ILh/QHt+zqYaV/d27Es7XK8KZhfnqs5rRZrRY7gzLK+O/79ZAT/tIA8PHSMdgCc3KPq34NB7Br9lc2sC6q5Zb40a85YW1OiAzYiDS4dQ2XHee9Xwa4SDFqSvDKogI+tK6PvcH0kE9VV3gHBI/e+MXBQXQIiVF3GFfiFFsqbXHCAn4lNYPJrb8/2OD7oS/vV+PG0MjJl2MjY8BfXRDILdBiMCebRSRy8r7QjnZiyZEIpB62SmZYR1KwW//2L9i8kjlc5ad78F8FK2FSal2I+qIvUM9Nk4DC0LIi6EboRUN3BT4VSu3Jdk9d0o0y2dduuXEh5c3hbA6RHgiYHtvhxlary/vyJKL1rXXX9ez+/QxyshuvKQlJVR9bSI6lgGGrO+R/ed2UgPUvoSxukdDgcdNGJE3mLtdQ2aEI18e5kX5onIleiWt1Iu31KYDa5Fr6hkMhtFFvfDAfQsNIRvU/tmhv2ZIdETSiUu7h/C52qGjJZlfOg5Z+l1Sr06noGCBjdwtA2Lm/LnPr1kC8stgosrSD02cB9Amhoulm4uEl8NC7Io85iAdKwqhcD0wGiDhm8UpXXPfkWefAvkyqfUSDE7Q2OUdxQnWWB2a3ExjiyeltYL5c36/epZbZ7/iY8qT/EwFOM7nuaop26V/MM7hxa86iJk6/L6QabgjD1tBgQjgT6KWVan/3hr3SikkOCrunuOGDe2GYczfW8fDXCQdGTl4pTwDzeoVNbAWIHX91pnTJtUcsEFJEenDAwGajWDI8h1Xv6RiFLyGWnqZ0Axk3Xk0JLilcHT28Yr5QFZBEX8H09sU5FNdI9Zw0hsaRThoUvKBrtmjiL7AOeaPLGvRNG7zl5STGzmSyr6/apmlvd+yAhLgzL3nysw2r+07m6eYa6snRri1HCVoz/LcsvQraRyIZ+fyAAmxEK5cXygLn+/XjmvPsACV601uJgSSzFNwB9pUHsvf0rVx7ZP21oOSY+okDtnfGZfXSB89Og877w6WBhGfnCJXjsUx4o24L13x2dRyaEEazhHPYmVeGppBG8OtNiBSriC7iJFek6nZgxyP2HVJKuv86rAr7uMUKshcynetQNzDRXx/CaHlrTPYL/CzRYX35kygj74WdyVF+YMDSphBo1X4W7vqlLHnq+1xLaqogWJTOa2ml0Wf3B7fqA== X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3e164df8-f435-4b58-53f9-08dbd698e8fc X-MS-Exchange-CrossTenant-AuthSource: SJ0PR13MB5545.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Oct 2023 03:00:43.8368 (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: 0ksC3boHZyrpHlu0HWWOLyopQ434Qee2AKXpfFV1Edoth4cN4GvRXSNL30hV9OpLLtToESs4TI/R8Y31SuXhWTs2ij/jhWvHIDie3Gic6+Q= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR13MB4493 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 Extract the 'reconfig_lock' data field into the super class, also change the parameter of the related APIs, prepare for the upcoming common library. Signed-off-by: Chaoyong He Reviewed-by: Long Wu Reviewed-by: Peng Zhang --- drivers/net/nfp/flower/nfp_flower.c | 50 +++++---- drivers/net/nfp/nfp_ethdev.c | 34 +++--- drivers/net/nfp/nfp_ethdev_vf.c | 20 ++-- drivers/net/nfp/nfp_net_common.c | 161 +++++++++++++++------------- drivers/net/nfp/nfp_net_common.h | 7 +- 5 files changed, 149 insertions(+), 123 deletions(-) diff --git a/drivers/net/nfp/flower/nfp_flower.c b/drivers/net/nfp/flower/nfp_flower.c index ccb579541b..831f4a7265 100644 --- a/drivers/net/nfp/flower/nfp_flower.c +++ b/drivers/net/nfp/flower/nfp_flower.c @@ -52,27 +52,29 @@ nfp_pf_repr_disable_queues(struct rte_eth_dev *dev) { uint32_t update; uint32_t new_ctrl; - struct nfp_net_hw *hw; + struct nfp_hw *hw; + struct nfp_net_hw *net_hw; struct nfp_flower_representor *repr; repr = dev->data->dev_private; - hw = repr->app_fw_flower->pf_hw; + net_hw = repr->app_fw_flower->pf_hw; + hw = &net_hw->super; - nn_cfg_writeq(&hw->super, NFP_NET_CFG_TXRS_ENABLE, 0); - nn_cfg_writeq(&hw->super, NFP_NET_CFG_RXRS_ENABLE, 0); + nn_cfg_writeq(hw, NFP_NET_CFG_TXRS_ENABLE, 0); + nn_cfg_writeq(hw, NFP_NET_CFG_RXRS_ENABLE, 0); - new_ctrl = hw->super.ctrl & ~NFP_NET_CFG_CTRL_ENABLE; + new_ctrl = hw->ctrl & ~NFP_NET_CFG_CTRL_ENABLE; update = NFP_NET_CFG_UPDATE_GEN | NFP_NET_CFG_UPDATE_RING | NFP_NET_CFG_UPDATE_MSIX; - if (hw->super.cap & NFP_NET_CFG_CTRL_RINGCFG) + if (hw->cap & NFP_NET_CFG_CTRL_RINGCFG) new_ctrl &= ~NFP_NET_CFG_CTRL_RINGCFG; /* If an error when reconfig we avoid to change hw state */ - if (nfp_net_reconfig(hw, new_ctrl, update) != 0) + if (nfp_reconfig(hw, new_ctrl, update) < 0) return; - hw->super.ctrl = new_ctrl; + hw->ctrl = new_ctrl; } int @@ -80,13 +82,15 @@ nfp_flower_pf_start(struct rte_eth_dev *dev) { int ret; uint16_t i; + struct nfp_hw *hw; uint32_t new_ctrl; uint32_t update = 0; - struct nfp_net_hw *hw; + struct nfp_net_hw *net_hw; struct nfp_flower_representor *repr; repr = dev->data->dev_private; - hw = repr->app_fw_flower->pf_hw; + net_hw = repr->app_fw_flower->pf_hw; + hw = &net_hw->super; /* Disabling queues just in case... */ nfp_pf_repr_disable_queues(dev); @@ -97,11 +101,11 @@ nfp_flower_pf_start(struct rte_eth_dev *dev) new_ctrl = nfp_check_offloads(dev); /* Writing configuration parameters in the device */ - nfp_net_params_setup(hw); + nfp_net_params_setup(net_hw); update |= NFP_NET_CFG_UPDATE_RSS; - if ((hw->super.cap & NFP_NET_CFG_CTRL_RSS2) != 0) + if ((hw->cap & NFP_NET_CFG_CTRL_RSS2) != 0) new_ctrl |= NFP_NET_CFG_CTRL_RSS2; else new_ctrl |= NFP_NET_CFG_CTRL_RSS; @@ -111,19 +115,19 @@ nfp_flower_pf_start(struct rte_eth_dev *dev) update |= NFP_NET_CFG_UPDATE_GEN | NFP_NET_CFG_UPDATE_RING; - if ((hw->super.cap & NFP_NET_CFG_CTRL_RINGCFG) != 0) + if ((hw->cap & NFP_NET_CFG_CTRL_RINGCFG) != 0) new_ctrl |= NFP_NET_CFG_CTRL_RINGCFG; - nn_cfg_writel(&hw->super, NFP_NET_CFG_CTRL, new_ctrl); + nn_cfg_writel(hw, NFP_NET_CFG_CTRL, new_ctrl); /* If an error when reconfig we avoid to change hw state */ - ret = nfp_net_reconfig(hw, new_ctrl, update); + ret = nfp_reconfig(hw, new_ctrl, update); if (ret != 0) { PMD_INIT_LOG(ERR, "Failed to reconfig PF vnic"); return -EIO; } - hw->super.ctrl = new_ctrl; + hw->ctrl = new_ctrl; /* Setup the freelist ring */ ret = nfp_net_rx_freelist_setup(dev); @@ -374,7 +378,7 @@ nfp_flower_init_vnic_common(struct nfp_net_hw *hw, vnic_type, hw->max_rx_queues, hw->max_tx_queues); /* Initializing spinlock for reconfigs */ - rte_spinlock_init(&hw->reconfig_lock); + rte_spinlock_init(&hw->super.reconfig_lock); return 0; } @@ -690,14 +694,16 @@ nfp_flower_cleanup_ctrl_vnic(struct nfp_net_hw *hw) } static int -nfp_flower_start_ctrl_vnic(struct nfp_net_hw *hw) +nfp_flower_start_ctrl_vnic(struct nfp_net_hw *net_hw) { int ret; uint32_t update; uint32_t new_ctrl; + struct nfp_hw *hw; struct rte_eth_dev *dev; - dev = hw->eth_dev; + dev = net_hw->eth_dev; + hw = &net_hw->super; /* Disabling queues just in case... */ nfp_net_disable_queues(dev); @@ -706,7 +712,7 @@ nfp_flower_start_ctrl_vnic(struct nfp_net_hw *hw) nfp_net_enable_queues(dev); /* Writing configuration parameters in the device */ - nfp_net_params_setup(hw); + nfp_net_params_setup(net_hw); new_ctrl = NFP_NET_CFG_CTRL_ENABLE; update = NFP_NET_CFG_UPDATE_GEN | NFP_NET_CFG_UPDATE_RING | @@ -715,13 +721,13 @@ nfp_flower_start_ctrl_vnic(struct nfp_net_hw *hw) rte_wmb(); /* If an error when reconfig we avoid to change hw state */ - ret = nfp_net_reconfig(hw, new_ctrl, update); + ret = nfp_reconfig(hw, new_ctrl, update); if (ret != 0) { PMD_INIT_LOG(ERR, "Failed to reconfig ctrl vnic"); return -EIO; } - hw->super.ctrl = new_ctrl; + hw->ctrl = new_ctrl; /* Setup the freelist ring */ ret = nfp_net_rx_freelist_setup(dev); diff --git a/drivers/net/nfp/nfp_ethdev.c b/drivers/net/nfp/nfp_ethdev.c index a773a81e55..1378545d22 100644 --- a/drivers/net/nfp/nfp_ethdev.c +++ b/drivers/net/nfp/nfp_ethdev.c @@ -45,12 +45,13 @@ nfp_net_start(struct rte_eth_dev *dev) { int ret; uint16_t i; + struct nfp_hw *hw; uint32_t new_ctrl; uint32_t update = 0; uint32_t cap_extend; uint32_t intr_vector; - struct nfp_net_hw *hw; uint32_t ctrl_extend = 0; + struct nfp_net_hw *net_hw; struct nfp_pf_dev *pf_dev; struct rte_eth_conf *dev_conf; struct rte_eth_rxmode *rxmode; @@ -58,9 +59,10 @@ nfp_net_start(struct rte_eth_dev *dev) struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(dev); struct rte_intr_handle *intr_handle = pci_dev->intr_handle; - hw = NFP_NET_DEV_PRIVATE_TO_HW(dev->data->dev_private); + net_hw = NFP_NET_DEV_PRIVATE_TO_HW(dev->data->dev_private); pf_dev = NFP_NET_DEV_PRIVATE_TO_PF(dev->data->dev_private); app_fw_nic = NFP_PRIV_TO_APP_FW_NIC(pf_dev->app_fw_priv); + hw = &net_hw->super; /* Disabling queues just in case... */ nfp_net_disable_queues(dev); @@ -100,9 +102,9 @@ nfp_net_start(struct rte_eth_dev *dev) } /* Checking MTU set */ - if (dev->data->mtu > hw->flbufsz) { + if (dev->data->mtu > net_hw->flbufsz) { PMD_INIT_LOG(ERR, "MTU (%u) can't be larger than the current NFP_FRAME_SIZE (%u)", - dev->data->mtu, hw->flbufsz); + dev->data->mtu, net_hw->flbufsz); return -ERANGE; } @@ -111,7 +113,7 @@ nfp_net_start(struct rte_eth_dev *dev) new_ctrl = nfp_check_offloads(dev); /* Writing configuration parameters in the device */ - nfp_net_params_setup(hw); + nfp_net_params_setup(net_hw); dev_conf = &dev->data->dev_conf; rxmode = &dev_conf->rxmode; @@ -119,7 +121,7 @@ nfp_net_start(struct rte_eth_dev *dev) if ((rxmode->mq_mode & RTE_ETH_MQ_RX_RSS) != 0) { nfp_net_rss_config_default(dev); update |= NFP_NET_CFG_UPDATE_RSS; - new_ctrl |= nfp_net_cfg_ctrl_rss(hw->super.cap); + new_ctrl |= nfp_net_cfg_ctrl_rss(hw->cap); } /* Enable device */ @@ -128,19 +130,19 @@ nfp_net_start(struct rte_eth_dev *dev) update |= NFP_NET_CFG_UPDATE_GEN | NFP_NET_CFG_UPDATE_RING; /* Enable vxlan */ - if ((hw->super.cap & NFP_NET_CFG_CTRL_VXLAN) != 0) { + if ((hw->cap & NFP_NET_CFG_CTRL_VXLAN) != 0) { new_ctrl |= NFP_NET_CFG_CTRL_VXLAN; update |= NFP_NET_CFG_UPDATE_VXLAN; } - if ((hw->super.cap & NFP_NET_CFG_CTRL_RINGCFG) != 0) + if ((hw->cap & NFP_NET_CFG_CTRL_RINGCFG) != 0) new_ctrl |= NFP_NET_CFG_CTRL_RINGCFG; - if (nfp_net_reconfig(hw, new_ctrl, update) != 0) + if (nfp_reconfig(hw, new_ctrl, update) != 0) return -EIO; /* Enable packet type offload by extend ctrl word1. */ - cap_extend = hw->super.cap_ext; + cap_extend = hw->cap_ext; if ((cap_extend & NFP_NET_CFG_CTRL_PKT_TYPE) != 0) ctrl_extend = NFP_NET_CFG_CTRL_PKT_TYPE; @@ -149,10 +151,10 @@ nfp_net_start(struct rte_eth_dev *dev) | NFP_NET_CFG_CTRL_IPSEC_LM_LOOKUP; update = NFP_NET_CFG_UPDATE_GEN; - if (nfp_net_ext_reconfig(hw, ctrl_extend, update) != 0) + if (nfp_ext_reconfig(hw, ctrl_extend, update) != 0) return -EIO; - hw->super.ctrl_ext = ctrl_extend; + hw->ctrl_ext = ctrl_extend; /* * Allocating rte mbufs for configured rx queues. @@ -165,11 +167,11 @@ nfp_net_start(struct rte_eth_dev *dev) if (rte_eal_process_type() == RTE_PROC_PRIMARY) /* Configure the physical port up */ - nfp_eth_set_configured(hw->cpp, hw->nfp_idx, 1); + nfp_eth_set_configured(net_hw->cpp, net_hw->nfp_idx, 1); else - nfp_eth_set_configured(dev->process_private, hw->nfp_idx, 1); + nfp_eth_set_configured(dev->process_private, net_hw->nfp_idx, 1); - hw->super.ctrl = new_ctrl; + hw->ctrl = new_ctrl; for (i = 0; i < dev->data->nb_rx_queues; i++) dev->data->rx_queue_state[i] = RTE_ETH_QUEUE_STATE_STARTED; @@ -587,7 +589,7 @@ nfp_net_init(struct rte_eth_dev *eth_dev) nfp_net_log_device_information(hw); /* Initializing spinlock for reconfigs */ - rte_spinlock_init(&hw->reconfig_lock); + rte_spinlock_init(&hw->super.reconfig_lock); /* Allocating memory for mac addr */ eth_dev->data->mac_addrs = rte_zmalloc("mac_addr", RTE_ETHER_ADDR_LEN, 0); diff --git a/drivers/net/nfp/nfp_ethdev_vf.c b/drivers/net/nfp/nfp_ethdev_vf.c index 7fb2a3d378..6ead7e02b8 100644 --- a/drivers/net/nfp/nfp_ethdev_vf.c +++ b/drivers/net/nfp/nfp_ethdev_vf.c @@ -32,10 +32,11 @@ nfp_netvf_start(struct rte_eth_dev *dev) { int ret; uint16_t i; + struct nfp_hw *hw; uint32_t new_ctrl; uint32_t update = 0; uint32_t intr_vector; - struct nfp_net_hw *hw; + struct nfp_net_hw *net_hw; struct rte_eth_conf *dev_conf; struct rte_eth_rxmode *rxmode; struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(dev); @@ -77,8 +78,9 @@ nfp_netvf_start(struct rte_eth_dev *dev) new_ctrl = nfp_check_offloads(dev); /* Writing configuration parameters in the device */ - hw = NFP_NET_DEV_PRIVATE_TO_HW(dev->data->dev_private); - nfp_net_params_setup(hw); + net_hw = NFP_NET_DEV_PRIVATE_TO_HW(dev->data->dev_private); + hw = &net_hw->super; + nfp_net_params_setup(net_hw); dev_conf = &dev->data->dev_conf; rxmode = &dev_conf->rxmode; @@ -86,7 +88,7 @@ nfp_netvf_start(struct rte_eth_dev *dev) if ((rxmode->mq_mode & RTE_ETH_MQ_RX_RSS) != 0) { nfp_net_rss_config_default(dev); update |= NFP_NET_CFG_UPDATE_RSS; - new_ctrl |= nfp_net_cfg_ctrl_rss(hw->super.cap); + new_ctrl |= nfp_net_cfg_ctrl_rss(hw->cap); } /* Enable device */ @@ -94,11 +96,11 @@ nfp_netvf_start(struct rte_eth_dev *dev) update |= NFP_NET_CFG_UPDATE_GEN | NFP_NET_CFG_UPDATE_RING; - if ((hw->super.cap & NFP_NET_CFG_CTRL_RINGCFG) != 0) + if ((hw->cap & NFP_NET_CFG_CTRL_RINGCFG) != 0) new_ctrl |= NFP_NET_CFG_CTRL_RINGCFG; - nn_cfg_writel(&hw->super, NFP_NET_CFG_CTRL, new_ctrl); - if (nfp_net_reconfig(hw, new_ctrl, update) != 0) + nn_cfg_writel(hw, NFP_NET_CFG_CTRL, new_ctrl); + if (nfp_reconfig(hw, new_ctrl, update) != 0) return -EIO; /* @@ -110,7 +112,7 @@ nfp_netvf_start(struct rte_eth_dev *dev) goto error; } - hw->super.ctrl = new_ctrl; + hw->ctrl = new_ctrl; for (i = 0; i < dev->data->nb_rx_queues; i++) dev->data->rx_queue_state[i] = RTE_ETH_QUEUE_STATE_STARTED; @@ -320,7 +322,7 @@ nfp_netvf_init(struct rte_eth_dev *eth_dev) nfp_net_log_device_information(hw); /* Initializing spinlock for reconfigs */ - rte_spinlock_init(&hw->reconfig_lock); + rte_spinlock_init(&hw->super.reconfig_lock); /* Allocating memory for mac addr */ eth_dev->data->mac_addrs = rte_zmalloc("mac_addr", RTE_ETHER_ADDR_LEN, 0); diff --git a/drivers/net/nfp/nfp_net_common.c b/drivers/net/nfp/nfp_net_common.c index 2ab8d8fadd..9e6d2fa490 100644 --- a/drivers/net/nfp/nfp_net_common.c +++ b/drivers/net/nfp/nfp_net_common.c @@ -199,7 +199,7 @@ nfp_net_notify_port_speed(struct nfp_net_hw *hw, #define FW_VER_LEN 32 static int -__nfp_net_reconfig(struct nfp_net_hw *hw, +nfp_reconfig_real(struct nfp_hw *hw, uint32_t update) { uint32_t cnt; @@ -207,14 +207,14 @@ __nfp_net_reconfig(struct nfp_net_hw *hw, struct timespec wait; PMD_DRV_LOG(DEBUG, "Writing to the configuration queue (%p)...", - hw->super.qcp_cfg); + hw->qcp_cfg); - if (hw->super.qcp_cfg == NULL) { + if (hw->qcp_cfg == NULL) { PMD_DRV_LOG(ERR, "Bad configuration queue pointer"); return -ENXIO; } - nfp_qcp_ptr_add(hw->super.qcp_cfg, NFP_QCP_WRITE_PTR, 1); + nfp_qcp_ptr_add(hw->qcp_cfg, NFP_QCP_WRITE_PTR, 1); wait.tv_sec = 0; wait.tv_nsec = 1000000; /* 1ms */ @@ -223,7 +223,7 @@ __nfp_net_reconfig(struct nfp_net_hw *hw, /* Poll update field, waiting for NFP to ack the config */ for (cnt = 0; ; cnt++) { - new = nn_cfg_readl(&hw->super, NFP_NET_CFG_UPDATE); + new = nn_cfg_readl(hw, NFP_NET_CFG_UPDATE); if (new == 0) break; @@ -263,7 +263,7 @@ __nfp_net_reconfig(struct nfp_net_hw *hw, * - (-EIO) if I/O err and fail to reconfigure the device. */ int -nfp_net_reconfig(struct nfp_net_hw *hw, +nfp_reconfig(struct nfp_hw *hw, uint32_t ctrl, uint32_t update) { @@ -271,17 +271,17 @@ nfp_net_reconfig(struct nfp_net_hw *hw, rte_spinlock_lock(&hw->reconfig_lock); - nn_cfg_writel(&hw->super, NFP_NET_CFG_CTRL, ctrl); - nn_cfg_writel(&hw->super, NFP_NET_CFG_UPDATE, update); + nn_cfg_writel(hw, NFP_NET_CFG_CTRL, ctrl); + nn_cfg_writel(hw, NFP_NET_CFG_UPDATE, update); rte_wmb(); - ret = __nfp_net_reconfig(hw, update); + ret = nfp_reconfig_real(hw, update); rte_spinlock_unlock(&hw->reconfig_lock); if (ret != 0) { - PMD_DRV_LOG(ERR, "Error nfp net reconfig: ctrl=%#08x update=%#08x", + PMD_DRV_LOG(ERR, "Error nfp reconfig: ctrl=%#08x update=%#08x", ctrl, update); return -EIO; } @@ -307,7 +307,7 @@ nfp_net_reconfig(struct nfp_net_hw *hw, * - (-EIO) if I/O err and fail to reconfigure the device. */ int -nfp_net_ext_reconfig(struct nfp_net_hw *hw, +nfp_ext_reconfig(struct nfp_hw *hw, uint32_t ctrl_ext, uint32_t update) { @@ -315,17 +315,17 @@ nfp_net_ext_reconfig(struct nfp_net_hw *hw, rte_spinlock_lock(&hw->reconfig_lock); - nn_cfg_writel(&hw->super, NFP_NET_CFG_CTRL_WORD1, ctrl_ext); - nn_cfg_writel(&hw->super, NFP_NET_CFG_UPDATE, update); + nn_cfg_writel(hw, NFP_NET_CFG_CTRL_WORD1, ctrl_ext); + nn_cfg_writel(hw, NFP_NET_CFG_UPDATE, update); rte_wmb(); - ret = __nfp_net_reconfig(hw, update); + ret = nfp_reconfig_real(hw, update); rte_spinlock_unlock(&hw->reconfig_lock); if (ret != 0) { - PMD_DRV_LOG(ERR, "Error nft net ext reconfig: ctrl_ext=%#08x update=%#08x", + PMD_DRV_LOG(ERR, "Error nfp ext reconfig: ctrl_ext=%#08x update=%#08x", ctrl_ext, update); return -EIO; } @@ -354,16 +354,16 @@ nfp_net_mbox_reconfig(struct nfp_net_hw *hw, mbox = hw->tlv_caps.mbox_off; - rte_spinlock_lock(&hw->reconfig_lock); + rte_spinlock_lock(&hw->super.reconfig_lock); nn_cfg_writeq(&hw->super, mbox + NFP_NET_CFG_MBOX_SIMPLE_CMD, mbox_cmd); nn_cfg_writel(&hw->super, NFP_NET_CFG_UPDATE, NFP_NET_CFG_UPDATE_MBOX); rte_wmb(); - ret = __nfp_net_reconfig(hw, NFP_NET_CFG_UPDATE_MBOX); + ret = nfp_reconfig_real(&hw->super, NFP_NET_CFG_UPDATE_MBOX); - rte_spinlock_unlock(&hw->reconfig_lock); + rte_spinlock_unlock(&hw->super.reconfig_lock); if (ret != 0) { PMD_DRV_LOG(ERR, "Error nft net mailbox reconfig: mbox=%#08x update=%#08x", @@ -494,26 +494,28 @@ nfp_net_disable_queues(struct rte_eth_dev *dev) { uint32_t update; uint32_t new_ctrl; - struct nfp_net_hw *hw; + struct nfp_hw *hw; + struct nfp_net_hw *net_hw; - hw = NFP_NET_DEV_PRIVATE_TO_HW(dev->data->dev_private); + net_hw = NFP_NET_DEV_PRIVATE_TO_HW(dev->data->dev_private); + hw = &net_hw->super; - nn_cfg_writeq(&hw->super, NFP_NET_CFG_TXRS_ENABLE, 0); - nn_cfg_writeq(&hw->super, NFP_NET_CFG_RXRS_ENABLE, 0); + nn_cfg_writeq(hw, NFP_NET_CFG_TXRS_ENABLE, 0); + nn_cfg_writeq(hw, NFP_NET_CFG_RXRS_ENABLE, 0); - new_ctrl = hw->super.ctrl & ~NFP_NET_CFG_CTRL_ENABLE; + new_ctrl = hw->ctrl & ~NFP_NET_CFG_CTRL_ENABLE; update = NFP_NET_CFG_UPDATE_GEN | NFP_NET_CFG_UPDATE_RING | NFP_NET_CFG_UPDATE_MSIX; - if ((hw->super.cap & NFP_NET_CFG_CTRL_RINGCFG) != 0) + if ((hw->cap & NFP_NET_CFG_CTRL_RINGCFG) != 0) new_ctrl &= ~NFP_NET_CFG_CTRL_RINGCFG; /* If an error when reconfig we avoid to change hw state */ - if (nfp_net_reconfig(hw, new_ctrl, update) != 0) + if (nfp_reconfig(hw, new_ctrl, update) != 0) return; - hw->super.ctrl = new_ctrl; + hw->ctrl = new_ctrl; } void @@ -551,26 +553,28 @@ nfp_net_set_mac_addr(struct rte_eth_dev *dev, { uint32_t ctrl; uint32_t update; - struct nfp_net_hw *hw; + struct nfp_hw *hw; + struct nfp_net_hw *net_hw; - hw = NFP_NET_DEV_PRIVATE_TO_HW(dev->data->dev_private); - if ((hw->super.ctrl & NFP_NET_CFG_CTRL_ENABLE) != 0 && - (hw->super.cap & NFP_NET_CFG_CTRL_LIVE_ADDR) == 0) { + net_hw = NFP_NET_DEV_PRIVATE_TO_HW(dev->data->dev_private); + hw = &net_hw->super; + if ((hw->ctrl & NFP_NET_CFG_CTRL_ENABLE) != 0 && + (hw->cap & NFP_NET_CFG_CTRL_LIVE_ADDR) == 0) { PMD_DRV_LOG(ERR, "MAC address unable to change when port enabled"); return -EBUSY; } /* Writing new MAC to the specific port BAR address */ - nfp_net_write_mac(hw, (uint8_t *)mac_addr); + nfp_net_write_mac(net_hw, (uint8_t *)mac_addr); update = NFP_NET_CFG_UPDATE_MACADDR; - ctrl = hw->super.ctrl; - if ((hw->super.ctrl & NFP_NET_CFG_CTRL_ENABLE) != 0 && - (hw->super.cap & NFP_NET_CFG_CTRL_LIVE_ADDR) != 0) + ctrl = hw->ctrl; + if ((hw->ctrl & NFP_NET_CFG_CTRL_ENABLE) != 0 && + (hw->cap & NFP_NET_CFG_CTRL_LIVE_ADDR) != 0) ctrl |= NFP_NET_CFG_CTRL_LIVE_ADDR; /* Signal the NIC about the change */ - if (nfp_net_reconfig(hw, ctrl, update) != 0) { + if (nfp_reconfig(hw, ctrl, update) != 0) { PMD_DRV_LOG(ERR, "MAC address update failed"); return -EIO; } @@ -689,36 +693,38 @@ int nfp_net_promisc_enable(struct rte_eth_dev *dev) { int ret; + uint32_t update; uint32_t new_ctrl; - uint32_t update = 0; - struct nfp_net_hw *hw; + struct nfp_hw *hw; + struct nfp_net_hw *net_hw; struct nfp_flower_representor *repr; if ((dev->data->dev_flags & RTE_ETH_DEV_REPRESENTOR) != 0) { repr = dev->data->dev_private; - hw = repr->app_fw_flower->pf_hw; + net_hw = repr->app_fw_flower->pf_hw; } else { - hw = NFP_NET_DEV_PRIVATE_TO_HW(dev->data->dev_private); + net_hw = NFP_NET_DEV_PRIVATE_TO_HW(dev->data->dev_private); } - if ((hw->super.cap & NFP_NET_CFG_CTRL_PROMISC) == 0) { + hw = &net_hw->super; + if ((hw->cap & NFP_NET_CFG_CTRL_PROMISC) == 0) { PMD_DRV_LOG(ERR, "Promiscuous mode not supported"); return -ENOTSUP; } - if ((hw->super.ctrl & NFP_NET_CFG_CTRL_PROMISC) != 0) { + if ((hw->ctrl & NFP_NET_CFG_CTRL_PROMISC) != 0) { PMD_DRV_LOG(INFO, "Promiscuous mode already enabled"); return 0; } - new_ctrl = hw->super.ctrl | NFP_NET_CFG_CTRL_PROMISC; + new_ctrl = hw->ctrl | NFP_NET_CFG_CTRL_PROMISC; update = NFP_NET_CFG_UPDATE_GEN; - ret = nfp_net_reconfig(hw, new_ctrl, update); + ret = nfp_reconfig(hw, new_ctrl, update); if (ret != 0) return ret; - hw->super.ctrl = new_ctrl; + hw->ctrl = new_ctrl; return 0; } @@ -727,25 +733,27 @@ int nfp_net_promisc_disable(struct rte_eth_dev *dev) { int ret; + uint32_t update; uint32_t new_ctrl; - uint32_t update = 0; - struct nfp_net_hw *hw; + struct nfp_hw *hw; + struct nfp_net_hw *net_hw; - hw = NFP_NET_DEV_PRIVATE_TO_HW(dev->data->dev_private); + net_hw = NFP_NET_DEV_PRIVATE_TO_HW(dev->data->dev_private); + hw = &net_hw->super; - if ((hw->super.ctrl & NFP_NET_CFG_CTRL_PROMISC) == 0) { + if ((hw->ctrl & NFP_NET_CFG_CTRL_PROMISC) == 0) { PMD_DRV_LOG(INFO, "Promiscuous mode already disabled"); return 0; } - new_ctrl = hw->super.ctrl & ~NFP_NET_CFG_CTRL_PROMISC; + new_ctrl = hw->ctrl & ~NFP_NET_CFG_CTRL_PROMISC; update = NFP_NET_CFG_UPDATE_GEN; - ret = nfp_net_reconfig(hw, new_ctrl, update); + ret = nfp_reconfig(hw, new_ctrl, update); if (ret != 0) return ret; - hw->super.ctrl = new_ctrl; + hw->ctrl = new_ctrl; return 0; } @@ -1554,17 +1562,20 @@ nfp_net_vlan_offload_set(struct rte_eth_dev *dev, int ret; uint32_t update; uint32_t new_ctrl; + struct nfp_hw *hw; uint64_t rx_offload; - struct nfp_net_hw *hw; + struct nfp_net_hw *net_hw; uint32_t rxvlan_ctrl = 0; - hw = NFP_NET_DEV_PRIVATE_TO_HW(dev->data->dev_private); + net_hw = NFP_NET_DEV_PRIVATE_TO_HW(dev->data->dev_private); + hw = &net_hw->super; + rx_offload = dev->data->dev_conf.rxmode.offloads; - new_ctrl = hw->super.ctrl; + new_ctrl = hw->ctrl; /* VLAN stripping setting */ if ((mask & RTE_ETH_VLAN_STRIP_MASK) != 0) { - nfp_net_enable_rxvlan_cap(hw, &rxvlan_ctrl); + nfp_net_enable_rxvlan_cap(net_hw, &rxvlan_ctrl); if ((rx_offload & RTE_ETH_RX_OFFLOAD_VLAN_STRIP) != 0) new_ctrl |= rxvlan_ctrl; else @@ -1579,16 +1590,16 @@ nfp_net_vlan_offload_set(struct rte_eth_dev *dev, new_ctrl &= ~NFP_NET_CFG_CTRL_RXQINQ; } - if (new_ctrl == hw->super.ctrl) + if (new_ctrl == hw->ctrl) return 0; update = NFP_NET_CFG_UPDATE_GEN; - ret = nfp_net_reconfig(hw, new_ctrl, update); + ret = nfp_reconfig(hw, new_ctrl, update); if (ret != 0) return ret; - hw->super.ctrl = new_ctrl; + hw->ctrl = new_ctrl; return 0; } @@ -1658,10 +1669,13 @@ nfp_net_reta_update(struct rte_eth_dev *dev, { int ret; uint32_t update; - struct nfp_net_hw *hw; + struct nfp_hw *hw; + struct nfp_net_hw *net_hw; - hw = NFP_NET_DEV_PRIVATE_TO_HW(dev->data->dev_private); - if ((hw->super.ctrl & NFP_NET_CFG_CTRL_RSS_ANY) == 0) + net_hw = NFP_NET_DEV_PRIVATE_TO_HW(dev->data->dev_private); + hw = &net_hw->super; + + if ((hw->ctrl & NFP_NET_CFG_CTRL_RSS_ANY) == 0) return -EINVAL; ret = nfp_net_rss_reta_write(dev, reta_conf, reta_size); @@ -1670,7 +1684,7 @@ nfp_net_reta_update(struct rte_eth_dev *dev, update = NFP_NET_CFG_UPDATE_RSS; - if (nfp_net_reconfig(hw, hw->super.ctrl, update) != 0) + if (nfp_reconfig(hw, hw->ctrl, update) != 0) return -EIO; return 0; @@ -1789,14 +1803,16 @@ nfp_net_rss_hash_update(struct rte_eth_dev *dev, { uint32_t update; uint64_t rss_hf; - struct nfp_net_hw *hw; + struct nfp_hw *hw; + struct nfp_net_hw *net_hw; - hw = NFP_NET_DEV_PRIVATE_TO_HW(dev->data->dev_private); + net_hw = NFP_NET_DEV_PRIVATE_TO_HW(dev->data->dev_private); + hw = &net_hw->super; rss_hf = rss_conf->rss_hf; /* Checking if RSS is enabled */ - if ((hw->super.ctrl & NFP_NET_CFG_CTRL_RSS_ANY) == 0) { + if ((hw->ctrl & NFP_NET_CFG_CTRL_RSS_ANY) == 0) { if (rss_hf != 0) { PMD_DRV_LOG(ERR, "RSS unsupported"); return -EINVAL; @@ -1814,7 +1830,7 @@ nfp_net_rss_hash_update(struct rte_eth_dev *dev, update = NFP_NET_CFG_UPDATE_RSS; - if (nfp_net_reconfig(hw, hw->super.ctrl, update) != 0) + if (nfp_reconfig(hw, hw->ctrl, update) != 0) return -EIO; return 0; @@ -1969,31 +1985,32 @@ nfp_net_close_tx_queue(struct rte_eth_dev *dev) } int -nfp_net_set_vxlan_port(struct nfp_net_hw *hw, +nfp_net_set_vxlan_port(struct nfp_net_hw *net_hw, size_t idx, uint16_t port) { int ret; uint32_t i; + struct nfp_hw *hw = &net_hw->super; if (idx >= NFP_NET_N_VXLAN_PORTS) { PMD_DRV_LOG(ERR, "The idx value is out of range."); return -ERANGE; } - hw->vxlan_ports[idx] = port; + net_hw->vxlan_ports[idx] = port; for (i = 0; i < NFP_NET_N_VXLAN_PORTS; i += 2) { - nn_cfg_writel(&hw->super, NFP_NET_CFG_VXLAN_PORT + i * sizeof(port), - (hw->vxlan_ports[i + 1] << 16) | hw->vxlan_ports[i]); + nn_cfg_writel(hw, NFP_NET_CFG_VXLAN_PORT + i * sizeof(port), + (net_hw->vxlan_ports[i + 1] << 16) | net_hw->vxlan_ports[i]); } rte_spinlock_lock(&hw->reconfig_lock); - nn_cfg_writel(&hw->super, NFP_NET_CFG_UPDATE, NFP_NET_CFG_UPDATE_VXLAN); + nn_cfg_writel(hw, NFP_NET_CFG_UPDATE, NFP_NET_CFG_UPDATE_VXLAN); rte_wmb(); - ret = __nfp_net_reconfig(hw, NFP_NET_CFG_UPDATE_VXLAN); + ret = nfp_reconfig_real(hw, NFP_NET_CFG_UPDATE_VXLAN); rte_spinlock_unlock(&hw->reconfig_lock); diff --git a/drivers/net/nfp/nfp_net_common.h b/drivers/net/nfp/nfp_net_common.h index 3fe3e96107..d418cd2b99 100644 --- a/drivers/net/nfp/nfp_net_common.h +++ b/drivers/net/nfp/nfp_net_common.h @@ -119,6 +119,7 @@ struct nfp_hw { uint32_t cap_ext; uint32_t ctrl; uint32_t ctrl_ext; + rte_spinlock_t reconfig_lock; }; struct nfp_net_hw { @@ -150,8 +151,6 @@ struct nfp_net_hw { uint16_t vxlan_ports[NFP_NET_N_VXLAN_PORTS]; uint8_t vxlan_usecnt[NFP_NET_N_VXLAN_PORTS]; - rte_spinlock_t reconfig_lock; - uint32_t max_tx_queues; uint32_t max_rx_queues; uint16_t flbufsz; @@ -368,8 +367,8 @@ nfp_qcp_queue_offset(const struct nfp_dev_info *dev_info, } /* Prototypes for common NFP functions */ -int nfp_net_reconfig(struct nfp_net_hw *hw, uint32_t ctrl, uint32_t update); -int nfp_net_ext_reconfig(struct nfp_net_hw *hw, uint32_t ctrl_ext, uint32_t update); +int nfp_reconfig(struct nfp_hw *hw, uint32_t ctrl, uint32_t update); +int nfp_ext_reconfig(struct nfp_hw *hw, uint32_t ctrl_ext, uint32_t update); int nfp_net_mbox_reconfig(struct nfp_net_hw *hw, uint32_t mbox_cmd); int nfp_net_configure(struct rte_eth_dev *dev); int nfp_net_common_init(struct rte_pci_device *pci_dev, struct nfp_net_hw *hw);