Skip to content
Commit 70713ddd authored by Qitao Xu's avatar Qitao Xu Committed by David S. Miller
Browse files

net_sched: introduce tracepoint trace_qdisc_enqueue()

Tracepoint trace_qdisc_enqueue() is introduced to trace skb at
the entrance of TC layer on TX side. This is similar to
trace_qdisc_dequeue():

1. For both we only trace successful cases. The failure cases
   can be traced via trace_kfree_skb().

2. They are called at entrance or exit of TC layer, not for each
   ->enqueue() or ->dequeue(). This is intentional, because
   we want to make trace_qdisc_enqueue() symmetric to
   trace_qdisc_dequeue(), which is easier to use.

The return value of qdisc_enqueue() is not interesting here,
we have Qdisc's drop packets in ->dequeue(), it is impossible to
trace them even if we have the return value, the only way to trace
them is tracing kfree_skb().

We only add information we need to trace ring buffer. If any other
information is needed, it is easy to extend it without breaking ABI,
see commit 3dd344ea

 ("net: tracepoint: exposing sk_family in all
tcp:tracepoints").

Reviewed-by: default avatarCong Wang <cong.wang@bytedance.com>
Signed-off-by: default avatarQitao Xu <qitao.xu@bytedance.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 851f36e4
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment