From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-SN1-obe.outbound.protection.outlook.com (mail-sn1nam01on0077.outbound.protection.outlook.com [104.47.32.77]) by dpdk.org (Postfix) with ESMTP id BCF271B695 for ; Wed, 4 Oct 2017 17:48:00 +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=ca81CMcV8/KlbHWbdr3o+sAwf8qzzmY8vdR0Ivia6Y4=; b=bNIjYLr+RFquvZM3U3+BtGhfZQr67yfixf2p099zsrkXOHxvQVPajfASWtBEl/Xi60/VqPG9oNiWvYxjSbziVDKF2cOfOZ454FRKzM4dYUPOYdpT09AXE+S8HQWuZsUUhIP/72XZGpKuRW+HEUimJG4AebS73FbNGXKOr+TcSCU= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Santosh.Shukla@cavium.com; Received: from [192.168.0.105] (103.76.56.167) by DM5PR07MB3098.namprd07.prod.outlook.com (10.172.85.8) 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:47:56 +0000 To: David Hunt , dev@dpdk.org References: <1507108515-186477-1-git-send-email-david.hunt@intel.com> <1507130720-48891-1-git-send-email-david.hunt@intel.com> <1507130720-48891-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: <6743205e-e0ac-77a5-10f5-6bf91edc0bc4@caviumnetworks.com> Date: Wed, 4 Oct 2017 21:17:45 +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: <1507130720-48891-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: SG2PR06CA0086.apcprd06.prod.outlook.com (10.170.138.12) To DM5PR07MB3098.namprd07.prod.outlook.com (10.172.85.8) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 4fc46b9f-72d3-463c-9226-08d50b3f49b6 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254152)(2017052603199)(201703131423075)(201703031133081)(201702281549075); SRVR:DM5PR07MB3098; X-Microsoft-Exchange-Diagnostics: 1; DM5PR07MB3098; 3:pzqTZk68olmuPvOYadxMAAzeSQ0+9Ue7G6uOJn8BJkfDEaqx38bfUDXGioLS6vQqY9sR3pRNQA/xIfJfxbqiYOcvz6RKaO5panB87iQR53XU8mI1SYtzIx3yVZ1FaP02kDolzWOPawWPWt5yTk9hRSMSNLNeguzURZODw3NHv9mW/T1WqeWvqGBu8mEBEygE2QzWbdsJxwFPJxZ201JYuB0NxARVbdKLQMSshMR9jx7ZOSOrAbMXnTcfAHIb/pnS; 25:0VOzayzPaEONz5n+uK9yV7I3tlHFlSqF6b5AIn+66QWzgShWoCdwLVaUWgjAyajIxHKP/6ovahN/wGzHz0N9lN9QOkt2FRV5XSjTNsSNYxJPfe9UfuirQmj0xliOmt0z9obV1++w9ncRbnrGiqZK3xWsZMzJXlisJSdWvVUwZGE35SPE/NBnhLdNr0FPYIC9raIOa//dJrKvch5qAFvlkhJw37i9o+HVHrqPgTGxvSuH6fhzEgkwAXMfIJEDBb/b71T+IFHqAx6J9/CJwx3TLbVbWY3T/qMXy+A7lGpelsLWeBJWst/9r1NsEEseWgvOnQhds3kdzuwanT2UTAY1ow==; 31:LZWNYs0vK/BiEzBbIvZB8Fxu3JorRo4wFEII3vyu944iz3sSXl+FnzW0Srw6wVw1v7FWQottQB6utI6u3WoVNHxr4N/IK5LQBr4xpcBR6BCKqatNDKZP9ZMKQIr0fYOlX/fENPLwsorEz7sHcpEsa48h5nOtGU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change-Antispam-Report-Test: UriScan:(228905959029699); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(5005006)(8121501046)(93006095)(3002001)(100000703101)(100105400095)(10201501046)(6041248)(20161123560025)(20161123555025)(20161123558100)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:DM5PR07MB3098; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:DM5PR07MB3098; X-Forefront-PRVS: 0450A714CB X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6049001)(6009001)(376002)(346002)(189002)(377454003)(199003)(24454002)(25786009)(8936002)(3846002)(36756003)(6116002)(6246003)(54356999)(58126008)(117156002)(4326008)(478600001)(316002)(2906002)(2950100002)(5660300001)(68736007)(42882006)(7736002)(31696002)(31686004)(101416001)(33646002)(81156014)(53936002)(16576012)(305945005)(8676002)(23746002)(86152003)(81166006)(97736004)(189998001)(47776003)(72206003)(106356001)(65826007)(54906003)(6666003)(230700001)(90366009)(65956001)(66066001)(76176999)(50986999)(6486002)(105586002)(77096006)(229853002)(65806001)(16526018)(64126003)(50466002)(83506001); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR07MB3098; H:[192.168.0.105]; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A: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; DM5PR07MB3098; 23:sstJl/qUE/Arp5magrUI2t9+vgvBZG8ASc6hp?= =?Windows-1252?Q?ZuzVKspNrHe4X2vZ5r3kc3+RmJWjwUrICA+eLI3fo0ojko8ZckCXRtH8?= =?Windows-1252?Q?a4gCmQ7yOZQk//IvfgMukryIEbyJDPFbxMKLrNkIxW7ghsSE/zy9xDxb?= =?Windows-1252?Q?c1eeu3Eyym9lzVB0ZQodn8zz+b3rnQ7apBHNsLcnp3sIscTT0JZauP2R?= =?Windows-1252?Q?2j7u8KI9O6niEhax5ehnal1mjFSGGQunzt/epRsaxJX+SCLFiLYaiaCx?= =?Windows-1252?Q?T6kvMpN6Xj+KM8iLLHQDbc7h3Dnf30HDmoy66dgcfQue/guzBLpNn0pq?= =?Windows-1252?Q?FKfzuHF8VhKYx9LaEu9BrS07nffmeACuGBIHWT99C2yh4ZtR+x4Mwwvs?= =?Windows-1252?Q?95o537Rn8DPiLNF+FMTGWDeu3BKTavsI05XR5i6Apvn+Rodu8z8+iGRW?= =?Windows-1252?Q?zcSwSRR9BpSgaI6TVvffspTDuEkDs6Au5jMbBfKO1U6jRq5tnl7bhvz5?= =?Windows-1252?Q?d94uAXzwrPHKT08Nx/5ZWWHl6o1+1j7+i6yzos7WHPN8MJrfLkaPYJ5G?= =?Windows-1252?Q?pf0EZyckQjBgteGia69Uko4nOqUkSFaO9Fa2ja7g88PP1F3FEKJ424/n?= =?Windows-1252?Q?y9AQdseg4r/niM/StbQoESkR/fcZv3fqbCmVyYYUeOh/LR5BqKBIw7dg?= =?Windows-1252?Q?s0+jtPM5XzqVwh+49NnH9s6+c8u4fRhJX03xoaxl3yAWQRZObPYnSW91?= =?Windows-1252?Q?46ELNcmCgfPzBGIOXhzdXjiVX7ceABWM8ub1zJ6yWv5Nylk794PZ5k8Z?= =?Windows-1252?Q?i2o+mBURPeJ3iUAhMGmr3hlXEIrtI+qjrk4hjiKfQTeVkKj1w55JYZ/C?= =?Windows-1252?Q?u0ki2xAA5cCAXS5Q0nL8xbSxZOe/5zCJwudzTlpSFb4SWhx9tkZ56ytc?= =?Windows-1252?Q?t4Ls0WJuAHaTBKb+kIywLvboIqDzAfa0dm1l6krfLtzeDWRr/mDdU8H/?= =?Windows-1252?Q?pdaSOS+23a2WaV7Nhg+9rJAbTox8b1krLi2e8sTIHDGXbkVQvgaxjyOB?= =?Windows-1252?Q?YYCbytGcyma5c+Jr9F4Prs6xleQXvDk7gn+qSrVdYaHkASZquwuXSUH9?= =?Windows-1252?Q?ZW9QpS7I9nbTLcI9bFtwbvBPMUbRhRTYU0DYZZc8PmvOqGVgr3v7La1M?= =?Windows-1252?Q?RJnHvfrTVPgY788UtFRD7rAEJgBtRNkISpzW+vlekwj55QPFzAXDzaFS?= =?Windows-1252?Q?H+x7SZanDjJ8Y7pvWzpZtpqda9G9HBHtm/uVXFYrysLNIaa6f1aq1ASE?= =?Windows-1252?Q?5JwfK4tYO90Uv++EP49zZCAF+QB4EAx+CTAh2E3+v5X37vp44ksh20LO?= =?Windows-1252?Q?y5i0CBDYb8hwDr2qPQVvzGREcVittOyVnvEMPG8gX2pVUZSqzvchcX5r?= =?Windows-1252?Q?5MLpv7zyjknwPe5pV2NPRIk0SmvLlJLFw8mXhB/Isu1ql//lFTkRyFQA?= =?Windows-1252?Q?26lSUAdganq1G79IPNT44MFHuty?= X-Microsoft-Exchange-Diagnostics: 1; DM5PR07MB3098; 6:H/m0sgsOGxnx+fYsWQo6cf0/HP6TgKC0+R+9Xql4x4JF2xVKSOvA4rsvDeXhSCzVftpQvpj1zmIcY+QN848s+KBCr/kbdOlh+T7yJsFmuhGGLKB4RjNmgm0SMaBLY7cK7kgEedQrh2O3B37i2Wnir895Kx/Nua2q3/SxjF8ymIi4kPpbKJhMkxAxNwQIzss5Hd9qHYAPp1yBPMC605Wk+gX3hLY10EjVj0QwOtoU6oTEY040kEeCM8lWLYduMuqvy8Je4wYmB7tEHR9XBAEfvzKNnZqBWxkDsaOghgUPoMZFFMZi2DbwPnHfPkWFrk/6/cjNJOX7e+VTGxIMaUftlA==; 5:pBl8XErAeH7ZQNSOE4DQxlXiF1cHIo3ykfgTuyfDe/7xNzgVMLe8BGmWn8tbCbl9g/dvk6g+c4p4g0MFahQjilAW3y9Qi7OxVJRDAXdLu6hDFZhSnQlzW95XElm5UJ5XSxP0PzoyFLWkkjFF8F1dAA==; 24:q4lYGxvOPhZDy8Rxoo89OA5OcE5mSEpvN9SN/6YKCyPf4rx1u18B9tN7uNyKRcqZjMQuqwLTJ47WWiImLy1Mc5hNAcJEO4p/VqOvBMYLq/k=; 7:nT5BbkoB2dpMn+Y/LZpP+5ZBvewaY93whuU+SH8lKL4Y8WjYNDCUd+2P3m0uKfCfNHZRCKzLsusTGFQ5Wi2NEFt0wavgDheg7RY/Onk/ivpa+1rhJ/S2wdPti2wGSGDeunOD237gJMD1r5ErUaOVgEmPMRWAEweGgv7cRoLNKDaQIDG6H2zSc57gKj15E7J5EMx8EipJwAp1MLIbEj5+4JVvjL9WAUykuutGaoB7As0= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Oct 2017 15:47:56.9402 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR07MB3098 Subject: Re: [dpdk-dev] [PATCH v5 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:48:01 -0000 Hi David, On Wednesday 04 October 2017 08:55 PM, David Hunt wrote: > Signed-off-by: Nemanja Marjanovic > Signed-off-by: Rory Sexton > Signed-off-by: David Hunt > --- Glad that ifdef clutter removed. Few nits though.. > lib/librte_power/channel_commands.h | 42 +++++++++++++++++++++++++++++++++++++ > 1 file changed, 42 insertions(+) > > diff --git a/lib/librte_power/channel_commands.h b/lib/librte_power/channel_commands.h > index 484085b..020d9fe 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,52 @@ extern "C" { > #define CPU_POWER_SCALE_MIN 4 > #define CPU_POWER_ENABLE_TURBO 5 > #define CPU_POWER_DISABLE_TURBO 6 > +#define HOURS 24 > + > +#define MAX_VFS 10 > + > +#define MAX_VCPU_PER_VM 8 > + > +typedef enum {false, true} bool; > + do we really need typedef for bool; can't we simply use bool data-type? > +struct t_boost_status { > + bool tbEnabled; > +}; > + > +struct timer_profile { > + int busy_hours[HOURS]; > + int quiet_hours[HOURS]; > + int hours_to_use_traffic_profile[HOURS]; > +}; > + > +enum workload {HIGH, MEDIUM, LOW}; > +enum policy_to_use { > + TRAFFIC, > + TIME, > + WORKLOAD > +}; > + > +struct traffic { > + uint32_t min_packet_thresh; > + uint32_t avg_max_packet_thresh; > + uint32_t max_max_packet_thresh; > +}; > > 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]; > + How about const char * Or in case not possible then #define RTE_xx 32 Or use existing RTE_ for same purpose or some micro local to power lib. > + uint64_t vfid[MAX_VFS]; > + int nb_mac_to_monitor; > + struct traffic traffic_policy; > + 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; > }; > >