[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <02e50ac3-a1cc-4c29-aafb-e36f28b51eaa@intel.com>
Date: Mon, 4 Nov 2024 15:39:09 +0100
From: Alexander Lobakin <aleksander.lobakin@...el.com>
To: Toke Høiland-Jørgensen <toke@...hat.com>
CC: "David S. Miller" <davem@...emloft.net>, Eric Dumazet
<edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>, Paolo Abeni
<pabeni@...hat.com>, Alexei Starovoitov <ast@...nel.org>, Daniel Borkmann
<daniel@...earbox.net>, John Fastabend <john.fastabend@...il.com>, "Andrii
Nakryiko" <andrii@...nel.org>, Maciej Fijalkowski
<maciej.fijalkowski@...el.com>, Stanislav Fomichev <sdf@...ichev.me>, "Magnus
Karlsson" <magnus.karlsson@...el.com>,
<nex.sw.ncis.osdt.itp.upstreaming@...el.com>, <bpf@...r.kernel.org>,
<netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH net-next v3 12/18] xdp: add generic
xdp_build_skb_from_buff()
From: Toke Høiland-Jørgensen <toke@...hat.com>
Date: Fri, 01 Nov 2024 14:18:04 +0100
> Alexander Lobakin <aleksander.lobakin@...el.com> writes:
>
>> The code which builds an skb from an &xdp_buff keeps multiplying itself
>> around the drivers with almost no changes. Let's try to stop that by
>> adding a generic function.
>> There's __xdp_build_skb_from_frame() already, so just convert it to take
>> &xdp_buff instead, while making the original one a wrapper.
>
> This does not seem to be what the patch actually does? :)
Good catch. Initially, I wanted the common function to take &xdp_buff,
so that frame -> skb conversion would convert frame to a buff and then
call it.
But there were some functional differences and also +56 bytes on the
stack, so I ended up just introducing a standalone function w/o changing
any existing ones.
>
> -Toke
Thanks,
Olek
Powered by blists - more mailing lists