gen_replace_estimator(9)
π« gen_replace_estimator β from the Kernel API Manual (section 9, bestie π)
okay so picture this: you've got a rate estimator and its config is not it anymore. so you call gen_replace_estimator, and it's literally the "out with the old, in with the new" of estimator configs. and yes, this is gen_replace_estimator(9) from the Kernel API Manual, in case you were wondering which manual we're living in π
β¨ NAME β¨
gen_replace_estimator β replace rate estimator configuration, that's the whole job, and she does it flawlessly π
π¦ SYNOPSIS π¦
int gen_replace_estimator (struct gnet_stats_basic_sync *bstats , struct
gnet_stats_basic_sync __percpu *cpu_bstats , struct net_rate_estimator
__rcu **rate_est , spinlock_t *lock , bool running , struct nlattr *opt
);
copy it exactly like that, no cap, the types are doing the heavy lifting π«Ά
πΈ ARGUMENTS πΈ
bstatsβ basic statistics. the vibes baseline, so to speak.cpu_bstatsβ thebstatsper cpu. one for every cpu, so nobody has to share π§rate_estβ rate estimator statistics β¨lockβ the lock for statistics and the control path. two jobs, one lock, main character energy lowkey.runningβtrueifbstatsrepresents a running qdisc, which meansbstats' internal values might literally change during basic reads π only used ifcpu_bstatsisNULL. remember that part, it's important.optβ rate estimator configuration TLV π
π DESCRIPTION π
She replaces the configuration of a rate estimator. the way she does it? by calling gen_kill_estimator and gen_new_estimator β kill the old, birth the new, iconic behavior honestly.
Returns 0 on success or a negative error code. slay either way, but like, preferably 0 π
β SEE ALSO β
- Kernel file
./net/core/gen_estimator.c gen_new_estimator(9)gen_kill_estimator(9)gen_estimator_active(9)
bestie fr fr: go read those three, they're the whole friend group and this page is just the one holding the group chat together π«Ά
that's the whole page!! written in ./net/core, dated October 2026, and belonging to gen_replace_estimator(9) β go forth and replace some estimator configs, you've got this ππ
π₯
π¦ 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