Skip to content

Commit 2abc2f0

Browse files
zenczykowskidavem330
authored andcommitted
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: afe4fd0 ("pkt_sched: fq: Fair Queue packet scheduler") Signed-off-by: Maciej Żenczykowski <maze@google.com> Signed-off-by: Eric Dumazet <edumazet@google.com> Cc: Stephen Hemminger <stephen@networkplumber.org> Cc: Willem de Bruijn <willemb@google.com> Cc: Yuchung Cheng <ycheng@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent b54629e commit 2abc2f0

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

net/sched/sch_fq.c

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -209,21 +209,15 @@ static void fq_gc(struct fq_sched_data *q,
209209
}
210210
}
211211

212-
static const u8 prio2band[TC_PRIO_MAX + 1] = {
213-
1, 2, 2, 2, 1, 2, 0, 0 , 1, 1, 1, 1, 1, 1, 1, 1
214-
};
215-
216212
static struct fq_flow *fq_classify(struct sk_buff *skb, struct fq_sched_data *q)
217213
{
218214
struct rb_node **p, *parent;
219215
struct sock *sk = skb->sk;
220216
struct rb_root *root;
221217
struct fq_flow *f;
222-
int band;
223218

224219
/* warning: no starvation prevention... */
225-
band = prio2band[skb->priority & TC_PRIO_MAX];
226-
if (unlikely(band == 0))
220+
if (unlikely((skb->priority & TC_PRIO_MAX) == TC_PRIO_CONTROL))
227221
return &q->internal;
228222

229223
if (unlikely(!sk)) {

0 commit comments

Comments
 (0)