1 // SPDX-License-Identifier: GPL-2.0
3 #include <bpf/bpf_helpers.h>
6 __uint(type, BPF_MAP_TYPE_DEVMAP);
7 __uint(key_size, sizeof(__u32));
8 __uint(value_size, sizeof(struct bpf_devmap_val));
9 __uint(max_entries, 4);
10 } dm_ports SEC(".maps");
12 /* valid program on DEVMAP entry via SEC name;
13 * has access to egress and ingress ifindex
16 int xdp_dummy_dm(struct xdp_md *ctx)
21 SEC("xdp.frags/devmap")
22 int xdp_dummy_dm_frags(struct xdp_md *ctx)
27 char _license[] SEC("license") = "GPL";