Remove the data fields of nfp structure which are not used by anyone, and modify the corresponding logics.
Signed-off-by: Chaoyong He <chaoyong...@corigine.com> Reviewed-by: Niklas Söderlund <niklas.soderl...@corigine.com> --- drivers/net/nfp/flower/nfp_flower.c | 4 +--- drivers/net/nfp/nfp_common.h | 34 +---------------------------- drivers/net/nfp/nfp_ethdev_vf.c | 4 +--- 3 files changed, 3 insertions(+), 39 deletions(-) diff --git a/drivers/net/nfp/flower/nfp_flower.c b/drivers/net/nfp/flower/nfp_flower.c index f7e0ba3b76..c5cc537790 100644 --- a/drivers/net/nfp/flower/nfp_flower.c +++ b/drivers/net/nfp/flower/nfp_flower.c @@ -438,9 +438,7 @@ nfp_flower_pf_recv_pkts(void *rx_queue, rte_ring_enqueue(repr->ring, (void *)mb); avail_multiplexed++; } else if (repr != NULL) { - PMD_RX_LOG(ERR, "[%u] No ring available for repr_port %s\n", - hw->idx, repr->name); - PMD_RX_LOG(DEBUG, "Adding the mbuf to the mbuf array passed by the app"); + PMD_RX_LOG(ERR, "No ring available for repr_port %s", repr->name); rx_pkts[avail++] = mb; } else { PMD_RX_LOG(DEBUG, "Adding the mbuf to the mbuf array passed by the app"); diff --git a/drivers/net/nfp/nfp_common.h b/drivers/net/nfp/nfp_common.h index 56ea203d7e..2281445861 100644 --- a/drivers/net/nfp/nfp_common.h +++ b/drivers/net/nfp/nfp_common.h @@ -119,36 +119,14 @@ struct nfp_pf_dev { /* The eth table reported by firmware */ struct nfp_eth_table *nfp_eth_table; - /* Current values for control */ - uint32_t ctrl; - uint8_t *ctrl_bar; - uint8_t *tx_bar; - uint8_t *rx_bar; - - uint8_t *qcp_cfg; - rte_spinlock_t reconfig_lock; - - uint16_t flbufsz; - uint16_t device_id; - uint16_t vendor_id; - uint16_t subsystem_device_id; - uint16_t subsystem_vendor_id; -#if defined(DSTQ_SELECTION) -#if DSTQ_SELECTION - uint16_t device_function; -#endif -#endif struct nfp_cpp *cpp; struct nfp_cpp_area *ctrl_area; struct nfp_cpp_area *hwqueues_area; - struct nfp_cpp_area *msix_area; uint8_t *hw_queues; - union eth_table_entry *eth_table; - struct nfp_hwinfo *hwinfo; struct nfp_rtsym_table *sym_tbl; @@ -208,11 +186,6 @@ struct nfp_net_hw { uint16_t vendor_id; uint16_t subsystem_device_id; uint16_t subsystem_vendor_id; -#if defined(DSTQ_SELECTION) -#if DSTQ_SELECTION - uint16_t device_function; -#endif -#endif struct rte_ether_addr mac_addr; @@ -222,19 +195,14 @@ struct nfp_net_hw { struct nfp_cpp *cpp; struct nfp_cpp_area *ctrl_area; - struct nfp_cpp_area *hwqueues_area; - struct nfp_cpp_area *msix_area; struct nfp_cpp_area *mac_stats_area; uint8_t *mac_stats_bar; uint8_t *mac_stats; - uint8_t *hw_queues; - /* Sequential physical port number */ + /* Sequential physical port number, only valid for CoreNIC firmware */ uint8_t idx; /* Internal port number as seen from NFP */ uint8_t nfp_idx; - - union eth_table_entry *eth_table; }; struct nfp_net_adapter { diff --git a/drivers/net/nfp/nfp_ethdev_vf.c b/drivers/net/nfp/nfp_ethdev_vf.c index d4357ad115..71f5020ecd 100644 --- a/drivers/net/nfp/nfp_ethdev_vf.c +++ b/drivers/net/nfp/nfp_ethdev_vf.c @@ -402,7 +402,7 @@ nfp_netvf_init(struct rte_eth_dev *eth_dev) if (eth_dev->data->mac_addrs == NULL) { PMD_INIT_LOG(ERR, "Failed to space for MAC address"); err = -ENOMEM; - goto dev_err_queues_map; + goto dev_err_ctrl_map; } nfp_netvf_read_mac(hw); @@ -443,8 +443,6 @@ nfp_netvf_init(struct rte_eth_dev *eth_dev) return 0; -dev_err_queues_map: - nfp_cpp_area_free(hw->hwqueues_area); dev_err_ctrl_map: nfp_cpp_area_free(hw->ctrl_area); -- 2.39.1