STRUCT EF4_FILTER_SPEC(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ NAME ✨

okay so bestie, welcome to the Kernel API Manual page for struct ef4_filter_spec(9) β€” literally the specification for a hardware filter. no cap, this is the blueprint. πŸ’…


🌸 SYNOPSIS 🌸

struct ef4_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;
 };

🫢 Members 🫢

  • match_flags β€” match type flags, from enum ef4_filter_match_flags. this is the β€œwhat are we matching tho” field. πŸ”
  • priority β€” priority of the filter, from enum ef4_filter_priority. yes, it has main character energy. πŸ‘‘
  • flags β€” miscellaneous flags, from enum ef4_filter_flags. the little extras. ✨
  • dmaq_id β€” source/target queue index, or EF4_FILTER_RX_DMAQ_ID_DROP for an RX drop filter. drop it like it’s hot. πŸ’€
  • rss_context β€” RSS context to use, if EF4_FILTER_FLAG_RX_RSS is set. πŸŒ€
  • outer_vid β€” outer VLAN ID to match, if EF4_FILTER_MATCH_OUTER_VID is set. 🏷️
  • inner_vid β€” inner VLAN ID to match, if EF4_FILTER_MATCH_INNER_VID is set. 🏷️
  • loc_mac β€” local MAC address to match, if EF4_FILTER_MATCH_LOC_MAC or EF4_FILTER_MATCH_LOC_MAC_IG is set. 🫢
  • rem_mac β€” remote MAC address to match, if EF4_FILTER_MATCH_REM_MAC is set. 🫢
  • ether_type β€” ether-type to match, if EF4_FILTER_MATCH_ETHER_TYPE is set. 🌈
  • ip_proto β€” IP transport protocol to match, if EF4_FILTER_MATCH_IP_PROTO is set. πŸ›°οΈ
  • loc_host β€” local IP host to match, if EF4_FILTER_MATCH_LOC_HOST is set. 🏠
  • rem_host β€” remote IP host to match, if EF4_FILTER_MATCH_REM_HOST is set. 🌍
  • loc_port β€” local TCP/UDP port to match, if EF4_FILTER_MATCH_LOC_PORT is set. πŸ”Œ
  • rem_port β€” remote TCP/UDP port to match, if EF4_FILTER_MATCH_REM_PORT is set. πŸ”Œ

πŸ’… Description πŸ’…

The ef4_filter_init_rx or ef4_filter_init_tx function must be used to initialise the structure. bestie, must is doing a lot of heavy lifting there β€” do not skip it. 🚨

The ef4_filter_set_*() functions may then be used to set rss_context, match_flags and related fields. slay, now you can customize. πŸŽ€

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. so yeah, priority is lowkey doing software politics while hardware does its own thing. 🧚

fr fr: initialise it with ef4_filter_init_rx or ef4_filter_init_tx first, then use the ef4_filter_set_*() functions. iykyk. πŸ’œ

πŸ”₯ SEE ALSO πŸ”₯


xoxo bestie πŸ’– β€” this came from ./drivers/net/ethernet/sfc/falcon, dated October 2026, and it’s literally the struct ef4_filter_spec(9) page. periodt. πŸ¦‹

πŸ“¦ where this page comes from