net/iavf: remove dead code in TM node parameter check
PATCH 1/1 net/iavf: remove dead code in TM node parameter check
The non-leaf validation in iavf_node_param_check() unconditionally rejects a non-NULL wfq_weight_mode pointer at the top of the block. The else-if clause below re-tests the same pointer, which is guaranteed NULL at that point, making the branch unreachable dead code.
Remove the dead else-if block. No functional change.
Fixes 44d0a720a538 ("net/iavf: query QoS capabilities and set queue TC mapping")
Signed-off-by Sergei Iashin <[email protected]>
--- drivers/net/intel/iavf/iavf_tm.c | 6 ------ 1 file changed, 6 deletions(-)
drivers/net/intel/iavf/iavf_tm.c +0 -6
@@ -178,12 +178,6 @@ iavf_node_param_check(struct iavf_info *vf, uint32_t node_id,RTE_TM_ERROR_TYPE_NODE_PARAMS_N_SP_PRIORITIES ; error->message ="SP priority not supported" ;return -EINVAL ; - }else if (params->nonleaf.wfq_weight_mode && - !(*params->nonleaf.wfq_weight_mode)) { - error->type = -RTE_TM_ERROR_TYPE_NODE_PARAMS_WFQ_WEIGHT_MODE ; - error->message ="WFP should be byte mode" ; -return -EINVAL ; }return 0 ;
Signature · 1 line
2.39.5
Quoted 7 lines · Sergei Iashin
The non-leaf validation in
iavf_node_param_check()unconditionally rejects a non-NULLwfq_weight_modepointer at the top of the block. The else-if clause below re-tests the same pointer, which is guaranteed NULL at that point, making the branch unreachable dead code.Remove the dead else-if block. No functional change.
Quoted 8 lines
Fixes 44d0a720a538 ("net/iavf: query QoS capabilities and set queue TC mapping")Signed-off-by Sergei Iashin <[email protected]>--- drivers/net/intel/iavf/iavf_tm.c | 6 ------ 1 file changed, 6 deletions(-)
Acked-by Bruce Richardson <[email protected]>
Applied to dpdk-next-net-intel
Thanks,
/Bruce