gen_replace_estimator(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’« 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 β€” the bstats per 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 β€” true if bstats represents a running qdisc, which means bstats' internal values might literally change during basic reads 😭 only used if cpu_bstats is NULL. 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 ⭐

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