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 ED7A84416A; Thu, 6 Jun 2024 13:28:15 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 814D6402E7; Thu, 6 Jun 2024 13:28:15 +0200 (CEST) Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2083.outbound.protection.outlook.com [40.107.236.83]) by mails.dpdk.org (Postfix) with ESMTP id 9332540299; Thu, 6 Jun 2024 13:28:13 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Jwk1ru1aGE/l0ZLUYbCgqAqnagJx6om33Cmkp9AmUx/5L9EkRa5o2MXVrfKsOg0hbusnC+wSWk4iFLOoogblbCr5fDxzFGOlXi3gP5qzvxnPkOiqUZaUfKUW6ms+b9c8+I9fSAdz4k7z4vuFBtugQyRqomqAs8yQGjSCsx+pg/WsAh7azpqK5NWcZYeAR2ux8nsUp8Zop1LZyKmkrFkTcqHhz2m528SjCGmHcNNjE+0V7HHKHayXtZHMX3LE9KZRKodnFzwr8Jo8SQcbhyzkAOkyRfNB8DCRZPJTTFUwoJ5HrQZ55t/5/oAb6iVATDkf6hrNMmK2V2jm3WfShy7QmQ== 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=H7tX7HeIczljJuk/ZJjcPzRVU06at8TBnJ4Zgy24BW8=; b=gKVbUFZMTgvN56CtCJ0Kl+xgkfwXyhJsMETM4GrwxYIglt5LaqfeK1nhaGdpKw9KJ6aJmxK2PAo1zdMCrZ6uNa3tJWevagq0poGkLHTnVJb64QGlng1J6mf1YGNzIx4FOMGU9Q2MsSZdgbTJsBetLP7lSGfF9cDNCT3mei5PkpHo/HItObUTO2ufD6jK7OQng+unzQSPYMkVJLJ1y3ovij77GAJkK4e7k4ToQSPgAKvCZUygfk0Dlsn2bii4oc0NYqJIpMMWK99ad0QhS8kF0zh8Q1ziHcEf05IPl2CJvMUXVHAawLY/5/ew4I/zOekQyHVJGpuUIOdaPTFjKwBfIw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=redhat.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=H7tX7HeIczljJuk/ZJjcPzRVU06at8TBnJ4Zgy24BW8=; b=Mgfb1hfK1aSg4VKQZbcp7TO27LLN4dVQ/c8j/KvSc2or1cjt8iPaOnO/0I8l+hafmWWGaQl1BuSbQx7vyvI1y9YKN8iYUBFg/1mNOA9m5biN78vKMsnqX3/v/VDExC2LIJMbVomtIJ1y5M5xp19o0dBuxavDDjT1gqS2z3WZBWU= Received: from SA1PR02CA0014.namprd02.prod.outlook.com (2603:10b6:806:2cf::21) by IA1PR12MB8223.namprd12.prod.outlook.com (2603:10b6:208:3f3::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.34; Thu, 6 Jun 2024 11:28:09 +0000 Received: from SN1PEPF0002529D.namprd05.prod.outlook.com (2603:10b6:806:2cf:cafe::9b) by SA1PR02CA0014.outlook.office365.com (2603:10b6:806:2cf::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7656.16 via Frontend Transport; Thu, 6 Jun 2024 11:28:09 +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 SN1PEPF0002529D.mail.protection.outlook.com (10.167.242.4) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7633.15 via Frontend Transport; Thu, 6 Jun 2024 11:28:08 +0000 Received: from jfw9ny3-os.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.35; Thu, 6 Jun 2024 06:28:06 -0500 From: Sivaprasad Tummala To: , , CC: , Subject: [PATCH v3] app/testpmd: fix lcore ID restriction Date: Thu, 6 Jun 2024 11:27:46 +0000 Message-ID: <20240606112746.2643600-1-sivaprasad.tummala@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240416095556.173787-1-sivaprasad.tummala@amd.com> References: <20240416095556.173787-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: SN1PEPF0002529D:EE_|IA1PR12MB8223:EE_ X-MS-Office365-Filtering-Correlation-Id: 6db16e83-51b8-45cd-822d-08dc861bbe08 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230031|82310400017|1800799015|36860700004|376005; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?53v+ZPQRj39lUWA/nA2icbpWzy+32AKXfT+KepkexfE3v5JiG1ajtmnFMD36?= =?us-ascii?Q?swpPxUuFwgMHXIfFaEXLDlOYLEkw9hYcE5Sa1d583P7BZ7+fkw662FdROfIf?= =?us-ascii?Q?jcBgiwI7y0o4s0yvtnJGFg2j3ZzlroETLS5mNoxe3FDgnZTzTsJhrxiT9dZ5?= =?us-ascii?Q?fdVB5wgJOFOExvUUJdbWtyQ7uSuQTltkLVbGjWGL7U5P8LaV/xgr8H7ZF8np?= =?us-ascii?Q?A2rL4PjM6SPUxYNguYpJ7OQu/hpWuAklpdHo3uTmQtijNnkw/JF4NsWGZRjj?= =?us-ascii?Q?olMHHbJBPgqcjhAoXGC3gwEK9Tclp465HBK7zxKvTrt3tpMqXQUwlY5t8jhZ?= =?us-ascii?Q?25XvATTwFxllRsuAKyC/VXA20kfrzt6nPm5Hy65qcshcXSv6cS7g0sFiBOb0?= =?us-ascii?Q?qRH8z8JWhqhHw5sHFo0tSewsNhWrLxcL3am7/8ZZFsS02PN5Z2gSD+272s9x?= =?us-ascii?Q?91stMD4kabp7hZTkzbbprdGsL6pILirIMlYvbMgrTLNrnh7mwOprjFdxzypr?= =?us-ascii?Q?ceh2RXeWC+v1pU7ylMsp0t4dzA2Scf/JZHHltzecjydrA6DvBb/wreBj9Wam?= =?us-ascii?Q?jQWR7eyktSdQalj23Lpzihubkx1EjngkNs9ZQ4IcCeDcIWl8OreYwy2yYbos?= =?us-ascii?Q?0kMUtf3YUusTRuyMe1ZrylRnZY6srXmdnI4L2vrfK+NB6H22CvWYc/ygMJ0P?= =?us-ascii?Q?YSxLW+QXGUROBxAudI+JZkPomJTH4/e2/Uz4QFdgPxPgKH53hPceX6r0naX9?= =?us-ascii?Q?ysV9Ga0PvwhKQZSIVzg3VVAMmnF0DRXGORZMA7wj9nNVVUHNCrfBimGil2qg?= =?us-ascii?Q?0CWjK65eFxjjxUl268RskSY3U3bXVieSCNyTaNv/qF74gWRNew4uOAHcVlxT?= =?us-ascii?Q?igT78qlFUu1eczpjbrZNmHK5itNVeHSvfS/0KrgwY9+LAoW/+u6VCUx4fJq9?= =?us-ascii?Q?Bx6nM26gdz0ZBycIy6lR9IqnenTpLdFiLzitvWiiMxu0uVLrFcImCB51S/zQ?= =?us-ascii?Q?8+y0MPHVU+rsGt8xj+4KU1fRRcUXOwI+KydbMJwe8/WT6bGe0IJ4kFPbuweI?= =?us-ascii?Q?YU0gt82PO+BpX9h+w1al7TeiGvkj0Ekwyy3S6B8zE8S098YIvzdZU+2E5SYo?= =?us-ascii?Q?uX6UE6Kb+9VFfSqpl1W9RUcr1/vjRXPawq52/3MYQVmtXn9+5yPwJ505rv4B?= =?us-ascii?Q?p8eDBblg0g9PrKVuZX3Zr3jJmMJUrhRyjF32LeUuc9k5DfrYEPQ8uQ41SFoA?= =?us-ascii?Q?oFhtmLUTPL2shw18nAN+7sxDoZB79UQW0vOiujSi8RR/8xtoVDQdr42h4p75?= =?us-ascii?Q?rEVJhDfzIfkOn55asmI9u4hCs09ibFIwRAsNZfBC8PWNWdVJtiikB4li72be?= =?us-ascii?Q?bwBHp1UWt6LAtFU+mpDvtE/loLSH4Aw24w1h8HnbpAJku7gmvQ=3D=3D?= 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)(82310400017)(1800799015)(36860700004)(376005); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Jun 2024 11:28:08.9454 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6db16e83-51b8-45cd-822d-08dc861bbe08 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: SN1PEPF0002529D.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR12MB8223 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 With modern CPUs, it is possible to have higher CPU count thus we can have higher RTE_MAX_LCORES. In testpmd application, the current config forwarding cores option "--nb-cores" is hard limited to 255. The patch fixes this constraint and also adjusts the lcore data structure to 32-bit to align with rte lcore APIs. Fixes: af75078fece3 ("first public release") Cc: stable@dpdk.org Signed-off-by: Sivaprasad Tummala --- v3: * Removed unnecessary cast v2: * Fixed type mistmatch in comparison * Fixed incorrect format specifier --- app/test-pmd/config.c | 4 ++-- app/test-pmd/parameters.c | 4 ++-- app/test-pmd/testpmd.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c index ba1007ace6..a0c8bb8fe1 100644 --- a/app/test-pmd/config.c +++ b/app/test-pmd/config.c @@ -4785,9 +4785,9 @@ fwd_stream_on_other_lcores(uint16_t domain_id, lcoreid_t src_lc, continue; printf("Shared Rx queue group %u queue %hu can't be scheduled on different cores:\n", share_group, share_rxq); - printf(" lcore %hhu Port %hu queue %hu\n", + printf(" lcore %u Port %hu queue %hu\n", src_lc, src_port, src_rxq); - printf(" lcore %hhu Port %hu queue %hu\n", + printf(" lcore %u Port %hu queue %hu\n", lc_id, fs->rx_port, fs->rx_queue); printf("Please use --nb-cores=%hu to limit number of forwarding cores\n", nb_rxq); diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c index c13f7564bf..22364e09ab 100644 --- a/app/test-pmd/parameters.c +++ b/app/test-pmd/parameters.c @@ -1071,8 +1071,8 @@ launch_args_parse(int argc, char** argv) break; case TESTPMD_OPT_NB_CORES_NUM: n = atoi(optarg); - if (n > 0 && n <= nb_lcores) - nb_fwd_lcores = (uint8_t) n; + if (n > 0 && (lcoreid_t)n <= nb_lcores) + nb_fwd_lcores = (lcoreid_t) n; else rte_exit(EXIT_FAILURE, "nb-cores should be > 0 and <= %d\n", diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h index 0afae7d771..9facd7f281 100644 --- a/app/test-pmd/testpmd.h +++ b/app/test-pmd/testpmd.h @@ -84,7 +84,7 @@ extern volatile uint8_t f_quit; /* Maximum number of pools supported per Rx queue */ #define MAX_MEMPOOL 8 -typedef uint8_t lcoreid_t; +typedef uint32_t lcoreid_t; typedef uint16_t portid_t; typedef uint16_t queueid_t; typedef uint16_t streamid_t; -- 2.34.1