summaryrefslogtreecommitdiff
path: root/net/sched/sch_hfsc.c
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2026-05-10 09:14:50 +0000
committerJakub Kicinski <kuba@kernel.org>2026-05-11 18:28:07 -0700
commit0e5b05f44d818d1efe5154832d2e3f3c44352c02 (patch)
tree8bca941a62b5953a8921fe47908ed80f0309ae6f /net/sched/sch_hfsc.c
parent863cd78652018576c60f1b73477a15bdb0ea7551 (diff)
downloadlinux-next-0e5b05f44d818d1efe5154832d2e3f3c44352c02.tar.gz
linux-next-0e5b05f44d818d1efe5154832d2e3f3c44352c02.zip
net/sched: annotate data-races around sch->qstats.backlog
Add qstats_backlog_sub() and qstats_backlog_add() helpers and use them instead of open-coding them. These helpers use WRITE_ONCE() to prevent store-tearing. Also use WRITE_ONCE() in fq_reset() and qdisc_reset() when sch->qstats.backlog is cleared. Signed-off-by: Eric Dumazet <edumazet@google.com> Acked-by: Toke Høiland-Jørgensen <toke@toke.dk> Link: https://patch.msgid.link/20260510091455.4039245-4-edumazet@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/sched/sch_hfsc.c')
-rw-r--r--net/sched/sch_hfsc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/sched/sch_hfsc.c b/net/sched/sch_hfsc.c
index e71a565100ed..59409ee2d2ff 100644
--- a/net/sched/sch_hfsc.c
+++ b/net/sched/sch_hfsc.c
@@ -1560,7 +1560,7 @@ hfsc_enqueue(struct sk_buff *skb, struct Qdisc *sch, struct sk_buff **to_free)
return err;
}
- sch->qstats.backlog += len;
+ qstats_backlog_add(sch, len);
qdisc_qlen_inc(sch);
if (first && !cl_in_el_or_vttree(cl)) {