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)
commit832622e6bd1884c95475094941914969ff82b329
tree26e3b2c3d653cbea952800e7323d7c7f8c77b8e3
parent814abfabef3ceed390c10d06a0cc69a86454b6cf
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]