tcf_em_tree_validate(9)
β¨ tcf_em_tree_validate β¨
Okay bestie, so this one is from the Kernel API Manual (section 9, kernel land π§), and it's literally the vibe-check function for ematch configs. Buckle up π
πΈ NAME πΈ
tcf_em_tree_validate β validate an ematch config TLV and build the ematch tree π
π¦ SYNOPSIS π¦
int tcf_em_tree_validate (struct tcf_proto *tp , struct nlattr *nla ,
struct tcf_ematch_tree *tree );
π ARGUMENTS π
tpβ the classifier kind handle. Like, it's the handle for whichever classifier kind you're rolling with πnlaβ the ematch tree configuration TLV. This is the raw config you're feeding in πtreeβ the destination ematch tree variable, where the resulting ematch tree gets stored. This is the output slot, not the real one, iykyk β¨
π DESCRIPTION π
So what this does is: it validates the configuration TLV you passed in as nla, and builds an ematch tree inside tree. Simple as that π«Ά
Now here's the part where you gotta listen, bestie, because it's giving important π β the resulting tree must later be copied into the private classifier data using tcf_em_tree_change. And you MUST NOT pass the ematch tree variable of the private classifier data directly, because then the changes would not be locked properly. Like, no cap, do it the right way π
β οΈ Warning, fr fr: handing in the private classifier data's own ematch tree variable directly = broken locking. Do not do the thing. π
And if the configuration TLV contains errors, it returns a negative error code. So negative return = something went wrong, bestie π
π SEE ALSO π
- Kernel file
./net/sched/ematch.c tcf_em_register(9)tcf_em_unregister(9)tcf_em_tree_destroy(9)tcf_em_tree_dump(9)
That's the whole arc, bestie πΈ this page lives in ./net/sched, and it's dated October 2026 β so like, from the future, main character energy fr fr. Laterz ππ¦
π¦ 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