diff options
author | 2020-05-14 12:51:25 +0200 | |
---|---|---|
committer | 2020-05-14 21:21:56 -0700 | |
commit | c8741e2bfe872425ea6f10bb6f7dc1d67bc60c3a (patch) | |
tree | f03ab9412cde9c6a8076e9f1b83e6fe1aae17058 /include/uapi/linux/bpf.h | |
parent | mlx5: Rx queue setup time determine frame_sz for XDP (diff) | |
download | wireguard-linux-c8741e2bfe872425ea6f10bb6f7dc1d67bc60c3a.tar.xz wireguard-linux-c8741e2bfe872425ea6f10bb6f7dc1d67bc60c3a.zip |
xdp: Allow bpf_xdp_adjust_tail() to grow packet size
Finally, after all drivers have a frame size, allow BPF-helper
bpf_xdp_adjust_tail() to grow or extend packet size at frame tail.
Remember that helper/macro xdp_data_hard_end have reserved some
tailroom. Thus, this helper makes sure that the BPF-prog don't have
access to this tailroom area.
V2: Remove one chicken check and use WARN_ONCE for other
Signed-off-by: Jesper Dangaard Brouer <[email protected]>
Signed-off-by: Alexei Starovoitov <[email protected]>
Link: https://lore.kernel.org/bpf/158945348530.97035.12577148209134239291.stgit@firesoul
Diffstat (limited to 'include/uapi/linux/bpf.h')
-rw-r--r-- | include/uapi/linux/bpf.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h index 32cbf36c7729..b9b8a0f63b91 100644 --- a/include/uapi/linux/bpf.h +++ b/include/uapi/linux/bpf.h @@ -2015,8 +2015,8 @@ union bpf_attr { * int bpf_xdp_adjust_tail(struct xdp_buff *xdp_md, int delta) * Description * Adjust (move) *xdp_md*\ **->data_end** by *delta* bytes. It is - * only possible to shrink the packet as of this writing, - * therefore *delta* must be a negative integer. + * possible to both shrink and grow the packet tail. + * Shrink done via *delta* being a negative integer. * * A call to this helper is susceptible to change the underlying * packet buffer. Therefore, at load time, all checks on pointers |