You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add kfunc, bpf_xdp_pull_data(), to support pulling data from xdp
fragments for direct packet access. Similar to bpf_skb_pull_data(),
bpf_xdp_pull_data() makes the first len bytes of data directly readable
and writable in bpf programs. If len is larger than the linear data
size, data in fragments will be copied to the linear region when there
is still space available, which is subject to driver implementation.
A use case of the kfunc is to decapsulate headers residing in xdp
fragments. It is possible for a NIC driver to place headers in xdp
fragments. To keep using direct packet access for parsing and
decapsulating headers, users can pull the header into linear data area
by calling bpf_xdp_pull_data() and then use bpf_xdp_adjust_head() to pop
the header.
An unused argument, flags is reserved for future extension (e.g.,
tossing the data instead of copying it to the linear data area).
Signed-off-by: Amery Hung <[email protected]>
0 commit comments