From: Maciej Żenczykowski Date: Thu, 14 Nov 2013 16:50:43 +0000 (-0800) Subject: pkt_sched: fq: change classification of control packets X-Git-Tag: v4.9.8~7405^2~30 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2abc2f070eb30ac8421554a5c32229f8332c6206;p=platform%2Fkernel%2Flinux-rpi3.git pkt_sched: fq: change classification of control packets Initial sch_fq implementation copied code from pfifo_fast to classify a packet as a high prio packet. This clashes with setups using PRIO with say 7 bands, as one of the band could be incorrectly (mis)classified by FQ. Packets would be queued in the 'internal' queue, and no pacing ever happen for this special queue. Fixes: afe4fd062416 ("pkt_sched: fq: Fair Queue packet scheduler") Signed-off-by: Maciej Żenczykowski Signed-off-by: Eric Dumazet Cc: Stephen Hemminger Cc: Willem de Bruijn Cc: Yuchung Cheng Signed-off-by: David S. Miller --- diff --git a/net/sched/sch_fq.c b/net/sched/sch_fq.c index fdc041c..d4fa38e 100644 --- a/net/sched/sch_fq.c +++ b/net/sched/sch_fq.c @@ -209,21 +209,15 @@ static void fq_gc(struct fq_sched_data *q, } } -static const u8 prio2band[TC_PRIO_MAX + 1] = { - 1, 2, 2, 2, 1, 2, 0, 0 , 1, 1, 1, 1, 1, 1, 1, 1 -}; - static struct fq_flow *fq_classify(struct sk_buff *skb, struct fq_sched_data *q) { struct rb_node **p, *parent; struct sock *sk = skb->sk; struct rb_root *root; struct fq_flow *f; - int band; /* warning: no starvation prevention... */ - band = prio2band[skb->priority & TC_PRIO_MAX]; - if (unlikely(band == 0)) + if (unlikely((skb->priority & TC_PRIO_MAX) == TC_PRIO_CONTROL)) return &q->internal; if (unlikely(!sk)) {