Commit a8b4cee4 authored by Paul Chaignon's avatar Paul Chaignon

Use older skb/kfree_skb tracepoint for tests

parent b66a9c9b
...@@ -704,10 +704,10 @@ BPF_HASH(table1, struct key_t, struct value_t); ...@@ -704,10 +704,10 @@ BPF_HASH(table1, struct key_t, struct value_t);
@skipUnless(kernel_version_ge(4,7), "requires kernel >= 4.7") @skipUnless(kernel_version_ge(4,7), "requires kernel >= 4.7")
def test_probe_read_tracepoint_context(self): def test_probe_read_tracepoint_context(self):
text = """ text = """
#include <net/inet_sock.h> #include <linux/netdevice.h>
TRACEPOINT_PROBE(tcp, tcp_retransmit_skb) { TRACEPOINT_PROBE(skb, kfree_skb) {
struct sock *sk = (struct sock *)args->skaddr; struct sk_buff *skb = (struct sk_buff *)args->skbaddr;
return sk->sk_dport; return skb->protocol;
} }
""" """
b = BPF(text=text) b = BPF(text=text)
......
Markdown is supported
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