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 C5DB5A0C3F for ; Sat, 12 Jun 2021 01:19:24 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BFFC140691; Sat, 12 Jun 2021 01:19:24 +0200 (CEST) Received: from NAM02-DM3-obe.outbound.protection.outlook.com (mail-dm3nam07on2058.outbound.protection.outlook.com [40.107.95.58]) by mails.dpdk.org (Postfix) with ESMTP id DECA7406A2 for ; Sat, 12 Jun 2021 01:19:22 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jwgxJH7U7FEGNqEqKkhD/hQrq7o6UF7zo/O2/7CyEAtmIPWf4mmzN9oY2heV9X23zQwshnEu+0IRm8uQxj3OnmPtbnl2uZNZQALsCQ+dsQJn7leqyXL02+OcGeEi/O4PTTYODp6sGkELf10CmP2IrFwSF4GiC882IH5L81b6sUBMpI233RF+1xPnNMKJub4c/HCSRETEBIt6DEubaq/mOmfxW0gZpNeAQgLuGwySxT0L4ZbrOeN61bj67CE8a3lbJegEQK/dRTV728dQMT6heYFRTFkD3lKkZSXUsHkYrtSLsuX784u5v7Hvm2p/yN24cCKYUZLP5tBo1ey5LhGOCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ME6L6DlrVqSXXxaOdBXnI0tI8HbI/LEFSCfOqtQX678=; b=NX8omYwaEY6TXmdiz/XRcImKBcmhCFL1CuA4LeSolQNqSgbnYccEhSdWl4UyqQyEKHWcF7zUdBEhp40nfleB/OKcRe9h/WWb97FZ+d3mLKtd2WKA3wYU1WWz139mFt8IYNnDmOjnJ+GLMUIpXE1TowJZh2+yjZu58mEqd80KthYwcu03PGYpfptHHjCwwj5PrP1PY5J6g+Dt0XoYQPtegkQbtOJfPbdmp49qZ9mw1V3cM+WBUZKE6GuTR6c4csl3bUtK/D0ERQRTa1VhXIMwbB/QrIlllYDo9tCJtaGqs5rF+ygy0e797vXNf+DY/rwjbvzwyqnXXti9/3HaF3ClEA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.34) smtp.rcpttodomain=dpdk.org smtp.mailfrom=nvidia.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ME6L6DlrVqSXXxaOdBXnI0tI8HbI/LEFSCfOqtQX678=; b=VV08/N9BpfIfcrqh1yT8OovtMQSoxz4BNw8rBzozc7aAmZCfPJcG0TQ4d4WqkTySY1+iBV0wLHTkIcaA2WJMCDNwByYfPcjPgpt9zwwjrlcyjhu9j6Phyh68QXKFm/eXjPwmg4xUSjGnZc+Yv28WVpBL+laFA5xa30qf3SeZ8Qf7cVGS9No4g4LzhuKgV8Q71YQLSnyDw99p0aLukn1faBH3R0hUlNn40UtqHQyaW6TdqmVaorzjAtA8XeheriUFspqhZWDYc3Lr9wmWmjYuUFJBgdAdhgX24ylNE3NJmwGMAdyDo1IZvfnBPvg/N2q2mDN6dFgk8LAacIt0IPUk4Q== Received: from DM5PR21CA0069.namprd21.prod.outlook.com (2603:10b6:3:129::31) by DM6PR12MB3387.namprd12.prod.outlook.com (2603:10b6:5:3a::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4195.27; Fri, 11 Jun 2021 23:19:21 +0000 Received: from DM6NAM11FT037.eop-nam11.prod.protection.outlook.com (2603:10b6:3:129:cafe::e8) by DM5PR21CA0069.outlook.office365.com (2603:10b6:3:129::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4242.4 via Frontend Transport; Fri, 11 Jun 2021 23:19:21 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) smtp.mailfrom=nvidia.com; dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.112.34 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.112.34; helo=mail.nvidia.com; Received: from mail.nvidia.com (216.228.112.34) by DM6NAM11FT037.mail.protection.outlook.com (10.13.172.122) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4219.21 via Frontend Transport; Fri, 11 Jun 2021 23:19:21 +0000 Received: from nvidia.com (172.20.187.5) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 11 Jun 2021 23:19:19 +0000 From: Xueming Li To: David Hunt CC: Luca Boccassi , dpdk stable Date: Sat, 12 Jun 2021 07:04:06 +0800 Message-ID: <20210611230433.8208-152-xuemingl@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210611230433.8208-1-xuemingl@nvidia.com> References: <20210510160258.30982-229-xuemingl@nvidia.com> <20210611230433.8208-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.20.187.5] X-ClientProxiedBy: HQMAIL105.nvidia.com (172.20.187.12) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 9c8401f9-7420-420e-94eb-08d92d2f580c X-MS-TrafficTypeDiagnostic: DM6PR12MB3387: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8882; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ASaGYxbGrh82haEb4+Bi3b7nnBd3Xd0cSGTqbmrlD/XrtmCT1W+uZys7tVYRkDYPgyQGWcX323lcMXMdsiZQLQKTBTu/0eFdKPcX8iXo8XfnLNBQsepAVLICNbAdH7EJM8Jbontu0MoKCEb3WXAynXV/8vveGcPmUR7Do4nkKUW9sfEyB7U8amzhWI3a80LxYcP8EFRhkpethDNGwjVMyZXtfer60+/KM9lsVd0lsMdf1N+iBOQgUjgU79iBX1gNe0xM+HaIfl6cE/PhiUGsp8VzQ9qwRvzwDMCtOWHrUoeCuIcFJ8derrg1lhM3Cadk+7xEEDB92u/GZ30CuMZFi43YT4lo4Oh3c+pvAmR7NYCFLXdlTlSBR8wwlu7isvOgJJoB60hQd6DzzjiFj2Nf6se09kpI1tvja9L2ZDPEpEo1Iee9BCRV7471O7pDboJdWNycHKstzNKFzl/fPnVGJUa4k5XlB2bnIohTxWnVsMT5/hfRk7p4DUQ/fOMSlI+9IRKo2SPLwwEkhwd2A9jZSIHFfFPT8KCD5Uk3+6CzQyzEF/TPVHfR98vnyCdFffiOx07DsUAXmq6K6zpASCHcEkIXA3uk1qTPn4QV1QfQkHK0bCaBztFo0vix6SC5HUrm/AVVMOfdT1uDvoUm00pUiXMrULW0qbAAjK8QNkfTZFoi3gDTyGR/KObGpHTHae3rqHBplQ9pg7MHUbKfX0nzrHdCci/o8Y8AtIor5hCWV8C0UuB4qAv9p5orFUEMXkTBJDwkJgGw6ap0ivCounvpxiBg3ynIctJR+XvvcdDcq1TZ3fP87+kJtLuk4k+7px5E X-Forefront-Antispam-Report: CIP:216.228.112.34; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:schybrid03.nvidia.com; CAT:NONE; SFS:(4636009)(136003)(39860400002)(396003)(376002)(346002)(46966006)(36840700001)(316002)(7696005)(47076005)(86362001)(7636003)(83380400001)(356005)(26005)(53546011)(70206006)(4326008)(36860700001)(186003)(70586007)(16526019)(1076003)(36756003)(6666004)(6916009)(2616005)(6286002)(55016002)(5660300002)(478600001)(336012)(54906003)(8936002)(82310400003)(8676002)(82740400003)(2906002)(966005)(426003)(36906005); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Jun 2021 23:19:21.1639 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9c8401f9-7420-420e-94eb-08d92d2f580c X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.112.34]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT037.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB3387 Subject: [dpdk-stable] patch 'test/power: fix CPU frequency check' has been queued to stable release 20.11.2 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 20.11.2 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 06/14/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/steevenlee/dpdk This queued commit can be viewed at: https://github.com/steevenlee/dpdk/commit/c729d4f1253d8123b18f2c539eff0d0655ace56f Thanks. Xueming Li --- >From c729d4f1253d8123b18f2c539eff0d0655ace56f Mon Sep 17 00:00:00 2001 From: David Hunt Date: Wed, 12 May 2021 17:32:51 +0100 Subject: [PATCH] test/power: fix CPU frequency check Cc: Luca Boccassi [ upstream commit ff6dfb8e492f1cfa8755150816d888541e2cd7c7 ] Different drivers present the current cpu core frequency in different sysfs files. Some present it in cpuinfo_cur_freq, some in scaling_cur_freq, and some actually present it in both. This patch attempts to open one, if that fails, tries the other. Fixes: d550a8cc31f3 ("app/test: enhance power manager unit tests") Signed-off-by: David Hunt --- app/test/test_power_cpufreq.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/app/test/test_power_cpufreq.c b/app/test/test_power_cpufreq.c index f753d24ac5..52f58ef8b2 100644 --- a/app/test/test_power_cpufreq.c +++ b/app/test/test_power_cpufreq.c @@ -39,8 +39,10 @@ test_power_caps(void) #define TEST_FREQ_ROUNDING_DELTA 50000 #define TEST_ROUND_FREQ_TO_N_100000 100000 -#define TEST_POWER_SYSFILE_CUR_FREQ \ +#define TEST_POWER_SYSFILE_CPUINFO_FREQ \ "/sys/devices/system/cpu/cpu%u/cpufreq/cpuinfo_cur_freq" +#define TEST_POWER_SYSFILE_SCALING_FREQ \ + "/sys/devices/system/cpu/cpu%u/cpufreq/scaling_cur_freq" static uint32_t total_freq_num; static uint32_t freqs[TEST_POWER_FREQS_NUM_MAX]; @@ -58,12 +60,19 @@ check_cur_freq(unsigned lcore_id, uint32_t idx) int i; if (snprintf(fullpath, sizeof(fullpath), - TEST_POWER_SYSFILE_CUR_FREQ, lcore_id) < 0) { + TEST_POWER_SYSFILE_SCALING_FREQ, lcore_id) < 0) { return 0; } f = fopen(fullpath, "r"); if (f == NULL) { - return 0; + if (snprintf(fullpath, sizeof(fullpath), + TEST_POWER_SYSFILE_CPUINFO_FREQ, lcore_id) < 0) { + return 0; + } + f = fopen(fullpath, "r"); + if (f == NULL) { + return 0; + } } for (i = 0; i < MAX_LOOP; i++) { fflush(f); -- 2.25.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-06-12 06:54:00.424588600 +0800 +++ 0152-test-power-fix-CPU-frequency-check.patch 2021-06-12 06:53:56.610000000 +0800 @@ -1 +1 @@ -From ff6dfb8e492f1cfa8755150816d888541e2cd7c7 Mon Sep 17 00:00:00 2001 +From c729d4f1253d8123b18f2c539eff0d0655ace56f Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Luca Boccassi + +[ upstream commit ff6dfb8e492f1cfa8755150816d888541e2cd7c7 ] @@ -13 +15,0 @@ -Cc: stable@dpdk.org