1 // SPDX-License-Identifier: GPL-2.0
3 #include <bpf/bpf_helpers.h>
6 __uint(type, BPF_MAP_TYPE_CPUMAP);
8 __type(value, struct bpf_cpumap_val);
9 __uint(max_entries, 1);
10 } cpu_map SEC(".maps");
13 int xdp_drop_prog(struct xdp_md *ctx)
19 int xdp_cpumap_prog(struct xdp_md *ctx)
21 return bpf_redirect_map(&cpu_map, 0, XDP_PASS);
24 char _license[] SEC("license") = "GPL";