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 BE42D4373B for ; Tue, 19 Dec 2023 04:29:42 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B76AD42DF3; Tue, 19 Dec 2023 04:29:42 +0100 (CET) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2080.outbound.protection.outlook.com [40.107.93.80]) by mails.dpdk.org (Postfix) with ESMTP id A2C554027B; Tue, 19 Dec 2023 04:29:37 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mL9quaSFLgHULnRIPYS2u65MYNf+QyU4u1jRIQ50Oi0OfjhNSlt3duzauPdj9zo/JjQnf5bZB1OwcBNjPWUzj/sD4hN6FTxECdCnO3sBJQyk6Q4GQU6TcwUOIjK3sEReGk3VSku/q1gtZJ/WL1dMa3Vm/Z/YJSJ2br1POfTLD30tlzUwJwJAN9iTriOEQi5i6vqMty3mfwksNaHwjzTvnn1cOom8uwxkeUXOSzCINmGFP3aQzlhjQ5qW5PxBt5VU1mM5HGGl3mYt98qYu5hMM6DRJtejYjIejKFeqIHDz1w7bx7gCacCIUP0L6dJNLgLPHiq0fhGZCjXE9rAP6MUSA== 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=QJWgffbR/bEGt2fQMMzRmJ+PUWyvjUkiagXkshOyG8M=; b=Ptr7nLhIySR/4ZmxmDNd0KXQG51Yf6SI3mp2e/7bLMdO2taAifYXa0JIcp/ro8JQBVRQznm6LvOW60BkjWVc3SA5NK2XqBsbqRadVL7Ni5ivxkCgREmtdPzU6HkWZznAHU0GlzZGOsgh4g0dzu0g4YpakGlPAtquJvZj6gxDaqJqt0Haxten7keyq5h0bzVLlEtlEprajyk1rA5vS0z7Isq1BiDNlzXHuOuGCifgkIzllvjMTC7UVnInwy5Jx/nY1r8Ax3dx9FSOXreJ0HkwJxQbtpsQYV5nhbVABb1scp03zaoLRzFouuuEjF5ADVDKoPLLHgN5G5uXx70s9wf1UA== 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=QJWgffbR/bEGt2fQMMzRmJ+PUWyvjUkiagXkshOyG8M=; b=vH4y1TW9UczU6lino2K2IoYYdEVR2TMhUsXOXdiJBB+x0lBrHyDr83ws/80ULvYwIe3uZ6qAcHyi11sOxVRMvRr3JY3nPq5tTfgtKDNOi/A+YNiivc430hRhelESfsAExNnNTcL9Xkvpvy6SqdqzmF+ReYHk2dm8P37rjGoDIVI= Received: from SN4PR0501CA0057.namprd05.prod.outlook.com (2603:10b6:803:41::34) by IA0PR12MB7577.namprd12.prod.outlook.com (2603:10b6:208:43e::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7091.37; Tue, 19 Dec 2023 03:29:34 +0000 Received: from SA2PEPF00001509.namprd04.prod.outlook.com (2603:10b6:803:41:cafe::2a) by SN4PR0501CA0057.outlook.office365.com (2603:10b6:803:41::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7113.17 via Frontend Transport; Tue, 19 Dec 2023 03:29:34 +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 SA2PEPF00001509.mail.protection.outlook.com (10.167.242.41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7113.14 via Frontend Transport; Tue, 19 Dec 2023 03:29:34 +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.34; Mon, 18 Dec 2023 21:28:56 -0600 From: Sivaprasad Tummala To: , , , , , , , CC: , , Subject: [PATCH v2 3/6] examples/l3fwd-graph: fix lcore ID restriction Date: Tue, 19 Dec 2023 04:28:22 +0100 Message-ID: <20231219032826.4814-4-sivaprasad.tummala@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20231219032826.4814-1-sivaprasad.tummala@amd.com> References: <20231218074905.42749-1-sivaprasad.tummala@amd.com> <20231219032826.4814-1-sivaprasad.tummala@amd.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain 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: SA2PEPF00001509:EE_|IA0PR12MB7577:EE_ X-MS-Office365-Filtering-Correlation-Id: 9a824c0f-955d-41bb-bed5-08dc0042b8b7 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: jdZ8oDX5RcBwD2j7s7WItT7/aM1bfBa0nrWAiOKa4cxhXBWbEQuydV9u7TboOEyevb1P3+5+dmWzOP8SUsdqnHnVBloUw8KDSvptkgvaxYULQeTnVzcvaKy8bf8J9wq4i5E3owNZqVEoSGOIiNWmQ8+L3oqPjHIpwXz5nakfP0R1c4ZamjUOVdFUUpd2gIWx+F000l9ECVn397NPeO6bRZHaEhkjlmaaudZG4wxlSII17KjxQB1N4y+KmkLOTMBzQmNbYFV/32hItPDlqomHY+kVgMDW63up+3b3rIdZ2OlNkmpKBKixUTSXkzYKYVn2yJXgfA2eUq3sRcZds9Lwr+Az9bqlW1MVk9kj7IXo1Tn74psnH77ZPowgIWS+sudZpiqEre3TdoTn2trBsysJr7v8yGvH4phl160oVZjhE2TVOQo1Wc3QUmXi5VM61329zjbGOyyF5eIzXluUzZhZoV0DiVvmt3KWQZywpUJJHLM8Pi42ZUb0v/HfVNxzeizRihl3btH4c/0rTuyTuKtRiBXZxCFvQgcZsp/J80vy3NZPQhapsHMwyzXpi0v2aKqwcwNqcco5SgYi5u9GnK3dLJfByA8MaGrPp/aFVxpUd3sOspQa2EHb6BLvbL+H26F4Ul6E1MkLosubYER4Fthi8SYSdcA1fA1DmPADRcdLSAEcXHcWpQqcLuLFMU7TD2F++3LasvOcckSzbra931ESHHlwwcIMdYo0WYIbJexp3Hv0DMsdIXx4EHxYSzz0L7/rClEcFcPckpKKKcVsxDp11Mj5napOPVf80WDZKrpghtj/j5ubs+d2dCor97kiHY9UIxVPYRu3W5kiRB1RGnPjDy0GLLhdCBTJXko8HeJpndI= 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)(4636009)(346002)(136003)(396003)(39860400002)(376002)(230173577357003)(230922051799003)(230273577357003)(82310400011)(64100799003)(1800799012)(186009)(451199024)(46966006)(36840700001)(40470700004)(40480700001)(5660300002)(7416002)(4326008)(47076005)(8936002)(8676002)(6666004)(316002)(54906003)(70586007)(83380400001)(70206006)(44832011)(36860700001)(336012)(2906002)(110136005)(426003)(26005)(81166007)(356005)(82740400003)(1076003)(2616005)(16526019)(478600001)(41300700001)(36756003)(86362001)(40460700003)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Dec 2023 03:29:34.6034 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9a824c0f-955d-41bb-bed5-08dc0042b8b7 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: SA2PEPF00001509.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA0PR12MB7577 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 the config option allows lcore IDs up to 255, irrespective of RTE_MAX_LCORES and needs to be fixed. The patch allows config options based on DPDK config. Fixes: 08bd1a174461 ("examples/l3fwd-graph: add graph-based l3fwd skeleton") Cc: ndabilpuram@marvell.com Cc: stable@dpdk.org Signed-off-by: Sivaprasad Tummala --- examples/l3fwd-graph/main.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/examples/l3fwd-graph/main.c b/examples/l3fwd-graph/main.c index 96cb1c81ff..6d3116aa7b 100644 --- a/examples/l3fwd-graph/main.c +++ b/examples/l3fwd-graph/main.c @@ -111,7 +111,7 @@ static struct lcore_conf lcore_conf[RTE_MAX_LCORE]; struct lcore_params { uint16_t port_id; uint8_t queue_id; - uint8_t lcore_id; + uint16_t lcore_id; } __rte_cache_aligned; static struct lcore_params lcore_params_array[MAX_LCORE_PARAMS]; @@ -205,9 +205,9 @@ check_worker_model_params(void) static int check_lcore_params(void) { - uint8_t queue, lcore; + uint8_t queue; int socketid; - uint16_t i; + uint16_t i, lcore; for (i = 0; i < nb_lcore_params; ++i) { queue = lcore_params[i].queue_id; @@ -217,7 +217,7 @@ check_lcore_params(void) } lcore = lcore_params[i].lcore_id; if (!rte_lcore_is_enabled(lcore)) { - printf("Error: lcore %hhu is not enabled in lcore mask\n", + printf("Error: lcore %hu is not enabled in lcore mask\n", lcore); return -1; } @@ -228,7 +228,7 @@ check_lcore_params(void) } socketid = rte_lcore_to_socket_id(lcore); if ((socketid != 0) && (numa_on == 0)) { - printf("Warning: lcore %hhu is on socket %d with numa off\n", + printf("Warning: lcore %hu is on socket %d with numa off\n", lcore, socketid); } } @@ -282,7 +282,7 @@ static int init_lcore_rx_queues(void) { uint16_t i, nb_rx_queue; - uint8_t lcore; + uint16_t lcore; for (i = 0; i < nb_lcore_params; ++i) { lcore = lcore_params[i].lcore_id; @@ -452,7 +452,7 @@ parse_config(const char *q_arg) lcore_params_array[nb_lcore_params].queue_id = (uint8_t)int_fld[FLD_QUEUE]; lcore_params_array[nb_lcore_params].lcore_id = - (uint8_t)int_fld[FLD_LCORE]; + (uint16_t)int_fld[FLD_LCORE]; ++nb_lcore_params; } lcore_params = lcore_params_array; -- 2.25.1