STRUCT EFX_FILTER_SPEC(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– struct efx_filter_spec(9) πŸ’–

okay bestie, welcome to the Kernel API Manual ✨ this page is all about struct efx_filter_spec β€” the specification for a hardware filter. Lowkey iconic, highkey essential. πŸ’…


🌸 NAME 🌸

  • struct efx_filter_spec β€” specification for a hardware filter 🫢

✨ SYNOPSIS ✨

       struct efx_filter_spec {
           u32 match_flags:12;
           u32 priority:2;
           u32 flags:6;
           u32 dmaq_id:12;
           u32 rss_context;
           __be16 outer_vid;
           __be16 inner_vid;
           u8 loc_mac[ETH_ALEN];
           u8 rem_mac[ETH_ALEN];
           __be16 ether_type;
           u8 ip_proto;
           __be32 loc_host[4];
           __be32 rem_host[4];
           __be16 loc_port;
           __be16 rem_port;
           u32 encap_type:4;
        };

πŸŽ€ Members πŸŽ€

  • match_flags β€” match type flags, straight from enum efx_filter_match_flags πŸ’–
  • priority β€” priority of the filter, from enum efx_filter_priority πŸ‘‘
  • flags β€” miscellaneous flags, from enum efx_filter_flags ✨
  • dmaq_id β€” source/target queue index, or EFX_FILTER_RX_DMAQ_ID_DROP for an RX drop filter 🫢
  • rss_context β€” RSS context to use, if EFX_FILTER_FLAG_RX_RSS is set. This is a user_id (with 0 meaning the driver/default RSS context), not an MCFW context_id. πŸŒ€
  • outer_vid β€” outer VLAN ID to match, if EFX_FILTER_MATCH_OUTER_VID is set 🌸
  • inner_vid β€” inner VLAN ID to match, if EFX_FILTER_MATCH_INNER_VID is set 🌸
  • loc_mac β€” local MAC address to match, if EFX_FILTER_MATCH_LOC_MAC or EFX_FILTER_MATCH_LOC_MAC_IG is set πŸŽ€
  • rem_mac β€” remote MAC address to match, if EFX_FILTER_MATCH_REM_MAC is set πŸŽ€
  • ether_type β€” Ether-type to match, if EFX_FILTER_MATCH_ETHER_TYPE is set ⭐
  • ip_proto β€” IP transport protocol to match, if EFX_FILTER_MATCH_IP_PROTO is set ⭐
  • loc_host β€” local IP host to match, if EFX_FILTER_MATCH_LOC_HOST is set πŸ¦‹
  • rem_host β€” remote IP host to match, if EFX_FILTER_MATCH_REM_HOST is set πŸ¦‹
  • loc_port β€” local TCP/UDP port to match, if EFX_FILTER_MATCH_LOC_PORT is set πŸ’œ
  • rem_port β€” remote TCP/UDP port to match, if EFX_FILTER_MATCH_REM_PORT is set πŸ’œ
  • encap_type β€” encapsulation type to match (from enum efx_encap_type), if EFX_FILTER_MATCH_ENCAP_TYPE is set 🌈

πŸ’… Description πŸ’…

Real talk: the efx_filter_init_rx or efx_filter_init_tx function must be used to initialise the structure. Non-negotiable, bestie 😭 After that, the efx_filter_set_*() functions may then be used to set rss_context, match_flags and related fields.

The priority field is used by software to determine whether a new filter may replace an old one. The hardware priority of a filter depends on which fields are matched. That's the whole vibe check πŸ‘‘

πŸ¦‹ SEE ALSO πŸ¦‹


That’s the tea from source/version ./drivers/net/ethernet/sfc/siena, October 2026 edition, for page struct efx_filter_spec(9). Bye bestie! πŸ’–πŸŽ€πŸ«Ά

πŸ“¦ where this page comes from