]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
net: sched: introduce qdisc-specific drop reason tracing
authorJesper Dangaard Brouer <hawk@kernel.org>
Thu, 26 Feb 2026 13:44:12 +0000 (14:44 +0100)
committerJakub Kicinski <kuba@kernel.org>
Sat, 28 Feb 2026 23:31:34 +0000 (15:31 -0800)
commitff2998f29f390d963299103f0b247cc79106ced5
tree94f2d14b5bbba48f20d74776804d4cf4efd413db
parent52d534aa6640a41f9813c7dfe30b65b11e4d7416
net: sched: introduce qdisc-specific drop reason tracing

Create new enum qdisc_drop_reason and trace_qdisc_drop tracepoint
for qdisc layer drop diagnostics with direct qdisc context visibility.

The new tracepoint includes qdisc handle, parent, kind (name), and
device information. Existing SKB_DROP_REASON_QDISC_DROP is retained
for backwards compatibility via kfree_skb_reason().

Convert qdiscs with drop reasons to use the new infrastructure.

Change CAKE's cobalt_should_drop() return type from enum skb_drop_reason
to enum qdisc_drop_reason to fix implicit enum conversion warnings.
Use QDISC_DROP_UNSPEC as the 'not dropped' sentinel instead of
SKB_NOT_DROPPED_YET. Both have the same compiled value (0), so the
comparison logic remains semantically equivalent.

Signed-off-by: Jesper Dangaard Brouer <hawk@kernel.org>
Reviewed-by: Toke Høiland-Jørgensen <toke@redhat.com>
Link: https://patch.msgid.link/177211345275.3011628.1974310302645218067.stgit@firesoul
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
17 files changed:
include/net/dropreason-core.h
include/net/dropreason-qdisc.h [new file with mode: 0644]
include/net/dropreason.h
include/net/sch_generic.h
include/trace/events/qdisc.h
net/core/dev.c
net/sched/sch_cake.c
net/sched/sch_codel.c
net/sched/sch_dualpi2.c
net/sched/sch_fq.c
net/sched/sch_fq_codel.c
net/sched/sch_fq_pie.c
net/sched/sch_generic.c
net/sched/sch_gred.c
net/sched/sch_pie.c
net/sched/sch_red.c
net/sched/sch_sfb.c