]> Git Repo - linux.git/blob - tools/testing/selftests/bpf/progs/test_xdp_with_devmap_frags_helpers.c
Linux 6.14-rc3
[linux.git] / tools / testing / selftests / bpf / progs / test_xdp_with_devmap_frags_helpers.c
1 // SPDX-License-Identifier: GPL-2.0
2 #include <linux/bpf.h>
3 #include <bpf/bpf_helpers.h>
4
5 struct {
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");
11
12 /* valid program on DEVMAP entry via SEC name;
13  * has access to egress and ingress ifindex
14  */
15 SEC("xdp/devmap")
16 int xdp_dummy_dm(struct xdp_md *ctx)
17 {
18         return XDP_PASS;
19 }
20
21 SEC("xdp.frags/devmap")
22 int xdp_dummy_dm_frags(struct xdp_md *ctx)
23 {
24         return XDP_PASS;
25 }
26
27 char _license[] SEC("license") = "GPL";
This page took 0.035617 seconds and 4 git commands to generate.