aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/net/xdp.h
diff options
context:
space:
mode:
authorJesper Dangaard Brouer <brouer@redhat.com>2020-05-14 12:49:28 +0200
committerAlexei Starovoitov <ast@kernel.org>2020-05-14 21:21:54 -0700
commita075767bbdc659066b89be282c8377fa880e9dc4 (patch)
tree9b7b752af8904ab5f8e2c67591cca1e7f571bc70 /include/net/xdp.h
parentnet: netsec: Add support for XDP frame size (diff)
downloadwireguard-linux-a075767bbdc659066b89be282c8377fa880e9dc4.tar.xz
wireguard-linux-a075767bbdc659066b89be282c8377fa880e9dc4.zip
net: XDP-generic determining XDP frame size
The SKB "head" pointer points to the data area that contains skb_shared_info, that can be found via skb_end_pointer(). Given xdp->data_hard_start have been established (basically pointing to skb->head), frame size is between skb_end_pointer() and data_hard_start, plus the size reserved to skb_shared_info. Change the bpf_xdp_adjust_tail offset adjust of skb->len, to be a positive offset number on grow, and negative number on shrink. As this seems more natural when reading the code. 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/158945336804.97035.7164852191163722056.stgit@firesoul
Diffstat (limited to 'include/net/xdp.h')
0 files changed, 0 insertions, 0 deletions