efx_tc_mangle(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… efx_tc_mangle β€” bestie's guide to handling a single 32-bit (or less) pedit πŸŽ€

okay so real talk, this is a page from the Kernel API Manual and it's all about one lil' function that handles exactly one pedit β€” and by "one" we mean 32-bit or less, no cap. let's get into it ✨


🌸 SYNOPSIS 🌸

int efx_tc_mangle (struct efx_nic *efx , struct efx_tc_action_set *act ,
const struct flow_action_entry *fa , struct efx_tc_mangler_state *mung ,
struct netlink_ext_ack *extack , struct efx_tc_match *match );

it's giving six-parameter main character energy, and honestly? iconic. 🌈


πŸ’– ARGUMENTS πŸ’–

  • efx β€” the NIC we're installing a flow rule on 🫢 (yes, the actual hardware, we're being brave today)
  • act β€” the action set (cursor) to update ✨ this is the thing that gets moved along
  • fa β€” the FLOW_ACTION_MANGLE action metadata πŸŽ€ the vibes, the details, the lore
  • mung β€” accumulator for partial mangles πŸ¦‹ lowkey a little bucket where half-finished mangles chill
  • extack β€” netlink extended ack for reporting errors πŸ’€ because when things go wrong we like details
  • match β€” original match used along with the mangle action πŸ‘‘ the context, the receipts, the origin story

πŸ”₯ DESCRIPTION πŸ”₯

so basically: this function identifies the fields written by a FLOW_ACTION_MANGLE, and then records the partial mangle state in mung. πŸ“

and here's the slay part β€” if this mangle completes an earlier partial mangle, it consumes and applies it to act by calling efx_tc_complete_mac_mangle. 😭 like, the two halves finally meet and it's beautiful. periodt. πŸ’…

ngl, this is the kind of function that does one thing and does it well. no notes. 🧚

πŸ¦‹ SEE ALSO πŸ¦‹

  • Kernel file ./drivers/net/ethernet/sfc/tc.c β€” TC conntrack sequences(9) πŸ“
  • struct efx_tc_mangler_state(9) πŸ’œ
  • efx_tc_incomplete_mangle(9) ⭐

and that's the whole vibe check! πŸŽ€ this page came to you straight from ./drivers/net/ethernet/sfc, dated October 2026 β€” go forth and mangle responsibly, bestie πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from