lkml.org 
[lkml]   [2022]   [Aug]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH net-next] net: sched: using TCQ_MIN_PRIO_BANDS in prio_tune()
Date
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(-)

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++) {
--
2.17.1
\
 
 \ /
  Last update: 2022-08-26 06:09    [W:0.122 / U:0.360 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site