diff options
author | Lorenzo Bianconi <lorenzo@kernel.org> | 2022-01-21 11:10:03 +0100 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2022-01-21 14:14:03 -0800 |
commit | 3f364222d032eea6b245780e845ad213dab28cdd (patch) | |
tree | d09bf6e5b92aec469bf956ae2451ce005394519d /kernel/relay.c | |
parent | f45d5b6ce2e835834c94b8b700787984f02cd662 (diff) | |
download | linux-3f364222d032eea6b245780e845ad213dab28cdd.tar.gz linux-3f364222d032eea6b245780e845ad213dab28cdd.tar.bz2 linux-3f364222d032eea6b245780e845ad213dab28cdd.zip |
net: xdp: introduce bpf_xdp_pointer utility routine
Similar to skb_header_pointer, introduce bpf_xdp_pointer utility routine
to return a pointer to a given position in the xdp_buff if the requested
area (offset + len) is contained in a contiguous memory area otherwise it
will be copied in a bounce buffer provided by the caller.
Similar to the tc counterpart, introduce the two following xdp helpers:
- bpf_xdp_load_bytes
- bpf_xdp_store_bytes
Reviewed-by: Eelco Chaudron <echaudro@redhat.com>
Acked-by: Toke Hoiland-Jorgensen <toke@redhat.com>
Acked-by: John Fastabend <john.fastabend@gmail.com>
Acked-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Link: https://lore.kernel.org/r/ab285c1efdd5b7a9d361348b1e7d3ef49f6382b3.1642758637.git.lorenzo@kernel.org
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'kernel/relay.c')
0 files changed, 0 insertions, 0 deletions