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 DA78D43D0F for ; Thu, 21 Mar 2024 19:49:15 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E208B42EB4; Thu, 21 Mar 2024 19:49:11 +0100 (CET) Received: from NAM04-MW2-obe.outbound.protection.outlook.com (mail-mw2nam04on2086.outbound.protection.outlook.com [40.107.101.86]) by mails.dpdk.org (Postfix) with ESMTP id 505E142E69; Thu, 21 Mar 2024 19:49:09 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Rl2Gg5BuAnvY76rFg/7YL+aCH1g/ZRpPqVv42es8xZgmIiMAIFno+H0oV1URl2k2i4FNf5V1ESJKu+b+mpxZ1iLcRLA40q1gMNfj6DjFB3+YBVukK1CCpTwCtLCAvgsZlZ/lW3tjgFLJ+Je9NMsghX054nXP3yZeikzaJYzAeyY0CqVmtvqwj7EV6ajM0eo08TW+yuqW7AamiI38V7W0ufqlnoci9PTdFYa9XwQMDSZRNeA0cpXShBJDKe3A27GpY2g6kaTHPYcn/xeQsckUgWSlhHyh/6F7eBJFSyeC9EO2OpfvWmmnmOAnPEFR5M8QvV60V92rpWCO8Dga/l4SCQ== 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=x8ZGktrsk9d+8qT2FS66Hv4CQnwMyBabidDzYcjVUUo=; b=ZB0XSL9z/5UaPMCPIIaAj7/8/xfo8TBb0ng6cCDv5adKrolVSmedRcTMZlkvbLHUYF05oZGK5n3VgQaB6yjnskQzFK8GhqzgYL51FSBKjzVsCb27ERPBhlpzOQW/cmpqWo/oFI8iD+Edk7IdAwEiqHZJMJQdnDuDzJLTSMqMl43GOqXbt9vmacjhJFv8jLut/jdCEbCh8JT968Jui+G8X7s4/f0prtLpiBeBGpu8yRtki8NcwKEmCbgBiLlhXXcKkYmWyDOltFtTyY3vxOy67MBu2MQ5INUzlIpzVcR6YsbGw3yOz7jx8ydoicKGo1byPFYw2mWuT1nC1GTzyd6Efg== 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=x8ZGktrsk9d+8qT2FS66Hv4CQnwMyBabidDzYcjVUUo=; b=EoMTNjr5MMllB6hI+dhL3i55Palqon8L6wx2TdxTx/dsv4X9uiLxRSdUNUYwePt6Q7kg8No8Q/nlDORhiW2RmNxQBHvbD/j3ytFWgNqK5ZuLr9xtdzYNHPUEfbUI+grUgQrSOJF4yZXxgqiClDGoBTXQLPC5/VnY9rD9d34kuLs= Received: from MN2PR08CA0015.namprd08.prod.outlook.com (2603:10b6:208:239::20) by IA1PR12MB6281.namprd12.prod.outlook.com (2603:10b6:208:3e7::17) 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:49:06 +0000 Received: from BL6PEPF0001AB73.namprd02.prod.outlook.com (2603:10b6:208:239:cafe::9e) by MN2PR08CA0015.outlook.office365.com (2603:10b6:208:239::20) 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:49:06 +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 BL6PEPF0001AB73.mail.protection.outlook.com (10.167.242.166) 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:49:06 +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:49:02 -0500 From: Sivaprasad Tummala To: , , , , , , , , , , CC: , , Subject: [PATCH v6 14/14] examples/ipsec-secgw: fix port ID restriction Date: Thu, 21 Mar 2024 19:47:20 +0100 Message-ID: <20240321184721.69040-15-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: BL6PEPF0001AB73:EE_|IA1PR12MB6281:EE_ X-MS-Office365-Filtering-Correlation-Id: 2daf9f7b-110e-467d-b6c4-08dc49d79613 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: vTWBumaeFBTEeeRMklVvu1/paoIhJCjlAHPUg0wk+FpIyQApAU6kKaZheT4B51SYarRKfvFErxDLOthEXHyGiKPAufo2N0CY5CT7V0FBQJTLo0390Nnx5vpQNuFZuh+xUXjZ9Oa3wHNXBiA46KB1XDO2LjRPea/QBu25f4eLlkxlNz5bpT1hMyQ2ldrHuKaJa9hEDHwdEt94wSYbZuOQOp0dbvWRITvnH1EfAR+27+Sxj7wfj3rpeI3SVGG7dPNqx13q2co35Z7NzRXWTuBsqise9tRuffiViCHRpjYXCCFEaoeVH+BBGULO9ZNnwTrW8AZlWDMJ1oOnSPnK3a0JzBaZS5D1+Rst5v2JReKCHrAXutLeOoy5nhVIqeEIQY3muLsNBI/QcV4Xm+fykI0NOjlL0TCfPlmwDckkpwy9T3I3WAMELflbQsabT6OMxZWazt04s5HUUVNPKg4fahfHfgzqIRJVQ5rdiHgkS2qZmrPuvAQDiHMxrPaJ7MpqUdqcf7nM+miN4qn7WOqmljYWNGTKCuLGV6MWNgQM/YYkf8wHfotCZZwEq9nicOMm9HvkdTWljC57RF1BaOyzi3/psKgbbt/T0d2oRy1+MArcW3BjqfkZwVx5CM2jiWTmwjypEu3nAk+8ck8+w6age0Pa2fUoYQgkcJcC0GJmOgkb/hKrI8m3OAZ6d+/xn0u6bmXjlSQsVetr6ETQUOXYNUWcZWwjwUGCmcO3Bu7V1Xcew602LxHf2vMbb4YlpGzyYRSV041+E1r1wS5rtI2HIJoCvQ== 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)(82310400014)(36860700004)(376005)(921011); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Mar 2024 18:49:06.3500 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2daf9f7b-110e-467d-b6c4-08dc49d79613 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: BL6PEPF0001AB73.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR12MB6281 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-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 Acked-by: Konstantin Ananyev Acked-by: Morten Brørup Acked-by: Ferruh Yigit --- 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 0fa9622626..dc7491a2b9 100644 --- a/examples/ipsec-secgw/ipsec-secgw.c +++ b/examples/ipsec-secgw/ipsec-secgw.c @@ -1048,7 +1048,7 @@ parse_config(const char *q_arg) char *str_fld[_NUM_FLD]; int32_t i; uint32_t 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; @@ -1079,7 +1079,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