ethtool_mm_...e_min_to_add(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… ethtool_mm_frag_size_min_to_add(9) ✨

okay so bestie, welcome to the Kernel API Manual πŸŽ€ β€” yes, the actual kernel API manual, we're reading it together, it's giving study date energy πŸ“šπŸ’–. This one's about turning a minimum fragment size in octets into the standard additional fragment size multiplier, which sounds scary but it's literally just math with a glow-up. stay with me 🫢


✨ NAME ✨

ethtool_mm_frag_size_min_to_add β€” translate a minimum fragment size expressed in octets (the absolute version) into the standard additional fragment size expressed as a multiplier. lowkey a unit conversion but make it networking πŸ’…


🌸 SYNOPSIS 🌸

int ethtool_mm_frag_size_min_to_add (u32 val_min , u32 *val_add , struct netlink_ext_ack *extack );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • val_min β€” the value of the addFragSize variable, but in octets πŸ“ (yes, this is the absolute one, the one in bytes, not the multiplier β€” keep up bestie).
  • val_add β€” a pointer to where the standard addFragSize value gets returned πŸŽ€ so the function can hand you back the multiplier through this.
  • extack β€” the netlink extended ack πŸ’Œ (the little messenger that carries the details when things go sideways).

πŸ‘‘ DESCRIPTION πŸ‘‘

So what this does, fr fr: it takes a value in octets and translates it into one of 0, 1, 2, 3 πŸ’€ β€” using the reverse application of the 802.3 formula:

64 * (1 + addFragSize) - 4

Like, you run that formula backwards and out pops the multiplier. iconic behavior honestly ✨.

🫢 who calls this? Drivers which do not support programming the minimum fragment size to a continuous range. if your driver can do the continuous thing, this ain't for you bestie.

And if you hand it some other fragment length value? It returns an error πŸ™ˆ β€” no guessing, no vibes-based fallback, just nope. periodt.


🌈 SEE ALSO 🌈

Kernel file ./include/linux/ethtool.h, plus the whole friend group πŸ‘―β€β™€οΈ β€” go say hi:


πŸ’œ mwah, that's the whole page. this lil masterpiece lives in ./include/linux, stamped October 2026, from the Kernel API Manual β€” go off, kernel docs, you ate. πŸ’…βœ¨πŸŽ€
πŸ“¦ where this page comes from