0001
0002
0003 #include <linux/bpf.h>
0004 #include <bpf/bpf_helpers.h>
0005
0006 struct inner {
0007 __uint(type, BPF_MAP_TYPE_ARRAY);
0008 __type(key, __u32);
0009 __type(value, int);
0010 __uint(max_entries, 4);
0011 };
0012
0013 struct {
0014 __uint(type, BPF_MAP_TYPE_ARRAY_OF_MAPS);
0015 __uint(max_entries, 0);
0016 __type(key, __u32);
0017 __array(values, struct inner);
0018 } mim SEC(".maps");
0019
0020 SEC("xdp")
0021 int xdp_noop0(struct xdp_md *ctx)
0022 {
0023 return XDP_PASS;
0024 }
0025
0026 char _license[] SEC("license") = "GPL";