diff options
author | Jesper Dangaard Brouer <brouer@redhat.com> | 2020-05-14 12:49:48 +0200 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2020-05-14 21:21:54 -0700 |
commit | 45a9e6d8a687e6a0ea6c2f78f15955ae96be4720 (patch) | |
tree | 38f75f66fdcbb8de6e0605cc447ee31dc589787a /drivers/net/ethernet/freescale | |
parent | 5c8572251fabc5bb49fd623c064e95a9daf6a3e3 (diff) | |
download | linux-45a9e6d8a687e6a0ea6c2f78f15955ae96be4720.tar.bz2 |
veth: Xdp using frame_sz in veth driver
The veth driver can run XDP in "native" mode in it's own NAPI
handler, and since commit 9fc8d518d9d5 ("veth: Handle xdp_frames in
xdp napi ring") packets can come in two forms either xdp_frame or
skb, calling respectively veth_xdp_rcv_one() or veth_xdp_rcv_skb().
For packets to arrive in xdp_frame format, they will have been
redirected from an XDP native driver. In case of XDP_PASS or no
XDP-prog attached, the veth driver will allocate and create an SKB.
The current code in veth_xdp_rcv_one() xdp_frame case, had to guess
the frame truesize of the incoming xdp_frame, when using
veth_build_skb(). With xdp_frame->frame_sz this is not longer
necessary.
Calculating the frame_sz in veth_xdp_rcv_skb() skb case, is done
similar to the XDP-generic handling code in net/core/dev.c.
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Reviewed-by: Lorenzo Bianconi <lorenzo@kernel.org>
Acked-by: Toke Høiland-Jørgensen <toke@redhat.com>
Acked-by: Toshiaki Makita <toshiaki.makita1@gmail.com>
Link: https://lore.kernel.org/bpf/158945338840.97035.935897116345700902.stgit@firesoul
Diffstat (limited to 'drivers/net/ethernet/freescale')
0 files changed, 0 insertions, 0 deletions