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 BA62143D51 for ; Tue, 26 Mar 2024 13:57:31 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A6A24415D7; Tue, 26 Mar 2024 13:57:31 +0100 (CET) Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on2061.outbound.protection.outlook.com [40.107.96.61]) by mails.dpdk.org (Postfix) with ESMTP id 71FB140ED1; Tue, 26 Mar 2024 13:57:23 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LYJZlJ+pC5nAJIYbShOYXhNpDlb68o4WY8+z2cjDOSyallbMz/VoM2X7ZUmbZ3Gv2LPc2rWpAvrZW79e08VQPOcRkMJKQqQYoNTfcSBmnxPO2/9vmkmZcNUbj10bIQQTQyyv67iZqgCTuwa8BpazHRxgp93S8/QdnkSZk44jB9rlN7ZoemYiTZKoB4QwgFem5CH3tRaAqlYz0i27B4ZHuIZQLKJxDi/xvdbVvfN3pjMaV2OGnCk4cF457gec0ssdVz4HgCGPepzVXVD/Va5+3E8izy1vbHWlIFySb7rUokr4KGHrotbBeT2G5cwxLaShfka1l/FoVAK3LUB0K+AfbA== 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=BceNGHJWg51DOXUp1ZrTZrDZZBcP2+miB77t5SX3CwY=; b=LiQ7ZCu5HQEuY/HbGK2uekyeyC8RvphZEnQsKsErHy0CdK+iNSagEbb3bCiUgEVeRLw22zXcoz3gDiIi9WiBtthIl4oNOB2is/Wy+8RLDPpI4SU6qXmvk3AouoAvU2cAHNtICM8Tv9m2AFgfD2AsA5IAmAfEPttjHFBLq74wfSCDTcDbCmNNkoBjr3R/VCdNxin0Clo+9b2iIzIzr0VSVNEZm24E8MVft+AKywauzbjpTUZ/PijldLGmw+nxT0NpjjM+LbsROXWZNESGeCLpEG8MNGMRiwobiu0VoicGeSjFW1cHe2EZVDfwP8dJQNKdJVEkY+AWN5EPSjC5Fwv6xw== 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=BceNGHJWg51DOXUp1ZrTZrDZZBcP2+miB77t5SX3CwY=; b=RkPRMhKnhE6ae7fGJm7KYJLQBpHGSwhH+9i4YfoXZ4htt36mvH1wNN5dk8BnTBFl4RK9TqXMRMyBzmfYsmonESMTEq86NBMrAPO+U5mxRPhwfxuVcCwkdTBYjcPBGD4Y6QtEE2NxRZV1/MjXPWp0sQjhvVwbLI/duXdYyufh/Ik= Received: from DS7PR03CA0084.namprd03.prod.outlook.com (2603:10b6:5:3bb::29) by CH2PR12MB4183.namprd12.prod.outlook.com (2603:10b6:610:7a::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.32; Tue, 26 Mar 2024 12:57:21 +0000 Received: from DS2PEPF00003443.namprd04.prod.outlook.com (2603:10b6:5:3bb:cafe::9a) by DS7PR03CA0084.outlook.office365.com (2603:10b6:5:3bb::29) 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:21 +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:21 +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:16 -0500 From: Sivaprasad Tummala To: , , , , , , , , , , CC: , Subject: [PATCH v7 12/14] examples/l3fwd-power: fix port ID restriction Date: Tue, 26 Mar 2024 13:55:51 +0100 Message-ID: <20240326125554.138840-13-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_|CH2PR12MB4183:EE_ X-MS-Office365-Filtering-Correlation-Id: 81e38557-52fd-477b-84a9-08dc4d944674 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: JZLq74od1y/bIIyIMZLbrDcuE7PIbVTXnRr04u7LhPfSunfyt4MijAvMJ00iIIoW7I7ipTtL4RKvL6nYIJKRbGrNOvQN5Ev8DMrpVxMKi/Bd7FN4yN4Mv9EynnDJdEwAdma8MFZvDHYWin1iL2qBD6W7CL9IEDeuBP3vKNx0SM48QIGuTsESeAph5Lm8yM8ca7UrPD6wGCa9Awyi3yCRWpD++gFDcNiJSe4enGHjwVWtSsZtP9RkILidSb5Yi7QpEZ+5SzeHcxpzuZdlMW6U89S10pGdcyb7qIm7FlopZhKJYVUtvd/HdZyKVKUDnlehkn6tlv8YjpdVgU57Gz35+Bk55rebtk1a1nWOjyT3DQ4yeRziqKQEcmYi2FpvUrfJh8kpFf8yfySLLXq+A/GkYRhE0BZo0eQehvNhFvG9NawYxobNINVhFHWK0xObeW82Q8VkfT7o/ETItbK3Pj2EVDvbNMaNmJpyvjtfiA1LP681ZMgKdfqfhb1pG3E+CDvcROtFxm1m6E3WFG8BwiaPoFu5QOGOvOHK2cz+GIjN70f/Dhtkm5mOhC28rXMMZKl/X3qkmcSBdkcXdtJbP4Ixxu+XOMNLSZbSY0r2ZBgx4sTDeblTe9cNOldhMyrUXyyeJ3TAbtCvEnejFaeT83aeHnkFl8C3vunjPqbQ9Wo6tNjkUzmSvi1jUPvF6KH0WUR2VT8qzGiyaMNG199QgZDiDZI5/Potp6c1aRspSl41eFzMlg8kUXEbQirzcEOSnlsPH9Lc7f/jX+SMPwl+mjDeew== 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)(376005)(7416005)(1800799015)(921011); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Mar 2024 12:57:21.1370 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 81e38557-52fd-477b-84a9-08dc4d944674 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: CH2PR12MB4183 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: 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 eac92ef875..a993af0408 100644 --- a/examples/l3fwd-power/main.c +++ b/examples/l3fwd-power/main.c @@ -1659,7 +1659,7 @@ parse_config(const char *q_arg) int i; unsigned size; unsigned int max_fld[_NUM_FLD] = { - 255, + RTE_MAX_ETHPORTS, RTE_MAX_QUEUES_PER_PORT, RTE_MAX_LCORE }; @@ -1691,7 +1691,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 fbd7864cb9..e4bdb62121 100644 --- a/examples/l3fwd-power/perf_core.c +++ b/examples/l3fwd-power/perf_core.c @@ -133,7 +133,7 @@ parse_perf_config(const char *q_arg) int i; unsigned int size; unsigned int max_fld[_NUM_FLD] = { - 255, + RTE_MAX_ETHPORTS, RTE_MAX_QUEUES_PER_PORT, 255, RTE_MAX_LCORE @@ -168,7 +168,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.25.1