From: Chaoyong He <chaoyong.he@corigine.com>
To: dev@dpdk.org
Cc: oss-drivers@corigine.com,
"Chaoyong He" <chaoyong.he@corigine.com>,
"Niklas Söderlund" <niklas.soderlund@corigine.com>
Subject: [PATCH v3 21/27] net/nfp: rename data field to sync with kernel driver
Date: Fri, 15 Sep 2023 17:15:45 +0800 [thread overview]
Message-ID: <20230915091551.1459606-22-chaoyong.he@corigine.com> (raw)
In-Reply-To: <20230915091551.1459606-1-chaoyong.he@corigine.com>
Rename the data fields to sync with the logic in kernel driver.
Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
---
drivers/net/nfp/flower/nfp_flower.c | 6 +++---
drivers/net/nfp/nfp_common.h | 4 ++--
drivers/net/nfp/nfp_ethdev.c | 16 ++++++++--------
3 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/drivers/net/nfp/flower/nfp_flower.c b/drivers/net/nfp/flower/nfp_flower.c
index 37895e8355..24a6878149 100644
--- a/drivers/net/nfp/flower/nfp_flower.c
+++ b/drivers/net/nfp/flower/nfp_flower.c
@@ -224,7 +224,7 @@ nfp_flower_pf_close(struct rte_eth_dev *dev)
/* Now it is safe to free all PF resources */
PMD_DRV_LOG(INFO, "Freeing PF resources");
nfp_cpp_area_free(pf_dev->ctrl_area);
- nfp_cpp_area_free(pf_dev->hwqueues_area);
+ nfp_cpp_area_free(pf_dev->qc_area);
rte_free(pf_dev->hwinfo);
free(pf_dev->sym_tbl);
nfp_cpp_free(pf_dev->cpp);
@@ -360,8 +360,8 @@ nfp_flower_init_vnic_common(struct nfp_net_hw *hw, const char *vnic_type)
start_q = nn_cfg_readl(hw, NFP_NET_CFG_START_RXQ);
rx_bar_off = (uint64_t)start_q * NFP_QCP_QUEUE_ADDR_SZ;
- hw->tx_bar = pf_dev->hw_queues + tx_bar_off;
- hw->rx_bar = pf_dev->hw_queues + rx_bar_off;
+ hw->tx_bar = pf_dev->qc_bar + tx_bar_off;
+ hw->rx_bar = pf_dev->qc_bar + rx_bar_off;
/* Set the current MTU to the maximum supported */
hw->mtu = hw->max_mtu;
diff --git a/drivers/net/nfp/nfp_common.h b/drivers/net/nfp/nfp_common.h
index 1ce51d44d4..86c4e10040 100644
--- a/drivers/net/nfp/nfp_common.h
+++ b/drivers/net/nfp/nfp_common.h
@@ -123,9 +123,9 @@ struct nfp_pf_dev {
struct nfp_cpp *cpp;
struct nfp_cpp_area *ctrl_area;
- struct nfp_cpp_area *hwqueues_area;
+ struct nfp_cpp_area *qc_area;
- uint8_t *hw_queues;
+ uint8_t *qc_bar;
struct nfp_hwinfo *hwinfo;
struct nfp_rtsym_table *sym_tbl;
diff --git a/drivers/net/nfp/nfp_ethdev.c b/drivers/net/nfp/nfp_ethdev.c
index 9243191de3..3f5375deb9 100644
--- a/drivers/net/nfp/nfp_ethdev.c
+++ b/drivers/net/nfp/nfp_ethdev.c
@@ -311,7 +311,7 @@ nfp_net_close(struct rte_eth_dev *dev)
/* Now it is safe to free all PF resources */
PMD_INIT_LOG(INFO, "Freeing PF resources");
nfp_cpp_area_free(pf_dev->ctrl_area);
- nfp_cpp_area_free(pf_dev->hwqueues_area);
+ nfp_cpp_area_free(pf_dev->qc_area);
rte_free(pf_dev->hwinfo);
free(pf_dev->sym_tbl);
nfp_cpp_free(pf_dev->cpp);
@@ -593,8 +593,8 @@ nfp_net_init(struct rte_eth_dev *eth_dev)
PMD_INIT_LOG(DEBUG, "tx_bar_off: 0x%" PRIx64 "", tx_bar_off);
PMD_INIT_LOG(DEBUG, "rx_bar_off: 0x%" PRIx64 "", rx_bar_off);
- hw->tx_bar = pf_dev->hw_queues + tx_bar_off;
- hw->rx_bar = pf_dev->hw_queues + rx_bar_off;
+ hw->tx_bar = pf_dev->qc_bar + tx_bar_off;
+ hw->rx_bar = pf_dev->qc_bar + rx_bar_off;
eth_dev->data->dev_private = hw;
PMD_INIT_LOG(DEBUG, "ctrl_bar: %p, tx_bar: %p, rx_bar: %p",
@@ -995,16 +995,16 @@ nfp_pf_init(struct rte_pci_device *pci_dev)
}
cpp_id = NFP_CPP_ISLAND_ID(0, NFP_CPP_ACTION_RW, 0, 0);
- pf_dev->hw_queues = nfp_cpp_map_area(pf_dev->cpp, cpp_id,
+ pf_dev->qc_bar = nfp_cpp_map_area(pf_dev->cpp, cpp_id,
addr, NFP_QCP_QUEUE_AREA_SZ,
- &pf_dev->hwqueues_area);
- if (pf_dev->hw_queues == NULL) {
+ &pf_dev->qc_area);
+ if (pf_dev->qc_bar == NULL) {
PMD_INIT_LOG(ERR, "nfp_rtsym_map fails for net.qc");
ret = -EIO;
goto pf_cleanup;
}
- PMD_INIT_LOG(DEBUG, "tx/rx bar address: 0x%p", pf_dev->hw_queues);
+ PMD_INIT_LOG(DEBUG, "qc_bar address: 0x%p", pf_dev->qc_bar);
/*
* PF initialization has been done at this point. Call app specific
@@ -1041,7 +1041,7 @@ nfp_pf_init(struct rte_pci_device *pci_dev)
return 0;
hwqueues_cleanup:
- nfp_cpp_area_free(pf_dev->hwqueues_area);
+ nfp_cpp_area_free(pf_dev->qc_area);
pf_cleanup:
rte_free(pf_dev);
sym_tbl_cleanup:
--
2.39.1
next prev parent reply other threads:[~2023-09-15 9:19 UTC|newest]
Thread overview: 159+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-24 11:09 [PATCH 00/27] refact the nfpcore module Chaoyong He
2023-08-24 11:09 ` [PATCH 01/27] net/nfp: explicitly compare to null and 0 Chaoyong He
2023-08-24 11:09 ` [PATCH 02/27] net/nfp: unify the indent coding style Chaoyong He
2023-08-24 11:09 ` [PATCH 03/27] net/nfp: unify the type of integer variable Chaoyong He
2023-08-24 11:09 ` [PATCH 04/27] net/nfp: remove the unneeded logic Chaoyong He
2023-08-24 11:09 ` [PATCH 05/27] net/nfp: standard the local variable coding style Chaoyong He
2023-08-24 11:09 ` [PATCH 06/27] net/nfp: adjust the log statement Chaoyong He
2023-08-24 11:09 ` [PATCH 07/27] net/nfp: standard the comment style Chaoyong He
2023-08-24 11:09 ` [PATCH 08/27] net/nfp: using the DPDK memory management API Chaoyong He
2023-08-24 11:09 ` [PATCH 09/27] net/nfp: standard the blank character Chaoyong He
2023-08-24 11:09 ` [PATCH 10/27] net/nfp: unify the guide line of header file Chaoyong He
2023-08-24 11:09 ` [PATCH 11/27] net/nfp: rename some parameter and variable Chaoyong He
2023-08-24 11:09 ` [PATCH 12/27] net/nfp: refact the hwinfo module Chaoyong He
2023-08-24 11:09 ` [PATCH 13/27] net/nfp: refact the nffw module Chaoyong He
2023-08-24 11:09 ` [PATCH 14/27] net/nfp: refact the mip module Chaoyong He
2023-08-24 11:09 ` [PATCH 15/27] net/nfp: refact the rtsym module Chaoyong He
2023-08-24 11:09 ` [PATCH 16/27] net/nfp: refact the resource module Chaoyong He
2023-08-24 11:09 ` [PATCH 17/27] net/nfp: refact the target module Chaoyong He
2023-08-24 11:09 ` [PATCH 18/27] net/nfp: add a new header file Chaoyong He
2023-08-24 11:09 ` [PATCH 19/27] net/nfp: refact the nsp module Chaoyong He
2023-08-24 11:09 ` [PATCH 20/27] net/nfp: refact the mutex module Chaoyong He
2023-08-24 11:09 ` [PATCH 21/27] net/nfp: rename data field to sync with kernel driver Chaoyong He
2023-08-24 11:09 ` [PATCH 22/27] net/nfp: add the dev module Chaoyong He
2023-08-24 11:09 ` [PATCH 23/27] net/nfp: add header file for PCIe module Chaoyong He
2023-08-24 11:09 ` [PATCH 24/27] net/nfp: refact the cppcore module Chaoyong He
2023-08-24 11:09 ` [PATCH 25/27] net/nfp: refact the PCIe module Chaoyong He
2023-08-24 11:09 ` [PATCH 26/27] net/nfp: refact the cppcore and " Chaoyong He
2023-08-24 11:09 ` [PATCH 27/27] net/nfp: extend the usage of nfp BAR from 8 to 24 Chaoyong He
2023-08-30 2:14 ` [PATCH v2 00/27] refact the nfpcore module Chaoyong He
2023-08-30 2:14 ` [PATCH v2 01/27] net/nfp: explicitly compare to null and 0 Chaoyong He
2023-08-30 2:14 ` [PATCH v2 02/27] net/nfp: unify the indent coding style Chaoyong He
2023-08-30 2:14 ` [PATCH v2 03/27] net/nfp: unify the type of integer variable Chaoyong He
2023-08-30 2:14 ` [PATCH v2 04/27] net/nfp: remove the unneeded logic Chaoyong He
2023-08-30 2:14 ` [PATCH v2 05/27] net/nfp: standard the local variable coding style Chaoyong He
2023-08-30 2:14 ` [PATCH v2 06/27] net/nfp: adjust the log statement Chaoyong He
2023-08-30 2:14 ` [PATCH v2 07/27] net/nfp: standard the comment style Chaoyong He
2023-08-30 2:14 ` [PATCH v2 08/27] net/nfp: using the DPDK memory management API Chaoyong He
2023-08-30 2:14 ` [PATCH v2 09/27] net/nfp: standard the blank character Chaoyong He
2023-08-30 2:14 ` [PATCH v2 10/27] net/nfp: unify the guide line of header file Chaoyong He
2023-08-30 2:14 ` [PATCH v2 11/27] net/nfp: rename some parameter and variable Chaoyong He
2023-08-30 2:14 ` [PATCH v2 12/27] net/nfp: refact the hwinfo module Chaoyong He
2023-08-30 2:14 ` [PATCH v2 13/27] net/nfp: refact the nffw module Chaoyong He
2023-08-30 2:14 ` [PATCH v2 14/27] net/nfp: refact the mip module Chaoyong He
2023-08-30 2:14 ` [PATCH v2 15/27] net/nfp: refact the rtsym module Chaoyong He
2023-08-30 2:14 ` [PATCH v2 16/27] net/nfp: refact the resource module Chaoyong He
2023-08-30 2:14 ` [PATCH v2 17/27] net/nfp: refact the target module Chaoyong He
2023-08-30 2:14 ` [PATCH v2 18/27] net/nfp: add a new header file Chaoyong He
2023-08-30 2:14 ` [PATCH v2 19/27] net/nfp: refact the nsp module Chaoyong He
2023-08-30 2:14 ` [PATCH v2 20/27] net/nfp: refact the mutex module Chaoyong He
2023-08-30 2:14 ` [PATCH v2 21/27] net/nfp: rename data field to sync with kernel driver Chaoyong He
2023-08-30 2:14 ` [PATCH v2 22/27] net/nfp: add the dev module Chaoyong He
2023-08-30 2:14 ` [PATCH v2 23/27] net/nfp: add header file for PCIe module Chaoyong He
2023-08-30 2:14 ` [PATCH v2 24/27] net/nfp: refact the cppcore module Chaoyong He
2023-08-30 2:14 ` [PATCH v2 25/27] net/nfp: refact the PCIe module Chaoyong He
2023-08-30 2:14 ` [PATCH v2 26/27] net/nfp: refact the cppcore and " Chaoyong He
2023-08-30 2:14 ` [PATCH v2 27/27] net/nfp: extend the usage of nfp BAR from 8 to 24 Chaoyong He
2023-09-15 9:15 ` [PATCH v3 00/27] refact the nfpcore module Chaoyong He
2023-09-15 9:15 ` [PATCH v3 01/27] net/nfp: explicitly compare to null and 0 Chaoyong He
2023-09-15 9:15 ` [PATCH v3 02/27] net/nfp: unify the indent coding style Chaoyong He
2023-09-15 13:40 ` Ferruh Yigit
2023-09-18 1:25 ` Chaoyong He
2023-09-18 2:22 ` Stephen Hemminger
2023-09-15 9:15 ` [PATCH v3 03/27] net/nfp: unify the type of integer variable Chaoyong He
2023-09-15 13:42 ` Ferruh Yigit
2023-09-18 1:26 ` Chaoyong He
2023-09-15 9:15 ` [PATCH v3 04/27] net/nfp: remove the unneeded logic Chaoyong He
2023-09-15 9:15 ` [PATCH v3 05/27] net/nfp: standard the local variable coding style Chaoyong He
2023-09-15 9:15 ` [PATCH v3 06/27] net/nfp: adjust the log statement Chaoyong He
2023-09-15 9:15 ` [PATCH v3 07/27] net/nfp: standard the comment style Chaoyong He
2023-09-15 13:44 ` Ferruh Yigit
2023-09-18 1:28 ` Chaoyong He
2023-09-18 2:08 ` Chaoyong He
2023-09-15 9:15 ` [PATCH v3 08/27] net/nfp: using the DPDK memory management API Chaoyong He
2023-09-15 13:45 ` Ferruh Yigit
2023-09-18 1:29 ` Chaoyong He
2023-09-15 9:15 ` [PATCH v3 09/27] net/nfp: standard the blank character Chaoyong He
2023-09-15 9:15 ` [PATCH v3 10/27] net/nfp: unify the guide line of header file Chaoyong He
2023-09-15 9:15 ` [PATCH v3 11/27] net/nfp: rename some parameter and variable Chaoyong He
2023-09-15 9:15 ` [PATCH v3 12/27] net/nfp: refact the hwinfo module Chaoyong He
2023-09-15 13:46 ` Ferruh Yigit
2023-09-18 1:39 ` Chaoyong He
2023-09-18 11:01 ` Ferruh Yigit
2023-09-15 9:15 ` [PATCH v3 13/27] net/nfp: refact the nffw module Chaoyong He
2023-09-15 9:15 ` [PATCH v3 14/27] net/nfp: refact the mip module Chaoyong He
2023-09-15 9:15 ` [PATCH v3 15/27] net/nfp: refact the rtsym module Chaoyong He
2023-09-15 9:15 ` [PATCH v3 16/27] net/nfp: refact the resource module Chaoyong He
2023-09-15 9:15 ` [PATCH v3 17/27] net/nfp: refact the target module Chaoyong He
2023-09-15 9:15 ` [PATCH v3 18/27] net/nfp: add a new header file Chaoyong He
2023-09-15 9:15 ` [PATCH v3 19/27] net/nfp: refact the nsp module Chaoyong He
2023-09-18 12:31 ` Ferruh Yigit
2023-09-18 12:36 ` Ferruh Yigit
2023-09-15 9:15 ` [PATCH v3 20/27] net/nfp: refact the mutex module Chaoyong He
2023-09-15 9:15 ` Chaoyong He [this message]
2023-09-15 9:15 ` [PATCH v3 22/27] net/nfp: add the dev module Chaoyong He
2023-09-15 9:15 ` [PATCH v3 23/27] net/nfp: add header file for PCIe module Chaoyong He
2023-09-15 9:15 ` [PATCH v3 24/27] net/nfp: refact the cppcore module Chaoyong He
2023-09-15 9:15 ` [PATCH v3 25/27] net/nfp: refact the PCIe module Chaoyong He
2023-09-15 9:15 ` [PATCH v3 26/27] net/nfp: refact the cppcore and " Chaoyong He
2023-09-15 9:15 ` [PATCH v3 27/27] net/nfp: extend the usage of nfp BAR from 8 to 24 Chaoyong He
2023-09-15 13:49 ` [PATCH v3 00/27] refact the nfpcore module Ferruh Yigit
2023-09-18 2:45 ` [PATCH v4 00/26] " Chaoyong He
2023-09-18 2:45 ` [PATCH v4 01/26] net/nfp: explicitly compare to null and 0 Chaoyong He
2023-09-18 2:45 ` [PATCH v4 02/26] net/nfp: unify the indent coding style Chaoyong He
2023-09-18 11:53 ` Niklas Söderlund
2023-09-18 2:45 ` [PATCH v4 03/26] net/nfp: unify the type of integer variable Chaoyong He
2023-09-18 2:45 ` [PATCH v4 04/26] net/nfp: remove the unneeded logic Chaoyong He
2023-09-18 2:45 ` [PATCH v4 05/26] net/nfp: standard the local variable coding style Chaoyong He
2023-09-18 2:45 ` [PATCH v4 06/26] net/nfp: adjust the log statement Chaoyong He
2023-09-18 2:45 ` [PATCH v4 07/26] net/nfp: standard the comment style Chaoyong He
2023-09-18 2:45 ` [PATCH v4 08/26] net/nfp: standard the blank character Chaoyong He
2023-09-18 2:45 ` [PATCH v4 09/26] net/nfp: unify the guide line of header file Chaoyong He
2023-09-18 2:45 ` [PATCH v4 10/26] net/nfp: rename some parameter and variable Chaoyong He
2023-09-18 2:45 ` [PATCH v4 11/26] net/nfp: refact the hwinfo module Chaoyong He
2023-09-18 2:45 ` [PATCH v4 12/26] net/nfp: refact the nffw module Chaoyong He
2023-09-18 2:45 ` [PATCH v4 13/26] net/nfp: refact the mip module Chaoyong He
2023-09-18 2:46 ` [PATCH v4 14/26] net/nfp: refact the rtsym module Chaoyong He
2023-09-18 2:46 ` [PATCH v4 15/26] net/nfp: refact the resource module Chaoyong He
2023-09-18 2:46 ` [PATCH v4 16/26] net/nfp: refact the target module Chaoyong He
2023-09-18 2:46 ` [PATCH v4 17/26] net/nfp: add a new header file Chaoyong He
2023-09-18 2:46 ` [PATCH v4 18/26] net/nfp: refact the nsp module Chaoyong He
2023-09-18 2:46 ` [PATCH v4 19/26] net/nfp: refact the mutex module Chaoyong He
2023-09-18 2:46 ` [PATCH v4 20/26] net/nfp: rename data field to sync with kernel driver Chaoyong He
2023-09-18 2:46 ` [PATCH v4 21/26] net/nfp: add the dev module Chaoyong He
2023-09-18 2:46 ` [PATCH v4 22/26] net/nfp: add header file for PCIe module Chaoyong He
2023-09-18 2:46 ` [PATCH v4 23/26] net/nfp: refact the cppcore module Chaoyong He
2023-09-18 2:46 ` [PATCH v4 24/26] net/nfp: refact the PCIe module Chaoyong He
2023-09-18 2:46 ` [PATCH v4 25/26] net/nfp: refact the cppcore and " Chaoyong He
2023-09-18 2:46 ` [PATCH v4 26/26] net/nfp: extend the usage of nfp BAR from 8 to 24 Chaoyong He
2023-09-19 9:54 ` [PATCH v5 00/26] refact the nfpcore module Chaoyong He
2023-09-19 9:54 ` [PATCH v5 01/26] net/nfp: explicitly compare to null and 0 Chaoyong He
2023-09-19 9:54 ` [PATCH v5 02/26] net/nfp: unify the indent coding style Chaoyong He
2023-09-19 9:54 ` [PATCH v5 03/26] net/nfp: unify the type of integer variable Chaoyong He
2023-09-19 9:54 ` [PATCH v5 04/26] net/nfp: remove the unneeded logic Chaoyong He
2023-09-19 9:54 ` [PATCH v5 05/26] net/nfp: standard the local variable coding style Chaoyong He
2023-09-19 9:54 ` [PATCH v5 06/26] net/nfp: adjust the log statement Chaoyong He
2023-09-19 9:54 ` [PATCH v5 07/26] net/nfp: standard the comment style Chaoyong He
2023-09-19 9:54 ` [PATCH v5 08/26] net/nfp: standard the blank character Chaoyong He
2023-09-19 9:54 ` [PATCH v5 09/26] net/nfp: unify the guide line of header file Chaoyong He
2023-09-19 9:54 ` [PATCH v5 10/26] net/nfp: rename some parameter and variable Chaoyong He
2023-09-19 9:54 ` [PATCH v5 11/26] net/nfp: refact the hwinfo module Chaoyong He
2023-09-19 9:54 ` [PATCH v5 12/26] net/nfp: refact the nffw module Chaoyong He
2023-09-19 9:54 ` [PATCH v5 13/26] net/nfp: refact the mip module Chaoyong He
2023-09-19 9:54 ` [PATCH v5 14/26] net/nfp: refact the rtsym module Chaoyong He
2023-09-19 9:54 ` [PATCH v5 15/26] net/nfp: refact the resource module Chaoyong He
2023-09-19 9:54 ` [PATCH v5 16/26] net/nfp: refact the target module Chaoyong He
2023-09-19 9:54 ` [PATCH v5 17/26] net/nfp: add a new header file Chaoyong He
2023-09-19 9:54 ` [PATCH v5 18/26] net/nfp: refact the nsp module Chaoyong He
2023-09-19 9:54 ` [PATCH v5 19/26] net/nfp: refact the mutex module Chaoyong He
2023-09-19 9:54 ` [PATCH v5 20/26] net/nfp: rename data field to sync with kernel driver Chaoyong He
2023-09-19 9:54 ` [PATCH v5 21/26] net/nfp: add the dev module Chaoyong He
2023-09-19 9:54 ` [PATCH v5 22/26] net/nfp: add header file for PCIe module Chaoyong He
2023-09-19 9:54 ` [PATCH v5 23/26] net/nfp: refact the cppcore module Chaoyong He
2023-09-19 9:54 ` [PATCH v5 24/26] net/nfp: refact the PCIe module Chaoyong He
2023-09-19 21:18 ` [PATCH v5 00/26] refact the nfpcore module Ferruh Yigit
2023-09-20 1:55 ` Chaoyong He
2023-09-20 8:54 ` Ferruh Yigit
2023-09-20 9:59 ` Ferruh Yigit
2023-09-20 1:28 ` [PATCH v5 25/26] net/nfp: refact the cppcore and PCIe module Chaoyong He
2023-09-20 1:29 ` [PATCH v5 26/26] net/nfp: extend the usage of nfp BAR from 8 to 24 Chaoyong He
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230915091551.1459606-22-chaoyong.he@corigine.com \
--to=chaoyong.he@corigine.com \
--cc=dev@dpdk.org \
--cc=niklas.soderlund@corigine.com \
--cc=oss-drivers@corigine.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).