0001
0002 #include <linux/bpf.h>
0003 #include <bpf/bpf_helpers.h>
0004
0005 struct {
0006 __uint(type, BPF_MAP_TYPE_DEVMAP);
0007 __uint(key_size, sizeof(__u32));
0008 __uint(value_size, sizeof(struct bpf_devmap_val));
0009 __uint(max_entries, 4);
0010 } dm_ports SEC(".maps");
0011
0012
0013
0014
0015 SEC("xdp/devmap")
0016 int xdp_dummy_dm(struct xdp_md *ctx)
0017 {
0018 return XDP_PASS;
0019 }
0020
0021 SEC("xdp.frags/devmap")
0022 int xdp_dummy_dm_frags(struct xdp_md *ctx)
0023 {
0024 return XDP_PASS;
0025 }
0026
0027 char _license[] SEC("license") = "GPL";