From patchwork Thu Jun 23 02:26:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jin Liu X-Patchwork-Id: 113286 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 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> 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?q?ouSbdyBPa7EVNHfi8gh+aw6gkhsc?= =?utf-8?q?TQzk/fUrjoG7prpVlAhYWwKxqHFl60Wj/fLJSoarZL9/bN7yZkrBZQ4EKatwXp72N?= =?utf-8?q?nNRPNWxnP9VkTGzy6VUVIRJJGlqgUPJeQ+UgtYNgutwxUip9cq9FFMeF5oWCidNn/?= =?utf-8?q?G5oYRpeK1+qYjCoyo3l/D/xHLZqsDmIiBtM4u4xpT2nQYBNLMoGWvIoarbX3SFiJu?= =?utf-8?q?eUgjwPKeiVru9N7j9mmj9cM6vGLWX1hF/KV/yoUDP6Rktr1taOgxaao3wt73GxtpF?= =?utf-8?q?zCOLvNHg6CmDxMFZaxNfEl2D7OKl1f+pYzPUQSEZXfInElNYtvE1afj+LBF5M6jau?= =?utf-8?q?SUBseTdcSwuopTG/vGffZ3GnPh8knPa15F6hUKibgfF1Gyr84iJmdu1QFzn4OXDVF?= =?utf-8?q?OoEruHSf5P8XPo9Ke9WE6zIrqRGmdQJ+2p4BKAfscydiM2xgW/BPaIDA7QjBDkop7?= =?utf-8?q?qtUFdpjA0t5ALNE9qUHEiJ8SV9ATgCrFxh2O+BpRQYKihXy8yjfCN1i98u07W2lYT?= =?utf-8?q?zmSxtxh4eQvKC5TnTmW3Ou1Hj7FVwKZDw27C5Y0IHn1suwy4ufC6AqQzGXWEJdRIX?= =?utf-8?q?u6jbIp+JOg9S2LB/yuP5TJG4UMPVtQcUhWr0RF72ZvoIQ5unayIKbwZaaeLDKa7KG?= =?utf-8?q?cK1GVFf7FupUn3UYcPfvgfb5P04eqPh5HwaHruaOy88WWOIbDBpndEaeFV9f7tnag?= =?utf-8?q?en9rR/8IiBHc9ihtY9cB9tSqCDr1cRfPiRP9Jbeh/X2j/n8lJhdCfZ0HoR9s1tvZw?= =?utf-8?q?4GPei/ZY8ISGLXMhsot1nJ+rjxZR4YX7z1HtvSio/NV1fsAwuhS0RwMq/0SAVEcxw?= =?utf-8?q?MFcJeXMo217Bpeb90WnVylEs0GNK5jyLzQaHgp50BPxVQVM1EzuGHsYx+bO174BWo?= =?utf-8?q?I3CKI4Nin7/You3IUtTRf5FFu44Ss7QkWgKiNvBbBmphTlQfii2aua5F6xtis+SYe?= =?utf-8?q?i/SyZkjnuX6Whmg+bedG72vwMQznFoIPNo2bP5YFw12bjJl7hKOUHgeGahcvw2+81?= =?utf-8?q?hTtmVqLe5fpNsiBQ3mAsEoJ5q1BpAeVmJcbkpaK+3rL9lxr5lmY3jQZthfelCLciu?= =?utf-8?q?UKXNNlDWNkfz3MWQ0gmRQuBPKTxt/79uEJsOp1aFmNOnXfqbd9o6jCVlJyxfLHvEF?= =?utf-8?q?X1O15JJG8ZdFqp5ONVjOif/+D4MJdP75/qplFtJyGXEq6SXN/7qlmmaEliAUPqHAK?= =?utf-8?q?ejicayZ0X4P+Jn4kImIAp1F7Q31+J7PFPAz861qISiF0Xcl12pmugJd5ROutsZ3tq?= =?utf-8?q?kP2iOZNmGKnuvoyIEGWyrZru6GlXBgI42Vzqjrkv2WUGegUAeRs13ZztrGv07I2bZ?= =?utf-8?q?g7g+vyksv36v2oN6GNVQtw8jr0xym6F/DpebZMlRAv1QQL2RM2MJLqX1NE6MTrx8s?= =?utf-8?q?5ihHtHSi/K3ltxiVjKVT80xmsR+TTT4nJWJJuwMwVIpzSQ/CmIA794eDszkz4b+vU?= =?utf-8?q?mO49MSlfaM3/8CW+V1RnGrISflEB2U1nzKuguBBhAdPj2vCTfJSY6DXxnTcJ6Nozf?= =?utf-8?q?jlzRnwlUFSig?= 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_ */