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 22530438E3 for ; Tue, 16 Jan 2024 19:24:05 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D258F40E78; Tue, 16 Jan 2024 19:23:59 +0100 (CET) Received: from NAM04-DM6-obe.outbound.protection.outlook.com (mail-dm6nam04on2055.outbound.protection.outlook.com [40.107.102.55]) by mails.dpdk.org (Postfix) with ESMTP id 5104340DCD; Tue, 16 Jan 2024 19:23:56 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=d/tuxt0dQ3cjLR2hA+MEGoP39Z55IOn4YXykKqyxuzmKlJVUpSYPjeEVistNU7t0c/WBsVQ0Gf8S/gf6jgl++QkxXg+Ozsa/7h5NbdvU5FMLLEDezSX/yEYTKJkOOHG19My1+AZd7JBypcWq3ffG5AN45/DFagW5GBYzZfNh8s9ockbTXpCkvc8UZPhZt6UZMcNKnletvBbDKvdNjBwQUd2p3FUvUWrk8p6zf6lflxilqrU0paYTJ+D0jyiyT3ePwPKI/c82NBTrmiMKhJikYIfBrvP0qNldsZmhMRJWwpNCs7F6PTpcW9kmjHBmo4qRFe6zSx1XpmbL+MrvwRCLlA== 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=hfuD1TfdsaMEkbEsFfJ1+s36h41KWJ+HrNUWHbIJS0iOb1bo1H05aJw57itm251rhFmn+yWOQgpfeD93iQk+grnTc97KHFW+ZMi+33S5loPxwgQaRNpYuyxj6zeBZWxWIqDGEnHu686s6dVCenrOwIsziBl6LXviWDSJbU9ZltS4ERJSDwDbcj69PqUaFLl5KkobEdLRdtYejAOjut0CFrIGYUzU5J+LFZfLGv9E2MWBvUkcvFzRhX6MhSonT44TQ5+u3VBGnUmb7qHlCdAgShtUZs0aEDRooUKe8nhQ5f1mT65WZBEiuKLV+dGoGJHHqtCFJhtDNspOa/kS5fUsog== 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=a5K0+3TDOClO0CYDOqK4J7CPr5sC6HfJKhZUiUKeMQwv49AONbUDzw5N/ER4TORFU4b5UBU9kcWQPSSoe7ie8JSxYAWMRK+U9FgGVUmNjEZQE6K41P9YgnQlASYo7tNUXDceg2KFfQ01lOasjMXT2r8/YKbIyeujQacmytqDw9Y= Received: from BYAPR01CA0040.prod.exchangelabs.com (2603:10b6:a03:94::17) by PH8PR12MB6771.namprd12.prod.outlook.com (2603:10b6:510:1c6::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7181.17; Tue, 16 Jan 2024 18:23:54 +0000 Received: from SJ1PEPF00001CE1.namprd05.prod.outlook.com (2603:10b6:a03:94:cafe::19) by BYAPR01CA0040.outlook.office365.com (2603:10b6:a03:94::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7181.23 via Frontend Transport; Tue, 16 Jan 2024 18:23:53 +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 SJ1PEPF00001CE1.mail.protection.outlook.com (10.167.242.9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7202.16 via Frontend Transport; Tue, 16 Jan 2024 18:23:53 +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; Tue, 16 Jan 2024 12:23:51 -0600 From: Sivaprasad Tummala To: , , , , , , , , CC: , , Subject: [PATCH v4 6/6] examples/vm_power_manager: fix lcore ID restriction Date: Tue, 16 Jan 2024 18:23:31 +0000 Message-ID: <20240116182332.95537-7-sivaprasad.tummala@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240116182332.95537-1-sivaprasad.tummala@amd.com> References: <20231220064502.2830-1-sivaprasad.tummala@amd.com> <20240116182332.95537-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: SJ1PEPF00001CE1:EE_|PH8PR12MB6771:EE_ X-MS-Office365-Filtering-Correlation-Id: 23e3fbc1-1fa5-420f-4a2d-08dc16c04ba4 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 8rJik5DWIjX4fr7UsILPmG81dqWJXxv6YrVNkcylwGidaXpwsMjIcpDJvwenHzONbICZSao0EpXGMsKuAMC6wyajFsceFErcFKr4zrQI6sq9WdrVCOB7MtIx6WzhE8pU536Q50KWWZSFqV7xsUhF30fqs431sEf8EJ4uPBhlmr8jeD+l5DPA3o3Uwx2bFxSRJG/FQc6KCeb6rzKd5eujPYHUS09QfmRpQ60W+fFS1F9C05YG72/bhw+69odE/be/9L3b2QioWqsrcj4cHIiIjigGu3zAySKW8Yq8IgPzY/EAwLSbUGeRW9bpx5LzkidV/v4aYz2Nxz9IfRKq4nicAE2fRdr10cf2bNABSObKJFloAx/FyNdAEexRuh/sjIV4JXlTcSqTRXISy2GK/PoyZx9R47DwvkYOH+gaQUDw0q0uEpfAohyGnT1ooFULFnrlsAdvRVUcxSEjCahzZnoUyb4ZUeEYJEw5ouxTd5Wj8qQJN3xcImFrp5cYVdIqJ8eW08Iwo4bBiNCCtBqXv7KDDeBQEN4occFzE/HU1S0KUGs2gO6UEUI++lcf7CAiH2np9S24w2wPxFn340iH7gseXpxrA7hroEYsskvwjGB+NclX8+XoGqGIwzXu+l/OgBlW2GXoG9eOUcKX+1ZOgAWpXUVPUyNBgJIpaYk0hPDuMAfdTv76iPSgdGSC6aOg415tG797HivxOCgumZzvVqCtu1nVTyIDv0ltueuPTzP0R+mqcJ0Kf48ns4cd87lSc4b8xGMzhzCeup/EAFJnv6Vb/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)(346002)(136003)(39860400002)(396003)(230922051799003)(64100799003)(451199024)(1800799012)(82310400011)(186009)(46966006)(36840700001)(40470700004)(40480700001)(40460700003)(336012)(83380400001)(26005)(1076003)(426003)(86362001)(16526019)(356005)(81166007)(47076005)(36756003)(5660300002)(7416002)(2906002)(7696005)(44832011)(8936002)(6666004)(4326008)(2616005)(70206006)(36860700001)(82740400003)(8676002)(54906003)(316002)(41300700001)(478600001)(110136005)(70586007)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Jan 2024 18:23:53.7107 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 23e3fbc1-1fa5-420f-4a2d-08dc16c04ba4 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: SJ1PEPF00001CE1.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH8PR12MB6771 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