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 08E5D4372C for ; Mon, 18 Dec 2023 08:49:37 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D6A20410F2; Mon, 18 Dec 2023 08:49:33 +0100 (CET) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2048.outbound.protection.outlook.com [40.107.94.48]) by mails.dpdk.org (Postfix) with ESMTP id 1A13440E68; Mon, 18 Dec 2023 08:49:27 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=A/p2r4Xg44RVnlAKqhiNjSvUbnZvp6cgBKkT3rZs27hnwhcNKdoHjW7d5YOT556N7fkHcQ5sxAsA/mZMEsO8BeVilOAwMzSxhL4HODXiCMAqVHPq5gAvlb/kMond7QsL3P0pOYR9aDPU7BYM0iUzOT0BCTNT4XI3OQ5gpBza16BWomQkutHZOzFY29/+XUbFcc9e2paKOPc+HxpgX33lZTEqscpD85ureyix/R3n9EESocho6pVEDMeUujMVkDfJhlHQJYyiiY/95QL+C1738+9RIqcDLmRNi8P2qjGidmo4zCVL5/6aSDeodVBLxDLUHqVDd0yCwn0dBjEqnzv+Aw== 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=k5F4QYFq3mqQ+HwcgN+t/SkQkNV7CbNpbJgB3zhp3AR4vL6N37BbKgkQFtnMP/jNsiSKH+jE1JvsZKisoWE1oy88BHjwMBAsi3l1Rh7vEg6FD8evPT9veCpYOGDp7oj95RY6SM9ztn8DNHZsDDg1iTlgk813wq+dDUR5qNy0jaOscleMZNpAPmbaYHOirKNVK2IVeRqV1RhxP9XFicDn0oealSxfHOMDAJcIYFamwmb2phLNXPIrmvenOB/0e4XTxR1bSDsuMLsHyykKBxmars3mOCLMgpGe2fM3RoRsxu0CEHkcuPvZSCHSG40OzF51+8r4daZXVMZfpWKoMxIv9Q== 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=il/4qSwf8xeata8+zQjIB0HQlMwxns7ibbsmBXhbe72gTx4lAUAMpmhofLhPVAUAfgYTjnztFsRiUKa3PjqJJ5JKnrT+hb9BQy+db//4M5eTVc3XA65sGUjAy5gm4ynzNwuxLcCq/VqYMm9nk/4juZELNxsOLXGD296HNtfFo/I= Received: from MW4PR04CA0140.namprd04.prod.outlook.com (2603:10b6:303:84::25) by DM4PR12MB5819.namprd12.prod.outlook.com (2603:10b6:8:63::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7091.37; Mon, 18 Dec 2023 07:49:24 +0000 Received: from MWH0EPF000989E6.namprd02.prod.outlook.com (2603:10b6:303:84:cafe::29) by MW4PR04CA0140.outlook.office365.com (2603:10b6:303:84::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7091.37 via Frontend Transport; Mon, 18 Dec 2023 07:49:24 +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 MWH0EPF000989E6.mail.protection.outlook.com (10.167.241.133) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7113.14 via Frontend Transport; Mon, 18 Dec 2023 07:49:24 +0000 Received: from 7dbylenovo.amd.com (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 01:49:23 -0600 From: Sivaprasad Tummala To: , , , , , , , CC: , , Subject: [PATCH 6/6] examples/vm_power_manager: fix lcore ID restriction Date: Mon, 18 Dec 2023 07:49:05 +0000 Message-ID: <20231218074905.42749-6-sivaprasad.tummala@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231218074905.42749-1-sivaprasad.tummala@amd.com> References: <20231218074905.42749-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: MWH0EPF000989E6:EE_|DM4PR12MB5819:EE_ X-MS-Office365-Filtering-Correlation-Id: 2f0057f8-e8a7-45f3-2a41-08dbff9ddab9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: CxU4YIHFqp7lcVtLm/iVSJwPXIhopi6xGQI+xg2WW1RTTG3vkA2kkAVL8vdEX21QbZJGQTLBzNv2wK8Om3n/sVLKhuRb+UQB8qpvs4w0YYfXHu1k2DXMsevPbFm68c4R+yZr5L8JI4RetkIdqwe3bft+ksSVWUhhwlFo1Oiyi5QspktJDRsYOKFT9L5es+pZZQx/i6kYIEJBPPsCm08WylqvEuKGW2usLpXyEs/ShH7fo7aWJyKKJEBb8eQ0MtGCTmiyXGRKdNOtGcTVDl46ly49G+yh94FW2gLGasBXsaYln5793N0SixGTdS0rHY75Dy7SUTqYTz5aEx2QO0scApqRDgx/vQ6mVn2CmeA6Q6wrRLLxeQunHvb9PwoYZ89aOLtqJPApEijimZF/DLvc7b6xpHwlV7L/87pv9udyMhz6iWJjXREu5Q09eQlsKw5G5+REoKa800LZ1TOJOKtdRH9Pcgjv/gy1LaoJNygj6pYe8FOc17LoanqUHzRxT5BOgHd08iruwY/GEHbG2ykNeVy1eO8QHNjVtPcpO6/aMJJCJnIllkNW+Dfj+NvKy42AF33egwlDlRV2wI8HfgX4miVmkg1uG2PkJst23uVCGJMsn7TGXjkjdQ1aFP3ZdUGVOP7ySas058UOsytTflKJs0hiYL1OyA8vFvuKCmH2WBWAhj7OPl7hHka1hZnOMAvhto7iHGcG9/cWucc01CqoduANu/JmyQkyAipDOypPz8BQAiqxHxxK7Fi8TtCCPIC/p8TctbvMVWDBtfqyB/nc+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)(346002)(396003)(136003)(39860400002)(376002)(230922051799003)(82310400011)(1800799012)(186009)(451199024)(64100799003)(36840700001)(46966006)(40470700004)(83380400001)(2616005)(70206006)(70586007)(110136005)(478600001)(54906003)(316002)(1076003)(26005)(40480700001)(336012)(426003)(16526019)(4326008)(44832011)(47076005)(8936002)(8676002)(7696005)(40460700003)(6666004)(36860700001)(7416002)(5660300002)(2906002)(86362001)(81166007)(356005)(82740400003)(36756003)(41300700001)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Dec 2023 07:49:24.6011 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2f0057f8-e8a7-45f3-2a41-08dbff9ddab9 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: MWH0EPF000989E6.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB5819 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..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