From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-bl2nam02on0067.outbound.protection.outlook.com [104.47.38.67]) by dpdk.org (Postfix) with ESMTP id 568C11B678 for ; Wed, 4 Oct 2017 17:36:43 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=K5EJqOKVQPc8PrNeHYdPaD4ljKOhcYNfNuvAmKjwmQ4=; b=lZ2mKiUXE7i8a8f98rEzVz7WcRIdc7A91of4ozGBK5NfYyxDZVepsthMv8AI3Pa4iEouxFmf16s8ELNzmF+ttLSG1rVpFjHbw+n6jWzh13ZDWOXx+gq77ONZppRuJOE4TvW07DqvGSi3T+3xaiVPoylr+sTUzpTaTsUAMGyHX74= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Santosh.Shukla@cavium.com; Received: from [192.168.0.105] (103.76.56.167) by CY4PR07MB3095.namprd07.prod.outlook.com (10.172.115.9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.7; Wed, 4 Oct 2017 15:36:40 +0000 To: David Hunt , dev@dpdk.org References: <1506342429-199695-1-git-send-email-david.hunt@intel.com> <1507108515-186477-1-git-send-email-david.hunt@intel.com> <1507108515-186477-3-git-send-email-david.hunt@intel.com> Cc: konstantin.ananyev@intel.com, jingjing.wu@intel.com, Nemanja Marjanovic , Rory Sexton From: santosh Message-ID: Date: Wed, 4 Oct 2017 21:06:27 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <1507108515-186477-3-git-send-email-david.hunt@intel.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Originating-IP: [103.76.56.167] X-ClientProxiedBy: SG2PR0401CA0002.apcprd04.prod.outlook.com (10.170.128.140) To CY4PR07MB3095.namprd07.prod.outlook.com (10.172.115.9) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5948280e-600a-4602-21cd-08d50b3db650 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254152)(2017052603199)(201703131423075)(201703031133081)(201702281549075); SRVR:CY4PR07MB3095; X-Microsoft-Exchange-Diagnostics: 1; CY4PR07MB3095; 3:+J1Rn2rk66hWYHnAEKyE1xdjXqUr3PDIU34ZfuwL5CJDOwYXqMGicnaJTSBib9BENTL2XcXhKHC/Yu0efQ++m/8coWUCxwVaWKO/a15ms5vZycYcP2J42jOEJ4cG1yBJFLIFt4N5YR00XwO2ff79WDRR6GVSeg9znSwOOBD8kowpztDBtA/2mC56C0ZFEuPd9lZpaRfLS7sVMbeS2l7ieUw7MyiDoeVSPbnDk0N8eZzKaYKeZlW5Dst2iQbVGF/l; 25:Z1s3YasX5XWxf8SOccAMhq7EoK/RKn/ItAbo7A6Gp6ywe25Erkjdov1qwMV9zdCoveqxdYAu7UobRARtDHvOV8VKAG8DP/2Y6IlQf6B2IRbws4pGpPzIWL7MXIhUEh+tTVsSEr+nSco25oLEJiAD/4gDpGSapvLZGnW8H95xXJG+E4vN4byptF6WPiYWDOZVY39c+J1EtsuG6ZFtqzspvZya0S087hoG7+sb3G5FZ40tyefklqK4R0gWfwag23y4evBPBdP+WQGtI1NNWk3a92hWiy0DTBs8GeTb55a/65eWw5cFgkHAghzcomnfZALuOZN/ZewOETlqL8xy4Jo6lQ==; 31:zX+Mv1QrklVEiAzq7SqmjB6lCqyeVzZggyoypsPh467cZT60bOnCCrlrNdHY5nsUaFhdqmm8Py9Pj+K/n0iqJ1g90E/A+4VuYf5NUVaBDYuQHNkVt2SMG8lTkLjxN2LJ12cbKlA/fTvZ0Yw08jlOXmA9/QuVGM9R/0WJr4vfaRjkWWl5/Hgvgi1+XV5CL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905959029699); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(8121501046)(5005006)(100000703101)(100105400095)(3002001)(10201501046)(93006095)(6041248)(20161123555025)(20161123564025)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(20161123562025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:CY4PR07MB3095; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:CY4PR07MB3095; X-Forefront-PRVS: 0450A714CB X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(6049001)(376002)(346002)(199003)(24454002)(189002)(377454003)(54906003)(58126008)(86152003)(316002)(36756003)(33646002)(76176999)(31696002)(6666003)(5660300001)(50986999)(54356999)(65826007)(23746002)(16576012)(106356001)(31686004)(105586002)(101416001)(189998001)(81156014)(6486002)(8676002)(68736007)(81166006)(8936002)(4326008)(72206003)(2906002)(77096006)(6116002)(83506001)(25786009)(229853002)(65806001)(47776003)(117156002)(3846002)(305945005)(6246003)(2950100002)(97736004)(50466002)(66066001)(65956001)(53936002)(64126003)(7736002)(42882006)(230700001)(16526018)(478600001)(90366009); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR07MB3095; H:[192.168.0.105]; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?Windows-1252?Q?1; CY4PR07MB3095; 23:Cq3fBPT9Ij+qX27gzvrmDqv7OxrniVe2VuzwH?= =?Windows-1252?Q?NVvfeaEKqiXRnD+n4rM5T7DDxuU+WjBEl2WVfuwtkfYDhkbI06gzRhqe?= =?Windows-1252?Q?f9ysK6GP9feHGlPcUw06/pwD66Vqqr8yyAXmX+AJMKbaKUZCDiZ+ETmm?= =?Windows-1252?Q?/FA7VismHNU+ALxey3al2Ge27Ndjg9xNECimMTgvUr67scg33XkXNbk4?= =?Windows-1252?Q?TLad9DjCsSPvffBScY9zmNbkgEQi0tf/C3vRup22yCZ8IdDZkqQB+qKa?= =?Windows-1252?Q?2ZEM8d9PeGJuKIQG+fBaeDep/peV1m8nY8QcT6ZPrTErZhcfQ6JiD4YA?= =?Windows-1252?Q?ZBphAT2raANkwMKXZBJSiIUZFEUnTODSz9MEeLX/lHvc2p96zTfpMPFK?= =?Windows-1252?Q?0ZppKWXCR+8e4rbMAa3de407xEQS11ZKK6SLVqed3fwTOPuLaBM3p4qg?= =?Windows-1252?Q?+LbUnhb+XG+nszJd+46A2pZHDU/SfoiD5syDRif/5t+1yZZP0fPSvTbQ?= =?Windows-1252?Q?lnnQnylfcvqkaJmzl/+3I53kXbPrSjt3RHflb9vjh8crCzIDN7YaNSWt?= =?Windows-1252?Q?3RJeerOi/UC9meDBeaozNmf5OPEPaFeZhElK/Ji8adYBhhQ2QcqDwEFm?= =?Windows-1252?Q?6AGD3Dgwdo7XtCocTntQmUMqANJprmrlnqWJvsrM39pv7UVF0NuUUCmW?= =?Windows-1252?Q?LgXUvZwL1HwE1uZTCl4KoorUaH/wnOrE+Mj+9tpJlqj9S7+DDvGgqDLg?= =?Windows-1252?Q?s4Fd7xn2PcXQHoiwN0xl6lHsDP1RkzVj/TspRCww+ILijkTNrs5pj3w4?= =?Windows-1252?Q?oRlK25ote15NBgyLb7tCStDBGS/j1RHdgsPExtRi3dMUhn+yHsDE7mSr?= =?Windows-1252?Q?DeffdRPewvdBhCX1wfDii0woW3+T5BONZQDY2F4o2iXKm5smh9C6MNSk?= =?Windows-1252?Q?Za2iSerkC1HodDBZkUOcPDjuE6X5ULWO6GLyMGU7U/qe2J4ZBvPrmWK4?= =?Windows-1252?Q?t0GHfU3AS771aDkRckcJoGP78P6JdycygusdkrM/iOKw1k5VNH5PckoC?= =?Windows-1252?Q?zJ+frNJv3LWqOmfZUHenSYrDiXqp/4blifONhiIvZr1+1GZys4L2pODP?= =?Windows-1252?Q?XiFl7D3zbi5VFpbiKDqM1RvBs+Ge/q8UbbuIevtxh+o7jFuq+WbCESgB?= =?Windows-1252?Q?Yzk44JYEM/f6FeXjj6c6AJDIJAfZj40lUAKLImdkdI0Qbz5nqR7YhCyY?= =?Windows-1252?Q?P8iYWat+D1uypdD90n3o6hTYuRgCLSvdNlxNnU84s7TCQiO8QocYIoMr?= =?Windows-1252?Q?O/vprrLStaoWbpNR13uGnYIUpxVd5Zr07hWLRipyhpvciJYCyAt0ZQUz?= =?Windows-1252?Q?Eu3REf63WCCL8Joy8LzCHDTKzML+f9dceRepkFKSuDsQhxF6vGWPrmsz?= =?Windows-1252?Q?9ADhsvPLIx0F4czN71Qye5HlFJ6nhBIJsrVMncx8o7Z1SAe0DTZfihr8?= =?Windows-1252?Q?XHEBfeVkQpHStFwThP4miTlap/X?= X-Microsoft-Exchange-Diagnostics: 1; CY4PR07MB3095; 6:DGcPsLRGtyUOnLCqR9eN9Bd67jqPu/bzMyBHqpsKRT1TIVJBBJQ9bK6cNvk42MYgOg0u+yoZec3yv9Zdh4FjVpegPl411Eg/zSHU73uBRCYl4U4IfJMRLfyqd2oNV5UogQBry9osv522WKeYGI7JDWpKmdZKR8gpIkpOZ9wuW10Pk1vo2YaFzvIsPYnBSNwuCuqb59ra+f/nmwHL5U3txiQOZxBwTgEcj1k0Qrnvkzkk9RcdeaSagigCqmybwpUFbsl+7pm8Gzj3S2U2UuL/VHZQxAZTw7vjHA919X63CLmiQbKE6toIUHmFkMPaJwkqiyuCsesRV7n8Ud967/aC8g==; 5:0iuluZbBiGPOAD4xAHdsOU46grvI0qjK8cY93xvsmTzNgJgT2SivUjtXQJNH5uIp17VAzVDRZoJmjmcn1G5Buaptwu3z/APwa7IEtkV1EdGzX/5Cg2SMpCnPTTt/5d2vPKgri5KkzKqJU3uTUm+GFw==; 24:9DKPA6MBSC53wMhPU0wixlv9yfJHhaGV/6np+ywLlhan6dnplVKK3Q3CQbVb7n9mBdqG/5my+HmHvEnznpjCR1e9gA8kEuIhXjQ/GcwJD6k=; 7:f4OVhsukDz+nLMwquAaZY+v34E52rSkkt6EKZRDJcRejRtrinu3n4OplL9Hec/4DsAtrk5kSO/wC1hthndRIyOFhjXtANkPJngfI92oj5MkWI/vCEunP47zu/egO5dAyTcujI2BGV8otG1xx6wopkZl/9bfycBcLFBjDg2zttZn3N7bCLCugsQmt+6Zbr+1g+9VLPU+dIzEd6IniKa/MDLPes2Z4FOu5vEFRaYTx3rg= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Oct 2017 15:36:40.2096 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR07MB3095 Subject: Re: [dpdk-dev] [PATCH v4 2/9] lib/librte_power: add extra msg type for policies X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Oct 2017 15:36:43 -0000 Hi David, On Wednesday 04 October 2017 02:45 PM, David Hunt wrote: > Signed-off-by: Nemanja Marjanovic > Signed-off-by: Rory Sexton > Signed-off-by: David Hunt > --- my 2cent: General comment on implementation approach: IMO, we should avoid PMD details in common lib area. example: file channel_commons.h has ifdef clutter referencing i40e pmds all over. Perhaps we should introduce opaque handle example void * or introduce pmd specific callback/handle which points to PMD specific metadata in power library. Example: struct channel_packet { void *pmd_specific_metadata; } Or someway via callback (I'm not sure at the moment) so that we could hide PMD details in common area. Thanks. > lib/librte_power/channel_commands.h | 52 +++++++++++++++++++++++++++++++++++++ > 1 file changed, 52 insertions(+) > > diff --git a/lib/librte_power/channel_commands.h b/lib/librte_power/channel_commands.h > index 484085b..1599706 100644 > --- a/lib/librte_power/channel_commands.h > +++ b/lib/librte_power/channel_commands.h > @@ -46,6 +46,7 @@ extern "C" { > /* Valid Commands */ > #define CPU_POWER 1 > #define CPU_POWER_CONNECT 2 > +#define PKT_POLICY 3 > > /* CPU Power Command Scaling */ > #define CPU_POWER_SCALE_UP 1 > @@ -54,11 +55,62 @@ extern "C" { > #define CPU_POWER_SCALE_MIN 4 > #define CPU_POWER_ENABLE_TURBO 5 > #define CPU_POWER_DISABLE_TURBO 6 > +#define HOURS 24 > + > +#ifdef RTE_LIBRTE_I40E_PMD > +#define MAX_VFS 10 > +#endif > + > +#define MAX_VCPU_PER_VM 8 > + > +typedef enum {false, true} bool; > + > +struct t_boost_status { > + bool tbEnabled; > +}; > + > +struct timer_profile { > + int busy_hours[HOURS]; > + int quiet_hours[HOURS]; > +#ifdef RTE_LIBRTE_I40E_PMD > + int hours_to_use_traffic_profile[HOURS]; > +#endif > +}; > + > +enum workload {HIGH, MEDIUM, LOW}; > +enum policy_to_use { > +#ifdef RTE_LIBRTE_I40E_PMD > + TRAFFIC, > +#endif > + TIME, > + WORKLOAD > +}; > + > +#ifdef RTE_LIBRTE_I40E_PMD > +struct traffic { > + uint32_t min_packet_thresh; > + uint32_t avg_max_packet_thresh; > + uint32_t max_max_packet_thresh; > +}; > +#endif > > struct channel_packet { > uint64_t resource_id; /**< core_num, device */ > uint32_t unit; /**< scale down/up/min/max */ > uint32_t command; /**< Power, IO, etc */ > + char vm_name[32]; > + > +#ifdef RTE_LIBRTE_I40E_PMD > + uint64_t vfid[MAX_VFS]; > + int nb_mac_to_monitor; > + struct traffic traffic_policy; > +#endif > + uint8_t vcpu_to_control[MAX_VCPU_PER_VM]; > + uint8_t num_vcpu; > + struct timer_profile timer_policy; > + enum workload workload; > + enum policy_to_use policy_to_use; > + struct t_boost_status t_boost_status; > }; > >