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 BBC8143D51; Tue, 26 Mar 2024 13:57:41 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 223A3410E8; Tue, 26 Mar 2024 13:57:25 +0100 (CET) Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2049.outbound.protection.outlook.com [40.107.223.49]) by mails.dpdk.org (Postfix) with ESMTP id 4027F40ED1; Tue, 26 Mar 2024 13:57:21 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Wm576EjN2AegkxtXYaCK1Ua+kQwQzgXTzp2UOPxt6jgcTAdEp4uHoTIb7BkHtA+71qBxIImDrdKCAl7b5o/pflAcbF6zqJ/gdjob3ShxfBGIk8mEcd50EBLaH43eKC1Xisxm7v62UZXrcq1PA+UN3H0Q8UlcP0cr3uBGIqh7DtMC7V2loUpU5SFc56tXUMqmxAt4062ibQTTZMdpfV7znKUbok5rXAfiGyAYbF3PfuVKfQIlgtAbtXMgnGxVXRup9UFLlm7m/5gplg4aMt2GDqqIZYt4gfO4UNYLrkD6LWNKtDAMp57hrt1raYCZGSpeAv72TC1SH7JST7VRVYVcJg== 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=t1oINm/Skehv285IfbSswA8GjdBgVs7jVzsqS3vSzcY=; b=DfqfUkP6B2TKjPrl3dJEO2jsEq3OC6lDWwuCwxwBMFoX/UTXkl99jorI+alP2XJJ3lxmH7pAw2R3oloTn02sgPDCPhTQn49zC8e9Y3xY+EXq77jJewTEePHsCqKjIzWMBGeAZsoISWCOl+/5D2gUwYS37owQbYSFngOsHtSbef2RbxBhccw9QHw3ahlmPsEBqdyQrEM9nHA3/HZFmmfU8wX1SC5qhNEO7Gu3Q3uCIiKv5XJz4rRs4G/2drFeJFMAvbZTXUXy72mI47iixOBD6mTccTvFYhYJM1n+p2d9o216KGcAwvBsz7MoB8BpwBlJrWiK9dn1Dnmsy2W59Ts8/A== 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=t1oINm/Skehv285IfbSswA8GjdBgVs7jVzsqS3vSzcY=; b=IbdPwzFhIPM+b+P9nf9KAW/7337icpt1H6Ycol6YSAV3r9YHkTWHSlDbCLdBdqj2V269OmkAyVJj+X0/0M8WE3Fx8c0dH+B9RTpnJq1DzEeyoQ1yvmQ145YpW54fPu5SHvb6NfOQWYtp8kXtn1hSoJoNEJLQE7kgjq4OxDnqbEg= Received: from DS7PR03CA0077.namprd03.prod.outlook.com (2603:10b6:5:3bb::22) by CY8PR12MB8216.namprd12.prod.outlook.com (2603:10b6:930:78::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.31; Tue, 26 Mar 2024 12:57:17 +0000 Received: from DS2PEPF00003443.namprd04.prod.outlook.com (2603:10b6:5:3bb:cafe::bd) by DS7PR03CA0077.outlook.office365.com (2603:10b6:5:3bb::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.13 via Frontend Transport; Tue, 26 Mar 2024 12:57:16 +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 DS2PEPF00003443.mail.protection.outlook.com (10.167.17.70) 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:57:16 +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:57:11 -0500 From: Sivaprasad Tummala To: , , , , , , , , , , CC: , Subject: [PATCH v7 11/14] examples/l3fwd: fix port ID restriction Date: Tue, 26 Mar 2024 13:55:50 +0100 Message-ID: <20240326125554.138840-12-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: DS2PEPF00003443:EE_|CY8PR12MB8216:EE_ X-MS-Office365-Filtering-Correlation-Id: c0397c1b-43af-4a5d-46de-08dc4d94436b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: h0hw1CA74+b1clxegoMrWV3/LsQnoQdvI1UH86cn7P9iKN74pMOa4RJeV0f/iLu8gmTthMG7lfz3r/T4ht0Keg19Wr40/++lPTiSfkvmeC3Gb1ltaN5nWFqlntih25Izb0SopB0ouHIqnz5r26ZhLAXEwCXiHgT06cz1oLvlwRSzWeyJDNd8ZUZzRoXfcJube+rvxn/q82DkLYQPVgdForF5I5TYWcghW7L9C3MJaom84vV69yStrVkHJhIUiPEc6jpg4GoCoyiCAi4gavYj6KLESFySC82j+WGtj7oIgWTsDfhDoSOrZEXfZ9IiGvy3bowlHkzevSK4btT5QQ4jo7bo2wZ6WtQ6c24bk7MRxvL5fuX6qZw9SELL5QJauzW2sXfOn/qmqk+rBiIMCP2L/0GV+ImHJC4NWIe7YuGoyo9Upp7/Ui8NlW6zybrZMNwvZD3nOhkpfMHKGz/UnN7HluIO1m6vtw3XyESOWNjwUIolLBr6ADuQgnDAaEihcwzTRvLhpCwHlJlQ/j0ZTtGr5qKog+JWHTXCr35u4mhER40RWZLU/dD5tG+ZcPorNVcCwOM8xeVSjWyXpBGG5ImfAVV7Ym148iNa3VDQembO99F7VJQifNCvZ0kKP9oL2B/FdNYWpKLjXHvze7oG87OdzJDcgsNl16b69S/I+HyVv8nzV8sXjPFs+UiWpFz+pJRwEp5P2HHfDf1cbC9beyEe+d1Na0BYMP22vm4NRkX8ydDBSbPIV3DW20w7TdIvo8cCxtygSc3538FkXH0SHSFq4w== 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)(7416005)(36860700004)(376005)(82310400014)(1800799015)(921011); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Mar 2024 12:57:16.0589 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c0397c1b-43af-4a5d-46de-08dc4d94436b 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: DS2PEPF00003443.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY8PR12MB8216 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 application supports port IDs up to 255 irrespective of RTE_MAX_ETHPORTS. The patch fixes these constraints by allowing port IDs up to RTE_MAX_ETHPORTS. Fixes: af75078fece3 ("first public release") Cc: stable@dpdk.org Signed-off-by: Sivaprasad Tummala Acked-by: Konstantin Ananyev Acked-by: Morten Brørup Acked-by: Ferruh Yigit --- examples/l3fwd/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/l3fwd/main.c b/examples/l3fwd/main.c index 47baf464e2..a239869ada 100644 --- a/examples/l3fwd/main.c +++ b/examples/l3fwd/main.c @@ -501,7 +501,7 @@ parse_config(const char *q_arg) int i; unsigned size; uint16_t max_fld[_NUM_FLD] = { - 255, + RTE_MAX_ETHPORTS, RTE_MAX_QUEUES_PER_PORT, RTE_MAX_LCORE }; @@ -532,7 +532,7 @@ parse_config(const char *q_arg) return -1; } lcore_params_array[nb_lcore_params].port_id = - (uint8_t)int_fld[FLD_PORT]; + (uint16_t)int_fld[FLD_PORT]; lcore_params_array[nb_lcore_params].queue_id = (uint16_t)int_fld[FLD_QUEUE]; lcore_params_array[nb_lcore_params].lcore_id = -- 2.25.1