net/idpf: remove useless function
PATCH 1/1 net/idpf: remove useless function
Commit 376faf4aaa16 ("net/idpf: enable simple Tx function") removed the one assignment that was performed in the function idpf_qc_tx_vec_avx512_setup. Without it, the function is useless and results in USELESS_CALL defects reported by Coverity. Fix these by removing the function and the logic that calls it in idpf and cpfl.
Coverity issue: 501500
Coverity issue: 501501
--- drivers/net/intel/cpfl/cpfl_rxtx.c | 16 ---------------- drivers/net/intel/idpf/idpf_common_rxtx.h | 4 ---- drivers/net/intel/idpf/idpf_common_rxtx_avx512.c | 10 ---------- drivers/net/intel/idpf/idpf_rxtx.c | 16 ---------------- 4 files changed, 46 deletions(-)
drivers/net/intel/cpfl/cpfl_rxtx.c +0 -16
@@ -1551,20 +1551,4 @@ cpfl_set_tx_function(struct rte_eth_dev *dev) dev->tx_pkt_prepare = idpf_dp_prep_pkts;PMD_DRV_LOG (NOTICE ,"Using %s Tx (port %d)." , idpf_tx_path_infos[ad->tx_func_type].info, dev->data->port_id); - -#ifdef RTE_ARCH_X86 -#ifdef CC_AVX512_SUPPORT -if (idpf_tx_path_infos[ad->tx_func_type].features.simd_width >=RTE_VECT_SIMD_256 && - idpf_tx_path_infos[ad->tx_func_type].features.single_queue) { -for (i =0 ; i < dev->data->nb_tx_queues; i++) { - txq = dev->data->tx_queues[i]; -if (txq ==NULL ) -continue ; -if (idpf_tx_path_infos[ad->tx_func_type].features.simd_width == -RTE_VECT_SIMD_512 ) -idpf_qc_tx_vec_avx512_setup (txq); - } - } -#endif /* CC_AVX512_SUPPORT */ -#endif /* RTE_ARCH_X86 */ }
drivers/net/intel/idpf/idpf_common_rxtx.h +0 -4
@@ -231,10 +231,6 @@ int idpf_qc_singleq_rx_vec_setup(struct idpf_rx_queue *rxq);__rte_internal int idpf_qc_splitq_rx_vec_setup(struct idpf_rx_queue *rxq);__rte_internal -int idpf_qc_tx_vec_avx512_setup(struct ci_tx_queue *txq); -__rte_internal -int idpf_qc_tx_vec_avx512_setup(struct ci_tx_queue *txq); -__rte_internal uint16_t idpf_dp_singleq_recv_pkts_avx512(void *rx_queue,struct rte_mbuf **rx_pkts,uint16_t nb_pkts);
drivers/net/intel/idpf/idpf_common_rxtx_avx512.c +0 -10
@@ -1357,13 +1357,3 @@ idpf_dp_splitq_xmit_pkts_avx512(void *tx_queue, struct rte_mbuf **tx_pkts, {return idpf_splitq_xmit_pkts_vec_avx512_cmn (tx_queue, tx_pkts, nb_pkts); } - -RTE_EXPORT_INTERNAL_SYMBOL (idpf_qc_tx_vec_avx512_setup) -int __rte_cold -idpf_qc_tx_vec_avx512_setup (struct ci_tx_queue *txq) -{ -if (!txq) -return 0 ; - -return 0 ; -}
drivers/net/intel/idpf/idpf_rxtx.c +0 -16
@@ -897,20 +897,4 @@ idpf_set_tx_function(struct rte_eth_dev *dev) dev->tx_pkt_prepare = idpf_dp_prep_pkts;PMD_DRV_LOG (NOTICE ,"Using %s Tx (port %d)." , idpf_tx_path_infos[ad->tx_func_type].info, dev->data->port_id); - -#ifdef RTE_ARCH_X86 -#ifdef CC_AVX512_SUPPORT -if (idpf_tx_path_infos[ad->tx_func_type].features.simd_width >=RTE_VECT_SIMD_256 && - idpf_tx_path_infos[ad->tx_func_type].features.single_queue) { -for (i =0 ; i < dev->data->nb_tx_queues; i++) { - txq = dev->data->tx_queues[i]; -if (txq ==NULL ) -continue ; -if (idpf_tx_path_infos[ad->tx_func_type].features.simd_width == -RTE_VECT_SIMD_512 ) -idpf_qc_tx_vec_avx512_setup (txq); - } - } -#endif /* CC_AVX512_SUPPORT */ -#endif /* RTE_ARCH_X86 */ }
Signature · 1 line
2.43.0
Quoted 11 lines · Ciara Loftus
Commit
376faf4aaa16("net/idpf: enable simple Tx function") removed the one assignment that was performed in the functionidpf_qc_tx_vec_avx512_setup. Without it, the function is useless and results inUSELESS_CALLdefects reported by Coverity. Fix these by removing the function and the logic that calls it in idpf and cpfl.Coverity issue: 501500
Coverity issue: 501501Fixes 376faf4aaa16 ("net/idpf: enable simple Tx function")
Quoted 7 lines
Signed-off-by Ciara Loftus <[email protected]>--- drivers/net/intel/cpfl/cpfl_rxtx.c | 16 ---------------- drivers/net/intel/idpf/idpf_common_rxtx.h | 4 ---- drivers/net/intel/idpf/idpf_common_rxtx_avx512.c | 10 ---------- drivers/net/intel/idpf/idpf_rxtx.c | 16 ---------------- 4 files changed, 46 deletions(-)
Bruce Richardson
AppliedQuoted 20 lines · Bruce Richardson
Quoted 11 lines · Ciara Loftus
Commit
376faf4aaa16("net/idpf: enable simple Tx function") removed the one assignment that was performed in the functionidpf_qc_tx_vec_avx512_setup. Without it, the function is useless and results inUSELESS_CALLdefects reported by Coverity. Fix these by removing the function and the logic that calls it in idpf and cpfl.Coverity issue: 501500
Coverity issue: 501501Fixes 376faf4aaa16 ("net/idpf: enable simple Tx function")Quoted 7 lines
Signed-off-by Ciara Loftus <[email protected]>--- drivers/net/intel/cpfl/cpfl_rxtx.c | 16 ---------------- drivers/net/intel/idpf/idpf_common_rxtx.h | 4 ---- drivers/net/intel/idpf/idpf_common_rxtx_avx512.c | 10 ---------- drivers/net/intel/idpf/idpf_rxtx.c | 16 ---------------- 4 files changed, 46 deletions(-)
Quoted 1 line
Acked-by Bruce Richardson <[email protected]>
Applied to dpdk-next-net-intel.
Thanks,
/Bruce