* [PATCH] net/nfp: remove unused struct fields
@ 2023-06-05 5:45 Chaoyong He
2023-06-06 10:11 ` Ferruh Yigit
0 siblings, 1 reply; 2+ messages in thread
From: Chaoyong He @ 2023-06-05 5:45 UTC (permalink / raw)
To: dev; +Cc: oss-drivers, niklas.soderlund, Chaoyong He
Remove the data fields of nfp structure which are not used by anyone,
and modify the corresponding logics.
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 | 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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] net/nfp: remove unused struct fields
2023-06-05 5:45 [PATCH] net/nfp: remove unused struct fields Chaoyong He
@ 2023-06-06 10:11 ` Ferruh Yigit
0 siblings, 0 replies; 2+ messages in thread
From: Ferruh Yigit @ 2023-06-06 10:11 UTC (permalink / raw)
To: Chaoyong He, dev; +Cc: oss-drivers, niklas.soderlund
On 6/5/2023 6:45 AM, Chaoyong He wrote:
> Remove the data fields of nfp structure which are not used by anyone,
> and modify the corresponding logics.
>
> Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
> Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
>
Applied to dpdk-next-net/main, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-06-06 10:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-05 5:45 [PATCH] net/nfp: remove unused struct fields Chaoyong He
2023-06-06 10:11 ` Ferruh Yigit
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).