STRUCT ETHTOOL_RX_NTUPLE_FLOW_SPEC(9)
π
struct ethtool_rx_ntuple_flow_spec(9) β like, the RX flow filter spec, bestie β¨
okay so this is a page straight out of the Kernel API Manual and it's all about struct ethtool_rx_ntuple_flow_spec, which is literally the spec for an RX flow filter π ngl it's giving "let me tell the NIC exactly which packets I care about" and I am obsessed.
πΈ NAME πΈ
struct ethtool_rx_ntuple_flow_spec β specification for RX flow filter π
β¨ SYNOPSIS β¨
struct ethtool_rx_ntuple_flow_spec {
__u32 flow_type;
union {
struct ethtool_tcpip4_spec tcp_ip4_spec;
struct ethtool_tcpip4_spec udp_ip4_spec;
struct ethtool_tcpip4_spec sctp_ip4_spec;
struct ethtool_ah_espip4_spec ah_ip4_spec;
struct ethtool_ah_espip4_spec esp_ip4_spec;
struct ethtool_usrip4_spec usr_ip4_spec;
struct ethhdr ether_spec;
__u8 hdata[72];
} h_u, m_u;
__u16 vlan_tag;
__u16 vlan_tag_mask;
__u64 data;
__u64 data_mask;
__s32 action;
#define ETHTOOL_RXNTUPLE_ACTION_DROP (-1) ;
#define ETHTOOL_RXNTUPLE_ACTION_CLEAR (-2) ;
};
like, yes, that union is doing a lot, but she's iconic and she knows it π
π¦ Members π¦
flow_typeβ the type of match we're doing, e.g.TCP_V4_FLOW. it's the vibe check that tells everyone else which fields even matter π«h_uβ the flow field values to match, and yes bestie it's dependent onflow_type(that's the whole point of the union) π₯m_uβ the masks for flow field value bits to be ignored π like "don't look at these bits, they're not the moment"vlan_tagβ the VLAN tag to match π·οΈvlan_tag_maskβ the mask for VLAN tag bits to be ignored, same energy as above, just for the tag β¨dataβ driver-dependent data to match, so what it means is on your driver, iykyk π€·ββοΈdata_maskβ mask for driver-dependent data bits to be ignored πactionβ the RX ring/queue index to deliver to (non-negative!) or some other action (negative, e.g.ETHTOOL_RXNTUPLE_ACTION_DROP) π
π Description π
okay this is the important part, don't skip it π«Ά
For the flow types TCP_V4_FLOW, UDP_V4_FLOW and SCTP_V4_FLOW, when a field value and mask are both zero, that's treated as if all mask bits are set β i.e. the field is ignored, periodt. so don't come for me thinking zero means "match zero", because no ma'am, it means "literally don't care" π
π SEE ALSO π
Kernel file ./include/uapi/linux/ethtool.h β go read it, it's the source of truth π
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_rxfh(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, no cap. every field, every mask, every macro preserved exactly β the vibe is new, the facts are untouched π
later bestie!! this one came from ./include/uapi/linux and it's dated October 2026, mwah ππΈ
π¦ 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