]> git.baikalelectronics.ru Git - kernel.git/commit
samples/bpf: fixup some tools to be able to support xdp multibuffer
authorAndy Gospodarek <andrew.gospodarek@broadcom.com>
Tue, 21 Jun 2022 17:54:02 +0000 (17:54 +0000)
committerAlexei Starovoitov <ast@kernel.org>
Wed, 22 Jun 2022 01:55:53 +0000 (18:55 -0700)
commitc06798917d3044752ffb2d857f0dd6f247948f66
tree143e41d60b55851f52e38fd81f7af112db6e359c
parentc20abf628916c3dd6103f2187c34c659df1fcb19
samples/bpf: fixup some tools to be able to support xdp multibuffer

This changes the section name for the bpf program embedded in these
files to "xdp.frags" to allow the programs to be loaded on drivers that
are using an MTU greater than PAGE_SIZE.  Rather than directly accessing
the buffers, the packet data is now accessed via xdp helper functions to
provide an example for those who may need to write more complex
programs.

v2: remove new unnecessary variable

Signed-off-by: Andy Gospodarek <gospo@broadcom.com>
Acked-by: John Fastabend <john.fastabend@gmail.com>
Acked-by: Lorenzo Bianconi <lorenzo@kernel.org>
Link: https://lore.kernel.org/r/20220621175402.35327-1-gospo@broadcom.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
samples/bpf/xdp1_kern.c
samples/bpf/xdp2_kern.c
samples/bpf/xdp_tx_iptunnel_kern.c