net/ice: remove unreachable DCF scheduler branch
PATCH 1/1 net/ice: remove unreachable DCF scheduler branch
Non-leaf node validation rejects any non-NULL WFQ weight mode before checking the SP priority count. Therefore the later else-if branch cannot be reached, because wfq_weight_mode is guaranteed to be NULL at that point.
Remove the dead branch to avoid keeping an impossible validation path in the DCF scheduler parameter checks.
--- drivers/net/intel/ice/ice_dcf_sched.c | 6 ------ 1 file changed, 6 deletions(-)
drivers/net/intel/ice/ice_dcf_sched.c +0 -6
@@ -188,12 +188,6 @@ ice_dcf_node_param_check(struct ice_dcf_hw *hw, 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.43.0
Quoted 8 lines · Artem Novikov
Non-leaf node validation rejects any non-NULL WFQ weight mode before checking the SP priority count. Therefore the later else-if branch cannot be reached, because
wfq_weight_modeis guaranteed to be NULL at that point.Remove the dead branch to avoid keeping an impossible validation path in the DCF scheduler parameter checks.
Quoted 6 lines
Fixes 3a6bfc37eaf4 ("net/ice: support QoS config VF bandwidth in DCF")Signed-off-by Artem Novikov <[email protected]>---
Quoted 23 lines
drivers/net/intel/ice/ice_dcf_sched.c | 6 ------ 1 file changed, 6 deletions(-)drivers/net/intel/ice/ice_dcf_sched.c +0
-6@@ -188,12 +188,6 @@ ice_dcf_node_param_check(struct ice_dcf_hw *hw, 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.43.0
Quoted 9 lines · Bruce Richardson
Quoted 8 lines · Artem Novikov
Non-leaf node validation rejects any non-NULL WFQ weight mode before checking the SP priority count. Therefore the later else-if branch cannot be reached, because
wfq_weight_modeis guaranteed to be NULL at that point.Remove the dead branch to avoid keeping an impossible validation path in the DCF scheduler parameter checks.
Quoted 6 lines
Quoted 6 lines
Fixes 3a6bfc37eaf4 ("net/ice: support QoS config VF bandwidth in DCF")Signed-off-by Artem Novikov <[email protected]>---
Applied to dpdk-next-net-intel.
Thanks,
/Bruce