STRUCT ETHTOOL_COALESCE(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ‘‘ struct ethtool_coalesce(9) πŸ‘‘

okay bestie so this is a page straight out of the Kernel API Manual, and it's all about struct ethtool_coalesce β€” the struct that holds your coalescing parameters for IRQs and stats updates ✨ like it's literally the vibe-control panel for how often your NIC decides to interrupt the CPU. Obsessed.


🌸 NAME 🌸

struct ethtool_coalesce β€” coalescing parameters for IRQs and stats updates πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

struct ethtool_coalesce {
    __u32 cmd;
    __u32 rx_coalesce_usecs;
    __u32 rx_max_coalesced_frames;
    __u32 rx_coalesce_usecs_irq;
    __u32 rx_max_coalesced_frames_irq;
    __u32 tx_coalesce_usecs;
    __u32 tx_max_coalesced_frames;
    __u32 tx_coalesce_usecs_irq;
    __u32 tx_max_coalesced_frames_irq;
    __u32 stats_block_coalesce_usecs;
    __u32 use_adaptive_rx_coalesce;
    __u32 use_adaptive_tx_coalesce;
    __u32 pkt_rate_low;
    __u32 rx_coalesce_usecs_low;
    __u32 rx_max_coalesced_frames_low;
    __u32 tx_coalesce_usecs_low;
    __u32 tx_max_coalesced_frames_low;
    __u32 pkt_rate_high;
    __u32 rx_coalesce_usecs_high;
    __u32 rx_max_coalesced_frames_high;
    __u32 tx_coalesce_usecs_high;
    __u32 tx_max_coalesced_frames_high;
    __u32 rate_sample_interval;
 };

that's the whole squad, no cap 🫢


πŸ¦‹ Members πŸ¦‹

okay so let's meet the team, one by one πŸ’–

  • cmd β€” ETHTOOL_{G,S}COALESCE ✨
  • rx_coalesce_usecs β€” how many usecs to delay an RX interrupt after a packet arrives ⏳
  • rx_max_coalesced_frames β€” the maximum number of packets to receive before an RX interrupt πŸ”₯
  • rx_coalesce_usecs_irq β€” same as rx_coalesce_usecs, except this value applies while an IRQ is being serviced by the host 🧚
  • rx_max_coalesced_frames_irq β€” same as rx_max_coalesced_frames, except this value applies while an IRQ is being serviced by the host 🧚
  • tx_coalesce_usecs β€” how many usecs to delay a TX interrupt after a packet is sent ⏳
  • tx_max_coalesced_frames β€” the maximum number of packets to be sent before a TX interrupt πŸ”₯
  • tx_coalesce_usecs_irq β€” same as tx_coalesce_usecs, except this value applies while an IRQ is being serviced by the host 🧚
  • tx_max_coalesced_frames_irq β€” same as tx_max_coalesced_frames, except this value applies while an IRQ is being serviced by the host 🧚
  • stats_block_coalesce_usecs β€” how many usecs to delay in-memory statistics block updates. some drivers literally don't have an in-memory statistic block, and in those cases this value is ignored. and bestie β€” this value must not be zero 🚨 (if the driver doesn't have the block, the value is ignored anyway, but like. don't set it to zero.)
  • use_adaptive_rx_coalesce β€” enable adaptive RX coalescing ✨
  • use_adaptive_tx_coalesce β€” enable adaptive TX coalescing ✨
  • pkt_rate_low β€” threshold for low packet rate (packets per second) πŸ“
  • rx_coalesce_usecs_low β€” how many usecs to delay an RX interrupt after a packet arrives, when the packet rate is below pkt_rate_low ⏳
  • rx_max_coalesced_frames_low β€” maximum number of packets to be received before an RX interrupt, when the packet rate is below pkt_rate_low πŸ”₯
  • tx_coalesce_usecs_low β€” how many usecs to delay a TX interrupt after a packet is sent, when the packet rate is below pkt_rate_low ⏳
  • tx_max_coalesced_frames_low β€” maximum number of packets to be sent before a TX interrupt, when the packet rate is below pkt_rate_low πŸ”₯
  • pkt_rate_high β€” threshold for high packet rate (packets per second) πŸ“
  • rx_coalesce_usecs_high β€” how many usecs to delay an RX interrupt after a packet arrives, when the packet rate is above pkt_rate_high ⏳
  • rx_max_coalesced_frames_high β€” maximum number of packets to be received before an RX interrupt, when the packet rate is above pkt_rate_high πŸ”₯
  • tx_coalesce_usecs_high β€” how many usecs to delay a TX interrupt after a packet is sent, when the packet rate is above pkt_rate_high ⏳
  • tx_max_coalesced_frames_high β€” maximum number of packets to be sent before a TX interrupt, when the packet rate is above pkt_rate_high πŸ”₯
  • rate_sample_interval β€” how often to do adaptive coalescing packet rate sampling, measured in seconds. must not be zero 🚨

πŸ’œ Description πŸ’œ

okay here's the actual tea β˜• each pair of (usecs, max_frames) fields is specifying that interrupts should be coalesced until:

(usecs > 0 && time_since_first_completion >= usecs)
|| (max_frames > 0 && completed_frames >= max_frames)

it is illegal to set both usecs and max_frames to zero, because that would cause interrupts to never be generated πŸ˜­πŸ’€ like genuinely do not do that. to disable coalescing, set usecs = 0 and max_frames = 1 β€” that's the correct slay βœ…

some implementations ignore the value of max_frames and use the condition:

time_since_first_completion >= usecs
⚠️ this is deprecated. drivers for hardware that does not support counting completions should validate that max_frames == !rx_usecs.

adaptive RX/TX coalescing is an algorithm implemented by some drivers to improve latency under low packet rates and improve throughput under high packet rates 🌈 some drivers only implement one of RX or TX adaptive coalescing. and anything not implemented by the driver causes these values to be silently ignored πŸ™ˆ (rude but true)

when the packet rate is below pkt_rate_high but above pkt_rate_low (both measured in packets per second), the normal {rx,tx}_* coalescing parameters are used πŸ‘‘


🌟 SEE ALSO 🌟

the whole extended friend group, iykyk πŸ’… kernel file ./include/uapi/linux/ethtool.h plus:

  • struct ethtool_cmd(9)
  • struct ethtool_drvinfo(9)
  • struct ethtool_wolinfo(9)
  • struct ethtool_regs(9)
  • struct ethtool_eeprom(9)
  • struct ethtool_eee(9)
  • struct ethtool_modinfo(9)
  • struct ethtool_ringparam(9)
  • struct ethtool_channels(9)
  • struct ethtool_pauseparam(9)
  • enum ethtool_stringset(9)
  • enum ethtool_mac_stats_src(9)
  • enum ethtool_module_power_mode_policy(9)
  • enum ethtool_module_power_mode(9)
  • enum ethtool_c33_pse_ext_state(9)
  • enum ethtool_c33_pse_ext_substate_mr_mps_valid(9)
  • enum ethtool_c33_pse_ext_substate_error_condition(9)
  • enum ethtool_c33_pse_ext_substate_mr_pse_enable(9)
  • enum ethtool_c33_pse_ext_substate_option_detect_ted(9)
  • enum ethtool_c33_pse_ext_substate_option_vport_lim(9)
  • enum ethtool_c33_pse_ext_substate_ovld_detected(9)
  • enum ethtool_c33_pse_ext_substate_power_not_available(9)
  • enum ethtool_c33_pse_ext_substate_short_detected(9)
  • enum ethtool_pse_types(9)
  • enum ethtool_c33_pse_admin_state(9)
  • enum ethtool_c33_pse_pw_d_status(9)
  • enum ethtool_podl_pse_admin_state(9)
  • enum ethtool_podl_pse_pw_d_status(9)
  • enum ethtool_mm_verify_status(9)
  • enum ethtool_module_fw_flash_status(9)
  • struct ethtool_gstrings(9)
  • struct ethtool_sset_info(9)
  • enum ethtool_test_flags(9)
  • struct ethtool_test(9)
  • struct ethtool_stats(9)
  • struct ethtool_perm_addr(9)
  • struct ethtool_tcpip4_spec(9)
  • struct ethtool_ah_espip4_spec(9)
  • struct ethtool_usrip4_spec(9)
  • struct ethtool_tcpip6_spec(9)
  • struct ethtool_ah_espip6_spec(9)
  • struct ethtool_usrip6_spec(9)
  • struct ethtool_flow_ext(9)
  • struct ethtool_rx_flow_spec(9)
  • struct ethtool_rxnfc(9)
  • struct ethtool_rxfh_indir(9)
  • struct ethtool_rxfh(9)
  • struct ethtool_rx_ntuple_flow_spec(9)
  • struct ethtool_rx_ntuple(9)
  • struct ethtool_dump(9)
  • struct ethtool_get_features_block(9)
  • struct ethtool_gfeatures(9)
  • struct ethtool_set_features_block(9)
  • struct ethtool_sfeatures(9)
  • struct ethtool_ts_info(9)
  • struct ethtool_per_queue_op(9)
  • struct ethtool_fecparam(9)
  • enum ethtool_fec_config_bits(9)
  • struct ethtool_link_settings(9)
  • enum phy_upstream(9)

and that's the whole page bestie, you ate that πŸ’…βœ¨

this little drop came to you from ./include/uapi/linux, dated October 2026 β€” mwah, go touch some packets πŸ«ΆπŸ’–πŸŽ€

πŸ“¦ where this page comes from