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 8F66843D51; Tue, 26 Mar 2024 13:57:18 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A357C41109; Tue, 26 Mar 2024 13:57:08 +0100 (CET) Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2061.outbound.protection.outlook.com [40.107.244.61]) by mails.dpdk.org (Postfix) with ESMTP id 2D42A40E28; Tue, 26 Mar 2024 13:56:58 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KQ01B0FtotXcj+DPd8t8VE+qJffxLTfOuKEyx97Lr8eLaIAckEGm21jwYxB/6H4ZcAxGJSpQaFo9fUa4jvx0Um4k2B2K7UTZ+uRGHY2l2OE23kuwHwoSXkQdxWSb7oJ6p1jifPxfVlg4Eh627ypiaXt3Af1rdQzM1O9bWuKhzD8lx5qjm+xaClZHyB9k+yvjkY3jLC6h6KYWxNIaH9mvQ8txcWMhrkvtU2gM1xkj/ocjXyBsBfDKtGC13/TdstIWAU93SfoAWgZXXLkWlhHLBkscs4/a8JybLUwr2ep6EF7njwXJemM3eNg36smv8LADag9WvbVhCtYAckBXqwYpEw== 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=NGQsTgnw8v1k66wultPJhFtCE7E/calaXhg+Ad57HMc=; b=XtoS2saZwZJoHXuTyezJfv74u2gPkgce/d3RvmHeu7BvCL0ZPl44xxcaiXGnFhkhkMuJTYk259dAIFK57eAtZepgDfQWfgTaIZSBywspoM1Dccq0xVrNlK97hP8WLnrhrufaOui0LftXFAHHwA/a+M8qWOOhqOBUI0oqxxR6h9ex83Xw69Sxn5ysSUWerx3QkJU0iAsp8Vyrla6zR3RXAKE+CHHF1jx5IG25EtfgtSecWIWHaDyhjwU3QhuJDv8GcBbFbzDfRGKLOQtdm0J4MYztUMTaFTWVTRIVSudKa/KF0mPLPvOoG3cU/FbV7ABJm5fSwu0hPfTRd2Z0yaYwAA== 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=NGQsTgnw8v1k66wultPJhFtCE7E/calaXhg+Ad57HMc=; b=VQGENfAb2URasbMXlOQcf73w/jrpuNa5ISQcmB54m9FPl+pJfZOsBxWYPKbs7kYYESGjzrwaN9HMIfIN8DCqjyuprL8Y4ngO6NnmFISGLoHl4SoHZjgByLh1mGc7CshGseTW2VkX2CcEEnMNS0/1IZbYafFBRVLZRnXq8kW1UpQ= Received: from CH0PR03CA0441.namprd03.prod.outlook.com (2603:10b6:610:10e::34) by CH3PR12MB8233.namprd12.prod.outlook.com (2603:10b6:610:129::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.33; Tue, 26 Mar 2024 12:56:56 +0000 Received: from DS2PEPF00003441.namprd04.prod.outlook.com (2603:10b6:610:10e:cafe::87) by CH0PR03CA0441.outlook.office365.com (2603:10b6:610:10e::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7362.35 via Frontend Transport; Tue, 26 Mar 2024 12:56:55 +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 DS2PEPF00003441.mail.protection.outlook.com (10.167.17.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7409.10 via Frontend Transport; Tue, 26 Mar 2024 12:56:55 +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.35; Tue, 26 Mar 2024 07:56:49 -0500 From: Sivaprasad Tummala To: , , , , , , , , , , CC: , , Subject: [PATCH v7 07/14] examples/l3fwd-graph: fix lcore ID restriction Date: Tue, 26 Mar 2024 13:55:46 +0100 Message-ID: <20240326125554.138840-8-sivaprasad.tummala@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240326125554.138840-1-sivaprasad.tummala@amd.com> References: <20240321184721.69040-1-sivaprasad.tummala@amd.com> <20240326125554.138840-1-sivaprasad.tummala@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit 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: DS2PEPF00003441:EE_|CH3PR12MB8233:EE_ X-MS-Office365-Filtering-Correlation-Id: 1f86c9ef-a7c0-42b2-bb82-08dc4d943751 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: c2CcG/91ZHkQsRBvRTFavsQ9+rxBDxGzOiVR265+NpGaIvkdeNHI8XauYQiD4rsSTfIAWDQ9MNNTUcHp/Lxz1uZtGweDrcX+ou3+S56DGy02JiITQgtin6TAvCiFc8qNLmYZL8nuNEseCzZ9NjgnK5JmJ/UkaicQjEksAXf5fVWrn+Taqm025aN5ZvNia1oAb4ljpcn0itELcArBVz1cMrpoDM/n5DnJl7gIe0nuN8/+kdhxPkZ23gXfxdYvT5CxygLJMkYV1iX7WEXagbXVIyyrh/PQd5Us7eL5cLVuFm0sdqh6wqdIvrw0Z7aykwrKhiNW1VoM5mQFYUorF+eusjxf9i9Ke3G9m4eGsvMNtJAb/EDrablXabGzda3Im8XiNBEby5CJ3FMqieKOkHqSB7pCLmdVwMedmNf6vA/ImisoLvMAeV2yR5nr1IhmJ0qcYv47IMNEjbzS3w/U7tj9HAxoUYK/4DJ8kh5owIXTfymvTxBnvCEe0GbecgkDM8BvLZoyrVEdgsQ94FDfwo6cZV5eoPxl3XFEor3i9KjqLuCaMypxR0Hlth3Ey94SpcSPG1/WltOmLxRyZChAoq6km6YTAOQJ1okMet8FdYBO8FVYnOV5DeygRvIO0kTSbkQ6Zp1TZr7kr3QZfp4WddnTR+06YaalPzwu3lugOewLGSAH1wYtbbEfg9ANS/3iwL7nRdVW1a6pRXnXbUG1QPUBPVGulGEm+xr+oU+JRFQFzfjit+IojzhfWCNP7/dE8D/SouCwkeRMMPJZ6bKuwIlN9Q== 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)(376005)(36860700004)(1800799015)(7416005)(921011); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Mar 2024 12:56:55.7588 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1f86c9ef-a7c0-42b2-bb82-08dc4d943751 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: DS2PEPF00003441.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR12MB8233 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 fixes these constraints by allowing all lcore IDs up to RTE_MAX_LCORES. Also the queue IDs are increased to support up to 65535. Fixes: 08bd1a174461 ("examples/l3fwd-graph: add graph-based l3fwd skeleton") Cc: ndabilpuram@marvell.com Cc: stable@dpdk.org Signed-off-by: Sivaprasad Tummala Acked-by: Morten Brørup Acked-by: Ferruh Yigit --- examples/l3fwd-graph/main.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/examples/l3fwd-graph/main.c b/examples/l3fwd-graph/main.c index 4b018d1e78..dbc36362c3 100644 --- a/examples/l3fwd-graph/main.c +++ b/examples/l3fwd-graph/main.c @@ -111,7 +111,7 @@ static struct lcore_conf lcore_conf[RTE_MAX_LCORE]; struct lcore_params { uint16_t port_id; uint16_t queue_id; - uint8_t lcore_id; + uint32_t lcore_id; } __rte_cache_aligned; static struct lcore_params lcore_params_array[MAX_LCORE_PARAMS]; @@ -207,7 +207,7 @@ check_lcore_params(void) { uint16_t queue, i; int socketid; - uint8_t lcore; + uint32_t lcore; for (i = 0; i < nb_lcore_params; ++i) { queue = lcore_params[i].queue_id; @@ -217,7 +217,7 @@ check_lcore_params(void) } lcore = lcore_params[i].lcore_id; if (!rte_lcore_is_enabled(lcore)) { - printf("Error: lcore %hhu is not enabled in lcore mask\n", + printf("Error: lcore %u is not enabled in lcore mask\n", lcore); return -1; } @@ -228,7 +228,7 @@ check_lcore_params(void) } socketid = rte_lcore_to_socket_id(lcore); if ((socketid != 0) && (numa_on == 0)) { - printf("Warning: lcore %hhu is on socket %d with numa off\n", + printf("Warning: lcore %u is on socket %d with numa off\n", lcore, socketid); } } @@ -282,7 +282,7 @@ static int init_lcore_rx_queues(void) { uint16_t i, nb_rx_queue; - uint8_t lcore; + uint32_t lcore; for (i = 0; i < nb_lcore_params; ++i) { lcore = lcore_params[i].lcore_id; @@ -290,7 +290,7 @@ init_lcore_rx_queues(void) if (nb_rx_queue >= MAX_RX_QUEUE_PER_LCORE) { printf("Error: too many queues (%u) for lcore: %u\n", (unsigned int)nb_rx_queue + 1, - (unsigned int)lcore); + lcore); return -1; } @@ -452,7 +452,7 @@ parse_config(const char *q_arg) lcore_params_array[nb_lcore_params].queue_id = (uint16_t)int_fld[FLD_QUEUE]; lcore_params_array[nb_lcore_params].lcore_id = - (uint8_t)int_fld[FLD_LCORE]; + (uint32_t)int_fld[FLD_LCORE]; ++nb_lcore_params; } lcore_params = lcore_params_array; -- 2.25.1