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 3831043E7D; Mon, 15 Apr 2024 21:46:54 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7270B402C4; Mon, 15 Apr 2024 21:46:53 +0200 (CEST) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2055.outbound.protection.outlook.com [40.107.243.55]) by mails.dpdk.org (Postfix) with ESMTP id 656B74021E; Mon, 15 Apr 2024 21:46:51 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GBrcvxm1AZcPe7V3ll/6Jz22OJ3d3Bw8CgtnuDq0EEfdl6wEQJROhhPCjGLHNeeVM1w79q2Yajm0j+zt+s9NzqWLeoxxUxCoc4XoElkYZl1uL79P4HgEDZkVx61rvAZVAuDunyQzcmj0gtV21RW4wz6AOCUVY8GBfpLkicqcswxsyOr0b1k85NNvaD3dkjfQ8Ed9PpXELRUDfCZTL/dsJ7fCWflDHWQS7ZeFIqGYGmhSlCEH/eM8P3rlsgQf2PajjN3vuhMU8YXRYeCgBAycx703XBgJyZCMZKIwyduKwdHLS778nOPXLYGPOFpUCZrZLAalwYbq94GPc8WXhW4zMw== 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=KRmwHpKuSE2eolTfjtMh9KgbbpRyJkmp4nT1mikmong=; b=G0fijM8m8xF5P+5KokzhEOKosnpZzCeokGI6gsEPhaYzxbFoI12Ujftn+BOZIegE3RwtW8u/y39eioTs1YMxWK/BUBpFHhCGQCCWYd+RNJU+ob64GKg+BFjYS1mSwzs/kKNiqqDC07IHbBlmo8CAp66w2c6PvqP2SQMeouKmsPekqNuNDreUMJaN1/a13/YAi/eT4hcM2KsHLr5JeBGRmxGOseifx6Iv8SnqXx1F8MUYzbeSdr+T+4pqdZIco6iKlu3YbbabPDZ+zOCbALBwutQBNZS2st0Ndi+vjHPcpAbSGsOTeNXnb2+dh+qvcGHxG46h3kPZ851XibEZtx+wOA== 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=KRmwHpKuSE2eolTfjtMh9KgbbpRyJkmp4nT1mikmong=; b=mQlmo3zyNbIh/Oxmfct3BUEc/qDDzDJqa/scsgG/CgeQFCNmEo8o+xyRHfJ2psu8KxNVjOUjbRJNnTLBvdZi+X3cwyKNyYqdYpKqISwckgyBQh+Y4BlOy3b97TBPtvBpN6P2gxrkIvrVMFt1NsUAONP9Kki/OKSZWmXszNm+usk= Received: from CH2PR15CA0002.namprd15.prod.outlook.com (2603:10b6:610:51::12) by SA0PR12MB4447.namprd12.prod.outlook.com (2603:10b6:806:9b::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7452.50; Mon, 15 Apr 2024 19:46:49 +0000 Received: from CH1PEPF0000AD74.namprd04.prod.outlook.com (2603:10b6:610:51:cafe::5) by CH2PR15CA0002.outlook.office365.com (2603:10b6:610:51::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7472.33 via Frontend Transport; Mon, 15 Apr 2024 19:46:48 +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 CH1PEPF0000AD74.mail.protection.outlook.com (10.167.244.52) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7452.22 via Frontend Transport; Mon, 15 Apr 2024 19:46:48 +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; Mon, 15 Apr 2024 14:46:46 -0500 From: Sivaprasad Tummala To: , , , CC: , Subject: [PATCH] app/testpmd: fix lcore ID restriction Date: Mon, 15 Apr 2024 19:46:31 +0000 Message-ID: <20240415194631.124343-1-sivaprasad.tummala@amd.com> X-Mailer: git-send-email 2.34.1 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: CH1PEPF0000AD74:EE_|SA0PR12MB4447:EE_ X-MS-Office365-Filtering-Correlation-Id: 63ba1992-bdf1-4c48-9eb6-08dc5d84ca38 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: g+UGUsLtMohRHb7rFtVDpRgBX+QP9DSOlZdDz8js8dPN7IkM+N8cHRPwRfXTgq6Omb0/S2pTLTEM9i1bs5zKdr15PsssXQT9YjGA4wdXR7Vnlk1/+nNDIQ/8rnkQMAvkBab7Y7sCOrRC9qWA6yCYExMgbBYNVclth8quj2lWBcj3h7UAWHBUdOi4xA3RS5e/k3pq+yYPk5ppBGvGXSviMxLm2GxFPKMibFu6/ein9GIEaDluAx5ZFX1AUdZYVew3WZvq9nP7S4MO8r65LN7G/htbaFpGPoROy0eNI+Be7c4VupYxYL0iifkbKQ6iCkowbH6CQS831zURt5mgNLOdh8l7ie/OgDg/DL8mU0i8wzNQWvlQTFqG/9Op3WmY8eevuzDqzbmnDCkHzV7qxQvLrhbnLU5MfccpmJEtDF4Fqeb3okaSJqR/gbuZbIoPew+4NoAZtd21jt7HJZHraGOh/Xt7VZVqxdXkBAPJqrZERmp2brbmj9ZArQxZlkSruY+t4BuUxGROG6N6ooYb8355q+/I715whkRamteVSDDcxkACK1MUxHFfE5tJl5nGV57mVMw+uqe8HjhtOEJ51LG+4K/sp0xnLQ0HeQji41hZO5mWN+e1PcAqlo9b1D/66DnfNNNGL/51S2u2bM6R/yyiqpzaggfrmDNzipltEcjbENt9at7JIkgzr3wc4AonKOugUWnIix1vSsL7H6KKQGp+AAGDSIJxXHkWaM7MALywJ0b7veZEIZqPsJe044cmQCDm 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)(82310400014)(1800799015)(376005)(36860700004); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Apr 2024 19:46:48.8917 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 63ba1992-bdf1-4c48-9eb6-08dc5d84ca38 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: CH1PEPF0000AD74.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA0PR12MB4447 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 --- app/test-pmd/parameters.c | 2 +- app/test-pmd/testpmd.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c index c13f7564bf..6d2bf9b7c1 100644 --- a/app/test-pmd/parameters.c +++ b/app/test-pmd/parameters.c @@ -1072,7 +1072,7 @@ launch_args_parse(int argc, char** argv) case TESTPMD_OPT_NB_CORES_NUM: n = atoi(optarg); if (n > 0 && n <= nb_lcores) - nb_fwd_lcores = (uint8_t) n; + 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.40.1