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 42A2BA0A05; Tue, 19 Jan 2021 13:25:18 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 297B9140E1E; Tue, 19 Jan 2021 13:25:18 +0100 (CET) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mails.dpdk.org (Postfix) with ESMTP id 912BA140E11 for ; Tue, 19 Jan 2021 13:25:15 +0100 (CET) IronPort-SDR: O2+pwSWaSff6Q7OkwRJCbLTWPZ9Yp57w6SL0UlZZ73uhxxXcLT1vFZ2GIMe9CjS3f3BdZXjJuF uah3wyNJKXPg== X-IronPort-AV: E=McAfee;i="6000,8403,9868"; a="197620871" X-IronPort-AV: E=Sophos;i="5.79,358,1602572400"; d="scan'208";a="197620871" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Jan 2021 04:25:14 -0800 IronPort-SDR: WXSg5I+CwKhvqMkwtyTe48Yu32KJ7Q5lxvma8prYZLHpw8CYmCfz+e1yzxqownB24mXJte/kD0 xJ0mUUSDQ42A== X-IronPort-AV: E=Sophos;i="5.79,358,1602572400"; d="scan'208";a="383912553" Received: from aburakov-mobl.ger.corp.intel.com (HELO [10.252.49.223]) ([10.252.49.223]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Jan 2021 04:25:11 -0800 To: Thomas Monjalon Cc: dev@dpdk.org, Liang Ma , David Hunt , Ray Kinsella , Neil Horman , konstantin.ananyev@intel.com, timothy.mcdaniel@intel.com, bruce.richardson@intel.com, chris.macnamara@intel.com References: <6905373.rh0UmGlLeQ@thomas> From: "Burakov, Anatoly" Message-ID: <887be7ca-a4c5-884c-4cd2-e19d66014da9@intel.com> Date: Tue, 19 Jan 2021 12:25:08 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: <6905373.rh0UmGlLeQ@thomas> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v17 07/11] power: add PMD power management API and callback 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 18-Jan-21 10:48 PM, Thomas Monjalon wrote: > 14/01/2021 15:46, Anatoly Burakov: >> From: Liang Ma >> >> + Currently, this power management API is limited to mandatory mapping of 1 >> + queue to 1 core (multiple queues are supported, but they must be polled from >> + different cores). > > This is quite limited. > Not sure librte_power is the right place for a flexible ethdev management. > It's not really "managing" ethdev as such, it just installs a callback. You could say it's building on what's available in ethdev, but aside from installing a callback it doesn't do anything else. >> +static struct pmd_conf_data { >> + struct rte_cpu_intrinsics intrinsics_support; >> + /**< what do we support? */ >> + uint64_t tsc_per_us; >> + /**< pre-calculated tsc diff for 1us */ >> + uint64_t pause_per_us; >> + /**< how many rte_pause can we fit in a microisecond? */ > > Vim typo spotted: microisecond > >> +} global_data; > > Not sure about the need for a struct. > Please insert comment before the field if not on the same line. > BTW, why doxygen syntax in a .c file? > The struct was really there to make autocomplete easier. I can make all of the variables static and pull them out if that's necessary, but i don't think it makes much difference. (the rest of the comments will be implemented) -- Thanks, Anatoly