samples/bpf: Add example of ipv4 and ipv6 forwarding in XDP
authorDavid Ahern <dsahern@gmail.com>
Thu, 10 May 2018 03:34:27 +0000 (20:34 -0700)
committerDaniel Borkmann <daniel@iogearbox.net>
Thu, 10 May 2018 22:10:57 +0000 (00:10 +0200)
commitfe616055f78457a0b78e0d3693d1ae26f2d7dab3
tree2bab4dd9bff8b85508549c97886d92d82d7c22e1
parent87f5fc7e48dd3175b30dd03b41564e1a8e136323
samples/bpf: Add example of ipv4 and ipv6 forwarding in XDP

Simple example of fast-path forwarding. It has a serious flaw
in not verifying the egress device index supports XDP forwarding.
If the egress device does not packets are dropped.

Take this only as a simple example of fast-path forwarding.

Signed-off-by: David Ahern <dsahern@gmail.com>
Acked-by: David S. Miller <davem@davemloft.net>
Acked-by: Jesper Dangaard Brouer <brouer@redhat.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
samples/bpf/Makefile
samples/bpf/xdp_fwd_kern.c [new file with mode: 0644]
samples/bpf/xdp_fwd_user.c [new file with mode: 0644]
tools/testing/selftests/bpf/bpf_helpers.h