• Qitao Xu's avatar
    net_sched: introduce tracepoint trace_qdisc_enqueue() · 70713ddd
    Qitao Xu authored
    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>
    70713ddd
qdisc.h 3.69 KB