From patchwork Tue Sep 27 10:09:02 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tadhg Kearney X-Patchwork-Id: 116965 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 41860A00C2; Tue, 27 Sep 2022 12:09:54 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 23AFA41133; Tue, 27 Sep 2022 12:09:54 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mails.dpdk.org (Postfix) with ESMTP id 29551410D0 for ; Tue, 27 Sep 2022 12:09:52 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1664273392; x=1695809392; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=B6l+dRLC/xMWbDGC5I4SDrDU8QATGmuSOhRyq5XBIZU=; b=QE0OdPcHpkIACCfwPdwO47X/92yOizxQFi44UOVB98nxC1x4yfy7rE2e YtcP2m6f0aeFOhc780RGktOWVmTT0S3Btf1PSA612gdvmvA9simZGd58Y HIRr9ZRLfJwO+dn92azd1x+RZmCbLzjsX8BDWhwYuba8uw3QikCdMncZk WHrbYqMiWAl51cx0+NC06p/ShBKt0TuLWD1d238B8MqNHzTKciW6Lr0Iv 3P/x7t7T98cQSCgZUmmgpU52HyzSaQNu5lPdw/gM2VMZU8l7cvNAlWTpY qY8GkhSMFNp5O3n6JNqFpitt2j5bnXwg0RnlG9DHYhFmp9gHrLI4HjZhj A==; X-IronPort-AV: E=McAfee;i="6500,9779,10482"; a="298874268" X-IronPort-AV: E=Sophos;i="5.93,349,1654585200"; d="scan'208";a="298874268" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Sep 2022 03:09:51 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10482"; a="621466608" X-IronPort-AV: E=Sophos;i="5.93,349,1654585200"; d="scan'208";a="621466608" Received: from silpixa00401183.ir.intel.com ([10.55.129.143]) by orsmga002.jf.intel.com with ESMTP; 27 Sep 2022 03:09:48 -0700 From: Tadhg Kearney To: dev@dpdk.org Cc: david.hunt@intel.com, anatoly.burakov@intel.com, reshma.pattan@intel.com, Tadhg Kearney Subject: [PATCH v5 0/3] add uncore api to be called through l3fwd-power Date: Tue, 27 Sep 2022 10:09:02 +0000 Message-Id: <20220927100905.1505722-1-tadhg.kearney@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220920094822.1403168-1-tadhg.kearney@intel.com> References: <20220920094822.1403168-1-tadhg.kearney@intel.com> 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 This is targeting 22.11 and aims to add an API to DPDK power library to allow uncore frequency adjustment. This will be called through the l3fwd-power app and gives the ability to set the minimum and maximum uncore frequency to both min, max or specific frequency index. Signed-off-by: tadhgkearney --- v2: Fix compilation warnings and errors. v3: Remove addition of x86 global macros. Add 2 new API's for getting package and die numbers from system. Address comments from mailing list. Improve efficiency of code and code quality. v4: Fix compilation warnings and errors. v5: Improve error message for uncore access not working. Tadhg Kearney (3): power: add uncore frequency control API to the power library l3fwd-power: add option to call uncore API test/power: add unit tests for uncore API app/test/meson.build | 2 + app/test/test_power_uncore.c | 301 ++++++++++++ doc/guides/prog_guide/power_man.rst | 38 ++ doc/guides/rel_notes/release_22_11.rst | 5 + .../sample_app_ug/l3_forward_power_man.rst | 29 ++ examples/l3fwd-power/main.c | 122 ++++- lib/power/meson.build | 2 + lib/power/rte_power_uncore.c | 451 ++++++++++++++++++ lib/power/rte_power_uncore.h | 194 ++++++++ lib/power/version.map | 11 + 10 files changed, 1152 insertions(+), 3 deletions(-) create mode 100644 app/test/test_power_uncore.c create mode 100644 lib/power/rte_power_uncore.c create mode 100644 lib/power/rte_power_uncore.h