[PATCH 06/25] net/nfp: extract the qcp data field
Chaoyong He
chaoyong.he at corigine.com
Tue Oct 17 07:45:26 CEST 2023
Extract the 'qcp_cfg' data field into the super class, prepare for the
upcoming common library.
Signed-off-by: Chaoyong He <chaoyong.he at corigine.com>
Reviewed-by: Long Wu <long.wu at corigine.com>
Reviewed-by: Peng Zhang <peng.zhang at 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(-)
diff --git a/drivers/net/nfp/nfp_net_common.c b/drivers/net/nfp/nfp_net_common.c
index 3cbf6bc021..a5548074fb 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 269fb4930e..cc7d438011 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;
};
@@ -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;
--
2.39.1
More information about the dev
mailing list