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 423A543D51 for ; Tue, 26 Mar 2024 13:56:40 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 93EEB40ED3; Tue, 26 Mar 2024 13:56:38 +0100 (CET) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2084.outbound.protection.outlook.com [40.107.220.84]) by mails.dpdk.org (Postfix) with ESMTP id CDC4E40ED6; Tue, 26 Mar 2024 13:56:37 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Gb+VC3hmuO4xtKIyWkZg2ju9L7FE0+mg2WEVuSmGhXZhgXxZtUrNfvK+pLk/90Sq2C0frZHtudpUBu/OJxiFtUYB/5YLPE5CCZzDibL8zZnT5xZxnHsxuT35ocOGY8mdAsKi3eAzda6bamwmFnG6EDue3tYsEn86lcK0P8pWieDb/vii3kAMa3hbi0RX2LpAngg21OyEYupdrAJS1WGJS/0cslJbQ3EbeqfMt7/+vUHzMIgJSskhYkx6gjuhvVfyaR29vCCEJwpLeD7MHEk6sEREyqWmXvaEKS1nzZz49BnfJx5vtUppHpdP95+ol/kWwH2uEcvs+6Cvq1CQ8pQ7VQ== 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=Zc9NT7EJc0bDhGp2HQBygNXkRUoySfTR2jPKzNEHDew=; b=j15uYLt1Uz9fPNRRQM1iKbK/CC8M3fleSks2Zcw44vYYxfwX8SxbRsHDq1xMbdeuUBi/qHlZnVrXgMCJA14XeXxSdNpCRxYpqYT8phcZ0moR6D+3yDWzFOozfTepp5lS6aTBExK/PiLl99BmyCI5dfwqm0w583BYAG5d/gWgnnE5JjR01LuqfFLUuO3oZmA8S8Gzy/isUt5zdyxvh+elcEpE9If1KG7GQt24Kz3Ul1xLv8iLrZl4pGnzbLHKDEovc72ub0eCRmJ9VeVyZnQAJh67vY8qh0AOIjr0H5IU2i29wc+cBcetDbXPc9MSujEbAMeKjF6Gp74oDBTkX56WVw== 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=Zc9NT7EJc0bDhGp2HQBygNXkRUoySfTR2jPKzNEHDew=; b=T0DPidc0ousnZFp951s4j0DH/i9XjENMtFUs3uVy4JZgeXWH7AL/GN/3s+ZM1ghJJLOXwt2BWqoM9UgFBQ2eD9c2nwR2NM3SkJm7r5OgI8+lksH4SepRoprmZhRRbzQGPgpQ5cgDyWix2d1U+TLAgkR1b5IuSN7f/gvD7PATtHM= Received: from BN9PR03CA0093.namprd03.prod.outlook.com (2603:10b6:408:fd::8) by MN6PR12MB8591.namprd12.prod.outlook.com (2603:10b6:208:471::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.31; Tue, 26 Mar 2024 12:56:35 +0000 Received: from BN1PEPF0000468E.namprd05.prod.outlook.com (2603:10b6:408:fd:cafe::cb) by BN9PR03CA0093.outlook.office365.com (2603:10b6:408:fd::8) 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:56: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 BN1PEPF0000468E.mail.protection.outlook.com (10.167.243.139) 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:56: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.35; Tue, 26 Mar 2024 07:56:28 -0500 From: Sivaprasad Tummala To: , , , , , , , , , , CC: , , Subject: [PATCH v7 03/14] examples/l3fwd-graph: fix queue ID restriction Date: Tue, 26 Mar 2024 13:55:42 +0100 Message-ID: <20240326125554.138840-4-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: BN1PEPF0000468E:EE_|MN6PR12MB8591:EE_ X-MS-Office365-Filtering-Correlation-Id: 2680a78f-8226-43ba-76c5-08dc4d942aa9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: KYqMWSm9sU+sN9DRke5fiGyiuShRBGA9Ny8sGQoqZHn2mr1dCYv5WZtaUZ7yNKXkCnCUb1ciFLbuEOV3n2ZI9xEyU++VywD9HvrlTCksFcYSPjTfWDUYBzim7dnLa71tT/t7OLkoUcq6gL758pelVvZA6k4V7uP/1ROa5tWI3z+f7c8ajmCQC1jL69F1p1Et6CsIYblwcqnUPB4csKUJSJYcvxNWPdkKeZlnpyTwI3YBEkALcfkCoBW7b1qcq4QFpJndu8yLjs+aITLCMy4r++GEqfLwBAWAJ26mAJc8pqwKP5MZUbuCe9Xg7kV0XI7a2j8epTaNLOSDPeNfWqDQ4ikrSosjWG8HcTagz0L5A7s6v8OZ0xq+zVSAMEcSIum5kFsZQsv0qnta7RcU1regSMyWDKQ6RiyPvMzZjIf0eSs6gfHoZ1KEjYoig2OPt7WhRf+tLelEw92bigqCL1iMZkTBrUGvL+2mW3iEzWYNWQrlZ7WQPPYMdRRpDe5YkHQGO8r064zMzv26WWahruvP8Da9O9S0Yvhze83Fa60oga/Gn0okgdSvbCirQtUwrEzWJcPV8q22urleeV87MbiubXHITJG/2u57HuL0nkWPKIbeJG5qs6P3+WoSkH+iuB+ESfZdtapH3SNhrWMAxdk1fL9kyUs9PYEqWXO3A8ddYrU9GE5JSe7BDWjk37PeTe1L7fDGm6075Z7PFEQ3//0+za87nHX/YSsiaCPfvpAtNTXl/WOMdk6MF5OR33harjt1IPBgWxUwbg9Y83BkNzHgMw== 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)(7416005)(1800799015)(36860700004)(376005)(82310400014)(921011); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Mar 2024 12:56:34.5546 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2680a78f-8226-43ba-76c5-08dc4d942aa9 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: BN1PEPF0000468E.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN6PR12MB8591 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 rx 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 rx 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..4b018d1e78 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: %" PRIu16 "\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.25.1