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 27B9EA0548; Thu, 2 Jun 2022 17:12:15 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 151D240691; Thu, 2 Jun 2022 17:12:15 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id CE0004021E for ; Thu, 2 Jun 2022 17:12:13 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1654182734; x=1685718734; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=gfyUsi3FPUbRgeSyFjaqR2bnqBBCmq90zh7F5zGQw78=; b=OVa87JDyk8ljL++b9xqvXvUPDSNV4xB/iRy8zVncGzMBHc4LwiUDs5CB xAp9c5/TwdLEqlGHVvMXcoQybNIwjjEYU3vY8YhFX+mzheYKKVeoCG4RQ BF6mHyyh9UVM9pBNx6M+eSRiGjdAyIBjr1At5/aP2fS6OkmeehGXoOPQT iH/mUDvdKYYFDYVz3goyqdtagl4sGMKHn4ZTcgfhIW84N3rVMkXP5Xee+ ePdAocRSudiw10E5oVP5410haNSWKGtEBzgOP3ZjL9Qfm9GN12Znkof+h GC7suw2DB9OShIEqY2v3vO1bpMFiDbcwKMK7CHImFD1kDVCg3pJCG4e4s A==; X-IronPort-AV: E=McAfee;i="6400,9594,10366"; a="275707553" X-IronPort-AV: E=Sophos;i="5.91,271,1647327600"; d="scan'208";a="275707553" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Jun 2022 08:11:40 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,271,1647327600"; d="scan'208";a="530610110" Received: from silpixa00401122.ir.intel.com ([10.237.213.29]) by orsmga003.jf.intel.com with ESMTP; 02 Jun 2022 08:11:39 -0700 From: Kevin Laatz To: dev@dpdk.org Cc: anatoly.burakov@intel.com, Kevin Laatz Subject: [PATCH v6 0/4] Add APIs for configurable power options Date: Thu, 2 Jun 2022 16:13:35 +0100 Message-Id: <20220602151339.86968-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. --- v6: * fix units in doc API descriptions v5: * add doc updates for new APIs 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 doc/guides/prog_guide/power_man.rst | 24 +++ .../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 ++ 7 files changed, 403 insertions(+), 11 deletions(-) -- 2.31.1