idpf_size_to_txd_count(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… idpf_size_to_txd_count β€” the Kernel API Manual, bestie edition ✨

Okay so real talk, this one's a tiny little helper living in the kernel API manual (that's the (9) part, iykyk), and it's literally just here to do math for you. Let's get into it 🫢


✨ NAME ✨

idpf_size_to_txd_count β€” get the number of descriptors you need for a large Tx frag πŸŽ€


🌸 SYNOPSIS 🌸

u32 idpf_size_to_txd_count (unsigned int size );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • size β€” the transmit request size, in bytes. that's it. that's the whole input πŸ’–

πŸ’œ DESCRIPTION πŸ’œ

So here's the vibe: when you've got a large frag on your hands β€” and by large we mean >= 16K β€” it has to get split across multiple descriptors. No cap, one descriptor can't hold it all.

Because of that, the function has to assume the worst case: no more than 12K of data per descriptor. Why so stingy? Hardware alignment restrictions, babes β€” specifically 4K alignment πŸ”₯

So yeah, it's giving "how many descriptors do I need" energy, and it's doing the math with that 12K-per-descriptor assumption baked in. Iconic, honestly.


πŸ‘‘ SEE ALSO πŸ‘‘

Kernel file ./drivers/net/ethernet/intel/idpf/idpf_txrx.h, plus the whole friend group:


And that's the whole page, bestie!! 🌈 Sourced straight from ./drivers/net/ethernet/intel/idpf, dated October 2026 β€” mwah, go forth and count your descriptors πŸ’…πŸ’–

πŸ“¦ where this page comes from