aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2023-10-20 20:12:54 +0000
committerJakub Kicinski <kuba@kernel.org>2023-10-23 15:49:44 -0700
commit81a4169856987b65918a93e9b9f53a28496575cf (patch)
treeb29ac02e3430dc7bf9f924b5711da56d2bcae778 /net/sched
parent06e4dd18f86876bc29786d66165f781cd0265b7c (diff)
downloadlinux-81a4169856987b65918a93e9b9f53a28496575cf.tar.gz
net_sched: sch_fq: fastpath needs to take care of sk->sk_pacing_status
If packets of a TCP flows take the fast path, we need to make sure sk->sk_pacing_status is set to SK_PACING_FQ otherwise TCP might fallback to internal pacing, which is not optimal. Fixes: 076433bd78d7 ("net_sched: sch_fq: add fast path for mostly idle qdisc") Signed-off-by: Eric Dumazet <edumazet@google.com> Reviewed-by: Willem de Bruijn <willemb@google.com> Link: https://lore.kernel.org/r/20231020201254.732527-1-edumazet@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/sched')
-rw-r--r--net/sched/sch_fq.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/sched/sch_fq.c b/net/sched/sch_fq.c
index f6fd0de293e58..bf9d00518a608 100644
--- a/net/sched/sch_fq.c
+++ b/net/sched/sch_fq.c
@@ -383,6 +383,10 @@ static struct fq_flow *fq_classify(struct Qdisc *sch, struct sk_buff *skb,
if (fq_fastpath_check(sch, skb, now)) {
q->internal.stat_fastpath_packets++;
+ if (skb->sk == sk && q->rate_enable &&
+ READ_ONCE(sk->sk_pacing_status) != SK_PACING_FQ)
+ smp_store_release(&sk->sk_pacing_status,
+ SK_PACING_FQ);
return &q->internal;
}