1 // SPDX-License-Identifier: GPL-2.0
2 /* Copyright (c) 2020 Facebook */
5 #include <bpf/bpf_tracing.h>
6 #include <bpf/bpf_helpers.h>
9 __uint(type, BPF_MAP_TYPE_SK_STORAGE);
10 __uint(map_flags, BPF_F_NO_PREALLOC);
13 } sk_stg_map SEC(".maps");
15 SEC("fentry/bpf_sk_storage_free")
16 int BPF_PROG(trace_bpf_sk_storage_free, struct sock *sk)
20 value = bpf_sk_storage_get(&sk_stg_map, sk, 0,
21 BPF_SK_STORAGE_GET_F_CREATE);
29 char _license[] SEC("license") = "GPL";