diff options
author | Andy Gospodarek <andrew.gospodarek@broadcom.com> | 2022-06-21 20:54:02 +0300 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2022-06-22 04:55:53 +0300 |
commit | 772251742262bd651529a3cea3ee756b71e95a29 (patch) | |
tree | 143e41d60b55851f52e38fd81f7af112db6e359c /samples/bpf/xdp_tx_iptunnel_kern.c | |
parent | d4609a5d8c70d21b4a3f801cf896a3c16c613fe1 (diff) | |
download | linux-772251742262bd651529a3cea3ee756b71e95a29.tar.xz |
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>
Diffstat (limited to 'samples/bpf/xdp_tx_iptunnel_kern.c')
-rw-r--r-- | samples/bpf/xdp_tx_iptunnel_kern.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/samples/bpf/xdp_tx_iptunnel_kern.c b/samples/bpf/xdp_tx_iptunnel_kern.c index 575d57e4b8d6..0e2bca3a3fff 100644 --- a/samples/bpf/xdp_tx_iptunnel_kern.c +++ b/samples/bpf/xdp_tx_iptunnel_kern.c @@ -212,7 +212,7 @@ static __always_inline int handle_ipv6(struct xdp_md *xdp) return XDP_TX; } -SEC("xdp_tx_iptunnel") +SEC("xdp.frags") int _xdp_tx_iptunnel(struct xdp_md *xdp) { void *data_end = (void *)(long)xdp->data_end; |