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 3B04F4373B; Tue, 19 Dec 2023 04:30:02 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 038B142DFE; Tue, 19 Dec 2023 04:29:51 +0100 (CET) Received: from NAM04-DM6-obe.outbound.protection.outlook.com (mail-dm6nam04on2081.outbound.protection.outlook.com [40.107.102.81]) by mails.dpdk.org (Postfix) with ESMTP id DF86A42DFE; Tue, 19 Dec 2023 04:29:45 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eT5RokdTucjReF3/98P2soL7mM7CCe+bFEY0N0xoCFCPWcIblJ7RXO+Lk0Q//+WRxAWwyXVls0zZlP9vo/lHb/D3SHASIqCgmmXLkSns6xPaYSieuTGb1A3rkOhxYkHZN3jWxQliUIfOM1nYM3iuMcHhUzX0UhrlO1/BUO8vCqsPjAwoa54Qx5oaskXkAb0XCxc8PODWqdBF+5oJd3uNmWlun9RZasMN5zMP2ZP3Qx6GpVVLhbhB+uHJPnEou4HcC05s7khmWGF8cBHm6Pm64GGyj0HLEEoJ5Uvkyawk5YN0sTeLNLNbxIXMnLYcblzrLtuJMXnf78K/Af8o41remA== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=pelULDo/Wpz4C81J43QCyteewJdU1439J7sWe81Jjj8=; b=d+Fogp4k+PobZ4KcbH3jesmAvv8A6w9kDnCajWuc7FUkFYK4d7oNiOj0R9bX4TPftYFbA3CiR4ei63U59oinMfoJdLNL34ZK4A6TkODdGpo7LmEcNAyUFzMFbRzdI3H+KSP01HByGfaSNRz5TscixpX3oGHRSHETq+hqR8w+8y8molirvX8x+2O9r2Sr7310kgyOsIi8hFbYmp7E7aRLl5zoriI9xEG0qTWboRmWjTDvx3rin9m6S8EB35bauLCRduJC/UL+vElinM0LVEUobfYZXg7GHmDYwbhuQJAHq3wwI0FcEatg8jXW3bUGD0D1HrhiKae4co12r2Zh9TnOJA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=intel.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=pelULDo/Wpz4C81J43QCyteewJdU1439J7sWe81Jjj8=; b=UuilL7YohiHMAEo8J2ufZSYE3jpmgSbqy2yrBe9CNqQzkJaDE7WXRXiGkOyIYAm8DSLyPAYxcy+EQoLkBfeCkgASmoDH+8PmwY/AZBNgqMPJUOWwK5vLot9EM6BZlhQFJmLW75DMUfbJnY5zCuh7PNksh+OeNqGSInmxNXtYv6A= Received: from CYXPR02CA0063.namprd02.prod.outlook.com (2603:10b6:930:cd::8) by DS0PR12MB7849.namprd12.prod.outlook.com (2603:10b6:8:141::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7091.38; Tue, 19 Dec 2023 03:29:44 +0000 Received: from CY4PEPF0000EE35.namprd05.prod.outlook.com (2603:10b6:930:cd:cafe::a4) by CYXPR02CA0063.outlook.office365.com (2603:10b6:930:cd::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7091.38 via Frontend Transport; Tue, 19 Dec 2023 03:29:44 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by CY4PEPF0000EE35.mail.protection.outlook.com (10.167.242.41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7113.14 via Frontend Transport; Tue, 19 Dec 2023 03:29:43 +0000 Received: from ubuntu2004.linuxvmimages.local (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34; Mon, 18 Dec 2023 21:29:09 -0600 From: Sivaprasad Tummala To: , , , , , , , CC: , , Subject: [PATCH v2 6/6] examples/vm_power_manager: fix lcore ID restriction Date: Tue, 19 Dec 2023 04:28:25 +0100 Message-ID: <20231219032826.4814-7-sivaprasad.tummala@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20231219032826.4814-1-sivaprasad.tummala@amd.com> References: <20231218074905.42749-1-sivaprasad.tummala@amd.com> <20231219032826.4814-1-sivaprasad.tummala@amd.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000EE35:EE_|DS0PR12MB7849:EE_ X-MS-Office365-Filtering-Correlation-Id: 5670d748-41eb-4f82-4db2-08dc0042be48 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: gtoah0l/viL5MPO3CleYeuSfto/Ccnvj1uDZV9dcLd0ps2GPMv8R8Cpi3jX33PW+9fp91PfmZW949qWZhBYBvxWbCWP1Y2sjOF9e8lm9mkyjZzV7YWiKbNQ07HKjvI8RXi0ePfrl/yuc0v4BYkpupobZ7rKD6ZhanCU4dp0sl7VG1wdXFNvuSxB8opwH5GVidog1Eq7eOmpRiZ2yOx2NpokwoDY3sphBdoY6YMWuqILE6YpCOO4z6W3pPPStJ6ayIQB0EgsquQs6JHWxlDiowRAZ0tPj8gUIffsDLrc4wuzLU8mxgWYa9bzS7R4X/PjNhxRMJvjsEHYmZRtjnbhtsfli1yGegYd0r8m7clwR0fzrh9QtuPt2suJwSsrgjv2JE7ENEHRvKQ+0t7HJ4X96907F19Z0wtd8xeBYQJSECIreolh3PbwplkTWM4easojTDBuF0InukUvFd+nSaL/76SuQheVoDhPwpzfFclZRtqi2mAaY1pfeltH7PAPVc4kQtZZENJH6yw7clALG6x1Qw387jTNg8G4dzq50ff8G8hprNbPJH//XCuhEh/mwOcInGC5KRtsCabYr0VySGQvCeOzFTnbVUWIy4f+WGTwuHfDQ5j2r4BfNtni6N7UP6u151sxqyf5vpMg7otjY4AWL8Jpvivob6ZtQRgtv1qnjmP1rstUrs9/U8LUbQtpmf2e9HST5EibC0nmzYSGw+8l82/8+TWgawOWtpXwkVfzKDxGHTZHq5l86YC2NXjPPkjIQJbDkT2B10NW3Pref0K9Q/g== X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230031)(4636009)(376002)(39860400002)(346002)(136003)(396003)(230922051799003)(82310400011)(186009)(1800799012)(451199024)(64100799003)(36840700001)(46966006)(40470700004)(83380400001)(2616005)(70586007)(478600001)(70206006)(54906003)(110136005)(316002)(40480700001)(426003)(26005)(1076003)(336012)(16526019)(44832011)(40460700003)(47076005)(8936002)(4326008)(8676002)(6666004)(36860700001)(7416002)(5660300002)(2906002)(86362001)(81166007)(82740400003)(356005)(36756003)(41300700001)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Dec 2023 03:29:43.9081 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5670d748-41eb-4f82-4db2-08dc0042be48 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: CY4PEPF0000EE35.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR12MB7849 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 Currently the config option allows lcore IDs up to 255, irrespective of RTE_MAX_LCORES and needs to be fixed. The patch allows config options based on DPDK config. Fixes: 0e8f47491f09 ("examples/vm_power: add command to query CPU frequency") Cc: marcinx.hajkowski@intel.com Cc: stable@dpdk.org Signed-off-by: Sivaprasad Tummala --- examples/vm_power_manager/guest_cli/vm_power_cli_guest.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/vm_power_manager/guest_cli/vm_power_cli_guest.c b/examples/vm_power_manager/guest_cli/vm_power_cli_guest.c index 94bfbbaf78..a586853a76 100644 --- a/examples/vm_power_manager/guest_cli/vm_power_cli_guest.c +++ b/examples/vm_power_manager/guest_cli/vm_power_cli_guest.c @@ -401,7 +401,7 @@ check_response_cmd(unsigned int lcore_id, int *result) struct cmd_set_cpu_freq_result { cmdline_fixed_string_t set_cpu_freq; - uint8_t lcore_id; + uint16_t lcore_id; cmdline_fixed_string_t cmd; }; @@ -444,7 +444,7 @@ cmdline_parse_token_string_t cmd_set_cpu_freq = set_cpu_freq, "set_cpu_freq"); cmdline_parse_token_num_t cmd_set_cpu_freq_core_num = TOKEN_NUM_INITIALIZER(struct cmd_set_cpu_freq_result, - lcore_id, RTE_UINT8); + lcore_id, RTE_UINT16); cmdline_parse_token_string_t cmd_set_cpu_freq_cmd_cmd = TOKEN_STRING_INITIALIZER(struct cmd_set_cpu_freq_result, cmd, "up#down#min#max#enable_turbo#disable_turbo"); -- 2.25.1