From: Sergei Iashin <yashin.sergey@gmail.com>
To: Vladimir Medvedkin <vladimir.medvedkin@intel.com>,
Qiming Yang <qiming.yang@intel.com>, Ting Xu <ting.xu@intel.com>,
Qi Zhang <qi.z.zhang@intel.com>
Cc: dev@dpdk.org, stable@dpdk.org, Sergei Iashin <yashin.sergey@gmail.com>
Subject: [PATCH] net/iavf: remove dead code in TM node parameter check
Date: Tue, 7 Apr 2026 14:47:30 +0300 [thread overview]
Message-ID: <20260407114730.1222526-1-yashin.sergey@gmail.com> (raw)
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")
Cc: ting.xu@intel.com
Cc: stable@dpdk.org
Signed-off-by: Sergei Iashin <yashin.sergey@gmail.com>
---
drivers/net/intel/iavf/iavf_tm.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/drivers/net/intel/iavf/iavf_tm.c b/drivers/net/intel/iavf/iavf_tm.c
index 1d12196ba6..efdbb45b62 100644
--- a/drivers/net/intel/iavf/iavf_tm.c
+++ b/drivers/net/intel/iavf/iavf_tm.c
@@ -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;
--
2.39.5
next reply other threads:[~2026-04-08 8:25 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-07 11:47 Sergei Iashin [this message]
2026-04-08 16:41 ` [PATCH] net/iavf: remove dead code in TM node parameter check Bruce Richardson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260407114730.1222526-1-yashin.sergey@gmail.com \
--to=yashin.sergey@gmail.com \
--cc=dev@dpdk.org \
--cc=qi.z.zhang@intel.com \
--cc=qiming.yang@intel.com \
--cc=stable@dpdk.org \
--cc=ting.xu@intel.com \
--cc=vladimir.medvedkin@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox