[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <57948250-bfbe-4d36-909a-987458374423@redhat.com>
Date: Fri, 6 Feb 2026 10:37:51 +0100
From: Paolo Abeni <pabeni@...hat.com>
To: Florian Westphal <fw@...len.de>
Cc: netdev@...r.kernel.org, Steffen Klassert <steffen.klassert@...unet.com>,
Herbert Xu <herbert@...dor.apana.org.au>,
"David S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Simon Horman <horms@...nel.org>
Subject: Re: [RFC PATCH] xfrm: reduce struct sec_path size
On 2/6/26 1:11 AM, Florian Westphal wrote:
> Paolo Abeni <pabeni@...hat.com> wrote:
>> The mentioned struct has an hole and uses unnecessary wide type to
>> store a MAC length.
>
> Good catch.
>
>> struct sec_path {
>> int len;
>> int olen;
>> struct xfrm_offload ovec[1];
>> int verified_cnt;
>
> Why not s/int/u8/ while at it?
>
>> struct xfrm_state * xvec[6];
>
> len is xvec, olen is the offload length which can only be 0 or 1 at this time.
I did not look closely at the other fields semantic, other than
`orig_mac_len`, because just the latter looked an low hanging fruit to me.
Thanks for the insight, that will save an additional 8 bytes! Which in
turn is IMHO very nice because it will keep skb_extension size inside
the 3 cacheline boundary even with all extensions enabled.
I'm trying to understand why XFRM_MAX_OFFLOAD_DEPTH is 6 exactly, but
it's not obvious to me skimming over the code.
/P
Powered by blists - more mailing lists