net: use %px to print skb address in trace_netif_receive_skb
authorQitao Xu <qitao.xu@bytedance.com>
Thu, 15 Jul 2021 05:59:23 +0000 (22:59 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 15 Jul 2021 17:28:48 +0000 (10:28 -0700)
The print format of skb adress in tracepoint class net_dev_template
is changed to %px from %p, because we want to use skb address
as a quick way to identify a packet.

Note, trace ring buffer is only accessible to privileged users,
it is safe to use a real kernel address here.

Reviewed-by: Cong Wang <cong.wang@bytedance.com>
Signed-off-by: Qitao Xu <qitao.xu@bytedance.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/trace/events/net.h

index 2399073..78c448c 100644 (file)
@@ -136,7 +136,7 @@ DECLARE_EVENT_CLASS(net_dev_template,
                __assign_str(name, skb->dev->name);
        ),
 
-       TP_printk("dev=%s skbaddr=%p len=%u",
+       TP_printk("dev=%s skbaddr=%px len=%u",
                __get_str(name), __entry->skbaddr, __entry->len)
 )