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 13DE5A0547; Thu, 16 Jun 2022 04:41:20 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2D59C42BEA; Thu, 16 Jun 2022 04:41:10 +0200 (CEST) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2092.outbound.protection.outlook.com [40.107.94.92]) by mails.dpdk.org (Postfix) with ESMTP id 661F642BD9 for ; Thu, 16 Jun 2022 04:41:08 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jPhFpPJN84UVbu/kUXA8CbSgd+cCk0KCMPFecSm2EY5wvBqvG9YzqtfyAvJ6IULaK9pbg1WMxbLtFsNdNj53+zT0jf3yErKn9+Skz2Vmia+lic3S3O6R2LF1HJTPfy+419lyWMlEyUg3DLT+qKAUm6dJvy7fG0+p2NEsFGLWYy100cI/PX6ok9jnZVnAxQTs/sNsLckquzY2CmzzQyOYFiySEgUSXG66mjSZgKooFbvwYQKbU0CUV6XKvL1l+KipEIcDg3o9tsSa5+LRenHPFLSDXF6KMqUANwelgYi46svkC9BMi8hnh1HGaqmeiKIWr6WRELPR4y+6Q5oZqEILzQ== 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=PdYvAKhbVJJsh3ibJpHxemt2CV6TSW8cXp9HKDoJ4FihcQkc+9iISALh1AJVTr3/b7BgrLIgHRz1itOyAgwxNZ65ZodLBPMSKWuhi2jVY3Dv2wLGiJq0Xk4ozrc0FMDEkFEtYcudVuYrSdntjYKzcv8RhiyqNjf+aFiBcfiPNj5DLfQXQ9vwe936B7WPrIAj0rzi3ka7QajhwtppqUUu5QmG3gjXOkEYOjcqMYoiWFwXJDY0+fDV4aejDJBwrHiNyWURgnaC3AY7mdqt+GfJX2UdQnmUxsck/ui5w0GyUYZb2iiWb/BFSS9mVb6fir2dkpX5k1JtLmzvbhVU9o95Ew== 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=kqP1ZoDi3cpDw9aYKcGovvCIn5ypOWXDqbRhsBlbLDdBekbvdm1D3p8IvQPwSb2H4T4lOZbMHNHDG426JwmIeljfYR6V6FysOjmy/iMEfujYYrhFxR0LRhsFLlGlUgv/rt2Cx7Jpp+A2vZ5wmt+Iu/kMOdMCMkqXHH/c9pD5vY4= 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 DM6PR13MB2345.namprd13.prod.outlook.com (2603:10b6:5:be::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5373.9; Thu, 16 Jun 2022 02:41:07 +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.5353.011; Thu, 16 Jun 2022 02:41:07 +0000 From: Jin Liu To: dev@dpdk.org Cc: niklas.soderlund@corigine.com, Jin Liu , Diana Wang , Peng Zhang , Chaoyong He Subject: [PATCH v2 07/15] net/nfp: rename function and struct Date: Thu, 16 Jun 2022 04:39:31 +0200 Message-Id: <20220616023939.1798769-8-jin.liu@corigine.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220616023939.1798769-1-jin.liu@corigine.com> References: <20220602015304.710197-1-jin.liu@corigine.com> <20220616023939.1798769-1-jin.liu@corigine.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: LO4P123CA0087.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:190::20) 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: cd31e8a4-a557-4876-d903-08da4f41a9d6 X-MS-TrafficTypeDiagnostic: DM6PR13MB2345: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: clhSqYwU9DK4svNPohp64AcBTQWjVM5o6Oi/et5be6Btb8nV+h+3aEIX+5SDY5JRPmtd/HxVWx7kWa15TSUe79AENcwNzVxnMSU+sMCmbqzo7sHKT1VabjoKSqRxfWCpRWmq3xHrQF3D2987GyyZncbQkwi5vOZm40JCjJXfXyJH6sunjkq7BkaH16vsEzRpVimonddS84jWKe8+cHIDkU9+F+HRPXwD7s0S4NIEC1JOL/Pm8D9gU2je5VfCozzt9Zql4wPqtasZGDWdz9YCl37z36y6Ls7RkS1T6fuuZ99hNP32z91q0d7V7r7pKMd7oVN/nvNXteQ9R9lplk9H7PC5BFj/8ooq47HJMbbFdBaXeLNlvnq8UYGARRDVmPDIVdxazPbzeKVMTYOmXHrqwc9lf13ZIoRd70vpzDuuUT4hrIW8nC9O56zBgr/77Tpgwmt/vlEfuIz+I8iQznYD7FPsmcNizEr67Hqtmkozfsuj5Z5t+CZdNmBLH+si5xHcJR9E08JQl7qA9mg0DG87C072zVRl6wHs6VtrSJiGJMqY+FC3sheepFhQvbY28aYdjxV8PtOzHVNY0XkDLaPcRQ2pov8suZdS/aR3M5wy+RpKaTtH+TJYTy4AEXOif1hJP1tBCJGUjFr9mafvILJFCtWW2e9L9qruema4nljmNnzLWmYSiqYFhv7+iQN+y3uc0eldR0XepCK7RCr5m5LOvw== 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)(346002)(396003)(366004)(39830400003)(136003)(6506007)(6666004)(26005)(316002)(66574015)(186003)(107886003)(6486002)(508600001)(41300700001)(2616005)(83380400001)(1076003)(36756003)(54906003)(6916009)(66556008)(8676002)(2906002)(4326008)(44832011)(38350700002)(6512007)(52116002)(5660300002)(66476007)(66946007)(86362001)(8936002)(38100700002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?MlE0ZzI3RWVXYzc5aHhNejhPMG5leDFTaFZHTUd5SVREaWFYUWp5ZitkR2hG?= =?utf-8?B?c1cxdkpuZzR6aCs0TlYzMUwzOHpzb3dEMjBTcUJRcHJhaVZ2UktxNG9XRTc3?= =?utf-8?B?L3d6T2hOeFlkQUV6bC8vcHJqNG1sZVFCRjlxaHI3VnYwS2FWblJiNHZaQzRF?= =?utf-8?B?dUxMeFFLS3RkSXhoV3hSNWllc1FBTU4zbzhJSjNTVkV4VjgvOXZ5dklBa1A3?= =?utf-8?B?aDdybW8yRElrV3BWZ2FnZ05nTEdPNEk3WnVaN2xtQzlEQnBLRGFUcE8veTU2?= =?utf-8?B?ak1rUVpKSkNQQWRGODNSZmwvbHRId3BCYmpnTEpac2JyU2NMSGswc3U1cVdS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UJGR1BWbzJrN21wQjdUQ2dCb1ljcktYODdX?= =?utf-8?B?eTNoNW0xazl4RSsxWTFkZTJRUHpGTmZGaWlSTWlPeDYyWENOWjJMeDBWa0Vv?= =?utf-8?B?aUxiRVBzeGNDSkZjalB6NHFYbmtOYno1V1k0Wk45Wmt4SHFOc24rRFczOXZu?= =?utf-8?B?amZScEl1MXFndDhIbC9oRGt1dEJiTEQvUVdxSHpOaVF2eUJvMnE2dz09?= X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: cd31e8a4-a557-4876-d903-08da4f41a9d6 X-MS-Exchange-CrossTenant-AuthSource: DM6PR13MB3004.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Jun 2022 02:41:07.0838 (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: 61H1muWNsxhovWCuyTeztv2Wfcc+X2btrMRkrJuzkcfmcLil/jCSIETlU/9JuNUeGxRdBR+BlvzSm+P5xEprFA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR13MB2345 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