ethtool_mm_...e_min_to_add(9)
π 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 theaddFragSizevariable, 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 standardaddFragSizevalue 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:
enum ethtool_phys_id_state(9)struct kernel_ethtool_ringparam(9)enum ethtool_supported_ring_param(9)ethtool_rxfh_indir_default(9)struct ethtool_rxfh_context(9)ethtool_link_ksettings_zero_link_mode(9)ethtool_link_ksettings_add_link_mode(9)ethtool_link_ksettings_del_link_mode(9)ethtool_link_ksettings_test_link_mode(9)ethtool_intersect_link_masks(9)struct ethtool_phy_stats(9)struct ethtool_pause_stats(9)struct ethtool_fec_hist_range(9)struct ethtool_fec_stats(9)struct ethtool_rmon_hist_range(9)struct ethtool_rmon_stats(9)struct ethtool_ts_stats(9)struct ethtool_module_eeprom(9)struct ethtool_module_power_mode_params(9)struct ethtool_mm_state(9)struct ethtool_mm_cfg(9)struct ethtool_mm_stats(9)struct ethtool_mmsv_ops(9)struct ethtool_mmsv(9)struct ethtool_rxfh_param(9)struct ethtool_rxfh_fields(9)struct kernel_ethtool_ts_info(9)struct ethtool_ops(9)struct ethtool_netdev_state(9)struct ethtool_phy_ops(9)ethtool_set_ethtool_phy_ops(9)ethtool_params_from_link_mode(9)ethtool_get_phc_vclocks(9)ethtool_mm_frag_size_add_to_min(9)β the other direction, the remix π§ethtool_get_ts_info_by_layer(9)ethtool_sprintf(9)ethtool_puts(9)ethtool_cpy(9)
π 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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms