]> 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)
commite8bd6891a91303b04949035e3cb482a62239ca85
treef776e9a5cb46b98c4148f83a3f960022dd3c142e
parenta7d9fcad986cebca924290a590bcd63e9b266e26
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]