Created
November 23, 2021 16:03
-
-
Save proelbtn/4e0b12cab04fdde47bee5d279d348a2f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bpftrace | |
#include <linux/netdevice.h> | |
#include <linux/skbuff.h> | |
tracepoint:skb:kfree_skb { | |
$skb = (struct sk_buff *)args->skbaddr; | |
if ($skb->mark == 0x23456) { | |
printf("------------------------------------------------------------\n"); | |
printf("$skb = %p\n", $skb); | |
printf("$skb->dev->name = %s\n", $skb->dev->name); | |
printf("$skb->mark = 0x%x\n", $skb->mark); | |
printf("stacktrace: %s", kstack()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment