Subject: Re: [PATCH net-next 6/8] ovpn: consolidate crypto allocations in one chunk

From: Jakub Kicinski <[email-masked]>
Date: Thu, 13 Nov 2025 18:25:15 -0800

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.