tcf_em_tree_match(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– tcf_em_tree_match(9) πŸ’–

okay bestie, welcome to the Kernel API Manual ✨ this one's a lil function called tcf_em_tree_match and it's literally the vibe check for packets, no cap 🫢


🌸 NAME 🌸

tcf_em_tree_match β€” evaluate an ematch tree 🧚

like, it runs the tree and tells you if your packet slays or not πŸ’…


✨ SYNOPSIS ✨

int tcf_em_tree_match (struct sk_buff *skb , struct tcf_ematch_tree
*tree , struct tcf_pkt_info *info );

three args, one int back, iconic behavior πŸ‘‘


πŸŽ€ ARGUMENTS πŸŽ€

  • skb β€” the socket buffer of the packet in question πŸ¦‹ like, the actual packet we're judging. main character energy fr fr.
  • tree β€” the ematch tree to be used for evaluation 🌸 this is the tree we're walking through, respectfully.
  • info β€” packet information examined by classifier πŸ’œ the classifier's little notes about the packet, iykyk.

πŸ”₯ DESCRIPTION πŸ”₯

so here's the tea β˜• β€” this function matches skb against the ematch tree in tree by going through all the ematches, respecting their logic relations, and returning as soon as the result is obvious πŸ’€ no wasting time, it dips out the second it knows. efficiency ate, honestly.


🌈 RETURN 🌈

  • 1 β€” if the ematch tree as-one matches πŸŽ‰ or if no ematches are configured 🫢 or if ematch is just not enabled in the kernel πŸ‘‘ (yes, all three get a 1, that's just how she is)
  • 0 β€” otherwise 😭

πŸ¦‹ SEE ALSO πŸ¦‹

go read those next bestie, they're all linked up in the same lore 🌟


ok that's the whole page!! no notes, she's perfect πŸ’…

and that's a wrap on this little slice of the kernel API manual, straight out of ./include/net, dated October 2026 ⭐ mwah, go match some trees πŸ’–πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from