linux/tools/testing/selftests/bpf/progs/test_trace_ext_tracing.c
<<
>>
Prefs
   1// SPDX-License-Identifier: GPL-2.0
   2
   3#include "vmlinux.h"
   4#include <bpf/bpf_helpers.h>
   5#include <bpf/bpf_tracing.h>
   6
   7__u64 fentry_called = 0;
   8
   9SEC("fentry/test_pkt_md_access_new")
  10int BPF_PROG(fentry, struct sk_buff *skb)
  11{
  12        fentry_called = skb->len;
  13        return 0;
  14}
  15
  16__u64 fexit_called = 0;
  17
  18SEC("fexit/test_pkt_md_access_new")
  19int BPF_PROG(fexit, struct sk_buff *skb)
  20{
  21        fexit_called = skb->len;
  22        return 0;
  23}
  24
  25char _license[] SEC("license") = "GPL";
  26