STRUCT EFX_TC_STATE(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ NAME ✨

okay so welcome to the Kernel API Manual page for struct efx_tc_state(9), bestie. This struct is the control plane data for TC offload β€” literally the state bundle for TC offload’s control-plane side. Think of it as the group-chat admin panel for all the offload bookkeeping. πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

here’s the whole struct, no cap:

struct efx_tc_state {
    struct mae_caps *caps;
    struct list_head block_list;
    struct mutex mutex;
    struct rhashtable counter_ht;
    struct rhashtable counter_id_ht;
    struct rhashtable encap_ht;
    struct rhashtable mac_ht;
    struct rhashtable encap_match_ht;
    struct rhashtable match_action_ht;
    struct rhashtable lhs_rule_ht;
    struct rhashtable ct_zone_ht;
    struct rhashtable ct_ht;
    struct rhashtable neigh_ht;
    struct rhashtable recirc_ht;
    struct ida recirc_ida;
    struct efx_tc_table_ct meta_ct;
    u32 reps_mport_id, reps_mport_vport_id;
    s32 reps_filter_uc, reps_filter_mc;
    bool flush_counters;
    u32 flush_gen[EFX_TC_COUNTER_TYPE_MAX];
    u32 seen_gen[EFX_TC_COUNTER_TYPE_MAX];
    wait_queue_head_t flush_wq;
    struct {
      struct efx_tc_flow_rule pf;
      struct efx_tc_flow_rule wire;
    } dflt;
    struct {
      struct efx_tc_action_set_list pf;
      struct efx_tc_action_set_list reps;
    } facts;
    bool up;
 };

πŸŽ€ Members πŸŽ€

every member is doing its little main-character job, so let’s give them their moment:

  • caps β€” the MAE capabilities reported by MCDI. it’s giving β€œwhat firmware says is possible” energy. ✨
  • block_list β€” a list of struct efx_tc_block_binding entries. πŸŽ€
  • mutex β€” the mutex used to serialise operations on the TC hashtables. don’t touch the hashtables without it, bestie. πŸ’…
  • counter_ht β€” hashtable of TC counters (FW IDs and counter values). πŸ“
  • counter_id_ht β€” hashtable mapping TC counter cookies to counters. iykyk. πŸͺ
  • encap_ht β€” hashtable of TC encap actions. πŸ¦‹
  • mac_ht β€” hashtable of MAC address entries, specifically for pedits. 🌸
  • encap_match_ht β€” hashtable of TC encap matches. ✨
  • match_action_ht β€” hashtable of TC match-action rules. πŸ”₯
  • lhs_rule_ht β€” hashtable of TC left-hand rules, aka the act ct & goto chain kind. πŸ‘‘
  • ct_zone_ht β€” hashtable of TC conntrack flowtable bindings. 🌈
  • ct_ht β€” hashtable of TC conntrack flow entries. ⭐
  • neigh_ht β€” hashtable of neighbour watches (struct efx_neigh_binder). πŸ‘€
  • recirc_ht β€” hashtable of recirculation ID mappings (struct efx_tc_recirc_id). πŸ”
  • recirc_ida β€” the recirculation ID allocator. 🎟️
  • meta_ct β€” MAE table layout for the conntrack table. πŸ“‹
  • reps_mport_id β€” the MAE port allocated for representor RX. πŸ“¬
  • reps_mport_vport_id β€” the vport_id for representor RX filters. 🫢
  • reps_filter_uc β€” VNIC filter for representor unicast RX (promisc). πŸ¦„
  • reps_filter_mc β€” VNIC filter for representor multicast RX (allmulti). 🌟
  • flush_counters β€” counters have been stopped, waiting for drain. not the fun kind of waiting. 😭
  • flush_gen β€” final generation count per type array, as reported by MC_CMD_MAE_COUNTERS_STREAM_STOP. πŸ’€
  • seen_gen β€” most recent generation count per type, as seen by efx_tc_rx. πŸ‘οΈ
  • flush_wq β€” wait queue used by efx_mae_stop_counters to wait for the MAE counters RXQ to finish draining. 🚰
  • dflt β€” match-action rules for default switching, sitting at priority EFX_TC_PRIO_DFLT. named by ingress port. πŸ’«
    • dflt.pf β€” rule for traffic ingressing from PF (egresses to wire). πŸ›°οΈ
    • dflt.wire β€” rule for traffic ingressing from wire (egresses to PF). 🧡
  • facts β€” fallback action-set-lists for unready rules. named by egress port. 🧚
    • facts.pf β€” action-set-list for unready rules on PF netdev, hence applying to traffic from wire, and egressing to PF. 🌸
    • facts.reps β€” action-set-list for unready rules on representors, hence applying to traffic from representees, and egressing to the reps mport. πŸ’œ
  • up β€” have the TC datastructures been set up? the ultimate vibe check. βœ…

🌈 SEE ALSO 🌈

  • Kernel file ./drivers/net/ethernet/sfc/tc.h struct efx_tc_mac_pedit_action(9), struct efx_tc_action_set(9), enum efx_tc_em_pseudo_type(9) β€” go read those next, bestie. 🫢

signed with love from the ./drivers/net/ethernet/sfc source, October 2026 β€” struct efx_tc_state(9) forever, periodt πŸ’–πŸŽ€βœ¨

πŸ“¦ where this page comes from