From patchwork Fri Apr 8 14:08:43 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Laatz X-Patchwork-Id: 109524 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 19C8EA050B; Fri, 8 Apr 2022 16:09:06 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AE3DA4067E; Fri, 8 Apr 2022 16:09:05 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mails.dpdk.org (Postfix) with ESMTP id D0D754003F for ; Fri, 8 Apr 2022 16:09:04 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1649426945; x=1680962945; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=5phAYh+skP38To1acr5WgOQthqIJB/l4DXOuBdiLRoY=; b=bRG9V7aeh4+qwqTc+8K22QxqxfsEC2vFzIYCpeIpU0mWMo3VQk/8r4zN 8Wa9pJV8eBSMYvt/FpVubDbk4wQejuLEZKUvxdn1xTt0eYzIHHz6ePW5X HTPWzhDU93CuxbWlGV3xStdX052Wo8tCxcDg/ywFGBViZqZGg3eDihIDO DoyN57aUVz/H8AOw1MKoQitUtuNHFrA7mtWkLyGcqWxvpYBF0HHR6+bkM YWsqySI0hEto9w58DWAhIdjyGXDQEHO3F7vFVQY9GhxT2RBAC8h99/K0+ xduzHRRd/va/TA/zKQCC/02ccPGBiyxucUBN7s4hbj+NyNGNinFNWFaQZ g==; X-IronPort-AV: E=McAfee;i="6400,9594,10310"; a="243732882" X-IronPort-AV: E=Sophos;i="5.90,245,1643702400"; d="scan'208";a="243732882" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Apr 2022 07:09:03 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,245,1643702400"; d="scan'208";a="698192699" Received: from silpixa00401122.ir.intel.com ([10.55.128.10]) by fmsmga001.fm.intel.com with ESMTP; 08 Apr 2022 07:09:01 -0700 From: Kevin Laatz To: dev@dpdk.org Cc: Kevin Laatz Subject: [PATCH 0/4] Add APIs for configurable power options Date: Fri, 8 Apr 2022 15:08:43 +0100 Message-Id: <20220408140847.1319312-1-kevin.laatz@intel.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 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. 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 examples/l3fwd-power/main.c | 75 ++++++++++++++++- lib/power/power_pstate_cpufreq.c | 22 +++-- lib/power/rte_power_pmd_mgmt.c | 112 +++++++++++++++++++++++-- lib/power/rte_power_pmd_mgmt.h | 138 +++++++++++++++++++++++++++++++ lib/power/version.map | 10 +++ 5 files changed, 346 insertions(+), 11 deletions(-)