From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <stable-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 7D13E43D51
	for <public@inbox.dpdk.org>; Tue, 26 Mar 2024 13:57:40 +0100 (CET)
Received: from mails.dpdk.org (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id 6CE7E410ED;
	Tue, 26 Mar 2024 13:57:38 +0100 (CET)
Received: from NAM10-MW2-obe.outbound.protection.outlook.com
 (mail-mw2nam10on2068.outbound.protection.outlook.com [40.107.94.68])
 by mails.dpdk.org (Postfix) with ESMTP id 71E1C40ED3;
 Tue, 26 Mar 2024 13:57:37 +0100 (CET)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;
 b=N8fhib9M351NeqiZrOZKiZ6tlzJdabDl1PgOP5TUvFoZfQ4A3NDTxAC/IbwFjTjwu296plSrzupWSRwa5EmdI3iZpVdgcBnktqfMNZcwXgZ0GAKZ9RpWW7i+g4ortsX9+R55/enLe0JGAQA6zw8OBgjtFN53J3+FNydGSCeFCV/hqIcD+Ht5LII5+IKW2690N5qjq6U7HextGtwpYFRyCZ4MqV3cNIaG/PRNtXYSvMdKo9EUxgVj43QILM+8rGIJOded+YFM6Vv8w7o4I0rro/eRUssxNRBdR6LfPmdbZZlzVtatKF7cuXRIobqwVH+7rVO14yk9MCFRfR7O99ER1A==
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=jQGiLgjV7V7FWhMS0JtpIRZBGGjxKBvxEnBbDyi6A5A=;
 b=ZUsPHPlA+x8JL0+slZSH5faDv+gjL+vnNQVQqdk/dJg9/b8nuBxmacfkJhXaI9dw4wSjRLBNPQIBhaer+vjbwdYjz+/eokoRCDqvbIu30waBIOsvCj9z9tBiMmY5X+oRSFmUetheUj8Z7rfyipXGSV7NLb6xpPb1Ui+vfGRHkXlb0w44Ww18oBunFqTdt9jmqqDhgCJYReLwGEA2BOaki+N7UhO4HRefB0IMLOd7AU68WY/PC2+rgVxGIOiGh8u29ZmaVFHVG8U3e2BnMg5h52ydxNo0TrChpLSHoWzs6IVUuIRBoDLmtoZVlVjZM5r2Xtlyju30Hq8UG8BiRHDsug==
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=jQGiLgjV7V7FWhMS0JtpIRZBGGjxKBvxEnBbDyi6A5A=;
 b=W3HicdcBWO2zJ6wwsyXHF9x+US9mGc8+rOCLy+O5mGvvnjoCvIkwBTXOefGvGKDzmESJnvwNqM1jxKa/uslahhzoI2ZfGvDTYK22/H/U0N/8aDEIMNTRJJB1oXyXrZFi7vCaXOOftJyY7G2pNeONwdQyz8a9sXTIUskvH13svBc=
Received: from CH0PR03CA0233.namprd03.prod.outlook.com (2603:10b6:610:e7::28)
 by DM4PR12MB7765.namprd12.prod.outlook.com (2603:10b6:8:113::5) 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:57:33 +0000
Received: from DS2PEPF00003446.namprd04.prod.outlook.com
 (2603:10b6:610:e7:cafe::bc) by CH0PR03CA0233.outlook.office365.com
 (2603:10b6:610:e7::28) 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:33 +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
 DS2PEPF00003446.mail.protection.outlook.com (10.167.17.73) 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:33 +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:26 -0500
From: Sivaprasad Tummala <sivaprasad.tummala@amd.com>
To: <david.hunt@intel.com>, <anatoly.burakov@intel.com>, <jerinj@marvell.com>, 
 <radu.nicolau@intel.com>, <gakhil@marvell.com>,
 <cristian.dumitrescu@intel.com>, <ferruh.yigit@amd.com>,
 <konstantin.ananyev@huawei.com>, <stephen@networkplumber.org>,
 <mb@smartsharesystems.com>, <david.marchand@redhat.com>
CC: <dev@dpdk.org>, <sergio.gonzalez.monroy@intel.com>, <stable@dpdk.org>
Subject: [PATCH v7 14/14] examples/ipsec-secgw: fix port ID restriction
Date: Tue, 26 Mar 2024 13:55:53 +0100
Message-ID: <20240326125554.138840-15-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: DS2PEPF00003446:EE_|DM4PR12MB7765:EE_
X-MS-Office365-Filtering-Correlation-Id: 70d62e99-bcb2-4c95-c77e-08dc4d944d8c
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam: BCL:0;
X-Microsoft-Antispam-Message-Info: 4X2gRhsXOusP7lNsDBkcVbMlH7r9x6ZqPDci0aCrJfDyPqY10NsJZaCZzftyuQVv+g9rdDbi1WTmVJjyWPbIVq/vdkqWw9WYHkm0myPJPcvrEUV+gWbMrdKgF/zQBh7TKl6IBN/tW/IVMprNgCBH7c9PEdcVT+fXvc4b+b61ZfEoXM23QEfKoXGYMO32CUHeZJ6irZWV2+VaCqd7VEhAyixq37EQC77RUZi/umGydaV0/14dn1Qr5YBNtY1JQV7B4MimkFsbRWpXu59nn5aIBgYhpJxYfVJexL2z2nMddbsv0efzqXUrsPrknhfuF7SaTFm31BAkunWCK8ML5a1bQJ2+pPY7e1H+SW9BiOfbwarxC9oXxVmB6Xt2qmhjBzArBZwM7EQYffXtjDPjiD7fTo+24i/G0hfivhY41xyHBP/BGz2B09jL/UzoqREQMU3719csfvXCiJlf48wa/DqNbyiMP7oJDgCYaPRSDgulhJNhl2mkPYj/3NURwUSEs8A4Y/HXbyNSbdFoXf+9eOhVPSKfxyoYOSsfLBxabC40kKJkvP05FtpTRrN+UgoKj+kGxu9qvcs+RlcPr8Bz3vJgoEmpUsltB4AFAffzDJc1WC8yqTKA2aTLYNvp0IBhplQ1zke8E0TZumnMcVWAaqPT+9HhPEzV0Z0qVYCHpYwPw3KxA5AAwDBxlPUeDk35kenn9CP3ECGetzCa19Ena6WQPssaiKNPD9tYWz7YFmpHC07ZUHW0qZV0G9R7kSWo90ZsV+ElP6CncdQJw5lUfPH/Lw==
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)(1800799015)(36860700004)(376005)(82310400014)(921011);
 DIR:OUT; SFP:1101; 
X-OriginatorOrg: amd.com
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Mar 2024 12:57:33.0400 (UTC)
X-MS-Exchange-CrossTenant-Network-Message-Id: 70d62e99-bcb2-4c95-c77e-08dc4d944d8c
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: DS2PEPF00003446.namprd04.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Anonymous
X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB7765
X-BeenThere: stable@dpdk.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: patches for DPDK stable branches <stable.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/stable>,
 <mailto:stable-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/stable/>
List-Post: <mailto:stable@dpdk.org>
List-Help: <mailto:stable-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/stable>,
 <mailto:stable-request@dpdk.org?subject=subscribe>
Errors-To: stable-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: d299106e8e31 ("examples/ipsec-secgw: add IPsec sample application")
Cc: sergio.gonzalez.monroy@intel.com
Cc: stable@dpdk.org

Signed-off-by: Sivaprasad Tummala <sivaprasad.tummala@amd.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@huawei.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
 examples/ipsec-secgw/ipsec-secgw.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ipsec-secgw.c
index 2d004d82fd..761b9cf396 100644
--- a/examples/ipsec-secgw/ipsec-secgw.c
+++ b/examples/ipsec-secgw/ipsec-secgw.c
@@ -1049,7 +1049,7 @@ parse_config(const char *q_arg)
 	int32_t i;
 	uint32_t size;
 	uint32_t max_fld[_NUM_FLD] = {
-		255,
+		RTE_MAX_ETHPORTS,
 		RTE_MAX_QUEUES_PER_PORT,
 		RTE_MAX_LCORE
 	};
@@ -1082,7 +1082,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