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 379B743D0F; Thu, 21 Mar 2024 19:49:00 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AF6C842E96; Thu, 21 Mar 2024 19:48:44 +0100 (CET) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2087.outbound.protection.outlook.com [40.107.237.87]) by mails.dpdk.org (Postfix) with ESMTP id 8689942E6F; Thu, 21 Mar 2024 19:48:42 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lfpS5s7SGVcZCo+4YpK1sfnv3O6icnIEt5n3/TdJuzWXmSzYxxQzM4k5gXQyUw1+oGu89FlDnh5FCLNKcqp4CNSfQDczXaLtuFQGSGUO7C250ug8IwohX99aU5P0kWv1nLKFYGz6UWtjH9tafQXgvi1pJCdI4Yc0eKWkpA9AZWeMwEguQTeDfCTG9086YaYXhReEG1N+m818XJ6kY8fXyPHmR3pU5+cZfR/Q1LRAHLSi8y1O1LfZmD06CeJvE8DJUHxek+RzKVzcwL9NIM9So4J5btl/ZJIYXTLG3Mz62c4TJYyZpG/gna/9wrOgZaB2slPsWdChczpL6DHoR74+rA== 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=EspoIvIFA/qG6YxpnYVUOYfvkYaGmiiNTw5dvFE2OZQ=; b=d/y2E85d3Lzwn/R9fyydDNnSxpi2456tEtSaoDV6MUdhYrZ1nj6mLxI+HxPdWM+TVcQ+mBOrCaQuKy+yBUho3Sfy5+bQgOYg2o8x+Tij8TGbKpMcB4NloRrkZjkxQ71OwvNQWOc6yDo7UTeea+4fIKGJguo74ZK9aWmUXXwXpTTxobG+UIrjX7Vpgx6M0hVdHfafDbMpQcGbHmMm4Rev2R6IgLQbWp3NEmYjYZ+yQwTAOheGwGs89NR5urH+Jlg5TUTbSgohXazgR8PS1E3Hwt5Myy+PDVSI9Ca1bBTZloznjd/ouVKRIkqWtr0gbTU+gJUPIACdSslItCuM0KUNMg== 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=EspoIvIFA/qG6YxpnYVUOYfvkYaGmiiNTw5dvFE2OZQ=; b=lHXfXmG37HMhVGd4wgG5tdJucEDBNkS/FEWASo2ctNDSxMK/7Kj81ML0EqOUNPBEvjGH+D152Caiq6lLSHLTx7PW62Z8OBDN6EE8IFg+5JM198Br4wX66mYDU5JfJ7vlVBE3AYB3vw7h7Eqz6f1O21WtWLuxB+OquJkGrGUicYM= Received: from MN2PR01CA0055.prod.exchangelabs.com (2603:10b6:208:23f::24) by BL3PR12MB6644.namprd12.prod.outlook.com (2603:10b6:208:3b1::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7386.30; Thu, 21 Mar 2024 18:48:40 +0000 Received: from BL6PEPF0001AB74.namprd02.prod.outlook.com (2603:10b6:208:23f:cafe::31) by MN2PR01CA0055.outlook.office365.com (2603:10b6:208:23f::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7386.28 via Frontend Transport; Thu, 21 Mar 2024 18:48:40 +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 BL6PEPF0001AB74.mail.protection.outlook.com (10.167.242.167) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7409.10 via Frontend Transport; Thu, 21 Mar 2024 18:48:40 +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; Thu, 21 Mar 2024 13:48:35 -0500 From: Sivaprasad Tummala To: , , , , , , , , , , CC: , , Subject: [PATCH v6 07/14] examples/l3fwd-graph: fix lcore ID restriction Date: Thu, 21 Mar 2024 19:47:13 +0100 Message-ID: <20240321184721.69040-8-sivaprasad.tummala@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240321184721.69040-1-sivaprasad.tummala@amd.com> References: <20240318173146.24303-1-sivaprasad.tummala@amd.com> <20240321184721.69040-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: 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: BL6PEPF0001AB74:EE_|BL3PR12MB6644:EE_ X-MS-Office365-Filtering-Correlation-Id: 15fe6d3b-3529-4d39-baaa-08dc49d78676 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 0mvyJXiPaMnt/3K1JP8JWCG4UCzAElrqS9TkY5l2LzLUMzdVoVZytbekxjbjicrY2KMNr1DXxw/gNZGJ6BzXs1tb1wpePdK4wLvq8ejXCS9UpAGHYwniU5QPMYMawmDzEk/x0qHT/U6KVjSk53Flf3o26Fu2uvUJkOaa8KPT/iloJ42ijAjcLpnOPo+6kYiAyUq+Wh12UbO9wC6vvcBAfhJV6sp5UtXIEo4cgdK4fI/vepmtPAlWvf8CUtzPhV3O+f3wRcS4+QX42fBL2etNvnFJB6PdRJ7D90JbYUYU43du7NGeE1n9czSWJTbMf4u5yB2znebQAPzRIYtj8E1Obs+pOCt/vGeeIytndjxGE9N0axxiPFPDyiDFrigplE7bCdOuZu/ebLfOEPmQ3qXSUtnD9F9MODEmXEx2qVBEtNkGxYSBkhr1yvG86gBE0uuLumP28JGu39uVQtWfkfnWYcrbHbdcrlwyLnSWsXtaOyM2FNw4SbnCj1McSrlG84LPafBTe6UtnwWPtoQ9bQB1J3ScWhGK4D7/IkehWNkjBh719OhSqUNQNeMSMZFmzoMaRdB0kxS/yGBzyEhZ8kfPkC/aRSmjNVT2YHL+ogzXlx3yYrpJquC0+7nn0FpMnbdBFgR5Nfph/nG13D83Ud8M4LaXBziCYaNnrjiM4XFTZLSifkHq2NwvhyKO3pL5CWorLwWMOhugx48Kiz6g+pw5X9i3EV074bEJZjzieYZrGh+raScAQZS1oCoGj+c6H19sIyxV1pbhXNOtuWM09RZoQQ== 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)(1800799015)(7416005)(36860700004)(82310400014)(376005)(921011); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Mar 2024 18:48:40.1398 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 15fe6d3b-3529-4d39-baaa-08dc49d78676 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: BL6PEPF0001AB74.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL3PR12MB6644 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 c3a7b267e9..8b7aa6642b 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.34.1