[v3,06/25] net/nfp: extract the qcp data field

Message ID 20231026064324.177531-7-chaoyong.he@corigine.com (mailing list archive)
State Changes Requested, archived
Delegated to: Ferruh Yigit
Headers
Series add the NFP vDPA PMD |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Chaoyong He Oct. 26, 2023, 6:43 a.m. UTC
  Extract the 'qcp_cfg' data field into the super class, prepare for the
upcoming common library.

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Long Wu <long.wu@corigine.com>
Reviewed-by: Peng Zhang <peng.zhang@corigine.com>
---
 drivers/net/nfp/nfp_net_common.c | 8 ++++----
 drivers/net/nfp/nfp_net_common.h | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)
  

Patch

diff --git a/drivers/net/nfp/nfp_net_common.c b/drivers/net/nfp/nfp_net_common.c
index 77c0652642..cb64fa13c5 100644
--- a/drivers/net/nfp/nfp_net_common.c
+++ b/drivers/net/nfp/nfp_net_common.c
@@ -206,14 +206,14 @@  __nfp_net_reconfig(struct nfp_net_hw *hw,
 	struct timespec wait;
 
 	PMD_DRV_LOG(DEBUG, "Writing to the configuration queue (%p)...",
-			hw->qcp_cfg);
+			hw->super.qcp_cfg);
 
-	if (hw->qcp_cfg == NULL) {
+	if (hw->super.qcp_cfg == NULL) {
 		PMD_DRV_LOG(ERR, "Bad configuration queue pointer");
 		return -ENXIO;
 	}
 
-	nfp_qcp_ptr_add(hw->qcp_cfg, NFP_QCP_WRITE_PTR, 1);
+	nfp_qcp_ptr_add(hw->super.qcp_cfg, NFP_QCP_WRITE_PTR, 1);
 
 	wait.tv_sec = 0;
 	wait.tv_nsec = 1000000; /* 1ms */
@@ -525,7 +525,7 @@  nfp_net_params_setup(struct nfp_net_hw *hw)
 void
 nfp_net_cfg_queue_setup(struct nfp_net_hw *hw)
 {
-	hw->qcp_cfg = hw->tx_bar + NFP_QCP_QUEUE_ADDR_SZ;
+	hw->super.qcp_cfg = hw->tx_bar + NFP_QCP_QUEUE_ADDR_SZ;
 }
 
 void
diff --git a/drivers/net/nfp/nfp_net_common.h b/drivers/net/nfp/nfp_net_common.h
index 7bcdd9295f..4bfb3174b0 100644
--- a/drivers/net/nfp/nfp_net_common.h
+++ b/drivers/net/nfp/nfp_net_common.h
@@ -113,6 +113,7 @@  struct nfp_app_fw_nic {
 };
 
 struct nfp_hw {
+	uint8_t *qcp_cfg;
 	uint32_t cap;
 	uint32_t cap_ext;
 };
@@ -150,7 +151,6 @@  struct nfp_net_hw {
 	uint16_t vxlan_ports[NFP_NET_N_VXLAN_PORTS];
 	uint8_t vxlan_usecnt[NFP_NET_N_VXLAN_PORTS];
 
-	uint8_t *qcp_cfg;
 	rte_spinlock_t reconfig_lock;
 
 	uint32_t max_tx_queues;