diff options
| author | Julian Anastasov <[email protected]> | 2022-11-22 18:46:04 +0200 |
|---|---|---|
| committer | Pablo Neira Ayuso <[email protected]> | 2022-12-10 22:44:43 +0100 |
| commit | 144361c1949f227df9244302da02c258a363b674 (patch) | |
| tree | f09b0f4c78d8bfe6473c458dc82bd6d115a08e44 /include | |
| parent | f0be83d5421718ead31707b6ece34cf77d411c00 (diff) | |
ipvs: run_estimation should control the kthread tasks
Change the run_estimation flag to start/stop the kthread tasks.
Signed-off-by: Julian Anastasov <[email protected]>
Cc: yunhong-cgl jiang <[email protected]>
Cc: "dust.li" <[email protected]>
Reviewed-by: Jiri Wiesner <[email protected]>
Signed-off-by: Pablo Neira Ayuso <[email protected]>
Diffstat (limited to 'include')
| -rw-r--r-- | include/net/ip_vs.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h index dc51b5497cf7..c6c61100d244 100644 --- a/include/net/ip_vs.h +++ b/include/net/ip_vs.h @@ -1605,8 +1605,10 @@ void ip_vs_est_kthread_stop(struct ip_vs_est_kt_data *kd); static inline void ip_vs_est_stopped_recalc(struct netns_ipvs *ipvs) { #ifdef CONFIG_SYSCTL - ipvs->est_stopped = ipvs->est_cpulist_valid && - cpumask_empty(sysctl_est_cpulist(ipvs)); + /* Stop tasks while cpulist is empty or if disabled with flag */ + ipvs->est_stopped = !sysctl_run_estimation(ipvs) || + (ipvs->est_cpulist_valid && + cpumask_empty(sysctl_est_cpulist(ipvs))); #endif } |