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 CCFAE4373B for ; Tue, 19 Dec 2023 03:56:41 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 964B642DE1; Tue, 19 Dec 2023 03:56:41 +0100 (CET) Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2053.outbound.protection.outlook.com [40.107.223.53]) by mails.dpdk.org (Postfix) with ESMTP id 22B29402BC for ; Tue, 19 Dec 2023 03:56:40 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=D11piV9m88/NM5UgVuafa1wPvkWIVE2G/MwV6bMKDAjDOBErGpmitWU34DnD5yM8eqh0MyTr5Jxzi/jVunFJOH57AbSqxVe4pS2skhsxd8A0rSzMc3vB96AB836a+cReswUtareEEq2fpER2xpAmINovjRYA2MXTjk6idsZQJ0zWwnkgXgR5x8cBQQnqLV2gznFVdshrJs7c21jXniFGY3o1dFazjYWJoGEy1+WdGKbhsosSA9AJkjEfRl0PV/YEio+Yd9HmHXghBggx6343ZS9kvqNIxPLYKtWXiPcZLyHIGXvL9Q9grhap/zYBRgmKnScEj/S2c3law+rrBguheQ== 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=lr/kTpTu8ebLg/vsFhkOnfmkmGSkq6QEMrPqvlUsU1zOwpwzqXAdv1fsSmqLRjC5CA4JjEvVwjKuC+BwCxHYQsCqdXlqGu6Cfrq/0cVQqGFdogFzIdUPElyXKA0GgZNOP14CqDnctuB37XgwiV4yCTfrNtyQ8TSLm09TxizbjhCgdynxeNRUAeHVQpa1KLS2ZSKFncSktdKPzg5GAO1cLki/8Tkm3X6MzNZplrZOmnBa5LX+l1ym9tD+woJawENVkkWcSJ/H+aD2yPEuB0DaYsbwxwXQt5vxbDxsAap++MQTfPEB92MmumlM/iZrLIpFssSrdF7NT6U9KUFIZteHmA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=marvell.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=B2yWI6yr/7jH6lndFmkjwUoiVuy/ABn5TtQzJFqQWil64lwedH6VPIRUQU+wPQ/n6P57lBKEc9BkzXcQDOqnzn65sefIlLdy6v2fs7AMGMD/GKKj8uEQhWZqv4BQIDAhNumAoOBwCHYYLWJFhxbmwYAmlO9ELE37BXB9NZv0OFA= Received: from DM6PR08CA0019.namprd08.prod.outlook.com (2603:10b6:5:80::32) by SJ0PR12MB6944.namprd12.prod.outlook.com (2603:10b6:a03:47b::11) 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 02:56:38 +0000 Received: from CY4PEPF0000EE3A.namprd03.prod.outlook.com (2603:10b6:5:80:cafe::72) by DM6PR08CA0019.outlook.office365.com (2603:10b6:5:80::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7091.38 via Frontend Transport; Tue, 19 Dec 2023 02:56:37 +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 CY4PEPF0000EE3A.mail.protection.outlook.com (10.167.242.14) 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 02:56:37 +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 20:56:35 -0600 From: Sivaprasad Tummala To: CC: , Subject: [PATCH v2 3/6] examples/l3fwd-graph: fix lcore ID restriction Date: Tue, 19 Dec 2023 03:56:04 +0100 Message-ID: <20231219025608.2538-4-sivaprasad.tummala@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20231219025608.2538-1-sivaprasad.tummala@amd.com> References: <20231218074905.42749-1-sivaprasad.tummala@amd.com> <20231219025608.2538-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: CY4PEPF0000EE3A:EE_|SJ0PR12MB6944:EE_ X-MS-Office365-Filtering-Correlation-Id: 500c245d-6d6c-431b-34bd-08dc003e1e2b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: W0CdCHPKPsXwDuIGXJxWGJPxQONrUx0kA8EMa6b1fOnRD/6cWXBCTE69FDuWPtp2RDFl2t+dd0x1UthHrzD4i+4pKgZVAjSxn1AjA+CrwuPFPzlx6C0Zc/+GQj6vSr9cR7KR8ykSuMFGl66MBW4MTnLIIO1iFz5SXlTAm1cPrUFmAbGPYn+zblnQxM9/2QZLocJ+ztITjRGb6sHYGB3hGiWf03EwiB1YWiBk2opg+Tu9h1Ptx9T8FQ44Ux4TP44X+FVooTg5YBac4p5W0eSqWNFuSkcfS4wXGJj10Bqac1bRAiIwRYnnJHXI5NpNISsSikLiOT4WMFcAtSk9JSFiRKrXq6YEmCyb7TJbSxYQAjXKOstdOquYtgKBBQzX3N6ZJ/Z/Jv8Ltb6EJLLgkJCIHE8M2hLOaGgY78sRX79fj2tCmNCoH+xmIdjD/hFJTmnEoYvpw3/HAJSCb4dXYTrJcyY85B8mgR3iQNyTO9ibzkMF3cxhTmytiZRd4Ulo5Z1XMDoho7fH4XYXb5CE/i+7M3GsX3mqxUQh7z76PmG5DNAq1hNnBVoFVbjpuw40G/5N4TTumbz5U+5h6kLgRxGkcyM9cWXnUnicevVDl4aI43ovLEn+GNYr+S0eYJZ/kTMOonGs4TwXydgrQLY3Xa4Asx+Xj20isNozPdpvxCxRW9DtkNpVt55eYFrYWuZtE1HTgnMXtH6ommQ6D93VbgCSBACENq6uB/KPzN271vkWBUMYP0qLQFZjS3beYZ80/mYqVuq/ApabybcpUCHM6OVC9mYccUsbXfPNoSikAKUyVVPumLF6CVGSEkFM4N0CR6P5 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)(376002)(136003)(396003)(39860400002)(230922051799003)(230273577357003)(230173577357003)(186009)(64100799003)(82310400011)(451199024)(1800799012)(40470700004)(36840700001)(46966006)(40480700001)(40460700003)(70586007)(82740400003)(356005)(81166007)(86362001)(36756003)(6636002)(336012)(83380400001)(426003)(26005)(16526019)(1076003)(36860700001)(47076005)(2616005)(70206006)(478600001)(37006003)(2906002)(6666004)(8676002)(54906003)(6862004)(4326008)(5660300002)(44832011)(8936002)(41300700001)(316002)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Dec 2023 02:56:37.2794 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 500c245d-6d6c-431b-34bd-08dc003e1e2b 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: CY4PEPF0000EE3A.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR12MB6944 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