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 C88494372F; Wed, 20 Dec 2023 07:46:15 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0581D42E9E; Wed, 20 Dec 2023 07:46:08 +0100 (CET) Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2089.outbound.protection.outlook.com [40.107.223.89]) by mails.dpdk.org (Postfix) with ESMTP id 9FC9142DDB; Wed, 20 Dec 2023 07:46:06 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=a4jJ9sA3z6v/YbaG4tn+ndDrQnFMgVV6PE8B9I0lUj/jbMLnaOAaE/796G17UHN7GTvIhsCWa7bRsVshJ47kbIfffebibSlq7YirP/v7aSrJdyHIBK/3ZRi8d/D/omN4hH2kpZHZTRBR5BaWWaNTwe3HEHKb4dpWyI9FVNeNs5qijQaRo3X6pnHB9xCdCqNnA2bO1ImRsznUtkrpaoYI+dba6oy1ODeTi4FbOyLRBQeFggi56HuD5NxGF4e5rYJSue4s4CGawnGHyvYK6RkoFaWHK2NwLGzMqWD2rAwYOdWGglVm2M+kICdLhFj949j2fAq7b3L64aK3n9bFTz2BkA== 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=DP70oIpgPu/QJE3u4riRwKqMYwp3jd05cVYSKgloPSL9rY/NQ2C7oh7bfHHu0Lo0d32P9sDsLUfDAT0Y7ieyLuF8MgINRmhaielEdB89xGAH8/wAZW3YOP+tykL5Q7GXYeud6NAteOttfpGH1yitib+LKmNJuDkO/RQe/sp4nMfSEBaSO2kt5YZdSqGGZJ8tnmCeJAnTAQjRpXIZKDAC7ZZ2do1GPlnCJZxTyiDuS8owpkksB41F4fdOfyGguJw2qv9IPMtAmFPFQyvJyjReTWFJbMqyzzGxjLlvR2ngqWsJ+dxjnIaGYoO3vSKSRWEydOUJbQcr20/xzyW7M66xKQ== 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=g9SI24YmUQFtjZ74dRmUq34DUpvagZ2V1vGKOyD+t6Kgj2GRo+5R6lRGcx0a6jbZa2WDGxERPjAeiMBk1JuPRAl9QVphl2CMKo7sEox3JetfOUbBUEUNi3gX6MY3ckJCdqlHRlHt7r+lvadqbPQDJpTGL1jcdhDsjjhyzh0w3YM= Received: from BL6PEPF00013E0D.NAMP222.PROD.OUTLOOK.COM (2603:10b6:22e:400:0:1001:0:11) by LV8PR12MB9109.namprd12.prod.outlook.com (2603:10b6:408:18a::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7113.18; Wed, 20 Dec 2023 06:46:04 +0000 Received: from BL6PEPF0001AB50.namprd04.prod.outlook.com (2a01:111:f403:f902::) by BL6PEPF00013E0D.outlook.office365.com (2603:1036:903:4::4) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7046.33 via Frontend Transport; Wed, 20 Dec 2023 06:46:04 +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 BL6PEPF0001AB50.mail.protection.outlook.com (10.167.242.74) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7113.14 via Frontend Transport; Wed, 20 Dec 2023 06:46:04 +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; Wed, 20 Dec 2023 00:45:59 -0600 From: Sivaprasad Tummala To: , , , , , , , CC: , , Subject: [PATCH v3 6/6] examples/vm_power_manager: fix lcore ID restriction Date: Wed, 20 Dec 2023 07:45:01 +0100 Message-ID: <20231220064502.2830-7-sivaprasad.tummala@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20231220064502.2830-1-sivaprasad.tummala@amd.com> References: <20231219032826.4814-1-sivaprasad.tummala@amd.com> <20231220064502.2830-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: BL6PEPF0001AB50:EE_|LV8PR12MB9109:EE_ X-MS-Office365-Filtering-Correlation-Id: af68407f-2182-4e5c-915c-08dc01275678 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: uVdb8XxCp/+wjPx8IOmF3kzcdrLFetNXhguGCU/v9UHckHx6iKr6i636mwDCOEwudDo+VnAZaYeoPeVInY/mMcZSPU/JahZ8PWgwMIoujpiAdcG2uAqzf6o6YfqFEbS9jrdvFQDZXZGZO5LgwsiJbxeu1FTOFUwgc6IwA/Fg1/S/dCXcb5+Li2u1PsEayEXhXPWNUw+bQM7RVs0SNcP8dTMoRvSDOYDSB4ifKsqBLBuagL829sfrhoM2N5H4swH186siFwysmoJJQzjPgwZUhdIRrhpjT68xpVgyiWF1j2GhCjZDlNQrL1tAQ+emLYzm2X6U/J0RcHs/UdC0tFHmgoUhxW6t9rVVwNtvfMvKDPdO2b58GS0t1pmHzEOZrW61/hiC9bCjFFqdcaef7btl+HKBvGMnfOv+qob1yb8w98XuKGh59EH+/yHPe2bXFDVuZ4bLCFT8IAblqglDty5XNciM96Km7vM2PJ7HPpLiExu1KmxcVv6aPy2Bp4VMXvULQGyqL0AWQ17ixq2YiOTpvxX6XZjFxtOMRPoDbtl1Mpn46JevZnu3s6z3ClORHxDodG7CZ9FtxiJv16XEikG+uQYyP/CwgS3DVt+9iRBvZvsRUZn4KXSoV0RkdR+jbm3sFNbsFVaX2TemZ7fYrDg2Pqoo5KBOmHN+tBN1eyBkYtJu4Drz21oDLBJ08b+hLt8ULhn/kcMNJE0ASmfoe094cQdbEU5kmn33R/yEnVZ+zyNOw5qQC4+oXtYfUFs87v7PfLogYqi49Eo2C9IqXPgf5A== 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)(136003)(376002)(39860400002)(346002)(396003)(230922051799003)(451199024)(1800799012)(64100799003)(82310400011)(186009)(36840700001)(40470700004)(46966006)(8676002)(8936002)(47076005)(4326008)(36756003)(82740400003)(81166007)(356005)(41300700001)(86362001)(2906002)(44832011)(36860700001)(5660300002)(7416002)(16526019)(26005)(2616005)(1076003)(40480700001)(6666004)(478600001)(70206006)(54906003)(70586007)(40460700003)(110136005)(83380400001)(316002)(426003)(336012)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Dec 2023 06:46:04.5393 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: af68407f-2182-4e5c-915c-08dc01275678 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: BL6PEPF0001AB50.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV8PR12MB9109 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