]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit54991b801b1de1059547ef9cdc09391fe4af4e2e
tree2bab4dd9bff8b85508549c97886d92d82d7c22e1
parent38fdec85744781e2139f750649bf2b73b56dad12
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