diff options
| author | Yan Zhai <yan@cloudflare.com> | 2024-06-17 11:09:04 -0700 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2024-06-19 12:44:22 +0100 |
| commit | c53795d48ee8f385c6a9e394651e7ee914baaeba (patch) | |
| tree | 87256aafb7ba058f39f10dca3ee7118926769d44 /net/core/dev.c | |
| parent | 6f46fc9bc2bda2254189f547110b9e87e5f100f2 (diff) | |
| download | linux-next-c53795d48ee8f385c6a9e394651e7ee914baaeba.tar.gz linux-next-c53795d48ee8f385c6a9e394651e7ee914baaeba.zip | |
net: add rx_sk to trace_kfree_skb
skb does not include enough information to find out receiving
sockets/services and netns/containers on packet drops. In theory
skb->dev tells about netns, but it can get cleared/reused, e.g. by TCP
stack for OOO packet lookup. Similarly, skb->sk often identifies a local
sender, and tells nothing about a receiver.
Allow passing an extra receiving socket to the tracepoint to improve
the visibility on receiving drops.
Signed-off-by: Yan Zhai <yan@cloudflare.com>
Acked-by: Jesper Dangaard Brouer <hawk@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/dev.c')
| -rw-r--r-- | net/core/dev.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index c361a7b69da8..093d82bf0e28 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -5234,7 +5234,7 @@ static __latent_entropy void net_tx_action(struct softirq_action *h) trace_consume_skb(skb, net_tx_action); else trace_kfree_skb(skb, net_tx_action, - get_kfree_skb_cb(skb)->reason); + get_kfree_skb_cb(skb)->reason, NULL); if (skb->fclone != SKB_FCLONE_UNAVAILABLE) __kfree_skb(skb); |
