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 AED5D43D0F; Thu, 21 Mar 2024 19:49:36 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 004AB42EB6; Thu, 21 Mar 2024 19:49:04 +0100 (CET) Received: from NAM04-MW2-obe.outbound.protection.outlook.com (mail-mw2nam04on2075.outbound.protection.outlook.com [40.107.101.75]) by mails.dpdk.org (Postfix) with ESMTP id 381D642E3D; Thu, 21 Mar 2024 19:49:01 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QXDAszQynZZxanG3k4E05OF1H50OAdSsJ29SCjrucLJRv4wcyP13d51hELDzzproc3txzW+3GGwoXCtOHQ57jVaZe7P/ZvxahiI48SjjHEbz+O9E+AU7lwVmrFVI02X4+tjSPAWO8HTU21Q+dhkhyZCRCgzHJhtKKAnm4aRY1X5zcs6swPYkxlvJLvYZwl6/BJKFkq73V0n7KnTAXJGGPPzJPG5VpJVwZTf7/FUN2K1Vamx0jrhKGVobG+7skyHu7rJxkI13Di74DwXCUlpGAJCBdxNeZxqySRlMwOPKWRsnJaKj/9g6IK+ModdoM3V90YpVyd7WS5gsfgMODpj8tg== 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=YnpzaTgNRbkVfpAhYFln1MKTJNdti8z8CxT6ezt9zeM=; b=NU20mmmxVKEDv3uqkw3mPRUJZC/wFcvJyxK1arweMPvRTlSjtRse9oKxcKfoqPqmUZ9KMBVPise3e0AlBV43plN+bUKrm0uBChveYfDLLdDSQKfLnPA5l5hh0Bi8QSabD6jx2Dcxojj57j8C8apyEU/74WHrpfKo5weWi2s9+oYA1pHFyzUFcv6yHFKgWgnUOMkYjC1BTBG0YQctpWXCYCnGxj0bL+fY2SWTDy/7429ef0MBYMLPySuXSKcpiqT4A9IIR/yzGs7cIRxO8yxbiXe2RW97LYvqNvb4vQNuWvW0H7ottFD5KTUfdkvqyQdzKJvHD4W1BLZJCSl/nx74tg== 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=YnpzaTgNRbkVfpAhYFln1MKTJNdti8z8CxT6ezt9zeM=; b=c4XI/HdDxBa7ZnBO2k010MOxZfNIGyu/oknuMDGT4Z1V6U+064U4tD9vfbTpbTYZk1reRifJlmtsBruVnFaXH2UpUIyBL7Zch0kG1/cbp4AUMgDyPAeXtL1YaRGnQGuHdSyzc/338gdYxDjCPvTqgPTSSHNrkisPxMmEBeZwTDk= Received: from MN2PR06CA0001.namprd06.prod.outlook.com (2603:10b6:208:23d::6) by SA0PR12MB4480.namprd12.prod.outlook.com (2603:10b6:806:99::10) 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:58 +0000 Received: from BL6PEPF0001AB76.namprd02.prod.outlook.com (2603:10b6:208:23d:cafe::52) by MN2PR06CA0001.outlook.office365.com (2603:10b6:208:23d::6) 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:58 +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 BL6PEPF0001AB76.mail.protection.outlook.com (10.167.242.169) 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:58 +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:54 -0500 From: Sivaprasad Tummala To: , , , , , , , , , , CC: , Subject: [PATCH v6 12/14] examples/l3fwd-power: fix port ID restriction Date: Thu, 21 Mar 2024 19:47:18 +0100 Message-ID: <20240321184721.69040-13-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: BL6PEPF0001AB76:EE_|SA0PR12MB4480:EE_ X-MS-Office365-Filtering-Correlation-Id: d1ffb5a8-9422-4034-4ffb-08dc49d7918a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: BSAAOwNBDmqiW6ix3tGQMfooyEq3jWgVwPQ1l4jRukxSc7bqoXhI3CinCYQg2W/z6iFle/1Emk7hAgjRlgMHsU0DkfW6TcZIiU/uBXNHUKVdDjDXJfvFmygFIHvhicBucfdZxIgyPxGUXSdEYLdb0jAvT6LNJH08MIlOa83NGJBQVvyPFMEqg9JJxODM8SuaTgRAgByPh0bFrQY6DiJ2uXbLzggdAWc6BD/aAlyyekQcb/EGbAYjFqcNltH1V5DK14uppKCIMG7nnN6qRxFeczy/HBRrJLD0GQh72N4xyN7R+T+5BOxj+46qZTRm6Bo0tMp+mF4Llmi7hjf8MSDsS8pvSBrqLnJyomkwOocMYBslZoH8HgCofoTFnxrLfhpzGz355vgOm1r6cySyMKXxFC4NaFq4nzl5wOLIQ1DaD8VqZI/pXsj7i+aagSUjEWiI/4kxqyrw0ge7N63NuR4tQMjXFVlsaau7xy4AzGVmWK9ZD046JYnuHtb6JxS3VIRoohZJYYZX8MBV+gpIiPcbwRYC3B6kJTsZyvesl8+8rDuL876GmGu2DS0PydtSKqWqB6HYGtw9y9RKYGL6h3rP9HOyc8I7/6oG8zMnAAzdxfSDgQ2ZZojizlBo1M3AEVbTkrs7fICBwlehCmGQakwGosRr7e/DnEkHkIGGkWsxixjiznB9M4HGK6VsTvlOkGqX82mRTULO0q6BPHARs0cz3fX2Y+9C/l5wKjyK0OYAcLCZzyHQA75EcLGYH0vMBh8+1VEUekCUz6ffIIpllrO2+A== 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)(36860700004)(82310400014)(7416005)(1800799015)(376005)(921011); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Mar 2024 18:48:58.7074 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d1ffb5a8-9422-4034-4ffb-08dc49d7918a 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: BL6PEPF0001AB76.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA0PR12MB4480 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: f88e7c175a68 ("examples/l3fwd-power: add high/regular perf cores options") Cc: radu.nicolau@intel.com Cc: stable@dpdk.org Signed-off-by: Sivaprasad Tummala Acked-by: Morten Brørup Acked-by: Ferruh Yigit --- examples/l3fwd-power/main.c | 4 ++-- examples/l3fwd-power/perf_core.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.c index 5411592dca..822b802f29 100644 --- a/examples/l3fwd-power/main.c +++ b/examples/l3fwd-power/main.c @@ -1658,7 +1658,7 @@ parse_config(const char *q_arg) char *str_fld[_NUM_FLD]; int i; unsigned size; - unsigned int max_fld[_NUM_FLD] = {USHRT_MAX, + unsigned int max_fld[_NUM_FLD] = {RTE_MAX_ETHPORTS, USHRT_MAX, RTE_MAX_LCORE}; nb_lcore_params = 0; @@ -1689,7 +1689,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 = diff --git a/examples/l3fwd-power/perf_core.c b/examples/l3fwd-power/perf_core.c index d8b35d062c..c2cdc4bf49 100644 --- a/examples/l3fwd-power/perf_core.c +++ b/examples/l3fwd-power/perf_core.c @@ -132,7 +132,7 @@ parse_perf_config(const char *q_arg) char *str_fld[_NUM_FLD]; int i; unsigned int size; - unsigned int max_fld[_NUM_FLD] = {USHRT_MAX, USHRT_MAX, + unsigned int max_fld[_NUM_FLD] = {RTE_MAX_ETHPORTS, USHRT_MAX, UCHAR_MAX, RTE_MAX_LCORE}; nb_prf_lc_prms = 0; @@ -165,7 +165,7 @@ parse_perf_config(const char *q_arg) return -1; } prf_lc_prms[nb_prf_lc_prms].port_id = - (uint8_t)int_fld[FLD_PORT]; + (uint16_t)int_fld[FLD_PORT]; prf_lc_prms[nb_prf_lc_prms].queue_id = (uint16_t)int_fld[FLD_QUEUE]; prf_lc_prms[nb_prf_lc_prms].high_perf = -- 2.34.1