1 // SPDX-License-Identifier: GPL-2.0 2 3 #include <linux/bpf.h> 4 #include <bpf/bpf_helpers.h> 5 6 struct { 7 __uint(type, BPF_MAP_TYPE_CPUMAP); 8 __uint(max_entries, 1); 9 __type(key, __u32); 10 __type(value, __u32); 11 } map_cpumap SEC(".maps"); 12 13 SEC("xdp.frags") 14 int xdp_cpumap_prog_frags(struct xdp_md *ctx) 15 { 16 return bpf_redirect_map(&map_cpumap, 0, XDP_DROP); 17 } 18 19 char _license[] SEC("license") = "GPL"; 20