]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit652216737d970bcbd494c0b97487356ce2178dcc
treef776e9a5cb46b98c4148f83a3f960022dd3c142e
parent034bb148943dd229708bbfb4465f61c558a10b4a
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]