2
0
mirror of https://github.com/openvswitch/ovs synced 2025-09-05 08:45:23 +00:00

dpif-netdev: Rename pmd-maxsleep config option.

other_config:pmd-maxsleep is a config option to allow
PMD thread cores to sleep under low or no load conditions.

Rename it to 'pmd-sleep-max' to allow a more structured
name and so that additional options or command can follow
the 'pmd-sleep-xyz' pattern.

Use of other_config:pmd-maxsleep is deprecated to be
removed in a future release and will result in a warning.

Reviewed-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
This commit is contained in:
Kevin Traynor
2023-07-14 19:06:33 +01:00
committed by Ilya Maximets
parent 4d55a364ff
commit 023dcdc7a1
5 changed files with 25 additions and 9 deletions

View File

@@ -4982,7 +4982,16 @@ dpif_netdev_set_config(struct dpif *dpif, const struct smap *other_config)
set_pmd_auto_lb(dp, autolb_state, log_autolb);
pmd_max_sleep = smap_get_ullong(other_config, "pmd-maxsleep", 0);
pmd_max_sleep = smap_get_ullong(other_config, "pmd-maxsleep", UINT64_MAX);
if (pmd_max_sleep != UINT64_MAX) {
VLOG_WARN("pmd-maxsleep is deprecated. "
"Please use pmd-sleep-max instead.");
} else {
pmd_max_sleep = 0;
}
pmd_max_sleep = smap_get_ullong(other_config, "pmd-sleep-max",
pmd_max_sleep);
pmd_max_sleep = MIN(PMD_RCU_QUIESCE_INTERVAL, pmd_max_sleep);
atomic_read_relaxed(&dp->pmd_max_sleep, &cur_pmd_max_sleep);
if (first_set_config || pmd_max_sleep != cur_pmd_max_sleep) {