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 076E443D0F; Thu, 21 Mar 2024 19:48:30 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E3E5F42E62; Thu, 21 Mar 2024 19:48:29 +0100 (CET) Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2065.outbound.protection.outlook.com [40.107.92.65]) by mails.dpdk.org (Postfix) with ESMTP id 1A3E142E60; Thu, 21 Mar 2024 19:48:28 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lXKtV1/UM9SF1YaoPRLcMoA4UxkftjcxUl2eTQVS0iVJXTq/JN55o7MSAEsSyavzzYgCqRZstJMHXJE1lhMCf+jN/yWbQXdy9U3OojAqfWHlqIUcf9xov1u1oKSMXouwvybSvn4a2kwXllwuPjd5Mz9nhLMgtXmUXDyNy92mzjzUtVbiY6kXO3TGutV1oHXtSloA+yfCpVtltfbo/RvDepQlgKhTKOjhYSKZuknLtzGGT7JHPYTmYAzfZUBqEmYwYc4oEamwJUMCV7ecbm7JYdimN8EdGGprp+TBeJC6dG6D1Nqi9BND83Ye9f2QUMRG+zkxvKX+CkQvqnk+FQvG8A== 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=yForpQvb1pVPX/6jRkci8vmofIYXez8kEPCmiYcDcmI=; b=j6N8jHsvF0zxvYhkNhsB/qCLJsw4/Tj2pGgsChaAK63Q9xwCDOuu8nlt+iW3yPXBYrAbgDU96A4fBrbYe18tJAofEroZ+M0wWMwivqBVAD7DHrYobCGfrpukLWivXAwXQc6bav5JYPbUXX3Qj+joN2Sg07I2NcHHkAIjvISGPXPpxF/VrMd1xv8fMzDMfLI1AvVGeAmF4ydBp17vhg5LZ65cd5BIEFjauWlKDwkZQHjfCqQw9jq7A/jYxWzsxFybY+6F1zRJ1Sf6yettBUOAQ4FXdggeSNVN9LYJV5558e0N9BwWFXFSTazMtByvjlx/JcLpeSth9CNBRVCBGB1Z1w== 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=yForpQvb1pVPX/6jRkci8vmofIYXez8kEPCmiYcDcmI=; b=xg09lM6yM5Gzm4l7w/e4OyH0VQ+sBWre+2jabLFJWGtFOfJi/i8Ev5slXP9o1FhVIM9XYBUKlpGwT5xiQCAVOrgEPao32HvSY9MX0nA+80vud7cxUyJdCNnfPUzXO248GHG7i9CMSqeC72bC7xygQGQqkB6wXi/3/0boG+TPXIA= Received: from BLAPR03CA0050.namprd03.prod.outlook.com (2603:10b6:208:32d::25) by DS7PR12MB5741.namprd12.prod.outlook.com (2603:10b6:8:70::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7386.34; Thu, 21 Mar 2024 18:48:25 +0000 Received: from BL6PEPF0001AB76.namprd02.prod.outlook.com (2603:10b6:208:32d:cafe::5e) by BLAPR03CA0050.outlook.office365.com (2603:10b6:208:32d::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7386.20 via Frontend Transport; Thu, 21 Mar 2024 18:48:25 +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:25 +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:10 -0500 From: Sivaprasad Tummala To: , , , , , , , , , , CC: , , Subject: [PATCH v6 03/14] examples/l3fwd-graph: fix queue ID restriction Date: Thu, 21 Mar 2024 19:47:09 +0100 Message-ID: <20240321184721.69040-4-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_|DS7PR12MB5741:EE_ X-MS-Office365-Filtering-Correlation-Id: bf8ad140-9e12-43be-fe0e-08dc49d77dbf X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: zi0AaWUwid9JQZIihhVOK909Rnz/sZdQKI4WHHmhgPoKz/tUQbbuYG53eElsJPSyEGXZdsoQr+7kIC3IgEVUxGBb7FVNYO/JwfR0Gw/p9BPj75Ls7AbItHRvI+7wbD24ZhiyopCCc3V4jOeduWw+jA3em6xEA9kIovf+hSfCvHxHeslLovPrPFe1EcokkM8PnNj3AYiDbSIF9LsaTmfjn2Qd7eyC2I0+DFBfAECvbXTyZQW8v4fkGqoVBlriuwX7HHLteVNEp44KxHQ3wVqQdIvzDzaf+u0TNNPvj+RRXY6c04nTBz0cCzdwJ44uystMnxzxDoQiyva/slpeFoAQqS2RxKuJex1N8SxV7JjdCEjBbTcbWTn3UAv/7OAQC3EkZKFs9SF586KvdyMWMvqTaFBukp+m6KtnCavTi2uH99pFOtaFpe7wuFHR0PrJRMLH8PiyGthuJEmccRyU3T6x7XBepVkSEFvevSH3GyGA2iQerJf3nepcmtisnWADHaTo28FvuQxey4MwETRjuJiIvjCLF/7SBxxH3tjNOcYJTXgVFIOg7KLOv3wENnj6L+U7who1Z27I8iOmOTAEa17K0wWKc6kRoDn+CUmTenykPGp4LGbGA5O+7Mb1xqDNSDtKEF/Dw1Uk5lzM6oubxK8U2mNYERdjz0vvQFZkGFbURePlRmQsxuiBkVnLuILnzbgt96f5fbuVsR/vkbsFgAYh2nrPwSf9/OGZ4lY3NylRGE8syLGwx5kJQ87D18ksR9kpHhXoLVhY9oISBZPnnY45eA== 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)(1800799015)(7416005)(82310400014)(376005)(921011); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Mar 2024 18:48:25.4579 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: bf8ad140-9e12-43be-fe0e-08dc49d77dbf 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: DS7PR12MB5741 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 queue IDs up to 255 and max queues of 256 irrespective of device support. This limits the number of active lcores to 256. The patch fixes these constraints by increasing the queue IDs to support up to 65535. Fixes: 08bd1a174461 ("examples/l3fwd-graph: add graph-based l3fwd skeleton") Cc: ndabilpuram@marvell.com Cc: stable@dpdk.org Signed-off-by: Sivaprasad Tummala Acked-by: Morten Brørup Acked-by: Ferruh Yigit --- examples/l3fwd-graph/main.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/examples/l3fwd-graph/main.c b/examples/l3fwd-graph/main.c index 96cb1c81ff..c3a7b267e9 100644 --- a/examples/l3fwd-graph/main.c +++ b/examples/l3fwd-graph/main.c @@ -90,7 +90,7 @@ static int pcap_trace_enable; struct lcore_rx_queue { uint16_t port_id; - uint8_t queue_id; + uint16_t queue_id; char node_name[RTE_NODE_NAMESIZE]; }; @@ -110,7 +110,7 @@ static struct lcore_conf lcore_conf[RTE_MAX_LCORE]; struct lcore_params { uint16_t port_id; - uint8_t queue_id; + uint16_t queue_id; uint8_t lcore_id; } __rte_cache_aligned; @@ -205,14 +205,14 @@ check_worker_model_params(void) static int check_lcore_params(void) { - uint8_t queue, lcore; + uint16_t queue, i; int socketid; - uint16_t i; + uint8_t lcore; for (i = 0; i < nb_lcore_params; ++i) { queue = lcore_params[i].queue_id; if (queue >= MAX_RX_QUEUE_PER_PORT) { - printf("Invalid queue number: %hhu\n", queue); + printf("Invalid queue number: %hu\n", queue); return -1; } lcore = lcore_params[i].lcore_id; @@ -257,7 +257,7 @@ check_port_config(void) return 0; } -static uint8_t +static uint16_t get_port_n_rx_queues(const uint16_t port) { int queue = -1; @@ -275,7 +275,7 @@ get_port_n_rx_queues(const uint16_t port) } } - return (uint8_t)(++queue); + return (uint16_t)(++queue); } static int @@ -450,7 +450,7 @@ parse_config(const char *q_arg) lcore_params_array[nb_lcore_params].port_id = (uint8_t)int_fld[FLD_PORT]; lcore_params_array[nb_lcore_params].queue_id = - (uint8_t)int_fld[FLD_QUEUE]; + (uint16_t)int_fld[FLD_QUEUE]; lcore_params_array[nb_lcore_params].lcore_id = (uint8_t)int_fld[FLD_LCORE]; ++nb_lcore_params; @@ -1011,7 +1011,8 @@ main(int argc, char **argv) "ethdev_tx-*", "pkt_drop", }; - uint8_t nb_rx_queue, queue, socketid; + uint8_t socketid; + uint16_t nb_rx_queue, queue; struct rte_graph_param graph_conf; struct rte_eth_dev_info dev_info; uint32_t nb_ports, nb_conf = 0; -- 2.34.1