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 82E32A04FF; Tue, 24 May 2022 15:12:45 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 25B4840140; Tue, 24 May 2022 15:12:45 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mails.dpdk.org (Postfix) with ESMTP id D94D7400D6 for ; Tue, 24 May 2022 15:12:42 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1653397963; x=1684933963; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=uPZljyrGFkNaBxS7T7oMc6XC6dSeHLl0ZSj0Ej77CL0=; b=CnNj9L9ZxsaP4PhFEiIVdix4+68gM3lAdQAFmHyj3uFr3KsfM/7QDweV JxXP4zo4nBFq4238jrix8Nhon+tUIGjCCTkU+Nw41tx3xtWlPFWBvpaRw 4elaE/CpLB2XHnZTHxPbYSWdUEPUyfAw+tEia3qYET5By1bU+8UOYCdlK nB2bEeONPDKHoSc7I6wMHESmOC2IGa29kDajFV+KE3/hjHJOuJ7P3zTBM xS/nwUOZAOypvbx5NCVOdINVM5hghBhP6Q9V1LLN29n5UuafQkQlS1hQo jH0sa4UHUFwjaLi9uPOZ7lIa9IZlr28IEhj4b5YbH9J1lXooQFfzpqmkF g==; X-IronPort-AV: E=McAfee;i="6400,9594,10356"; a="271099166" X-IronPort-AV: E=Sophos;i="5.91,248,1647327600"; d="scan'208";a="271099166" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 May 2022 06:12:41 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,248,1647327600"; d="scan'208";a="703463248" Received: from silpixa00401122.ir.intel.com ([10.237.213.29]) by orsmga004.jf.intel.com with ESMTP; 24 May 2022 06:12:40 -0700 From: Kevin Laatz To: dev@dpdk.org Cc: anatoly.burakov@intel.com, Kevin Laatz Subject: [PATCH v4 0/4] Add APIs for configurable power options Date: Tue, 24 May 2022 14:14:03 +0100 Message-Id: <20220524131407.423609-1-kevin.laatz@intel.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220408140847.1319312-1-kevin.laatz@intel.com> References: <20220408140847.1319312-1-kevin.laatz@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 The power library contains some variables which are currently set by defines, hard-coded values or set using sysfs values. In order to configure these, code changes and recompiles are required, making configuring these variables tedious. This patchset introduces some new get/set APIs which allow users and applications to configure there settings to suit their use-cases. In addition, CLI options have been added to l3fwd_power to demonstrate how an application could use these APIs to expose the options to users without needing code changes to configure them. --- v4: * fix return value when scaling_freq_max is not set * fix mismatching comments v3: * move setters from arg parse function to init * consider 0 as 'not set' for scaling_freq_max * other minor fixes v2: * add doc update for l3fwd-power * order version.map additions alphabetically Kevin Laatz (4): lib/power: add get and set API for emptypoll max lib/power: add get and set API for pause duration lib/power: add get and set API for scaling freq min and max with pstate mode examples/l3fwd_power: add cli for configurable options .../sample_app_ug/l3_forward_power_man.rst | 8 + examples/l3fwd-power/main.c | 86 ++++++++++- lib/power/power_pstate_cpufreq.c | 24 ++- lib/power/rte_power_pmd_mgmt.c | 123 +++++++++++++++- lib/power/rte_power_pmd_mgmt.h | 139 ++++++++++++++++++ lib/power/version.map | 10 ++ 6 files changed, 379 insertions(+), 11 deletions(-) -- 2.31.1