mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-03 23:58:05 +00:00
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: afe4fd0624
("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>
This commit is contained in:
parent
b54629e226
commit
2abc2f070e
1 changed files with 1 additions and 7 deletions
|
@ -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)
|
static struct fq_flow *fq_classify(struct sk_buff *skb, struct fq_sched_data *q)
|
||||||
{
|
{
|
||||||
struct rb_node **p, *parent;
|
struct rb_node **p, *parent;
|
||||||
struct sock *sk = skb->sk;
|
struct sock *sk = skb->sk;
|
||||||
struct rb_root *root;
|
struct rb_root *root;
|
||||||
struct fq_flow *f;
|
struct fq_flow *f;
|
||||||
int band;
|
|
||||||
|
|
||||||
/* warning: no starvation prevention... */
|
/* warning: no starvation prevention... */
|
||||||
band = prio2band[skb->priority & TC_PRIO_MAX];
|
if (unlikely((skb->priority & TC_PRIO_MAX) == TC_PRIO_CONTROL))
|
||||||
if (unlikely(band == 0))
|
|
||||||
return &q->internal;
|
return &q->internal;
|
||||||
|
|
||||||
if (unlikely(!sk)) {
|
if (unlikely(!sk)) {
|
||||||
|
|
Loading…
Reference in a new issue