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 44E9BA0548; Thu, 2 Jun 2022 03:54:51 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7761742B71; Thu, 2 Jun 2022 03:54:48 +0200 (CEST) Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2107.outbound.protection.outlook.com [40.107.223.107]) by mails.dpdk.org (Postfix) with ESMTP id 9268D42B70 for ; Thu, 2 Jun 2022 03:54:47 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NKZAL2zrZLIsikKGVilmI9JIyFGVuP8uN7BE02IOCeBzz7r68Y0PhW4FzzfKun2eifhE4clwQ8SvxT8Ur2Oq8F+Nrna0gUcRnf8uJ9yKtiD3CL7osfqy+jBskKqKJxWTDMVwtnlks/RzcWgyltemQRF0rKpfzJLlfFHfv1nDGu6F14EBt6QIQkMWn4Gu0+WJUeZOUTH+2M2PJEvnaDbBkr9VH35N3axizxK0y13BN6tyv7zOlBVaLI6mpNTCNcdZTYdRAtXdXP8Dn38WyrdaQQfIPdMXLDla8yeQ3vjn/JT8ym4oY+dLn3+qVFuPZL12GCd9B1cb12WhX8Yf24DKKQ== 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=jNQQseR4lHSv6qkTTkZDpdzMgaWasqRxgBnyOqsxc/I=; b=eyoPqVy9eX4UNna1+s9VuIlnSqJs6ljMqHx62rnf0vcrtr8EEceZ99DGP74QOKr1KmsYFQIRBrdpE3U9CvaVBNKsT/YUm9k3xjkzEoqbIVIwnDsYt7dYi9CyHxfDDs/EDHlAG47INjZlewXo837fTW/jdCQrOqVGH6vRDa3XmzbWNUJWOd6UaMX5/ACS8ddKP/sv11DHqMfKgRKqkqYelc2UaANuUjjGsXVPgq9guBYAMZ9LlZ56ufhm+8Yoi9A1jOqnXsndWuu83TSz8U7WPZTl2SLtpvmwLuWwK5mSmj4SzxbHNzJv3r5xOhxvlkmmPeizYbxLX1BnscbbzMvWvQ== 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=jNQQseR4lHSv6qkTTkZDpdzMgaWasqRxgBnyOqsxc/I=; b=regGp9ZVjg1V3QBY/Gkf7+2J7SD3ly8cLpKqXsM/FlsoHjnz3x3b/giP0HFN+ZTa03QqR+YAJ9K35vPnRD3DWZR63ij7TjJyASW0Jqh1gV7b8I6XKSwuxobgUR3ImI+5fDSvwf33i1E09Xt/Mp5SmFZPziSM9PGkM1zOmQwCTqw= 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 DM4PR13MB5858.namprd13.prod.outlook.com (2603:10b6:8:46::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5314.11; Thu, 2 Jun 2022 01:54:46 +0000 Received: from DM6PR13MB3004.namprd13.prod.outlook.com ([fe80::d902:ed7d:82bb:c753]) by DM6PR13MB3004.namprd13.prod.outlook.com ([fe80::d902:ed7d:82bb:c753%4]) with mapi id 15.20.5314.013; Thu, 2 Jun 2022 01:54:46 +0000 From: Jin Liu To: dev@dpdk.org Cc: niklas.soderlund@corigine.com, Jin Liu , Diana Wang , Peng Zhang , Chaoyong He Subject: [PATCH 05/14] net/nfp: rename function and struct Date: Thu, 2 Jun 2022 03:52:55 +0200 Message-Id: <20220602015304.710197-6-jin.liu@corigine.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220602015304.710197-1-jin.liu@corigine.com> References: <20220602015304.710197-1-jin.liu@corigine.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: LO4P123CA0457.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:1aa::12) 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: ccf77b29-ee9a-4c0d-8f32-08da443ade65 X-MS-TrafficTypeDiagnostic: DM4PR13MB5858: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: bJTpfpN/sJfWvRJKiMcr8ZS0bpfTcjdC3cupMsFMSFh+oyglJPM3wVCncQnSpksREUH7EIitKKXd6OT9Qxrw88GzYrGOVh/yrfkj+WBx6BVEsOCuN+i8fieEQjKSMWlDJWydFg5UQje1/xhzHEj63/n72E3U9Y75juOhD74K1inSfvdxaGsVBA1ABc5512hCr45ClCMqBkQyXUqvY9uKEFLMJORm/R2knwn8R556/jCWrEoXxWN+++A93IjBiORjPRczSM3fSvRHIyLC4oAc1Nu2xGkwECnWjVXFOcT2yJIBfzpoL2y3jONx0s4gxTV3Imy1VKjpH6m8FdoGLDPks1laKlGccp7nK2gVleo3klCodlk3+mh2iZfa/wqdBSxrGQVyEZoqTlzuW+lp7gSdPnWwV/Nf6kVOE5yTFL2tbOk0t5+u87pRQCU2DdleOPO12IV2+0lJECfepzxJZ7dFulHh9e5DxCd2gMYlLcgwJ6zWNimlnpVU+I51izEyXUEJNhOsgJYCiE8cTmaZn7bD+FdpzJ5f95Op9LozVi/xeV2h61SWlDXojeC6DJZLO7moqVwrCgZejPCltgqrDlHEevD13ng711BflThQKPXT82Mci/dX6XXLMfmaI7DmNkUsK0PqL0ggmvkCi1dRKrIrkTl6ZLZf138Lu4BNbjXeO2HJpUkIRL6A1d312dl5oYKbLTj/n+526AfA+5J8Aqcndw== 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:(13230001)(4636009)(346002)(366004)(396003)(136003)(376002)(39840400004)(36756003)(186003)(66574015)(83380400001)(30864003)(5660300002)(4326008)(44832011)(8936002)(2906002)(6916009)(54906003)(1076003)(107886003)(6506007)(316002)(2616005)(41300700001)(8676002)(66946007)(66476007)(6666004)(66556008)(26005)(6512007)(52116002)(38100700002)(38350700002)(86362001)(6486002)(508600001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?SjIvajBDLzA0VE5TaWFzMVFVcWhXWWJrZTRIbHdtbDR6aHBUQk53WXRZYTFS?= =?utf-8?B?amNSb2FnSGN3SDJSdGt5K0pMVjN2MW1HWUQvT3c4a3hwZmlFZXo1TUYvV3Vy?= =?utf-8?B?bnNPRHhadThCYmtMbVZtc2VJU3h0ay9nYlFWNittakVUdFZWZzd0QU40bFJQ?= =?utf-8?B?clVNOWl5TnV4QjY0dm9hZ1N4eFZwMjZNK3FReXBZZUxmbTB3eXcrVmtvT2tM?= =?utf-8?B?SXpCSVFTaVkyREVvT3hlNWptS3NRcUNCcTg4V3J4NXlRN0hrejlnaWNFekZs?= =?utf-8?B?eVNWZmEveDRMOEFpOVFLcWFoRkxLTm15YTZvU0E5OE9nNHJSbk44MUZwUkdN?= =?utf-8?B?RDlIekljUkI1WGRSVEl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Ra?= =?utf-8?B?UXRyeXpXOExFTDZHQ1F6SHllOUQ4MTArZlRZSmxnTFByQ2RWT3RPV1NFK0Nq?= =?utf-8?B?Z3Q5Z2wwVThpT0FiRzFlRjU0SU16Vmp4aWZVUHoyQVdNcS9pRisyU285Yysr?= =?utf-8?B?MmVkWGYxOUJzWklUMjRHUXMvOGVuUlNWclZLbGdndDFZOVcxYzZlZz09?= X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: ccf77b29-ee9a-4c0d-8f32-08da443ade65 X-MS-Exchange-CrossTenant-AuthSource: DM6PR13MB3004.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Jun 2022 01:54:45.9929 (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: ME4ePJF4yTkO3o7Pje5AaRvZrxvg6lGBBFFB4+blpl2MZP6anpxGpn70rGmlMCA5Yqs0yUN4+urYM/0vh8gBsw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR13MB5858 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 nfd3 firmware eth driver function name, preparation for the next work, as we will support another nfdk firmware version. 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 | 28 +++++++++---------- drivers/net/nfp/nfp_ethdev_vf.c | 26 +++++++++--------- drivers/net/nfp/nfp_rxtx.c | 48 ++++++++++++++++----------------- drivers/net/nfp/nfp_rxtx.h | 12 ++++----- 4 files changed, 57 insertions(+), 57 deletions(-) diff --git a/drivers/net/nfp/nfp_ethdev.c b/drivers/net/nfp/nfp_ethdev.c index e491eee99a..0d5caf94ea 100644 --- a/drivers/net/nfp/nfp_ethdev.c +++ b/drivers/net/nfp/nfp_ethdev.c @@ -179,7 +179,7 @@ nfp_net_start(struct rte_eth_dev *dev) /* Stop device: disable rx and tx functions to allow for reconfiguring. */ static int -nfp_net_stop(struct rte_eth_dev *dev) +nfp_net_nfd3_stop(struct rte_eth_dev *dev) { int i; struct nfp_net_hw *hw; @@ -195,7 +195,7 @@ nfp_net_stop(struct rte_eth_dev *dev) /* Clear queues */ for (i = 0; i < dev->data->nb_tx_queues; i++) { this_tx_q = (struct nfp_net_txq *)dev->data->tx_queues[i]; - nfp_net_reset_tx_queue(this_tx_q); + nfp_net_nfd3_reset_tx_queue(this_tx_q); } for (i = 0; i < dev->data->nb_rx_queues; i++) { @@ -251,7 +251,7 @@ nfp_net_set_link_down(struct rte_eth_dev *dev) /* Reset and stop device. The device can not be restarted. */ static int -nfp_net_close(struct rte_eth_dev *dev) +nfp_net_nfd3_close(struct rte_eth_dev *dev) { struct nfp_net_hw *hw; struct rte_pci_device *pci_dev; @@ -279,8 +279,8 @@ nfp_net_close(struct rte_eth_dev *dev) /* Clear queues */ for (i = 0; i < dev->data->nb_tx_queues; i++) { this_tx_q = (struct nfp_net_txq *)dev->data->tx_queues[i]; - nfp_net_reset_tx_queue(this_tx_q); - nfp_net_tx_queue_release(dev, i); + nfp_net_nfd3_reset_tx_queue(this_tx_q); + nfp_net_nfd3_tx_queue_release(dev, i); } for (i = 0; i < dev->data->nb_rx_queues; i++) { @@ -329,13 +329,13 @@ 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, + .dev_stop = nfp_net_nfd3_stop, .dev_set_link_up = nfp_net_set_link_up, .dev_set_link_down = nfp_net_set_link_down, - .dev_close = nfp_net_close, + .dev_close = nfp_net_nfd3_close, .promiscuous_enable = nfp_net_promisc_enable, .promiscuous_disable = nfp_net_promisc_disable, .link_update = nfp_net_link_update, @@ -352,8 +352,8 @@ 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_release = nfp_net_tx_queue_release, + .tx_queue_setup = nfp_net_nfd3_tx_queue_setup, + .tx_queue_release = nfp_net_nfd3_tx_queue_release, .rx_queue_intr_enable = nfp_rx_queue_intr_enable, .rx_queue_intr_disable = nfp_rx_queue_intr_disable, }; @@ -401,10 +401,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) @@ -970,10 +970,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 aa156ad162..7d79a08041 100644 --- a/drivers/net/nfp/nfp_ethdev_vf.c +++ b/drivers/net/nfp/nfp_ethdev_vf.c @@ -143,7 +143,7 @@ nfp_netvf_start(struct rte_eth_dev *dev) } static int -nfp_netvf_stop(struct rte_eth_dev *dev) +nfp_netvf_nfd3_stop(struct rte_eth_dev *dev) { struct nfp_net_txq *this_tx_q; struct nfp_net_rxq *this_rx_q; @@ -156,7 +156,7 @@ nfp_netvf_stop(struct rte_eth_dev *dev) /* Clear queues */ for (i = 0; i < dev->data->nb_tx_queues; i++) { this_tx_q = (struct nfp_net_txq *)dev->data->tx_queues[i]; - nfp_net_reset_tx_queue(this_tx_q); + nfp_net_nfd3_reset_tx_queue(this_tx_q); } for (i = 0; i < dev->data->nb_rx_queues; i++) { @@ -182,7 +182,7 @@ nfp_netvf_set_link_down(struct rte_eth_dev *dev __rte_unused) /* Reset and stop device. The device can not be restarted. */ static int -nfp_netvf_close(struct rte_eth_dev *dev) +nfp_netvf_nfd3_close(struct rte_eth_dev *dev) { struct rte_pci_device *pci_dev; struct nfp_net_txq *this_tx_q; @@ -206,8 +206,8 @@ nfp_netvf_close(struct rte_eth_dev *dev) /* Clear queues */ for (i = 0; i < dev->data->nb_tx_queues; i++) { this_tx_q = (struct nfp_net_txq *)dev->data->tx_queues[i]; - nfp_net_reset_tx_queue(this_tx_q); - nfp_net_tx_queue_release(dev, i); + nfp_net_nfd3_reset_tx_queue(this_tx_q); + nfp_net_nfd3_tx_queue_release(dev, i); } for (i = 0; i < dev->data->nb_rx_queues; i++) { @@ -236,13 +236,13 @@ 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, + .dev_stop = nfp_netvf_nfd3_stop, .dev_set_link_up = nfp_netvf_set_link_up, .dev_set_link_down = nfp_netvf_set_link_down, - .dev_close = nfp_netvf_close, + .dev_close = nfp_netvf_nfd3_close, .promiscuous_enable = nfp_net_promisc_enable, .promiscuous_disable = nfp_net_promisc_disable, .link_update = nfp_net_link_update, @@ -259,8 +259,8 @@ 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_release = nfp_net_tx_queue_release, + .tx_queue_setup = nfp_net_nfd3_tx_queue_setup, + .tx_queue_release = nfp_net_nfd3_tx_queue_release, .rx_queue_intr_enable = nfp_rx_queue_intr_enable, .rx_queue_intr_disable = nfp_rx_queue_intr_disable, }; @@ -291,10 +291,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) @@ -467,7 +467,7 @@ static const struct rte_pci_id pci_id_nfp_vf_net_map[] = { static int nfp_vf_pci_uninit(struct rte_eth_dev *eth_dev) { /* VF cleanup, just free private port data */ - return nfp_netvf_close(eth_dev); + return nfp_netvf_nfd3_close(eth_dev); } static int eth_nfp_vf_pci_probe(struct rte_pci_driver *pci_drv __rte_unused, diff --git a/drivers/net/nfp/nfp_rxtx.c b/drivers/net/nfp/nfp_rxtx.c index cd7faa2c58..2c9875e829 100644 --- a/drivers/net/nfp/nfp_rxtx.c +++ b/drivers/net/nfp/nfp_rxtx.c @@ -618,7 +618,7 @@ nfp_net_tx_free_bufs(struct nfp_net_txq *txq) } static void -nfp_net_tx_queue_release_mbufs(struct nfp_net_txq *txq) +nfp_net_nfd3_tx_queue_release_mbufs(struct nfp_net_txq *txq) { unsigned int i; @@ -634,12 +634,12 @@ nfp_net_tx_queue_release_mbufs(struct nfp_net_txq *txq) } void -nfp_net_tx_queue_release(struct rte_eth_dev *dev, uint16_t queue_idx) +nfp_net_nfd3_tx_queue_release(struct rte_eth_dev *dev, uint16_t queue_idx) { struct nfp_net_txq *txq = dev->data->tx_queues[queue_idx]; if (txq) { - nfp_net_tx_queue_release_mbufs(txq); + nfp_net_nfd3_tx_queue_release_mbufs(txq); rte_eth_dma_zone_free(dev, "tx_ring", queue_idx); rte_free(txq->txbufs); rte_free(txq); @@ -647,15 +647,15 @@ 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) +nfp_net_nfd3_reset_tx_queue(struct nfp_net_txq *txq) { - nfp_net_tx_queue_release_mbufs(txq); + nfp_net_nfd3_tx_queue_release_mbufs(txq); txq->wr_p = 0; txq->rd_p = 0; } 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) { @@ -698,7 +698,7 @@ nfp_net_tx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx, if (dev->data->tx_queues[queue_idx]) { PMD_TX_LOG(DEBUG, "Freeing memory prior to re-allocation %d", queue_idx); - nfp_net_tx_queue_release(dev, queue_idx); + nfp_net_nfd3_tx_queue_release(dev, queue_idx); dev->data->tx_queues[queue_idx] = NULL; } @@ -718,12 +718,12 @@ 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) { PMD_DRV_LOG(ERR, "Error allocating tx dma"); - nfp_net_tx_queue_release(dev, queue_idx); + nfp_net_nfd3_tx_queue_release(dev, queue_idx); dev->data->tx_queues[queue_idx] = NULL; return -ENOMEM; } @@ -743,21 +743,21 @@ 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", sizeof(*txq->txbufs) * nb_desc, RTE_CACHE_LINE_SIZE, socket_id); if (txq->txbufs == NULL) { - nfp_net_tx_queue_release(dev, queue_idx); + nfp_net_nfd3_tx_queue_release(dev, queue_idx); dev->data->tx_queues[queue_idx] = NULL; return -ENOMEM; } PMD_TX_LOG(DEBUG, "txbufs=%p hw_ring=%p dma_addr=0x%" PRIx64, txq->txbufs, txq->txds, (unsigned long)txq->dma); - nfp_net_reset_tx_queue(txq); + nfp_net_nfd3_reset_tx_queue(txq); txq->hw = hw; @@ -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..87a9c59b3b 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 @@ -284,12 +284,12 @@ int nfp_net_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx, uint16_t nb_desc, unsigned int socket_id, const struct rte_eth_rxconf *rx_conf, 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, +void nfp_net_nfd3_tx_queue_release(struct rte_eth_dev *dev, uint16_t queue_idx); +void nfp_net_nfd3_reset_tx_queue(struct nfp_net_txq *txq); +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