From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 79D4CA0545; Thu, 23 Jun 2022 04:27:28 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B53AC4281C; Thu, 23 Jun 2022 04:27:17 +0200 (CEST) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2096.outbound.protection.outlook.com [40.107.94.96]) by mails.dpdk.org (Postfix) with ESMTP id 6BACD4282C for ; Thu, 23 Jun 2022 04:27:06 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Vrz1Xf0HHcahiCFgyAES/uCSMZah05DDVUCNeBtFEY1MqNNIhaGwnprpp1HYTaaY7zZnp1SiNNycE97HCi5jKirofO9BMQZgAYYawb5oACJUH6YfcbGOUBB0oq22LMSj+ddEmPHn+y8CeGFpjO3lnm7achYapJXCmvKz/WbYNzMQPrToKIWAzRneOkLisWRaKEjvK2w2DjAm60A24PAPQ1/Fvt3lkSdl3FSnFK8O8f7LQXVD8eHXymFK4k8j8KkGyBnjgzP+q2VaeASZOS3qEzIS3Fosk1S57bp7h0LoWvbHKZtJmx5b8kNLjyNC851CimQoAfN/dLHHJfO8D9Z6uw== 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=8i3tIAISLgeP2g66yVp8LOoOojfrZBjxUk9Fp4H/RkE=; b=TsvCQMjmeE2tyou2/lEBW8jB9Dx17rXCz3J2uTgaxlXKDMKKqlia66u0vZ14lXZgjwmo7OsXcSkpmEd1SwB9UUxMiurMeDYOR14puaEQgcQdXStUaDIk0XaJmIVE6xUFcCZU+V8WtJutpnUaTm4w4ia2gB6cEkyEVoNNynR0v8G1LwUEGuHqRw6PnGZ/ye05ZC3u5wSzyAAQYGjFE6ZSITfNs0lptXmfoG3tohvHbD98nBLoSt87wibUbHw9KbNpOlHOicF7gx9uARObyvVxPXiAZptmfB6mW5UnK8SGhJAWwHr+b9MVuV7IcoKyb3PeOCgbMf+X6ofKqrODX2ylzA== 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=8i3tIAISLgeP2g66yVp8LOoOojfrZBjxUk9Fp4H/RkE=; b=h6OXI/4lFyS7zZriNxouIHbtv11Tyydy1EsyX2FVB8gEei2fv877VVaOl9Igu4oOSpd2fDCqIWrIGM81nSwFAo21J3N7sMMO/+1udA/jspTrowIxRhAGTNnB9trknOaKdbZHOFTc9uY9rr1M8Odcy5H3eyAIAfExHVTKkBwundU= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=corigine.com; Received: from DM6PR13MB3004.namprd13.prod.outlook.com (2603:10b6:5:191::21) by MN2PR13MB3535.namprd13.prod.outlook.com (2603:10b6:208:169::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5373.15; Thu, 23 Jun 2022 02:27:04 +0000 Received: from DM6PR13MB3004.namprd13.prod.outlook.com ([fe80::ac31:a36a:cc15:cd35]) by DM6PR13MB3004.namprd13.prod.outlook.com ([fe80::ac31:a36a:cc15:cd35%7]) with mapi id 15.20.5373.015; Thu, 23 Jun 2022 02:27:04 +0000 From: Jin Liu To: dev@dpdk.org Cc: niklas.soderlund@corigine.com, Jin Liu , Diana Wang , Peng Zhang , Chaoyong He Subject: [PATCH v4 05/13] net/nfp: rename function and struct Date: Thu, 23 Jun 2022 04:26:07 +0200 Message-Id: <20220623022615.3628093-6-jin.liu@corigine.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220623022615.3628093-1-jin.liu@corigine.com> References: <20220617093444.2004000-1-jin.liu@corigine.com> <20220623022615.3628093-1-jin.liu@corigine.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: LO4P265CA0222.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:33a::10) To DM6PR13MB3004.namprd13.prod.outlook.com (2603:10b6:5:191::21) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ef44d1cb-4a2b-4729-422c-08da54bfdca8 X-MS-TrafficTypeDiagnostic: MN2PR13MB3535:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: CHJRggx1fCEsfWk1cpXo7VK3S1HyMZy4lJ3WPDGtcREPySfVU1BPoBR1zPd9eOVmVcTOZ+acpDw6055tkbDmwvwEe2lKoUb1aR4sc99XN6mt7bUB/WvVQwZhO/Oirz8x/fqfafR9971hkcYViz77CUmJFI+YYwe3dUU+9CzO2bvTjiS+psuVtauOUnLIsKZoTAtuZ34iIdNJDdVqWUdFI1vvYJd0721XZ8loitqB4ksRKBr4seh5WbQiPiuTB0lB4bf59C01i9ril59ktJCrkmJw5mwrYollGXHw8kQruzA+jhSWp4EqLEhBdX0tjcCfiIEJ1zmAZULHgX6Lx58tsduhkwBm63RQH7HAKvxbpXb+qwSTLFfZ26GLzPZD4qdQzLdEBI1Bo4ZZlRkDJDcQoIIXt+tGwlLbavQTOW+rsFW3zaFcOg1QsEz5OvMWBQe7qmVcU+pKNJtAPrqWJgvqRI1gtCSWrlCq0+M8nYfDgDxDOd62LqSja+a6IOjdD3pJmcjjnSOua+SN57cisSwv0dCKleRR0nuPAVTHBli6rtSxvueIMCmZfxHEOtTZu3Yc96Vlz6Qqho2uhSMJ+sowIaNfOm2P0oy41bn51ygTymh4vi7m/TF/5T2FwblsmWuUmlzOMg8MKEnaF5PHoD56BeELvXdKLma3itQjtaLiq3RnT7SMSIADc6PdPWWAdjKELZU7KRcqOo0S8ynZByPhJZpYD0KF5hL2AD4mE6As5lfP+uMQJI6LdZmcn2zTr8gZtuZY6HAtR5Ja7UK7OpHSxwfVjldHNyx6mw8AklxG/KJ7cGogGnB0DkZrB1ZDUTDH X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR13MB3004.namprd13.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230016)(4636009)(376002)(366004)(346002)(136003)(396003)(39830400003)(107886003)(1076003)(38100700002)(38350700002)(6486002)(36756003)(66574015)(8936002)(54906003)(2616005)(6916009)(5660300002)(316002)(66556008)(52116002)(6506007)(186003)(66946007)(8676002)(4326008)(66476007)(41300700001)(86362001)(6512007)(26005)(83380400001)(478600001)(2906002)(44832011); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?b3VTYmR5QlBhN0VWTkhmaThnaCthdzZna2hzY1RRemsvZlVyam9HN3BycFZs?= =?utf-8?B?QWhZV3dLeHFIRmw2MFdqL2ZMSlNvYXJaTDkvYk43eVprckJaUTRFS2F0d1hw?= =?utf-8?B?NzJObk5SUE5XeG5QOVZrVEd6eTZWVVZJUkpKR2xxZ1VQSmVRK1VndFlOZ3V0?= =?utf-8?B?d3hVaXA5Y3E5RkZNZUY1b1dDaWRObi9HNW9ZUnBlSzErcVlqQ295bzNsL0Qv?= =?utf-8?B?eEhMWnFzRG1JaUJ0TTR1NHhwVDJuUVlCTkxNb0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?utf-8?B?ZmFNMy84Q1crVjFSbkdySVNmbEVCMlUxbnpLdWd1QkJoQWRQajJ2Q1RmSlNZ?= =?utf-8?Q?6DXxnTcJ6NozfjlzRnwlUFSig?= X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: ef44d1cb-4a2b-4729-422c-08da54bfdca8 X-MS-Exchange-CrossTenant-AuthSource: DM6PR13MB3004.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Jun 2022 02:27:04.7441 (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: 0DQWpADZDwh7cxFnp7wCCOrFxlByaTjg2oF+2TTL9RHknvAoAED//bXdKMARJqw2XPsaeOhai5b6GR6Epq6AGg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR13MB3535 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 Add 'nfd3' into the firmware with NFD3 eth driver function name, preparation for the next work, as we will support another version firmware with NFDk. Signed-off-by: Jin Liu Signed-off-by: Diana Wang Signed-off-by: Peng Zhang Signed-off-by: Chaoyong He Signed-off-by: Niklas Söderlund --- drivers/net/nfp/nfp_ethdev.c | 12 ++++++------ drivers/net/nfp/nfp_ethdev_vf.c | 8 ++++---- drivers/net/nfp/nfp_rxtx.c | 30 +++++++++++++++--------------- drivers/net/nfp/nfp_rxtx.h | 8 ++++---- 4 files changed, 29 insertions(+), 29 deletions(-) diff --git a/drivers/net/nfp/nfp_ethdev.c b/drivers/net/nfp/nfp_ethdev.c index b80109ec37..ae6cb5943f 100644 --- a/drivers/net/nfp/nfp_ethdev.c +++ b/drivers/net/nfp/nfp_ethdev.c @@ -329,7 +329,7 @@ nfp_net_close(struct rte_eth_dev *dev) } /* Initialise and register driver with DPDK Application */ -static const struct eth_dev_ops nfp_net_eth_dev_ops = { +static const struct eth_dev_ops nfp_net_nfd3_eth_dev_ops = { .dev_configure = nfp_net_configure, .dev_start = nfp_net_start, .dev_stop = nfp_net_stop, @@ -352,7 +352,7 @@ static const struct eth_dev_ops nfp_net_eth_dev_ops = { .rss_hash_conf_get = nfp_net_rss_hash_conf_get, .rx_queue_setup = nfp_net_rx_queue_setup, .rx_queue_release = nfp_net_rx_queue_release, - .tx_queue_setup = nfp_net_tx_queue_setup, + .tx_queue_setup = nfp_net_nfd3_tx_queue_setup, .tx_queue_release = nfp_net_tx_queue_release, .rx_queue_intr_enable = nfp_rx_queue_intr_enable, .rx_queue_intr_disable = nfp_rx_queue_intr_disable, @@ -402,10 +402,10 @@ nfp_net_init(struct rte_eth_dev *eth_dev) PMD_INIT_LOG(DEBUG, "Working with physical port number: %d, " "NFP internal port number: %d", port, hw->nfp_idx); - eth_dev->dev_ops = &nfp_net_eth_dev_ops; + eth_dev->dev_ops = &nfp_net_nfd3_eth_dev_ops; eth_dev->rx_queue_count = nfp_net_rx_queue_count; eth_dev->rx_pkt_burst = &nfp_net_recv_pkts; - eth_dev->tx_pkt_burst = &nfp_net_xmit_pkts; + eth_dev->tx_pkt_burst = &nfp_net_nfd3_xmit_pkts; /* For secondary processes, the primary has done all the work */ if (rte_eal_process_type() != RTE_PROC_PRIMARY) @@ -971,10 +971,10 @@ nfp_pf_secondary_init(struct rte_pci_device *pci_dev) return -ENODEV; } eth_dev->process_private = cpp; - eth_dev->dev_ops = &nfp_net_eth_dev_ops; + eth_dev->dev_ops = &nfp_net_nfd3_eth_dev_ops; eth_dev->rx_queue_count = nfp_net_rx_queue_count; eth_dev->rx_pkt_burst = &nfp_net_recv_pkts; - eth_dev->tx_pkt_burst = &nfp_net_xmit_pkts; + eth_dev->tx_pkt_burst = &nfp_net_nfd3_xmit_pkts; rte_eth_dev_probing_finish(eth_dev); } diff --git a/drivers/net/nfp/nfp_ethdev_vf.c b/drivers/net/nfp/nfp_ethdev_vf.c index 08077632c6..d0fa1df24d 100644 --- a/drivers/net/nfp/nfp_ethdev_vf.c +++ b/drivers/net/nfp/nfp_ethdev_vf.c @@ -236,7 +236,7 @@ nfp_netvf_close(struct rte_eth_dev *dev) } /* Initialise and register VF driver with DPDK Application */ -static const struct eth_dev_ops nfp_netvf_eth_dev_ops = { +static const struct eth_dev_ops nfp_netvf_nfd3_eth_dev_ops = { .dev_configure = nfp_net_configure, .dev_start = nfp_netvf_start, .dev_stop = nfp_netvf_stop, @@ -259,7 +259,7 @@ static const struct eth_dev_ops nfp_netvf_eth_dev_ops = { .rss_hash_conf_get = nfp_net_rss_hash_conf_get, .rx_queue_setup = nfp_net_rx_queue_setup, .rx_queue_release = nfp_net_rx_queue_release, - .tx_queue_setup = nfp_net_tx_queue_setup, + .tx_queue_setup = nfp_net_nfd3_tx_queue_setup, .tx_queue_release = nfp_net_tx_queue_release, .rx_queue_intr_enable = nfp_rx_queue_intr_enable, .rx_queue_intr_disable = nfp_rx_queue_intr_disable, @@ -292,10 +292,10 @@ nfp_netvf_init(struct rte_eth_dev *eth_dev) hw = NFP_NET_DEV_PRIVATE_TO_HW(eth_dev->data->dev_private); - eth_dev->dev_ops = &nfp_netvf_eth_dev_ops; + eth_dev->dev_ops = &nfp_netvf_nfd3_eth_dev_ops; eth_dev->rx_queue_count = nfp_net_rx_queue_count; eth_dev->rx_pkt_burst = &nfp_net_recv_pkts; - eth_dev->tx_pkt_burst = &nfp_net_xmit_pkts; + eth_dev->tx_pkt_burst = &nfp_net_nfd3_xmit_pkts; /* For secondary processes, the primary has done all the work */ if (rte_eal_process_type() != RTE_PROC_PRIMARY) diff --git a/drivers/net/nfp/nfp_rxtx.c b/drivers/net/nfp/nfp_rxtx.c index cd7faa2c58..9b769c9775 100644 --- a/drivers/net/nfp/nfp_rxtx.c +++ b/drivers/net/nfp/nfp_rxtx.c @@ -655,7 +655,7 @@ nfp_net_reset_tx_queue(struct nfp_net_txq *txq) } int -nfp_net_tx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx, +nfp_net_nfd3_tx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx, uint16_t nb_desc, unsigned int socket_id, const struct rte_eth_txconf *tx_conf) { @@ -670,7 +670,7 @@ nfp_net_tx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx, PMD_INIT_FUNC_TRACE(); /* Validating number of descriptors */ - tx_desc_sz = nb_desc * sizeof(struct nfp_net_tx_desc); + tx_desc_sz = nb_desc * sizeof(struct nfp_net_nfd3_tx_desc); if (tx_desc_sz % NFP_ALIGN_RING_DESC != 0 || nb_desc > NFP_NET_MAX_TX_DESC || nb_desc < NFP_NET_MIN_TX_DESC) { @@ -718,7 +718,7 @@ nfp_net_tx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx, * resizing in later calls to the queue setup function. */ tz = rte_eth_dma_zone_reserve(dev, "tx_ring", queue_idx, - sizeof(struct nfp_net_tx_desc) * + sizeof(struct nfp_net_nfd3_tx_desc) * NFP_NET_MAX_TX_DESC, NFP_MEMZONE_ALIGN, socket_id); if (tz == NULL) { @@ -743,7 +743,7 @@ nfp_net_tx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx, /* Saving physical and virtual addresses for the TX ring */ txq->dma = (uint64_t)tz->iova; - txq->txds = (struct nfp_net_tx_desc *)tz->addr; + txq->txds = (struct nfp_net_nfd3_tx_desc *)tz->addr; /* mbuf pointers array for referencing mbufs linked to TX descriptors */ txq->txbufs = rte_zmalloc_socket("txq->txbufs", @@ -773,7 +773,7 @@ nfp_net_tx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx, /* Leaving always free descriptors for avoiding wrapping confusion */ static inline -uint32_t nfp_free_tx_desc(struct nfp_net_txq *txq) +uint32_t nfp_net_nfd3_free_tx_desc(struct nfp_net_txq *txq) { if (txq->wr_p >= txq->rd_p) return txq->tx_count - (txq->wr_p - txq->rd_p) - 8; @@ -790,14 +790,14 @@ uint32_t nfp_free_tx_desc(struct nfp_net_txq *txq) * This function uses the host copy* of read/write pointers */ static inline -uint32_t nfp_net_txq_full(struct nfp_net_txq *txq) +uint32_t nfp_net_nfd3_txq_full(struct nfp_net_txq *txq) { - return (nfp_free_tx_desc(txq) < txq->tx_free_thresh); + return (nfp_net_nfd3_free_tx_desc(txq) < txq->tx_free_thresh); } /* nfp_net_tx_tso - Set TX descriptor for TSO */ static inline void -nfp_net_tx_tso(struct nfp_net_txq *txq, struct nfp_net_tx_desc *txd, +nfp_net_nfd3_tx_tso(struct nfp_net_txq *txq, struct nfp_net_nfd3_tx_desc *txd, struct rte_mbuf *mb) { uint64_t ol_flags; @@ -828,7 +828,7 @@ nfp_net_tx_tso(struct nfp_net_txq *txq, struct nfp_net_tx_desc *txd, /* nfp_net_tx_cksum - Set TX CSUM offload flags in TX descriptor */ static inline void -nfp_net_tx_cksum(struct nfp_net_txq *txq, struct nfp_net_tx_desc *txd, +nfp_net_nfd3_tx_cksum(struct nfp_net_txq *txq, struct nfp_net_nfd3_tx_desc *txd, struct rte_mbuf *mb) { uint64_t ol_flags; @@ -857,11 +857,11 @@ nfp_net_tx_cksum(struct nfp_net_txq *txq, struct nfp_net_tx_desc *txd, } uint16_t -nfp_net_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts) +nfp_net_nfd3_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts) { struct nfp_net_txq *txq; struct nfp_net_hw *hw; - struct nfp_net_tx_desc *txds, txd; + struct nfp_net_nfd3_tx_desc *txds, txd; struct rte_mbuf *pkt; uint64_t dma_addr; int pkt_size, dma_size; @@ -876,10 +876,10 @@ nfp_net_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts) PMD_TX_LOG(DEBUG, "working for queue %u at pos %d and %u packets", txq->qidx, txq->wr_p, nb_pkts); - if ((nfp_free_tx_desc(txq) < nb_pkts) || (nfp_net_txq_full(txq))) + if ((nfp_net_nfd3_free_tx_desc(txq) < nb_pkts) || (nfp_net_nfd3_txq_full(txq))) nfp_net_tx_free_bufs(txq); - free_descs = (uint16_t)nfp_free_tx_desc(txq); + free_descs = (uint16_t)nfp_net_nfd3_free_tx_desc(txq); if (unlikely(free_descs == 0)) return 0; @@ -913,8 +913,8 @@ nfp_net_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts) * multisegment packet, but TSO info needs to be in all of them. */ txd.data_len = pkt->pkt_len; - nfp_net_tx_tso(txq, &txd, pkt); - nfp_net_tx_cksum(txq, &txd, pkt); + nfp_net_nfd3_tx_tso(txq, &txd, pkt); + nfp_net_nfd3_tx_cksum(txq, &txd, pkt); if ((pkt->ol_flags & RTE_MBUF_F_TX_VLAN) && (hw->cap & NFP_NET_CFG_CTRL_TXVLAN)) { diff --git a/drivers/net/nfp/nfp_rxtx.h b/drivers/net/nfp/nfp_rxtx.h index dec1857da3..d784f52b66 100644 --- a/drivers/net/nfp/nfp_rxtx.h +++ b/drivers/net/nfp/nfp_rxtx.h @@ -53,7 +53,7 @@ #define PCIE_DESC_TX_ENCAP_VXLAN (1 << 1) #define PCIE_DESC_TX_ENCAP_GRE (1 << 0) -struct nfp_net_tx_desc { +struct nfp_net_nfd3_tx_desc { union { struct { uint8_t dma_addr_hi; /* High bits of host buf address */ @@ -124,7 +124,7 @@ struct nfp_net_txq { * of the queue and @size is the size in bytes for the queue * (needed for free) */ - struct nfp_net_tx_desc *txds; + struct nfp_net_nfd3_tx_desc *txds; /* * At this point 48 bytes have been used for all the fields in the @@ -286,10 +286,10 @@ int nfp_net_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx, struct rte_mempool *mp); void nfp_net_tx_queue_release(struct rte_eth_dev *dev, uint16_t queue_idx); void nfp_net_reset_tx_queue(struct nfp_net_txq *txq); -int nfp_net_tx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx, +int nfp_net_nfd3_tx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx, uint16_t nb_desc, unsigned int socket_id, const struct rte_eth_txconf *tx_conf); -uint16_t nfp_net_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, +uint16_t nfp_net_nfd3_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts); #endif /* _NFP_RXTX_H_ */ -- 2.27.0