[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87a5bpob4h.fsf@toke.dk>
Date: Fri, 17 Jan 2025 13:53:02 +0100
From: Toke Høiland-Jørgensen <toke@...hat.com>
To: Alexander Lobakin <aleksander.lobakin@...el.com>, Andrew Lunn
<andrew+netdev@...n.ch>, "David S. Miller" <davem@...emloft.net>, Eric
Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>, Paolo
Abeni <pabeni@...hat.com>
Cc: Alexander Lobakin <aleksander.lobakin@...el.com>, Lorenzo Bianconi
<lorenzo@...nel.org>, Daniel Xu <dxu@...uu.xyz>, Alexei Starovoitov
<ast@...nel.org>, Daniel Borkmann <daniel@...earbox.net>, Andrii Nakryiko
<andrii@...nel.org>, John Fastabend <john.fastabend@...il.com>, Jesper
Dangaard Brouer <hawk@...nel.org>, Martin KaFai Lau
<martin.lau@...ux.dev>, netdev@...r.kernel.org, bpf@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next v3 4/8] bpf: cpumap: reuse skb array instead of
a linked list to chain skbs
Alexander Lobakin <aleksander.lobakin@...el.com> writes:
> cpumap still uses linked lists to store a list of skbs to pass to the
> stack. Now that we don't use listified Rx in favor of
> napi_gro_receive(), linked list is now an unneeded overhead.
> Inside the polling loop, we already have an array of skbs. Let's reuse
> it for skbs passed to cpumap (generic XDP) and keep there in case of
> XDP_PASS when a program is installed to the map itself. Don't list
> regular xdp_frames after converting them to skbs as well; store them
> in the mentioned array (but *before* generic skbs as the latters have
> lower priority) and call gro_receive_skb() for each array element after
> they're done.
>
> Signed-off-by: Alexander Lobakin <aleksander.lobakin@...el.com>
> Tested-by: Daniel Xu <dxu@...uu.xyz>
Clever approach. A little hard to follow all the memmoves, but I think
it checks out given the description above :)
Reviewed-by: Toke Høiland-Jørgensen <toke@...hat.com>
Powered by blists - more mailing lists