History

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

Jesper Dangaard Brouer committed 6 years ago

Commit c8741e21 parent d628ee42 files · +11 −4Browse files

Showing the changes to include/uapi/linux (1 of 2 files). Show all

Unified · Split

include/uapi/linux/bpf.h+2−2
@@ -2015,8 +2015,8 @@ union bpf_attr { · 2014 unmodified lines
20152015 * int bpf_xdp_adjust_tail(struct xdp_buff *xdp_md, int delta)
20162016 * Description
20172017 * Adjust (move) *xdp_md*\ **->data_end** by *delta* bytes. It is
2018− * only possible to shrink the packet as of this writing,
2019− * therefore *delta* must be a negative integer.
2018+ * possible to both shrink and grow the packet tail.
2019+ * Shrink done via *delta* being a negative integer.
20202020 *
20212021 * A call to this helper is susceptible to change the underlying
20222022 * packet buffer. Therefore, at load time, all checks on pointers