STRUCT ETHTOOL_RX_FLOW_SPEC(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct ethtool_rx_flow_spec(9) β€” Kernel API Manual ✨

okay bestie, welcome to the iconic little struct that tells your NIC "hey, when a packet looks like this, put it over there". it's giving traffic-cop but make it kernel ✨ (this is from the Kernel API Manual, by the way β€” keep that energy 🫢).


πŸŽ€ NAME πŸŽ€

struct ethtool_rx_flow_spec β€” the classification rule for RX flows. like, a whole lil bouncer for your incoming packets πŸ’…


🌸 SYNOPSIS 🌸

struct ethtool_rx_flow_spec {
    __u32 flow_type;
    union ethtool_flow_union h_u;
    struct ethtool_flow_ext h_ext;
    union ethtool_flow_union m_u;
    struct ethtool_flow_ext m_ext;
    __u64 ring_cookie;
    __u32 location;
 };

ngl, look at that struct. absolutely ate. πŸ”₯


πŸ¦‹ Members πŸ¦‹

okay so let's go through the members one by one, no skipping, we don't do that here πŸ’–

  • flow_type β€” the type of match you're doing, e.g. TCP_V4_FLOW. this is the main-character field, it decides everything else 🌈
  • h_u β€” the actual flow fields to match. which fields? honestly depends on flow_type β€” it's giving "read the room" 🧚
  • h_ext β€” the additional fields to match, for when the regular ones just aren't enough πŸ’…
  • m_u β€” masks for the flow field bits you want matched (yes, masks, we love a good bitmask era) πŸŽ€
  • m_ext β€” masks for the additional field bits to be matched. important, bestie: all the additional fields have to be ignored unless flow_type includes the FLOW_EXT or FLOW_MAC_EXT flag β€” go read the struct ethtool_flow_ext description, it says it right there, iykyk πŸ™ˆ
  • ring_cookie β€” the RX ring/queue index to deliver to. orrr it can be RX_CLS_FLOW_DISC if the packets should just be discarded (bye πŸ‘‹), or RX_CLS_FLOW_WAKE if the packets should be used for Wake-on-LAN with WAKE_FILTER (waking up is highkey a vibe ⭐)
  • location β€” where the rule sits in the table. and here's the caveat bestie, listen: locations must be numbered so that a flow matching multiple rules gets classified according to the first (lowest numbered) rule. lowest number wins, periodt πŸ‘‘
lowkey do not sleep on that location ordering rule. multiple matches β†’ lowest number takes it. no cap. πŸ’€

✨ SEE ALSO ✨

the whole extended friend group πŸ’œ β€” starting with the kernel file itself:

  • Kernel file ./include/uapi/linux/ethtool.h
  • 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_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)

that's the whole squad. go read them. or don't, i'm not your mom πŸ“


kay that's the page bestie!! πŸ’– this one lives in ./include/uapi/linux, dated October 2026, and it's filed under struct ethtool_rx_flow_spec(9) β€” mwah, slay, see u in the next man page πŸ§šβ€β™€οΈβœ¨

πŸ“¦ where this page comes from