diff mbox series

[net-next] net: sched: using TCQ_MIN_PRIO_BANDS in prio_tune()

Message ID 20220826041035.80129-1-shaozhengchao@huawei.com (mailing list archive)
State Accepted
Commit 4b7477f0921a2dc9594b6bb0c893e79169c6e829
Delegated to: Netdev Maintainers
Headers show
Series [net-next] net: sched: using TCQ_MIN_PRIO_BANDS in prio_tune() | expand

Checks

Context Check Description
netdev/tree_selection success Clearly marked for net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/subject_prefix success Link
netdev/cover_letter success Single patches do not need cover letters
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/cc_maintainers success CCed 8 of 8 maintainers
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 8 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

shaozhengchao Aug. 26, 2022, 4:10 a.m. UTC
Using TCQ_MIN_PRIO_BANDS instead of magic number in prio_tune().

Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com>
---
 net/sched/sch_prio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Cong Wang Aug. 29, 2022, 5:50 a.m. UTC | #1
On Fri, Aug 26, 2022 at 12:10:35PM +0800, Zhengchao Shao wrote:
> Using TCQ_MIN_PRIO_BANDS instead of magic number in prio_tune().
> 
> Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com>

Acked-by: Cong Wang <xiyou.wangcong@gmail.com>

Thanks.
patchwork-bot+netdevbpf@kernel.org Aug. 30, 2022, 11:30 a.m. UTC | #2
Hello:

This patch was applied to netdev/net-next.git (master)
by Paolo Abeni <pabeni@redhat.com>:

On Fri, 26 Aug 2022 12:10:35 +0800 you wrote:
> Using TCQ_MIN_PRIO_BANDS instead of magic number in prio_tune().
> 
> Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com>
> ---
>  net/sched/sch_prio.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Here is the summary with links:
  - [net-next] net: sched: using TCQ_MIN_PRIO_BANDS in prio_tune()
    https://git.kernel.org/netdev/net-next/c/4b7477f0921a

You are awesome, thank you!
diff mbox series

Patch

diff --git a/net/sched/sch_prio.c b/net/sched/sch_prio.c
index 3b8d7197c06b..fbbd4f7015be 100644
--- a/net/sched/sch_prio.c
+++ b/net/sched/sch_prio.c
@@ -187,7 +187,7 @@  static int prio_tune(struct Qdisc *sch, struct nlattr *opt,
 		return -EINVAL;
 	qopt = nla_data(opt);
 
-	if (qopt->bands > TCQ_PRIO_BANDS || qopt->bands < 2)
+	if (qopt->bands > TCQ_PRIO_BANDS || qopt->bands < TCQ_MIN_PRIO_BANDS)
 		return -EINVAL;
 
 	for (i = 0; i <= TC_PRIO_MAX; i++) {