On 02-Apr-21 10:26 AM, Anatoly Burakov wrote:
Currently, when we set the pstate governor to "performance", we check if
it is already set to this value, and if it is, we skip setting it.

However, we never save this value anywhere, so that next time we come
back and request the governor to be set to its original value, the
original value is empty.

Fix it by saving the original pstate governor first. While we're at it,
replace `strlcpy` with `rte_strscpy`.

Fixes: e6c6dc0f96c8 ("power: add p-state driver compatibility")
Cc: david.h...@intel.com

Signed-off-by: Anatoly Burakov <anatoly.bura...@intel.com>
---
  lib/librte_power/power_pstate_cpufreq.c | 5 +++--
  1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/lib/librte_power/power_pstate_cpufreq.c 
b/lib/librte_power/power_pstate_cpufreq.c
index c4639e4b8a..1cb0e4d917 100644
--- a/lib/librte_power/power_pstate_cpufreq.c
+++ b/lib/librte_power/power_pstate_cpufreq.c

Apologies for wrong threading, i'm sending patches from a new machine so it's been a while since i've run git commands manually...

--
Thanks,
Anatoly

Reply via email to