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 5CA32A0542; Tue, 31 May 2022 11:58:26 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3E607400EF; Tue, 31 May 2022 11:58:26 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mails.dpdk.org (Postfix) with ESMTP id 55328400D6 for ; Tue, 31 May 2022 11:58:24 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1653991104; x=1685527104; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=XtB8O6tCYctJ15BXyDDHcTpYM2ollJn7KySbkNti7FU=; b=hXSMikW22tF0YlkG5JySfGycpAhQ8qsOmW8AZ53zJsTzRruddT0xP06o 0/XqPbR/njtH4ttp5Zk4z25AetEpobmxQ/6erRRb+Iw3VPwj8GRHPiGZ5 bPL9KrYxUA7NnL6QocGBTojcFdLMnyE2usFcM0oOoN8zA5KAFw59bMQME eocJgfjuVtWZDyl/QoyVPFCFmfvvIAx8i05hzD/H5oGJw2g4OHMeI3K/T V0p78RfE0TJ9wq8d5EwA4kjtoJg11VzHjHT1RMNPY7sQ6LKZJ7hGayUzp R4U576aoL5iJe8lnelwNfp1hXGDXjxHi21kxrz9flC/R2ajjGsI98PFCz Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10363"; a="338248401" X-IronPort-AV: E=Sophos;i="5.91,264,1647327600"; d="scan'208";a="338248401" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 May 2022 02:58:23 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,264,1647327600"; d="scan'208";a="679507624" Received: from silpixa00401122.ir.intel.com ([10.237.213.29]) by fmsmga002.fm.intel.com with ESMTP; 31 May 2022 02:58:22 -0700 From: Kevin Laatz To: dev@dpdk.org Cc: anatoly.burakov@intel.com, Kevin Laatz Subject: [PATCH v5 0/4] Add APIs for configurable power options Date: Tue, 31 May 2022 10:59:32 +0100 Message-Id: <20220531095936.1965727-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. --- 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