STRUCT ETHTOOL_RX_FLOW_SPEC(9)
π 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 onflow_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 unlessflow_typeincludes theFLOW_EXTorFLOW_MAC_EXTflag β go read thestruct ethtool_flow_extdescription, it says it right there, iykyk πring_cookieβ the RX ring/queue index to deliver to. orrr it can beRX_CLS_FLOW_DISCif the packets should just be discarded (bye π), orRX_CLS_FLOW_WAKEif the packets should be used for Wake-on-LAN withWAKE_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
- 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