[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ec7bde1d-3d0e-b43c-b4dd-667106ef4cf9@gmail.com>
Date: Sat, 25 Apr 2020 12:10:01 +0900
From: Toshiaki Makita <toshiaki.makita1@...il.com>
To: Jesper Dangaard Brouer <brouer@...hat.com>
Cc: sameehj@...zon.com, Lorenzo Bianconi <lorenzo@...nel.org>,
netdev@...r.kernel.org, bpf@...r.kernel.org, zorik@...zon.com,
akiyano@...zon.com, gtzalik@...zon.com,
Toke Høiland-Jørgensen <toke@...hat.com>,
Daniel Borkmann <borkmann@...earbox.net>,
Alexei Starovoitov <alexei.starovoitov@...il.com>,
John Fastabend <john.fastabend@...il.com>,
Alexander Duyck <alexander.duyck@...il.com>,
Jeff Kirsher <jeffrey.t.kirsher@...el.com>,
David Ahern <dsahern@...il.com>,
Willem de Bruijn <willemdebruijn.kernel@...il.com>,
Ilias Apalodimas <ilias.apalodimas@...aro.org>,
Saeed Mahameed <saeedm@...lanox.com>,
steffen.klassert@...unet.com
Subject: Re: [PATCH net-next 10/33] veth: xdp using frame_sz in veth driver
On 2020/04/23 1:08, Jesper Dangaard Brouer wrote:
> 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.
>
> Cc: Toshiaki Makita <toshiaki.makita1@...il.com>
> Reviewed-by: Lorenzo Bianconi <lorenzo@...nel.org>
> Signed-off-by: Jesper Dangaard Brouer <brouer@...hat.com>
Acked-by: Toshiaki Makita <toshiaki.makita1@...il.com>
Powered by blists - more mailing lists