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 CE386A0C47 for ; Tue, 10 Aug 2021 17:42:56 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C87B44014F; Tue, 10 Aug 2021 17:42:56 +0200 (CEST) Received: from smtp-relay-canonical-0.canonical.com (smtp-relay-canonical-0.canonical.com [185.125.188.120]) by mails.dpdk.org (Postfix) with ESMTP id 333BA4014F for ; Tue, 10 Aug 2021 17:42:55 +0200 (CEST) Received: from mail-ej1-f69.google.com (mail-ej1-f69.google.com [209.85.218.69]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-canonical-0.canonical.com (Postfix) with ESMTPS id D86773F047 for ; Tue, 10 Aug 2021 15:42:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1628610174; bh=m+/uYfUwRppk6j3cKaqQMV2b5+FSXZB2K79jzJrDE6o=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=k+zYHqoANCQ1TJFiuKCkNkQQY1++Wd7TdWU6rGcdWQCKLsejYFnzuVaw2SmxKYTuq Oyrbt4+Sxu8vFIWTFn2ASQsfvkCb6jE3ygTcYinTBzXKs7rPlcjzlO4zuoz8lyiHpS m5LkS4YkJ3IuChtHCthtV9hRSFeYDf7maoxvMrmlEKUDLX4csQSiBFacX4eX+VQPcx mjSZxY9jo3NqnexCxLUNwkeCpzGPqPbpcfHk27NywMT7qoI/Q/yk3lLvoK0aSejNIq fv8207nTyJ7G1OKuMYqPlaVRQSarVnfGknnqBLKcDz55pb90APOMNicjs4TQSwe0eY 1He2FKcEthTbQ== Received: by mail-ej1-f69.google.com with SMTP id qf6-20020a1709077f06b029057e66b6665aso5785116ejc.18 for ; Tue, 10 Aug 2021 08:42:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=m+/uYfUwRppk6j3cKaqQMV2b5+FSXZB2K79jzJrDE6o=; b=CJzKGkcgdfXmW6YNRSDQ302YiJq6Hk/ZXW22RV2lT9vlbvJ7+oCQ6CkxgdujYfKH9g YVnZrVG6ndD1HPXjsWeHUxg+Hzvv+25g1bQqgn8w+fp81Koe6iZrx4erQTsTaTGbJ0qi 3UDFcaSw9tmZHOnm+0SjK+4NYBl9CU84fB8Dh4zXN1RlwUnS/TH8uxuLg1vdNMGSypNV bAnVMqj6GadTL2zyXOMoROHgmAM16cULMC/ufpmXiiRPfLokp9gNe8pzpKwGgPDynVjp 0xpoUYrJve2yEWseOWYmZ4Te2p9O5l0jXmHtFiDz52ZpA5ARSY5NzN2raUJNbo+2deoJ bsaw== X-Gm-Message-State: AOAM5338l46Wg2l5yHpX2o7Dd0+BX9rbGVzHWt3g2lR3lHiDBH6vrI8m jUf9QdqnooNflm3o1/Wm6kBKOQTHC7EGX3O5UkIyEkI3u9ZRxL4VMzZqhRVSRH/FEO8l2C9RPjR 9ZlhXeVEwXFFltqfRXweEO0Sd X-Received: by 2002:a17:906:3a57:: with SMTP id a23mr28663100ejf.469.1628610174155; Tue, 10 Aug 2021 08:42:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyY7PAB2vX34yA76pPR0h6koNfy7ItZi8CA9iBeEtO7pdKYHlbnJ02xS+WG2HktEqAtpDZmcQ== X-Received: by 2002:a17:906:3a57:: with SMTP id a23mr28663073ejf.469.1628610173831; Tue, 10 Aug 2021 08:42:53 -0700 (PDT) Received: from Keschdeichel.fritz.box ([2001:67c:1560:8007::aac:c4ad]) by smtp.gmail.com with ESMTPSA id 8sm783795ejy.65.2021.08.10.08.42.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Aug 2021 08:42:53 -0700 (PDT) From: christian.ehrhardt@canonical.com To: Anatoly Burakov Cc: David Hunt , dpdk stable Date: Tue, 10 Aug 2021 17:39:26 +0200 Message-Id: <20210810154022.749358-46-christian.ehrhardt@canonical.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210810154022.749358-1-christian.ehrhardt@canonical.com> References: <20210810154022.749358-1-christian.ehrhardt@canonical.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'power: fix namespace for internal struct' has been queued to stable release 19.11.10 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi, FYI, your patch has been queued to stable release 19.11.10 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 08/12/21. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/cpaelzer/dpdk-stable-queue This queued commit can be viewed at: https://github.com/cpaelzer/dpdk-stable-queue/commit/4b0cbc869ae8c882ab15d1c8ae8247832afe05da Thanks. Christian Ehrhardt --- >From 4b0cbc869ae8c882ab15d1c8ae8247832afe05da Mon Sep 17 00:00:00 2001 From: Anatoly Burakov Date: Thu, 8 Jul 2021 16:38:22 +0100 Subject: [PATCH] power: fix namespace for internal struct [ upstream commit 02a6d683113428f87e2375ba249b9c40ae46ff79 ] Currently, ACPI code uses rte_power_info as the struct name, which gives the appearance that this is an externally visible API. Fix to use internal namespace. Signed-off-by: Anatoly Burakov Acked-by: David Hunt --- lib/librte_power/power_acpi_cpufreq.c | 34 +++++++++++++-------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/lib/librte_power/power_acpi_cpufreq.c b/lib/librte_power/power_acpi_cpufreq.c index 63859bcd70..9b31112348 100644 --- a/lib/librte_power/power_acpi_cpufreq.c +++ b/lib/librte_power/power_acpi_cpufreq.c @@ -78,7 +78,7 @@ enum power_state { /** * Power info per lcore. */ -struct rte_power_info { +struct acpi_power_info { unsigned int lcore_id; /**< Logical core id */ uint32_t freqs[RTE_MAX_LCORE_FREQS]; /**< Frequency array */ uint32_t nb_freqs; /**< number of available freqs */ @@ -90,14 +90,14 @@ struct rte_power_info { uint16_t turbo_enable; /**< Turbo Boost enable/disable */ } __rte_cache_aligned; -static struct rte_power_info lcore_power_info[RTE_MAX_LCORE]; +static struct acpi_power_info lcore_power_info[RTE_MAX_LCORE]; /** * It is to set specific freq for specific logical core, according to the index * of supported frequencies. */ static int -set_freq_internal(struct rte_power_info *pi, uint32_t idx) +set_freq_internal(struct acpi_power_info *pi, uint32_t idx) { if (idx >= RTE_MAX_LCORE_FREQS || idx >= pi->nb_freqs) { RTE_LOG(ERR, POWER, "Invalid frequency index %u, which " @@ -133,7 +133,7 @@ set_freq_internal(struct rte_power_info *pi, uint32_t idx) * governor will be saved for rolling back. */ static int -power_set_governor_userspace(struct rte_power_info *pi) +power_set_governor_userspace(struct acpi_power_info *pi) { FILE *f; int ret = -1; @@ -189,7 +189,7 @@ out: * sys file. */ static int -power_get_available_freqs(struct rte_power_info *pi) +power_get_available_freqs(struct acpi_power_info *pi) { FILE *f; int ret = -1, i, count; @@ -259,7 +259,7 @@ out: * It is to fopen the sys file for the future setting the lcore frequency. */ static int -power_init_for_setting_freq(struct rte_power_info *pi) +power_init_for_setting_freq(struct acpi_power_info *pi) { FILE *f; char fullpath[PATH_MAX]; @@ -293,7 +293,7 @@ out: int power_acpi_cpufreq_init(unsigned int lcore_id) { - struct rte_power_info *pi; + struct acpi_power_info *pi; if (lcore_id >= RTE_MAX_LCORE) { RTE_LOG(ERR, POWER, "Lcore id %u can not exceeds %u\n", @@ -355,7 +355,7 @@ fail: * needed by writing the sys file. */ static int -power_set_governor_original(struct rte_power_info *pi) +power_set_governor_original(struct acpi_power_info *pi) { FILE *f; int ret = -1; @@ -401,7 +401,7 @@ out: int power_acpi_cpufreq_exit(unsigned int lcore_id) { - struct rte_power_info *pi; + struct acpi_power_info *pi; if (lcore_id >= RTE_MAX_LCORE) { RTE_LOG(ERR, POWER, "Lcore id %u can not exceeds %u\n", @@ -443,7 +443,7 @@ fail: uint32_t power_acpi_cpufreq_freqs(unsigned int lcore_id, uint32_t *freqs, uint32_t num) { - struct rte_power_info *pi; + struct acpi_power_info *pi; if (lcore_id >= RTE_MAX_LCORE) { RTE_LOG(ERR, POWER, "Invalid lcore ID\n"); @@ -490,7 +490,7 @@ power_acpi_cpufreq_set_freq(unsigned int lcore_id, uint32_t index) int power_acpi_cpufreq_freq_down(unsigned int lcore_id) { - struct rte_power_info *pi; + struct acpi_power_info *pi; if (lcore_id >= RTE_MAX_LCORE) { RTE_LOG(ERR, POWER, "Invalid lcore ID\n"); @@ -508,7 +508,7 @@ power_acpi_cpufreq_freq_down(unsigned int lcore_id) int power_acpi_cpufreq_freq_up(unsigned int lcore_id) { - struct rte_power_info *pi; + struct acpi_power_info *pi; if (lcore_id >= RTE_MAX_LCORE) { RTE_LOG(ERR, POWER, "Invalid lcore ID\n"); @@ -549,7 +549,7 @@ power_acpi_cpufreq_freq_max(unsigned int lcore_id) int power_acpi_cpufreq_freq_min(unsigned int lcore_id) { - struct rte_power_info *pi; + struct acpi_power_info *pi; if (lcore_id >= RTE_MAX_LCORE) { RTE_LOG(ERR, POWER, "Invalid lcore ID\n"); @@ -566,7 +566,7 @@ power_acpi_cpufreq_freq_min(unsigned int lcore_id) int power_acpi_turbo_status(unsigned int lcore_id) { - struct rte_power_info *pi; + struct acpi_power_info *pi; if (lcore_id >= RTE_MAX_LCORE) { RTE_LOG(ERR, POWER, "Invalid lcore ID\n"); @@ -582,7 +582,7 @@ power_acpi_turbo_status(unsigned int lcore_id) int power_acpi_enable_turbo(unsigned int lcore_id) { - struct rte_power_info *pi; + struct acpi_power_info *pi; if (lcore_id >= RTE_MAX_LCORE) { RTE_LOG(ERR, POWER, "Invalid lcore ID\n"); @@ -615,7 +615,7 @@ power_acpi_enable_turbo(unsigned int lcore_id) int power_acpi_disable_turbo(unsigned int lcore_id) { - struct rte_power_info *pi; + struct acpi_power_info *pi; if (lcore_id >= RTE_MAX_LCORE) { RTE_LOG(ERR, POWER, "Invalid lcore ID\n"); @@ -642,7 +642,7 @@ power_acpi_disable_turbo(unsigned int lcore_id) int power_acpi_get_capabilities(unsigned int lcore_id, struct rte_power_core_capabilities *caps) { - struct rte_power_info *pi; + struct acpi_power_info *pi; if (lcore_id >= RTE_MAX_LCORE) { RTE_LOG(ERR, POWER, "Invalid lcore ID\n"); -- 2.32.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-08-10 15:11:14.810048247 +0200 +++ 0046-power-fix-namespace-for-internal-struct.patch 2021-08-10 15:11:13.010638042 +0200 @@ -1 +1 @@ -From 02a6d683113428f87e2375ba249b9c40ae46ff79 Mon Sep 17 00:00:00 2001 +From 4b0cbc869ae8c882ab15d1c8ae8247832afe05da Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 02a6d683113428f87e2375ba249b9c40ae46ff79 ] + @@ -13 +15 @@ - lib/power/power_acpi_cpufreq.c | 34 +++++++++++++++++----------------- + lib/librte_power/power_acpi_cpufreq.c | 34 +++++++++++++-------------- @@ -16,4 +18,4 @@ -diff --git a/lib/power/power_acpi_cpufreq.c b/lib/power/power_acpi_cpufreq.c -index d028a9947f..1b8c69cc8b 100644 ---- a/lib/power/power_acpi_cpufreq.c -+++ b/lib/power/power_acpi_cpufreq.c +diff --git a/lib/librte_power/power_acpi_cpufreq.c b/lib/librte_power/power_acpi_cpufreq.c +index 63859bcd70..9b31112348 100644 +--- a/lib/librte_power/power_acpi_cpufreq.c ++++ b/lib/librte_power/power_acpi_cpufreq.c @@ -73 +75 @@ -@@ -299,7 +299,7 @@ power_acpi_cpufreq_check_supported(void) +@@ -293,7 +293,7 @@ out: @@ -79 +80,0 @@ - uint32_t exp_state; @@ -82 +83,2 @@ -@@ -374,7 +374,7 @@ fail: + RTE_LOG(ERR, POWER, "Lcore id %u can not exceeds %u\n", +@@ -355,7 +355,7 @@ fail: @@ -91 +93 @@ -@@ -420,7 +420,7 @@ out: +@@ -401,7 +401,7 @@ out: @@ -97 +98,0 @@ - uint32_t exp_state; @@ -100 +101,2 @@ -@@ -475,7 +475,7 @@ fail: + RTE_LOG(ERR, POWER, "Lcore id %u can not exceeds %u\n", +@@ -443,7 +443,7 @@ fail: @@ -109 +111 @@ -@@ -522,7 +522,7 @@ power_acpi_cpufreq_set_freq(unsigned int lcore_id, uint32_t index) +@@ -490,7 +490,7 @@ power_acpi_cpufreq_set_freq(unsigned int lcore_id, uint32_t index) @@ -118 +120 @@ -@@ -540,7 +540,7 @@ power_acpi_cpufreq_freq_down(unsigned int lcore_id) +@@ -508,7 +508,7 @@ power_acpi_cpufreq_freq_down(unsigned int lcore_id) @@ -127 +129 @@ -@@ -581,7 +581,7 @@ power_acpi_cpufreq_freq_max(unsigned int lcore_id) +@@ -549,7 +549,7 @@ power_acpi_cpufreq_freq_max(unsigned int lcore_id) @@ -136 +138 @@ -@@ -598,7 +598,7 @@ power_acpi_cpufreq_freq_min(unsigned int lcore_id) +@@ -566,7 +566,7 @@ power_acpi_cpufreq_freq_min(unsigned int lcore_id) @@ -145 +147 @@ -@@ -614,7 +614,7 @@ power_acpi_turbo_status(unsigned int lcore_id) +@@ -582,7 +582,7 @@ power_acpi_turbo_status(unsigned int lcore_id) @@ -154 +156 @@ -@@ -647,7 +647,7 @@ power_acpi_enable_turbo(unsigned int lcore_id) +@@ -615,7 +615,7 @@ power_acpi_enable_turbo(unsigned int lcore_id) @@ -163 +165 @@ -@@ -674,7 +674,7 @@ power_acpi_disable_turbo(unsigned int lcore_id) +@@ -642,7 +642,7 @@ power_acpi_disable_turbo(unsigned int lcore_id)