bpf: add sample for xdp forwarding and rewrite
authorBrenden Blanco <bblanco@plumgrid.com>
Tue, 19 Jul 2016 19:16:57 +0000 (12:16 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 20 Jul 2016 04:46:33 +0000 (21:46 -0700)
commit764cbccef8c9cb95e869ba2bb8371c42685c934a
treef776e9a5cb46b98c4148f83a3f960022dd3c142e
parent4acf6c0b84c91243c705303cd9ff16421914150d
bpf: add sample for xdp forwarding and rewrite

Add a sample that rewrites and forwards packets out on the same
interface. Observed single core forwarding performance of ~10Mpps.

Since the mlx4 driver under test recycles every single packet page, the
perf output shows almost exclusively just the ring management and bpf
program work. Slowdowns are likely occurring due to cache misses.

Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
samples/bpf/Makefile
samples/bpf/xdp2_kern.c [new file with mode: 0644]