[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <fd96e756bae9bdbd48aee2e48c1feaed6a7dd70b.camel@mandelbit.com>
Date: Fri, 14 Nov 2025 10:33:19 +0100
From: Ralf Lici <ralf@...delbit.com>
To: Jakub Kicinski <kuba@...nel.org>, Antonio Quartulli <antonio@...nvpn.net>
Cc: netdev@...r.kernel.org, Sabrina Dubroca <sd@...asysnail.net>, Eric
Dumazet <edumazet@...gle.com>, Paolo Abeni <pabeni@...hat.com>
Subject: Re: [PATCH net-next 6/8] ovpn: consolidate crypto allocations in
one chunk
On Thu, 2025-11-13 at 18:25 -0800, Jakub Kicinski wrote:
> On Tue, 11 Nov 2025 22:47:39 +0100 Antonio Quartulli wrote:
> > + /* adds enough space for nfrags + 2 scatterlist entries */
> > + len += sizeof(struct scatterlist) * (nfrags + 2);
>
> nit: array_size() ?
ACK.
> > + return len;
> > +}
> > +
> > +/**
> > + * ovpn_aead_crypto_tmp_iv - retrieve the pointer to the IV within
> > a temporary
> > + * buffer allocated using
> > ovpn_aead_crypto_tmp_size
> > + * @aead: the AEAD cipher handle
> > + * @tmp: a pointer to the beginning of the temporary buffer
> > + *
> > + * This function retrieves a pointer to the initialization vector
> > (IV) in the
> > + * temporary buffer. If the AEAD cipher specifies an IV size, the
> > pointer is
> > + * adjusted using the AEAD's alignment mask to ensure proper
> > alignment.
> > + *
> > + * Returns: a pointer to the IV within the temporary buffer
> > + */
> > +static inline u8 *ovpn_aead_crypto_tmp_iv(struct crypto_aead *aead,
> > void *tmp)
>
> nit: does the compiler really not inline this? the long standing
> kernel
> preference is to avoid using "inline" unless it's actually making
> a different. Trivial static function will be inlined anyway.
Got it. I wasn't aware of that kernel preference and was following the
esp implementation.
Thanks.
--
Ralf Lici
Mandelbit Srl
Powered by blists - more mailing lists