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(-)
@@ -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
@@ -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;