]> git.baikalelectronics.ru Git - kernel.git/commit
xdp: sample program for new bpf_redirect helper
authorJohn Fastabend <john.fastabend@gmail.com>
Mon, 17 Jul 2017 16:27:28 +0000 (09:27 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 17 Jul 2017 16:48:06 +0000 (09:48 -0700)
commit4496b65605a33821f2a144890100ae9cc92e30fb
tree26e3b2c3d653cbea952800e7323d7c7f8c77b8e3
parent5db98bdfe2b593c7f27c565c737f2402bacf1256
xdp: sample program for new bpf_redirect helper

This implements a sample program for testing bpf_redirect. It reports
the number of packets redirected per second and as input takes the
ifindex of the device to run the xdp program on and the ifindex of the
interface to redirect packets to.

Signed-off-by: John Fastabend <john.fastabend@gmail.com>
Tested-by: Andy Gospodarek <andy@greyhouse.net>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Jesper Dangaard Brouer <brouer@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
samples/bpf/Makefile
samples/bpf/xdp_redirect_kern.c [new file with mode: 0644]
samples/bpf/xdp_redirect_user.c [new file with mode: 0644]