From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 80085A04F1; Thu, 18 Jun 2020 19:19:04 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6D0101BFE4; Thu, 18 Jun 2020 19:18:52 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 9260A1BFB5 for ; Thu, 18 Jun 2020 19:18:47 +0200 (CEST) IronPort-SDR: OqAycdu7aJ9K9ekKgl3mPp0J1kzlSg1YooRqmQH9j7aGA6l3N8RoSXcf7N2IGi8MFyJ0A14vTm mM6dFIBx+isg== X-IronPort-AV: E=McAfee;i="6000,8403,9656"; a="131064091" X-IronPort-AV: E=Sophos;i="5.75,251,1589266800"; d="scan'208";a="131064091" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jun 2020 10:18:45 -0700 IronPort-SDR: aIX84iS3ryB9FwwdEEO7nzGZ409rpMrrW4WjubGMoHZnriu4MT9yObsfuenZ+K1o6fbPjj6BcY scI0URsWtTxg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,251,1589266800"; d="scan'208";a="299768409" Received: from silpixa00399498.ir.intel.com (HELO silpixa00399498.ger.corp.intel.com) ([10.237.222.52]) by fmsmga004.fm.intel.com with ESMTP; 18 Jun 2020 10:18:28 -0700 From: Anatoly Burakov To: dev@dpdk.org Cc: david.hunt@intel.com, reshma.pattan@intel.com, hkalra@marvell.com, jerinjacobk@gmail.com, yinan.wang@intel.com Date: Thu, 18 Jun 2020 18:18:22 +0100 Message-Id: X-Mailer: git-send-email 2.17.1 In-Reply-To: References: Subject: [dpdk-dev] [PATCH v2 0/7] Add interrupt-only mode to l3fwd-power X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Since 20.05, l3fwd-power has become much more stringent about whether it allows initialization without initializing the librte_power library with it. This means that while previously the app could have been used to test RX interrupts functionality even if the app itself was in a half-working state, it is now no longer possible to do so. To address this use case, we're adding an interrupt-only mode that does not rely on librte_power or telemetry. This enables using l3fwd-power in environments where librte_power is not expected to work (such as inside a VM or on non-IA architectures). The RX/TX path is basically copy paste from legacy RX/TX path but with librte_power bits taken out. There seem to be two opposing schools of thought on whether we should have more or less examples. This patchset goes in the "less" direction where we add a new mode to an existing app, rather than creating a new one like it could be argued it deserves. v2: - Add API to probe support for a specific power env - Add autodetection for the default mode - Add ability to request legacy mode specifically - Fix some code style issues Anatoly Burakov (7): l3fwd-power: disable interrupts by default l3fwd-power: only allow supported power library envs l3fwd-power: code style and flow fixes l3fwd-power: add support for requesting legacy mode l3fwd-power: add interrupt-only mode power: add API to probe support for a specific env l3fwd-power: add auto-selection of default mode examples/l3fwd-power/main.c | 267 ++++++++++++++++++++++-- lib/librte_power/Makefile | 1 + lib/librte_power/guest_channel.c | 26 +++ lib/librte_power/guest_channel.h | 12 ++ lib/librte_power/meson.build | 3 +- lib/librte_power/power_acpi_cpufreq.c | 7 + lib/librte_power/power_acpi_cpufreq.h | 10 + lib/librte_power/power_common.c | 52 +++++ lib/librte_power/power_common.h | 3 + lib/librte_power/power_kvm_vm.c | 5 + lib/librte_power/power_kvm_vm.h | 10 + lib/librte_power/power_pstate_cpufreq.c | 7 + lib/librte_power/power_pstate_cpufreq.h | 10 + lib/librte_power/rte_power.c | 17 ++ lib/librte_power/rte_power.h | 18 ++ lib/librte_power/rte_power_version.map | 1 + 16 files changed, 429 insertions(+), 20 deletions(-) create mode 100644 lib/librte_power/power_common.c -- 2.17.1