[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251113182515.1b488301@kernel.org>
Date: Thu, 13 Nov 2025 18:25:15 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: 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>, Ralf Lici
<ralf@...delbit.com>
Subject: Re: [PATCH net-next 6/8] ovpn: consolidate crypto allocations in
one chunk
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() ?
> + 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.
Powered by blists - more mailing lists