1 // SPDX-License-Identifier: GPL-2.0
2 /* Copyright (c) 2021 Facebook */
5 #include <bpf/bpf_helpers.h>
6 #include <bpf/bpf_tracing.h>
8 char _license[] SEC("license") = "GPL";
11 __uint(type, BPF_MAP_TYPE_HASH);
12 __uint(max_entries, 1);
18 __uint(type, BPF_MAP_TYPE_HASH);
19 __uint(max_entries, 1);
27 SEC("fentry/htab_map_delete_elem")
28 int BPF_PROG(on_delete, struct bpf_map *map)
32 if (map == (void *)&hash1) {
36 if (map == (void *)&hash2) {
38 bpf_map_delete_elem(&hash2, &key);