ovpn_aead_crypto_tmp_size(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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