summaryrefslogtreecommitdiff
path: root/net/core/dev.c
diff options
context:
space:
mode:
authorJesper Dangaard Brouer <hawk@kernel.org>2026-02-26 16:44:12 +0300
committerJakub Kicinski <kuba@kernel.org>2026-03-01 02:31:34 +0300
commitff2998f29f390d963299103f0b247cc79106ced5 (patch)
tree94f2d14b5bbba48f20d74776804d4cf4efd413db /net/core/dev.c
parent52d534aa6640a41f9813c7dfe30b65b11e4d7416 (diff)
downloadlinux-ff2998f29f390d963299103f0b247cc79106ced5.tar.xz
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>
Diffstat (limited to 'net/core/dev.c')
-rw-r--r--net/core/dev.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index c1a9f7fdcffa..1cf3ad840697 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -4166,7 +4166,7 @@ static inline int __dev_xmit_skb(struct sk_buff *skb, struct Qdisc *q,
qdisc_calculate_pkt_len(skb, q);
- tcf_set_drop_reason(skb, SKB_DROP_REASON_QDISC_DROP);
+ tcf_set_qdisc_drop_reason(skb, QDISC_DROP_GENERIC);
if (q->flags & TCQ_F_NOLOCK) {
if (q->flags & TCQ_F_CAN_BYPASS && nolock_qdisc_is_empty(q) &&
@@ -4274,8 +4274,8 @@ unlock:
spin_unlock(root_lock);
free_skbs:
- tcf_kfree_skb_list(to_free);
- tcf_kfree_skb_list(to_free2);
+ tcf_kfree_skb_list(to_free, q, txq, dev);
+ tcf_kfree_skb_list(to_free2, q, txq, dev);
return rc;
}
@@ -5811,7 +5811,7 @@ static __latent_entropy void net_tx_action(void)
to_free = qdisc_run(q);
if (root_lock)
spin_unlock(root_lock);
- tcf_kfree_skb_list(to_free);
+ tcf_kfree_skb_list(to_free, q, NULL, qdisc_dev(q));
}
rcu_read_unlock();