In ixgbe_node_param_check(), a non-NULL nonleaf.wfq_weight_mode
of a non-leaf node is already rejected with "WFQ not supported"
before the n_sp_priorities check. The pointer is not modified
afterwards, so the following else-if branch that checks it again
("WFP should be byte mode") can never be taken.

Remove the dead branch. No functional change.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Signed-off-by: Andrey Mokrushin <[email protected]>
---
 .mailmap                           | 1 +
 drivers/net/intel/ixgbe/ixgbe_tm.c | 6 ------
 2 files changed, 1 insertion(+), 6 deletions(-)

diff --git a/.mailmap b/.mailmap
index 6d9e262cfb..5b06576b4a 100644
--- a/.mailmap
+++ b/.mailmap
@@ -123,6 +123,7 @@ Andrew Pinski <[email protected]>
 Andrew Rybchenko <[email protected]> <[email protected]>
 Andrey Chilikin <[email protected]>
 Andrey Ignatov <[email protected]>
+Andrey Mokrushin <[email protected]>
 Andrey Nikolaev <[email protected]>
 Andrey Vesnovaty <[email protected]>
 Andrey Yudin <[email protected]>
diff --git a/drivers/net/intel/ixgbe/ixgbe_tm.c 
b/drivers/net/intel/ixgbe/ixgbe_tm.c
index 984c157223..000223232f 100644
--- a/drivers/net/intel/ixgbe/ixgbe_tm.c
+++ b/drivers/net/intel/ixgbe/ixgbe_tm.c
@@ -508,12 +508,6 @@ ixgbe_node_param_check(struct rte_eth_dev *dev, 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;
-- 
2.56.0


Reply via email to