__iavf_chk_linearize(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– __iavf_chk_linearize β€” the kernel API manual, but make it make sense πŸ’–

okay bestie, welcome to the __iavf_chk_linearize(9) page from the Kernel API Manual ✨ this is the little helper that checks if there are more than 8 buffers per packet, and honestly it's giving "tiny function, huge responsibility" energy πŸ‘‘


✨ NAME ✨

__iavf_chk_linearize β€” check if there are more than 8 buffers per packet πŸŽ€


🌸 SYNOPSIS 🌸

bool __iavf_chk_linearize (struct sk_buff *skb );

like literally that's it, that's the whole call ✨


πŸ¦‹ ARGUMENTS πŸ¦‹

  • skb β€” the send buffer πŸ’Œ (yes that's the whole description, she's a woman of few words and we respect it)

πŸ’… NOTE πŸ’… (read this one, i'm begging)

okay so here's the tea, and it's important πŸ«–

Our HW can't DMA more than 8 buffers to build a packet on the wire, so we need to figure out the cases where we need to linearize the skb. no cap. 8 buffers max, that's the whole vibe check. 😭

For TSO we need to count the TSO header and segment payload separately. As such we need to check cases where we have 7 fragments or more, because we can potentially require 9 DMA transactions:

  1. 1 for the TSO header πŸŽ€
  2. 1 for the segment payload in the first descriptor πŸŽ€
  3. another 7 for the fragments πŸ’€

so yeah, 7 fragments + the header + the payload = we already blew past 8 and it's not even close, hence this function existing. the math is mathing ✨


πŸ‘‘ SEE ALSO πŸ‘‘

the kernel file, bestie β€” go read the source if you want the full lore πŸ“–

  • ./drivers/net/ethernet/intel/iavf/iavf_txrx.c

and the whole friend group πŸ’œ:


reminder bestie: the hardware cap is real, and the 7-fragments threshold is real, don't come for me, come for the DMA engine πŸ’€

okay that's the page!! this one came from ./drivers/net/ethernet/intel/iavf, dated October 2026, and it's signed __iavf_chk_linearize(9) β€” slay, go linearize responsibly πŸ§šπŸ’–πŸŒΈ

πŸ“¦ where this page comes from