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 553D243CE8 for ; Mon, 18 Mar 2024 18:32:37 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 07B5F40DFB; Mon, 18 Mar 2024 18:32:36 +0100 (CET) Received: from NAM04-MW2-obe.outbound.protection.outlook.com (mail-mw2nam04on2064.outbound.protection.outlook.com [40.107.101.64]) by mails.dpdk.org (Postfix) with ESMTP id AEE3440A80; Mon, 18 Mar 2024 18:32:33 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PoWsx9fqH90XbW/OGo4ttADRSJgzEgIgayZEjMzHK6wTMiMJTQtDY/OBKCDlGWAvoj24t3QxpN1l20Egs+rUWIPhD7113JGzS3qOJ+wx6N051ZHCMzIr5G5BI4IQKHxzWDbkkoGSSu+OhPiJ9Dm43qdjflF/z6k/iv4JvRdlC2c1XiCa0ZGuEGIc93VU5E8R57wZ7fniaKCqA9k9TNUAyAAJP6O4NRELIC20KpGDT12bIb800T/lY1gb0mUh4HoEpeQElqAb6XpnzRu1PJieO4wb/9TDaOZ4d9aNwZDg6netlJ+O9pgSn3zZCEJD6L4iGMssGE+FFnMw4WoS/Z6MhA== 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=OTd5VNcNhO6FDeMTA3luxXWRKtBBvBwfBetB+a3X7iA=; b=d50YAC2CevXffpqCZtY+DeDr11K7hp0+SL6ZODlb7U2yy7zTj1wrVeBxioEeLJwogp7xN/KenGTMKWjwjObcXNJt6CWCClshyByEcdKJrW/pMpOwkKUlagqe2ZkpTV73BBb7zFtBlIzKJ0Vy+VbT/owIvkf8lINNH7Q67D9trryUXYV4uO7SF3xalUXjDe3h6fORuS4v77ae3tiOgxsoWV9zDuv6u3kxxqRMDZavkSS9A/NeDu3HijqEDnALASf43uJryMe3XIK4hDUvJb1hBY1fVmzy8WcdVhMV+JMakuKcptUeZwYw/Y1+zt18Fcf4w4wVI2sripMmQGermb7N0g== 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=OTd5VNcNhO6FDeMTA3luxXWRKtBBvBwfBetB+a3X7iA=; b=LlrBf55a727wV9A+7hXeZ5htz2Y6yrrLG0As3uSz/73vrhT4/NdYecR2DpSnPOZYSJ/9fBtmrI0ytLttRk0lsGmGJvcXcSUJ7WUPZDEYPLtf6CQrA5urkTGQYwHuj7BmzlyPgdRSSaakO4o5mXDwFCRDXx2ZhHiyi4ql7KyOHyU= Received: from BN0PR04CA0191.namprd04.prod.outlook.com (2603:10b6:408:e9::16) by PH7PR12MB9075.namprd12.prod.outlook.com (2603:10b6:510:2f0::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7386.27; Mon, 18 Mar 2024 17:32:29 +0000 Received: from BN3PEPF0000B076.namprd04.prod.outlook.com (2603:10b6:408:e9:cafe::10) by BN0PR04CA0191.outlook.office365.com (2603:10b6:408:e9::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7386.27 via Frontend Transport; Mon, 18 Mar 2024 17:32:29 +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 BN3PEPF0000B076.mail.protection.outlook.com (10.167.243.121) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7409.10 via Frontend Transport; Mon, 18 Mar 2024 17:32:29 +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.35; Mon, 18 Mar 2024 12:32:25 -0500 From: Sivaprasad Tummala To: , , , , , , , , , CC: , , Subject: [PATCH v5 6/6] examples/vm_power_manager: fix lcore ID restriction Date: Mon, 18 Mar 2024 18:31:45 +0100 Message-ID: <20240318173146.24303-7-sivaprasad.tummala@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240318173146.24303-1-sivaprasad.tummala@amd.com> References: <20240116182332.95537-1-sivaprasad.tummala@amd.com> <20240318173146.24303-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: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN3PEPF0000B076:EE_|PH7PR12MB9075:EE_ X-MS-Office365-Filtering-Correlation-Id: 9c0e1d04-1bfe-4b4f-42ef-08dc477162e6 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Kevyx98sX8zBI8CVC7C7Io7xShhCJxuqNnstC+/Vn17fn0gCmntJzBRdi/o8V5ZJyrqGXxHxjYJh+aRwXD/Hfn/i1w9X59fLKkxsBXA/GGEqYwACUrSTkD67Ju03apVZoV+lsDPapcHMU6ikZvJmP5ZH60JnKfz8bZhkqEJdN6lT5uFIpxlMCJTKco1CdVkkcnRQW/d5fc/3gRbUz6iCzIgVc1Ub4qLmng6A5+x3lQa99RPf1LfJ43qhQZOSKVRP8GvJTF6loNa6IBypTVjuF5eEPrpCEukKGV6RfHA3XQNNBtcyOciMdSAcUOSbsFUwACFG5S0M6AoZkX+r3KJj0M51g0Ht/YiBNskb8srxpGgTD8GzWFzmJZpE7uxszmV/roP1DqmKHGdq9DFUBFRNIGGZwI3A2J4X+x1+uqS5HboJfIjAjhDjAypltq4HP12taULn0sULkC+zkgox8b45W7pmMm4zYLafwpEPQO2NSl6do2vlcVCpEMtKiu8CFd9e5EYTPmZRar2xlF/cO0FaykntvpKIZc2kABiSZB2IXeFqxyCSAsvuDMxAyASoCkVGK5ypb57b9WWJ+r0+PxFwuN0uFe+M2678EVJBoUaxgqbULg7deZxQcDdOUMV3nptXYVNWHFM6J5DCm8i/5fPk9d21sZpdhMCEk69XoYW6ddexAdxSz3BQrmsCu7q4mmuJTe1dwg4rGLZqMT208saKUsHlpsUHrz+Hl2TEPY3irh1V3PAXf8CeT5hN/eBzl19ZDb0X4aOAnUj3TVa2gGgKJg== 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)(376005)(82310400014)(7416005)(36860700004)(1800799015)(921011); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Mar 2024 17:32:29.5433 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9c0e1d04-1bfe-4b4f-42ef-08dc477162e6 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: BN3PEPF0000B076.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB9075 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 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..5eddb47847 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; + uint32_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_UINT32); 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