Skip to content

Commit 81a4169

Browse files
edumazetkuba-moo
authored andcommitted
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: 076433b ("net_sched: sch_fq: add fast path for mostly idle qdisc") Signed-off-by: Eric Dumazet <[email protected]> Reviewed-by: Willem de Bruijn <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 06e4dd1 commit 81a4169

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

net/sched/sch_fq.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -383,6 +383,10 @@ static struct fq_flow *fq_classify(struct Qdisc *sch, struct sk_buff *skb,
383383

384384
if (fq_fastpath_check(sch, skb, now)) {
385385
q->internal.stat_fastpath_packets++;
386+
if (skb->sk == sk && q->rate_enable &&
387+
READ_ONCE(sk->sk_pacing_status) != SK_PACING_FQ)
388+
smp_store_release(&sk->sk_pacing_status,
389+
SK_PACING_FQ);
386390
return &q->internal;
387391
}
388392

0 commit comments

Comments
 (0)