Skip to contentSkip to conversation

net/ice: remove unreachable DCF scheduler branch

PATCH Applied Artem Novikov 2 participants 3 messages Sep 14 – Oct 5 Network drivers

lore
Share & tools
lore
#0 lore raw

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.

Fixes 3a6bfc37eaf4 ("net/ice: support QoS config VF bandwidth in DCF")
---
 drivers/net/intel/ice/ice_dcf_sched.c | 6 ------
 1 file changed, 6 deletions(-)
drivers/net/intel/ice/ice_dcf_sched.c +0 -6
index 795b6e683d..5895407331 100644
@@ -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
Acked-by on v1 1/1
#1 lore raw
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_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.

Quoted 6 lines
Fixes 3a6bfc37eaf4 ("net/ice: support QoS config VF bandwidth in DCF")

---

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
index 795b6e683d..5895407331 100644
@@ -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
Acked-by Applied
#2 lore raw
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_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.

Quoted 6 lines
Quoted 6 lines
Fixes 3a6bfc37eaf4 ("net/ice: support QoS config VF bandwidth in DCF")

---

Applied to dpdk-next-net-intel.
Thanks,
/Bruce