diff options
author | Jesper Dangaard Brouer <brouer@redhat.com> | 2020-05-14 12:49:02 +0200 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2020-05-14 21:21:54 -0700 |
commit | f95f0f95cfb7f180ed7571d4915432d5098df7ec (patch) | |
tree | 4d2360c5f6375836ac272346e1a31de48aa55ddd /init/noinitramfs.c | |
parent | d00f26b623333f2419f4c3b95ff11c8b1bb96f56 (diff) |
xdp: Add frame size to xdp_buff
XDP have evolved to support several frame sizes, but xdp_buff was not
updated with this information. The frame size (frame_sz) member of
xdp_buff is introduced to know the real size of the memory the frame is
delivered in.
When introducing this also make it clear that some tailroom is
reserved/required when creating SKBs using build_skb().
It would also have been an option to introduce a pointer to
data_hard_end (with reserved offset). The advantage with frame_sz is
that (like rxq) drivers only need to setup/assign this value once per
NAPI cycle. Due to XDP-generic (and some drivers) it's not possible to
store frame_sz inside xdp_rxq_info, because it's varies per packet as it
can be based/depend on packet length.
V2: nitpick: deduct -> deduce
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Toke Høiland-Jørgensen <toke@redhat.com>
Link: https://lore.kernel.org/bpf/158945334261.97035.555255657490688547.stgit@firesoul
Diffstat (limited to 'init/noinitramfs.c')
0 files changed, 0 insertions, 0 deletions