STRUCT EFX_TC_STATE(9)
β¨ 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 ofstruct efx_tc_block_bindingentries. π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 theact ct & goto chainkind. π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β thevport_idfor 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 byMC_CMD_MAE_COUNTERS_STREAM_STOP. πseen_genβ most recent generation count per type, as seen byefx_tc_rx. ποΈflush_wqβ wait queue used byefx_mae_stop_countersto wait for the MAE counters RXQ to finish draining. π°dfltβ match-action rules for default switching, sitting at priorityEFX_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.hstructefx_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
- 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