From patchwork Tue Oct 24 02:28:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaoyong He X-Patchwork-Id: 133215 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 4FA53431EB; Tue, 24 Oct 2023 04:31:00 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2D67642831; Tue, 24 Oct 2023 04:30:01 +0200 (CEST) Received: from NAM02-DM3-obe.outbound.protection.outlook.com (mail-dm3nam02on2108.outbound.protection.outlook.com [40.107.95.108]) by mails.dpdk.org (Postfix) with ESMTP id 80288427DF for ; Tue, 24 Oct 2023 04:29:58 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Y8wbCbhB9bemrGR48+Cb/kyk8lcvVgIiWKakZUND7ad0TAX7n9V2gng/iBz0uI/BuDcBLkmRzBR8Wu84J4Q7ahybOky7l8bcKumTjFaXNOpIDd5eVBz62lRrY4I2gZuYzVTF9hFXj6pU0lyrYUxcNzHrQzeFqfzPSnokQhV2uOL6ij7Zr3EvYWa6jMZ4ojM76W9JfocLPUZlZnZ2ywvZ5+pLyuTsxeWw5d6Dj7h3/gHX5h7H/g6Z4NzPifnXx/IPQ17HG2STY6F+wsGEs2t/mwku+7Uk1dg/5B6gz7hy4l7RiHSaZeiYcVGPz/FVUeY0zw7r9Y5VqT9oJMHKcjPtpQ== 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=fiB+rsUWgz6asuj7LOilc7RcCTZk06lf3hIOaiPdJAVBEFTUC0ig7Xz30MkmARkxraAWShYzs7XhNff8V5ZP+ytM4GNOvByXPjsoKPFh91jxBpFaV4LDZIrVyrCT76j9X/rWDohreJxdklmQdP5fvXevyZGwqW0hAf+3VqkX2ihb6apr+s0NEt3yCoUtX/UbdxoiiUkhYtGuXheqCwWuo8lGz1ifPqI6FVTUnGB+aTGSaJiWKhxsZjIq/One8RUlZLg1xps3N6kxX5FuYfwx2yA1jkzclZf4oOIJmjzcdoOSrqEDOMUNNbLeTHmh1lFMkZhnq8LHRFwqmn3j1uPsVg== 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=m1TEEFq/4Tc46AwTMOYDSDU1vCJRkkKxv7G1kOQBtmbPTumgw15vfQfXmaz8t11F07eVBg0GxxLYlWR2bo/FKjOGHtmzAWNfiA5GeUgOD3I19RIkvY/a8ilHU5PNPmcOTJTSucypS5ii7d8iR8tIE649os66jGBCPNkURFxS7uE= 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 BLAPR13MB4691.namprd13.prod.outlook.com (2603:10b6:208:306::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6907.33; Tue, 24 Oct 2023 02:29:56 +0000 Received: from SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::142e:d47c:7320:8a9d]) by SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::142e:d47c:7320:8a9d%4]) with mapi id 15.20.6907.021; Tue, 24 Oct 2023 02:29:56 +0000 From: Chaoyong He To: dev@dpdk.org Cc: oss-drivers@corigine.com, Chaoyong He , Long Wu , Peng Zhang Subject: [PATCH v2 10/25] net/nfp: change the parameter of reconfig Date: Tue, 24 Oct 2023 10:28:34 +0800 Message-Id: <20231024022849.3092506-11-chaoyong.he@corigine.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20231024022849.3092506-1-chaoyong.he@corigine.com> References: <20231017054545.1692509-1-chaoyong.he@corigine.com> <20231024022849.3092506-1-chaoyong.he@corigine.com> X-ClientProxiedBy: BYAPR04CA0015.namprd04.prod.outlook.com (2603:10b6:a03:40::28) To SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR13MB5545:EE_|BLAPR13MB4691:EE_ X-MS-Office365-Filtering-Correlation-Id: 4276bf1d-90ff-4124-8271-08dbd4391c58 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 7Mp8YW2LOwWKy3692DcbRqgN60tf/9VTA1+wKdM4scRmPySmV6g3g00QlXOzh+VlB9GlFaYn9WOElbkSLdpLQxTQ6FDR5oRV7jGm0kEaFVNLTgF0ZK4sEjzGlSjk5bmrKHu6InZqraUt2iw4Li0vxdZtMQNMlV++JtTK3+0WxCKkLgGJZQky/1jGN9cTT/ZWG+FPVxOgT/MOKkacY6ojrY35jruhqnDL61czTboWcSjfX7LX5C5pSZ/YB+lrfK8scsM4gJP2xTOIflMqnPP5Wz6cCh0V5KT9ULhS2wJAePFxdgIs+0QF983sSB9iEG+Cyd1EA5Yi05c4bCLeysGumPi/HAhGVy3Fb6VFFeoh83vq6xmzmx/sx1KxoGI9M4s2KGlm/8FUs09ALTmhNXKgIwXo9d477V8/Eogsp1zfjLhKlhGH7vRyAvEm27EZjbNJYJ2P9dNvTWGhIG6/WOpvM3A1O+Si+Jpjj7/ydlVaO4hOdsDeabGMhbjKIapBmAeyt8+1hXRHDVPvW0epMHP4qoxDR+PYHAl6ooKBsmc55SUvZX84URcLuFtbedcGrrcrIItXR07+CVY6bYTwxNbzMOsWF4HPC/UeWOaRUsd5xtdG1UoliLaARjjwK5oNgW+dU86E4rA/lhhW+8VH+j5IL2op9k+vE6huXG/iDEnENOw= 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)(39830400003)(366004)(376002)(346002)(396003)(136003)(230922051799003)(186009)(451199024)(1800799009)(64100799003)(83380400001)(38350700005)(30864003)(2906002)(4326008)(8936002)(36756003)(44832011)(8676002)(26005)(52116002)(107886003)(2616005)(1076003)(38100700002)(6506007)(6666004)(6512007)(316002)(6916009)(478600001)(6486002)(5660300002)(66476007)(86362001)(54906003)(41300700001)(66946007)(66556008); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: O9qRam6NPPL7l9Qz5PS8QrjuFDeqMG0ag3uSB2TeCtSp2pn7eOIhe6q1iWern7EW7BCfTbw/RtdTXfg35BRMvYFSOdm1UZbkAbSg8EI8VbXIzbhnDcXw0jaIwaGS8yUp5uPAoWyT8+L/Km4RjQTg7LjHJw4BtORcdXwo4J6exUjwxeCN/AFuh9hR52hla6cpNTwkrHijRzweej616b2tJLdeW9HQFpUXNLH0a4EAnOnOVXouFTxHOayXi/tqQzKjOc1B7lwbv+3zQaP1VTQbt7Yt0nL/Ijvmzzd9k+D2QKtabPepew+Iho6z/OT3LwRtF7841qHpnY6blFkOnJEJfQfu7KSXICABKsvwHwFgtCxi5m3ECBm8Yg9DUIi+7gAruzjWuaDlMK4sexjD7ZZcdbjzj4p1Hem37C7m+NgoHLqPVZlSARdR+DBXBk2swlyEgouLFrsppfg3FPWaWRmV8bFj6A2uGGser5XaazjbIj9fsNY2dek3fTro7+FeUrmHZIp/cYiV+tagJsIujH00hQKF4WFA8AoeEHARzKaqs/bLmIj9AxtPjK+j3WQGkwgGGEFyDVSeRdb7CAQ4RWWRW+RyuMoZKH/k+hso9q6u3HbCBSYBkkGw40qn50YKx0kKMVPEW/AIaHb/kQKqDObTq2ipmStq8S8XeHGTQVCwSvIDxRb4tIlc5EmAJF7MV9U1QojyocJR3ZvSuqsJNyJZjpegjVqgYB115//Icn0onnKFkqtHQ/ByX94XL6vzKxoolINymfnZSLz8Sknf9ERuj8tnMY5qHRTs9qHvaqy2I2MdgH7Nnemu/FJzcDyYE7aPLlP519kgrZCgb+GmEpBeWLhjSdR2h0FEGfcDPfjIIuZlkahSTUvpcqehCTJ+5xXJLjtMpCdq86ZDPt1r6ZF+F1D46aJqSk57uE5IWEXCQkDsP5RYenfmr9Ixo3HpUVbQT7MHUDHmTaSVq5P01ePDA8Ai7ctnJ6Higcjn9bUX3moHbCggg1NcqKAha3Rgf+ajHMpS+TxC3G9i6Rt9ieK/FXhL4YianKzbviNylz3EsXcPziv4B/fGxbKEoqSl0Xq9n7scxvc6lzVXO0QIl90AZonjxzGZXl6sGNvSRmBzfM0nlPjPRzz+YynvZQFJR8qSWrA/a4nIhssiSwn2Tg+xsT7jjPdjyZEHH5ZpdOnh189xh+2t7zEBccLKMkE/61K7INJKbUDJZTN42eWy55RqN2CkyG9S9j2agaqxhlUcoC4Xxu3s3TIJjcT+ZyHUTyKdoHTvBdj0PQ5d/GI4s+8oOBWw/YV8Rz88F6ARzL2uXE9ugy7JyYxJ2sGRu3BPl78NilKFFeL+YX0HgyIvUjMF1EAJPvlbtzLMH9qnJXNCXPKDwZaX3FnEMCNSgnkHWOXgQ4abEkjqPjGRIjWptTQWfKHKeJmaiwdSNWIFvG9nlnP1JSCTMwjEZu7EuW8k1sDvtKK2/uxdZYZnDkLzitL54fy/w1AQI4a0CDnY4w93v1l1Bnwc57jbABx/mzlcX42Sj5F+HGXby2QyMmrZv5XFYpitTX7/TdKZ17vXodamP4C39RhkEJObHss+17MGVxtUnkUr8RdkyGs76nDLwNj97g== X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4276bf1d-90ff-4124-8271-08dbd4391c58 X-MS-Exchange-CrossTenant-AuthSource: SJ0PR13MB5545.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Oct 2023 02:29:55.9733 (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: PPchoa0XwMb61L2xVWusBqCtujxqxusAo/WYZ75EdSAP/7sHS6Xbifgs80lZcE5Ef/7gZREU/aFUdHxjO3K1NV8bYWo4kEdoj1bw8U9dlAY= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLAPR13MB4691 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);