ovpn_aead_crypto_tmp_size(9)
π ovpn_aead_crypto_tmp_size(9) π
okay bestie, so this one is from the Kernel API Manual β it's ovpn_aead_crypto_tmp_size(9) and she's here to do exactly one (1) job: math. sit down, hydrate, let's go π«Ά
β¨ NAME β¨
ovpn_aead_crypto_tmp_size β literally just computes the size of a temporary object that holds an AEAD request structure, plus the extra space for SG and IV. that's it, that's the whole gig π
πΈ SYNOPSIS πΈ
unsigned int ovpn_aead_crypto_tmp_size (struct crypto_aead *tfm , const
unsigned int nfrags );
π ARGUMENTS π
tfmβ the AEAD cipher handle. yes, the whole cipher vibe, she's the one you're asking about π₯nfragsβ the number of fragments in the skb. count 'em, bestie π§
π¦ DESCRIPTION π¦
so this function does the math on the size of a contiguous memory block, and that block is packing three things: the initialization vector (IV), the AEAD request, and an array of scatterlist entries. it's giving "everything in one place" energy β¨
now β alignment. because alignment is that girl π the IV goes first, then the request, then the scatterlist. and there's additional alignment applied according to the requirements of the underlying structures. so yeah, it's not just "add the sizes up," there's structure-requirement alignment in the mix, lowkey important, highkey cute πΈ
π RETURN π
- the size of the temporary memory that needs to be allocated. that's the number, go allocate it, slay π
π SEE ALSO π
Kernel file ./drivers/net/ovpn/crypto_aead.c β and the squad:
ngl, double-check that return value before you kmalloc, bestie. size math is not the moment to be guessing π
aaaand that's the page!! π brought to you from ./drivers/net/ovpn, dated October 2026 β catch you in the next one, mwah πβ¨π¦
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms