aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched
diff options
context:
space:
mode:
Diffstat (limited to 'net/sched')
-rw-r--r--net/sched/sch_qfq.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/net/sched/sch_qfq.c b/net/sched/sch_qfq.c
index 7c195d972bf0..8d86a8b5522a 100644
--- a/net/sched/sch_qfq.c
+++ b/net/sched/sch_qfq.c
@@ -821,7 +821,14 @@ static void qfq_make_eligible(struct qfq_sched *q)
821 unsigned long old_vslot = q->oldV >> q->min_slot_shift; 821 unsigned long old_vslot = q->oldV >> q->min_slot_shift;
822 822
823 if (vslot != old_vslot) { 823 if (vslot != old_vslot) {
824 unsigned long mask = (1ULL << fls(vslot ^ old_vslot)) - 1; 824 unsigned long mask;
825 int last_flip_pos = fls(vslot ^ old_vslot);
826
827 if (last_flip_pos > 31) /* higher than the number of groups */
828 mask = ~0UL; /* make all groups eligible */
829 else
830 mask = (1UL << last_flip_pos) - 1;
831
825 qfq_move_groups(q, mask, IR, ER); 832 qfq_move_groups(q, mask, IR, ER);
826 qfq_move_groups(q, mask, IB, EB); 833 qfq_move_groups(q, mask, IB, EB);
827 } 834 }