From patchwork Thu Oct 26 06:43:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaoyong He X-Patchwork-Id: 133350 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 6995643204; Thu, 26 Oct 2023 08:45:31 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 12B3A42DE1; Thu, 26 Oct 2023 08:44:12 +0200 (CEST) Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2136.outbound.protection.outlook.com [40.107.244.136]) by mails.dpdk.org (Postfix) with ESMTP id 3F19640A8A for ; Thu, 26 Oct 2023 08:44:05 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lDspWOjUt95xnsOv8JjGFRT3BqlEOLYMiduZxazVVnjl9mnx9DbSbXojWKrmAVqsLxkCL1t4AlM9SnLYYOUVYSd6x/ydXBuxAK5Ile20zZPVfrOOvqBIUzXNFDoT5IO6mj8EwMocmHxTXCzC8hHBKdW3UlLY3eGFTMHFoNbbq85zv9DQrIhPF0YX8TXSG+xEH+MnFFNbtNuFlpnVj4jyhX3I8Lt5SCchxPnyz9xaJYKLpPdAUoVi7qp/yRGlFWBUbg8AFOAfMOvrHsaGsH/+RQ9kHLOuvAy+keogLcah9Uy/L+LkWgjSQyyL+yrkpO9SsfKP4KCgkJwVI63+GjhnKA== 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=h/mshjoYc3BOwI58GRx3z9Kt2nUOTVz9UKYxudYDR4B0g9R+Xc7dHVhyID+JdFaI55J6fCaYPSBY+6DR+yf4apP6u9aQabDYQ3amHO8HzUlB0dMYUebT21dsbSsYM6kXa9ACV+KFeR68Hqnvqr4Oiz9qxtTF1zAC8q4s8Syxsi/QOKTzuwsNNLXf6efaB76Rv5N5qe/q6ojF6V4/KRi25SjUjFXcF9nuXzGr0wmcvuanNkHcZE9Fvh1JSJHx2j0xrzEs0NONP5HDqgnfMwXl1pcR05mbGnZplB5Xy4eT6UqpXUvSrjuvU4JwD+UgkUkrrdJg+KgIts2So3l0w5dbOg== 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=dqIzseQJCKGEzRQR5uMw8sEg3yKS7TYcbu9OsjuHJfF309JmN21jbBn6BqEgAWpev0gle4jSWKVjB2Iwrucq3iH2njsxm/58+5QqsiZL2i18Y+tEPk1T67kZmnhb4LgegH7miXZqFoNk9XEvqLhjwqSsiaOW3A+JbKuxmJvWX6U= 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 SJ0PR13MB5965.namprd13.prod.outlook.com (2603:10b6:a03:43d::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6907.33; Thu, 26 Oct 2023 06:44:03 +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; Thu, 26 Oct 2023 06:44:03 +0000 From: Chaoyong He To: dev@dpdk.org Cc: oss-drivers@corigine.com, Chaoyong He , Long Wu , Peng Zhang Subject: [PATCH v3 10/25] net/nfp: change the parameter of reconfig Date: Thu, 26 Oct 2023 14:43:09 +0800 Message-Id: <20231026064324.177531-11-chaoyong.he@corigine.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20231026064324.177531-1-chaoyong.he@corigine.com> References: <20231024022849.3092506-1-chaoyong.he@corigine.com> <20231026064324.177531-1-chaoyong.he@corigine.com> X-ClientProxiedBy: BYAPR07CA0034.namprd07.prod.outlook.com (2603:10b6:a02:bc::47) To SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR13MB5545:EE_|SJ0PR13MB5965:EE_ X-MS-Office365-Filtering-Correlation-Id: b6fdb42e-2e54-41d5-40a6-08dbd5eef149 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: DxF3kxpf705hjiwoZN6andUBugMhnPhRVglfa6L3uMUKF8Pf0rclEiQJ27IAZ8uNNso35sRrmKLJPke1ZX7/6x3vOEDcdfeT6Cg5bbSl/p0N+371oZTTSbzA5Majoc7HhDI3L5/zL6CQKKORSo2o0UJ5xYYH/leG2c1mNQLbTf+Wlh2a3nI3K0JGRLzmgrWWAosTZz1QnZT2eAqznF2sXAKChJmOml5iDeWo7ez20+gQ5/yhOkfPNbap5uqyxjoccXvi+WOSzMNzt03k172vFMjCX9PR1SWwjfDaqYv01iYim8D/C9EBBv+pvwXm2TU/3dXt1zeHRhPtBA/8Znlwq7M32e0zvWi7DiNQc9lwU1Tywqgqp2JPa7HBwIZGxUQjmnuH7cjMvlxNJf1c7eD5epRbKSoXxbnjNUmJewwH1xAdY5SB0yhzB+DNyU8dLYhGlzbfVMhR/+XMWutzufsO4wkn5LRH/bP1+tA1i/71K1lJVCmxRbd6jpHP8Ev7dcSebTXv3i2RCCYDE1ief/mfZmwfnvsNOUKY9lC7Y8T/JRi383Nxk/5+3oL7XiNS5AfCUKg0KeqqgR85guPqG/LCh8Ew52tXVzFdiMiYxXotyoNF1A+Q9bk7KfgtDv9SHEAOTS3ykZlWgULC4cuU9luBbjyMfalfeZfU1raIZYWvcoo= 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)(346002)(39830400003)(136003)(366004)(376002)(396003)(230922051799003)(64100799003)(186009)(1800799009)(451199024)(6512007)(478600001)(6506007)(52116002)(2616005)(8676002)(83380400001)(107886003)(30864003)(41300700001)(26005)(1076003)(6486002)(5660300002)(44832011)(6916009)(316002)(66556008)(54906003)(66476007)(66946007)(2906002)(4326008)(8936002)(38350700005)(38100700002)(86362001)(36756003); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: SascwoTR0S6hizhLctcRiFGgt8tCAItpXTtxNGXnn9w8iE9HDYxkg7BPKDFKIWkLsONW6hvguY8ENM/w6CzYhJFyz2hbeCJN0rUuwBUazINrql12ojMI4qIoG7eMlHWOH2lBTrAe+cU9k76Z0IIRhydqhm6Mm2KEEhe2Coh4kS0MFVAomniomGf7eYOV9c7cTsHH65HvFUocl8LkT/NP9s0ZG3evS1OpvKgy096RAXWIklILoQruwfQ8nBjmymZrp4NKyKdDgVPvlCQLZKV0WCUntFG+jkSSGU06hxEKbPUSbx0CfEYyZtQU07SR/Wx2jvUiiuJuuKnY3NLwcHiVi4vKbdpvso7WYnqAccARMkMakBN4cQncGg5jQr9RwKnTDiOd+rjBSVqj+MI9gMurU13VWlviSmGvvJR+6pId4r98hpwao7vMKfGv+oqUCySMVjLlRaSkR8XgOdnc2zVKEe9qi8nO3eZWeL/81n4SMH8kg1YNfNI+TCBk4mvArbzyez5zl4u+82K43qaXgfHlqWP/B7iGV0GdyIpQKBEJoxXXpjBl4uWtbG+3TW4PWr6VREZi9dTGjq8FFVvsDfiUCpE1SSzYr+puhWzkDiMU4N4AmVJqbX3yjGteZAGyDdTZ+RoqPVNYnwHWaT/DXRPUUH95VAe1S2sUh8+Z1YvhtliVCLhAec5kEYEMkbWNktxek6qzjl5seP8dQBk3lxJks1SWCfarkeLpA11YeKCWw1Il1tjMqCvY6H+MQMeFN6BxOsnTJsQ/ufuRB9Llfxxp23g5XI2husEztY8pFdYC3LCq6WarijMUowlxk/SRcdfgI5kaDHvFCdmLXhkUP4TEkIiklhxpaJz5SVQA3YDdtYhmBeyE0t0J7nvxh60U4aMzznndJ+6o5kXjq3aS89h1hLpxF7z2TCCnTx3k3FXKbyr61aa+3r3u8QDx8J0TykV508hfAhp4f3PyIjXvsmZwQwqrcIe60VNwTY/4/7KbKTyX1X56S5gWNBwRYah5hz/2U84fOZf2gzV4ej2G9UlAHjlFEGZ1fj/iBaW0tsrHbHigM48BfxVFjsRhTGMnUci/4yTGF9QvN7PdJUlzJ52lCsJXZiULdVROArV3By0R1yxxq9Y6TP/ZPVAoK+8EdUS4oJuba6TLnet3Km3iuINgsgwGOgRVSDsjwdvDrifdPxl9WL8lICU5ka2+FUl/vwBrKS+r3gnDdWTV/Z75zDoJwQfJKP544xMCfSmUwGAfRjVhFEYxZJyC/NdrmWDniAyIEk+ooc+2/EvcsHxKNojCIQE1VfmEAm9LyaOi09bDAyPT4Nv/Y84XQX87E/83HMybk63b/QCkGuAQqKcJ8eZ4Eo3G1m9OuERHOZdrmQAQqKwR5QLmiLRqk7IDWzP3EF3HViwWfcujE1jMAnvzEJ1g3VB1tiLv36AeS4PIoSe/1AjtHkemlTVgPx4BvZmgfa6La3kY73VnToOfEYSob2sR/wp4A2OpjdaO0x415Cx8JygtxJl1SaklDcyI5BnbTcJseMI9uvcqKlXwaa15AmLuxG/je0KHOzi3QXysMvAmN4q8VzQ7QbXrmK0vqF8wIUEcb5UzeW33TfII3xMx8EPD5Q== X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: b6fdb42e-2e54-41d5-40a6-08dbd5eef149 X-MS-Exchange-CrossTenant-AuthSource: SJ0PR13MB5545.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Oct 2023 06:44:03.2928 (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: eF8kkLIuk5OKzIfq4/gcTd2q00PgLM8pW1zqbyf6Ruglc+GGmIoN0zIdyVCFOnrG8BGm/OOa162RgkiaGdYeVXWE+R/x/WMMZcsEZJA3Bjg= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR13MB5965 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);