csum_partial(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– NAME πŸ’–

okay bestie, welcome to csum_partial(9) β€” that's the page, and we're chilling in the Kernel API Manual. This one is literally about computing an internet checksum. no cap ✨


πŸŽ€ SYNOPSIS πŸŽ€

__wsum csum_partial (const void *buff , int len , __wsum sum );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • buff β€” the buffer to be checksummed. yes, this is the thing getting the checksum treatment πŸ’…
  • len β€” length of buffer.
  • sum β€” the initial sum to be added in (32bit unfolded). it comes preloaded, bestie 🫢

πŸ”₯ RETURN πŸ”₯

You get back the 32bit unfolded internet checksum of the buffer. Quick heads-up though: before filling it in, it needs to be csum_fold'ed β€” that step is mandatory, not a vibe 😭

Also, buff should be aligned to a 64bit boundary if possible. alignment is kinda giving main character energy here πŸ‘‘


🌈 SEE ALSO 🌈

go read these too, iykyk πŸ«ΆπŸ’œ


source/version: ./arch/x86/include/asm β€” dated October 2026 β€” catch you later bestie, stay folded πŸ’…πŸŽ€

πŸ“¦ where this page comes from