diff options
author | Jakub Kicinski <kuba@kernel.org> | 2022-01-05 23:36:10 +0100 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2022-01-05 23:36:10 +0100 |
commit | b9adba350a841e8233d3e4d8d3c8dede3fc88c46 (patch) | |
tree | 2fbaa3fb25cf76d44a510e0c4f96c02622e268f9 /net/sched | |
parent | net: gemini: allow any RGMII interface mode (diff) | |
parent | Merge tag 'net-5.16-final' of git://git.kernel.org/pub/scm/linux/kernel/git/n... (diff) | |
download | linux-b9adba350a841e8233d3e4d8d3c8dede3fc88c46.tar.xz linux-b9adba350a841e8233d3e4d8d3c8dede3fc88c46.zip |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
No conflicts.
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/sched')
-rw-r--r-- | net/sched/sch_qfq.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/net/sched/sch_qfq.c b/net/sched/sch_qfq.c index 0b7f9ba28deb..d4ce58c90f9f 100644 --- a/net/sched/sch_qfq.c +++ b/net/sched/sch_qfq.c @@ -1421,10 +1421,8 @@ static int qfq_init_qdisc(struct Qdisc *sch, struct nlattr *opt, if (err < 0) return err; - if (qdisc_dev(sch)->tx_queue_len + 1 > QFQ_MAX_AGG_CLASSES) - max_classes = QFQ_MAX_AGG_CLASSES; - else - max_classes = qdisc_dev(sch)->tx_queue_len + 1; + max_classes = min_t(u64, (u64)qdisc_dev(sch)->tx_queue_len + 1, + QFQ_MAX_AGG_CLASSES); /* max_cl_shift = floor(log_2(max_classes)) */ max_cl_shift = __fls(max_classes); q->max_agg_classes = 1<<max_cl_shift; |