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 1D0F043D0F; Thu, 21 Mar 2024 19:49:31 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BB0EB42EC0; Thu, 21 Mar 2024 19:49:01 +0100 (CET) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2087.outbound.protection.outlook.com [40.107.243.87]) by mails.dpdk.org (Postfix) with ESMTP id 1A78B42E87; Thu, 21 Mar 2024 19:49:00 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=B/Mbyp4Qbrhn5HWsog5rxu3ztC13ODviiMUW7zQygUVBSgfOMulxk41tuy6p2ooSnb9tFeZjx+bVgADXusBdfsryJScvThHMsDPDQiE8RcMP2zhykAik4aYGe301Yn1xIsFZ/ENTvWWLVu7XVPgMY3zZ6cb1pBtyI8wpxDsQ4IODSkXvFy0jMXgktSxZafMLlrPPttxD1O7Ms59uclpItcXTP7HS3Lp0F+wXsSwuzrNbmfbK1N9p7KvQlzvLn6wL9EOCZMZJORZNtJqxlkZKFilAydXxPgfZ8toLxvYnJAI6NxSurbDRU0tcByspLc3VFmJcq1Ctm7TTnF70+r6Rbg== 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=4VTpoK07L9IEANWMa0kmXYAU/okrjuC7TrRFjsOQdkY=; b=Ho9hhAg3vb+DQ3KH9HHaWZSxRPG9LIWZz2+OmdefHF8dlvLX095KfYFhbzOb2oI8oY1TUpEHYBwDNtbnT/YAbE3sMqTfhd+pw8pAoT2uoh+i/j42kuzU+GxMJBYEnjU21tp+VBkGrfdRFEEdt84xiVVto2aEwd8CSfz5MYMoLt4zFiSDn//2BKP8modWZOL7kK/NER3aTXFhAmuDc7A+voo7BqekoVtyItn6uJt9ia6/Wm9o60uAQy23fxZSBQsaW2bz8+U+RZfxlC82VWanZWQijQ/xoib0CNMMW/5pr8WTBBpbcJPbfSN22WsW5IcG0qePXEO+MmQFnNrxC+WrAA== 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=4VTpoK07L9IEANWMa0kmXYAU/okrjuC7TrRFjsOQdkY=; b=Uk/U/1uO+avyRuudI0L0SJtmDCpKiiXlIg6SlJfab9vxxHaUXQX7t3e/Ttc9xd4wPaEJ875uWRKuB3G+Qs0kbSNtBKXWpjX8DHgcQVa28tQO+moAhTJVoEo1T/ug4dAm1s4CDmeAQ5ljbn4uboL0FKov6q5DjokAuRCr+xnWbzM= Received: from BL0PR02CA0126.namprd02.prod.outlook.com (2603:10b6:208:35::31) by SJ0PR12MB6967.namprd12.prod.outlook.com (2603:10b6:a03:44b::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7386.31; Thu, 21 Mar 2024 18:48:55 +0000 Received: from BL6PEPF0001AB75.namprd02.prod.outlook.com (2603:10b6:208:35:cafe::fe) by BL0PR02CA0126.outlook.office365.com (2603:10b6:208:35::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.13 via Frontend Transport; Thu, 21 Mar 2024 18:48: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 BL6PEPF0001AB75.mail.protection.outlook.com (10.167.242.168) 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: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; Thu, 21 Mar 2024 13:48:51 -0500 From: Sivaprasad Tummala To: , , , , , , , , , , CC: , Subject: [PATCH v6 11/14] examples/l3fwd: fix port ID restriction Date: Thu, 21 Mar 2024 19:47:17 +0100 Message-ID: <20240321184721.69040-12-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: BL6PEPF0001AB75:EE_|SJ0PR12MB6967:EE_ X-MS-Office365-Filtering-Correlation-Id: 85bc8132-ddb8-4f90-c24c-08dc49d78f6c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: u52yiL95cBq8k5Nhz2VEIiqG+TvBoATsnqMbUxs2ZIszhX7PQomt1/HFUHsyZ1q1+iSRWrPf6N7gIbkjm4AziZORnZhlslhfQEW+nvBWN272IgB6m0+4g2HqeiDxUtlncRDA5TxuPZ7LzSHA0wWhMeFkG9X74xtxhKCw6hmWg5u8LzDek4reCnJUTZTSA/u6xeUJ1Rs+Oj3S5dQTzBblxzct/AKfqQzhk51cTBq2h42PL+MsKrlg5HMtpNr1vs/yfXrJfekIw1hcbA6AXZAHsZdsV9FlWv9RLu/exeOMS5NN7Lp9stU1vHr16cekbN9x1Xl73I86Y7lL80zIO+4UvQDaeAmPE7wezFsr2ExXmxZDnxj7TvUvsdtGqvPrp1xKDFnSBtozG42B0DO6CeXvsRrpkTDg2jmnVcNv05HcMze/h3DWPs1R5hWyZIPmy/RXqfJF1Oan9wIp3qLXBhAWgW7Wnr2fSCXh/KcD/v8lygcpIpPnoJVj5dmabymjHrYuBOzE+TxV0O5FISkX5JwXAVBprE89I58GEMl0lA2c0DtYL9VSPwsGxxgUkzowGTQ5Ql3PuFm3AULeojUqr6oeRd9MwXBiK6KaW33rhRxCWKNbUb0hJknPSvEw9khzuWKAjsIyEL+MShPHl1clhk7oGjg0DTBhGXhfhNqpQpL+Z8R4FoOd7krEjsQoeo6MI2ib4Xw6XqoIL70JJPZtL4UibYxfUD/6Di+dVpzMlLPI0a6J1H+4uQy1cEbRwS8l+n2770MqHS7N7c3hEfLdkCf4PA== 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)(376005)(36860700004)(82310400014)(921011); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Mar 2024 18:48:55.1739 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 85bc8132-ddb8-4f90-c24c-08dc49d78f6c 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: BL6PEPF0001AB75.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR12MB6967 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 9fb4fe97d4..19e4d9dfa2 100644 --- a/examples/l3fwd/main.c +++ b/examples/l3fwd/main.c @@ -500,7 +500,7 @@ parse_config(const char *q_arg) char *str_fld[_NUM_FLD]; int i; unsigned size; - uint32_t max_fld[_NUM_FLD] = {USHRT_MAX, + uint32_t max_fld[_NUM_FLD] = {RTE_MAX_ETHPORTS, USHRT_MAX, RTE_MAX_LCORE}; nb_lcore_params = 0; @@ -530,7 +530,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.34.1