STRUCT ETHTOOL_RXFH(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– STRUCT ETHTOOL_RXFH(9) πŸ’–

okay so bestie, welcome to the Kernel API Manual ✨ β€” this is the page for struct ethtool_rxfh, and it is genuinely the moment you get to poke at your NIC's RX flow hash indirection table and/or hash key. yes, both. at the same time. main character energy fr fr πŸŽ€


🌸 NAME 🌸

struct ethtool_rxfh β€” the command struct to get/set the RX flow hash indir and/or the hash key πŸ’…


✨ SYNOPSIS ✨

struct ethtool_rxfh {
    __u32 cmd;
    __u32 rss_context;
    __u32 indir_size;
    __u32 key_size;
    __u8 hfunc;
    __u8 input_xfrm;
    __u8 rsvd8[2];
    __u32 rsvd32;
    __u32 rss_config[];
 };

literally the whole vibe in one struct, no cap 🫢


πŸ¦‹ Members πŸ¦‹

okay so here's the field-by-field tour, and yes we're doing all of them:

  • cmd β€” the specific command number, and it's either ETHTOOL_GRSSH or ETHTOOL_SRSSH. that's it. that's the choice πŸ‘‘
  • rss_context β€” the RSS context identifier. context 0 is the default one for normal traffic; the other contexts can be referenced as the destination for RX flow classification rules. ETH_RXFH_CONTEXT_ALLOC is used with the ETHTOOL_SRSSH command to allocate a brand-new RSS context, and on return this field will contain the ID of the newly allocated context. so it comes back with the goods 🎁
  • indir_size β€” on entry, this is the array size of the user buffer for the indirection table, which may be zero, or (for ETHTOOL_SRSSH) ETH_RXFH_INDIR_NO_CHANGE. on return from ETHTOOL_GRSSH, it's the array size of the hardware indirection table. it's giving "same field, two moods" 😭
  • key_size β€” on entry, the array size of the user buffer for the hash key, which may be zero. on return from ETHTOOL_GRSSH, it's the size of the hardware hash key. slay, symmetric behaviour πŸ”₯
  • hfunc β€” defines the current RSS hash function used by the HW (or the one to be set to, bestie). valid values are one of the ETH_RSS_HASH_*. pick your fighter ✨
  • input_xfrm β€” defines how the input data is transformed. valid values are one of RXH_XFRM_*. transformation era πŸ’«
  • rsvd8 β€” reserved for future use; see the note on reserved space. do not touch, it's not for you πŸ™ˆ
  • rsvd32 β€” reserved for future use; see the note on reserved space. same energy, bigger field πŸ’€
  • rss_config β€” the RX ring/queue index for each hash value, i.e. the indirection table of indir_size __u32 elements, followed by the hash key of key_size bytes. it's the payload, it's the moment, it's everything 🌈

πŸ’œ Description πŸ’œ

okay so the deets πŸ’…

For ETHTOOL_GRSSH: an indir_size and a key_size of zero means that only the size should be returned. you're just asking "how big is it, bestie?" and nothing else.

For ETHTOOL_SRSSH: an indir_size of ETH_RXFH_INDIR_NO_CHANGE means that the indir table setting is not requested (so, leave it alone, it's fine). and an indir_size of zero means the indir table should be reset to default values (if rss_context == 0) or that the RSS context should be deleted. two completely different outcomes from one zero, iykyk 😭

An hfunc of zero means that the hash function setting is not requested. zero = "no thoughts, head empty, don't change it" 🧚

lowkey important bestie: this struct is defined in the kernel UAPI header ./include/uapi/linux/ethtool.h β€” that's the source of truth, not me πŸ’–

πŸŽ€ SEE ALSO πŸŽ€

the whole friend group, in order, no one left behind 🫢:

  • 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_coalesce(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_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 the kernel file itself: ./include/uapi/linux/ethtool.h πŸ“


that's the whole page bestie, go forth and hash your flows πŸ’œ

this icon was brought to you by the lovely humans at ./include/uapi/linux, dated October 2026 β€” stan them, they did the work, I just did the vibes πŸŒŸπŸ’–

πŸ“¦ where this page comes from