summaryrefslogtreecommitdiffstats
path: root/samples/bpf/bpf_load.h
diff options
context:
space:
mode:
authorMartin KaFai Lau <kafai@fb.com>2016-12-08 00:53:14 +0100
committerDavid S. Miller <davem@davemloft.net>2016-12-08 20:25:13 +0100
commit12d8bb64e3f65f5287ff17c084d076a28daa8096 (patch)
treee772f55d041956a3e07a487b48b42df8a0b830bf /samples/bpf/bpf_load.h
parentmlx4: xdp: Reserve headroom for receiving packet when XDP prog is active (diff)
downloadlinux-12d8bb64e3f65f5287ff17c084d076a28daa8096.tar.xz
linux-12d8bb64e3f65f5287ff17c084d076a28daa8096.zip
bpf: xdp: Add XDP example for head adjustment
The XDP prog checks if the incoming packet matches any VIP:PORT combination in the BPF hashmap. If it is, it will encapsulate the packet with a IPv4/v6 header as instructed by the value of the BPF hashmap and then XDP_TX it out. The VIP:PORT -> IP-Encap-Info can be specified by the cmd args of the user prog. Acked-by: Alexei Starovoitov <ast@kernel.org> Signed-off-by: Martin KaFai Lau <kafai@fb.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'samples/bpf/bpf_load.h')
-rw-r--r--samples/bpf/bpf_load.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/samples/bpf/bpf_load.h b/samples/bpf/bpf_load.h
index 4adeeef53ad6..fb46a421ab41 100644
--- a/samples/bpf/bpf_load.h
+++ b/samples/bpf/bpf_load.h
@@ -31,4 +31,5 @@ struct ksym {
int load_kallsyms(void);
struct ksym *ksym_search(long key);
+int set_link_xdp_fd(int ifindex, int fd);
#endif