[<prev] [next>] [day] [month] [year] [list]
Message-ID: <DM4PR11MB6455F02DDCD8FB0084D10BA49800A@DM4PR11MB6455.namprd11.prod.outlook.com>
Date: Thu, 4 Sep 2025 16:44:55 +0000
From: "R, Ramu" <ramu.r@...el.com>
To: "intel-wired-lan@...ts.osuosl.org" <intel-wired-lan@...ts.osuosl.org>
CC: "Lobakin, Aleksander" <aleksander.lobakin@...el.com>, "Kubiak, Michal"
<michal.kubiak@...el.com>, "Fijalkowski, Maciej"
<maciej.fijalkowski@...el.com>, "Nguyen, Anthony L"
<anthony.l.nguyen@...el.com>, "Kitszel, Przemyslaw"
<przemyslaw.kitszel@...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>, "Alexei
Starovoitov" <ast@...nel.org>, Daniel Borkmann <daniel@...earbox.net>, "Simon
Horman" <horms@...nel.org>, NXNE CNSE OSDT ITP Upstreaming
<nxne.cnse.osdt.itp.upstreaming@...el.com>, "bpf@...r.kernel.org"
<bpf@...r.kernel.org>, "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [Intel-wired-lan] [PATCH iwl-next v5 01/13] xdp, libeth: make the
xdp_init_buff() micro-optimization generic
> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@...osl.org> On Behalf Of
> Alexander Lobakin
> Sent: Tuesday, August 26, 2025 9:25 PM
> To: intel-wired-lan@...ts.osuosl.org
> Cc: Lobakin, Aleksander <aleksander.lobakin@...el.com>; Kubiak, Michal
> <michal.kubiak@...el.com>; Fijalkowski, Maciej
> <maciej.fijalkowski@...el.com>; Nguyen, Anthony L
> <anthony.l.nguyen@...el.com>; Kitszel, Przemyslaw
> <przemyslaw.kitszel@...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>; Alexei Starovoitov <ast@...nel.org>; Daniel
> Borkmann <daniel@...earbox.net>; Simon Horman <horms@...nel.org>;
> NXNE CNSE OSDT ITP Upstreaming
> <nxne.cnse.osdt.itp.upstreaming@...el.com>; bpf@...r.kernel.org;
> netdev@...r.kernel.org; linux-kernel@...r.kernel.org
> Subject: [Intel-wired-lan] [PATCH iwl-next v5 01/13] xdp, libeth: make the
> xdp_init_buff() micro-optimization generic
>
> Often times the compilers are not able to expand two consecutive 32-bit
> writes into one 64-bit on the corresponding architectures. This applies to
> xdp_init_buff() called for every received frame (or at least once per each 64
> frames when the frag size is fixed).
> Move the not-so-pretty hack from libeth_xdp straight to xdp_init_buff(), but
> using a proper union around ::frame_sz and ::flags.
> The optimization is limited to LE architectures due to the structure layout.
>
> One simple example from idpf with the XDP series applied (Clang 22-git,
> CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE => -O2):
>
> add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-27 (-27)
> Function old new delta
> idpf_vport_splitq_napi_poll 5076 5049 -27
>
> The perf difference with XDP_DROP is around +0.8-1% which I see as more
> than satisfying.
>
> Suggested-by: Simon Horman <horms@...nel.org>
> Signed-off-by: Alexander Lobakin <aleksander.lobakin@...el.com>
> ---
> include/net/libeth/xdp.h | 11 +----------
> include/net/xdp.h | 28 +++++++++++++++++++++++++---
> 2 files changed, 26 insertions(+), 13 deletions(-)
>
Tested-by: R,Ramu <ramu.r@...el.com>
Powered by blists - more mailing lists