From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8870CA0548; Fri, 2 Apr 2021 11:34:14 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 49017140ED1; Fri, 2 Apr 2021 11:34:14 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mails.dpdk.org (Postfix) with ESMTP id 8BD2040141 for ; Fri, 2 Apr 2021 11:34:12 +0200 (CEST) IronPort-SDR: wGF6VX8tSK5FvpVwhgql7tO0PULq/FHMFgARwYfxbBNEs6i3Q1Y4K59PC4wpwguk0Xb+NqGB9u YBgRdRMXAxeg== X-IronPort-AV: E=McAfee;i="6000,8403,9941"; a="256415247" X-IronPort-AV: E=Sophos;i="5.81,299,1610438400"; d="scan'208";a="256415247" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Apr 2021 02:34:11 -0700 IronPort-SDR: yLJCDz7+MheYKz58O57pZcaK3jnChpKWRU1K0YJDEC8pVsOdv2c2XBtGNnBKCNpu7vPtPFBejC XEv67wbH3XZA== X-IronPort-AV: E=Sophos;i="5.81,299,1610438400"; d="scan'208";a="419590875" Received: from aburakov-mobl.ger.corp.intel.com (HELO [10.213.214.195]) ([10.213.214.195]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Apr 2021 02:34:11 -0700 From: "Burakov, Anatoly" To: dev@dpdk.org Cc: david.hunt@intel.com References: <20210401150614.234257-1-anatoly.burakov@intel.com> <20210402092645.258257-2-anatoly.burakov@intel.com> Message-ID: Date: Fri, 2 Apr 2021 10:34:07 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.9.0 MIME-Version: 1.0 In-Reply-To: <20210402092645.258257-2-anatoly.burakov@intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v4 2/2] power: do not skip saving original pstate governor X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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.hunt@intel.com > > Signed-off-by: Anatoly Burakov > --- > 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