From patchwork Thu Mar 21 18:47:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Sivaprasad Tummala X-Patchwork-Id: 138673 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8FF2C43D0F; Thu, 21 Mar 2024 19:48:00 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4BF2342D45; Thu, 21 Mar 2024 19:47:59 +0100 (CET) Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2055.outbound.protection.outlook.com [40.107.223.55]) by mails.dpdk.org (Postfix) with ESMTP id 3EABA402C2; Thu, 21 Mar 2024 19:47:58 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=f0fnI9/w3EugP2EcbXDDjr46kU+fPNaCv+JqiM1Yx9xhG3lqVOJH9nnAzD0r32xjusR6RTlhrsypvfXSHkbr1lDhhBM+x5Sev7o7NN7U7aPFP7bB+MjULdkaSTB7FdDg5mXtbSoOkZo5rNdpXDNVyewwxsMcaEtn7LtuOt7OmR06GYropCdtpuTE9Sj72fxcO9cwnv4bgNmFP+85/jWbQmqfs4rxnk2UO+aC6vwjaJ4AM6Eqwo87JhQk5XNCCJ3qglTcD70CAJcdd89WKCHQE2XA6yG8wbyzkUVOSH4uxkgaEW0iDG7HghuqiZci5zO62lpa+nSa28/sf/PJOHq65A== 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=g1Ck7eR8Y5jcoKuDktoYyETZVNDV4sjQZ+m3Gcsqekc=; b=htxTxk7VkdWNf4tjVOdb4KeXVm+3Ntolp9xlbpJqlUJkTYb8ms/hGrM4yrxfvxz8tucPWf3QpDQCLR6BC/dkHN00fWkCNgDcOjZASLlLf7cZQQl1LD5br3lY6ktMeKPCfKX9oRFHydBW5g9X9KNWsLtYZAlpCh7g5LBVZZB+H4SXQgt/VPy05N9jCBysTRBbFpmoYs7Ruaeq4qmbKVFVTwYBpb5rk9kWlTB5gSR1ZtbUgmhxdmSkSdGIytqrcNuctgGGRYxfsap89V+OSIXuavWC24CZGeBhzvUbTsHr2qMjfIO1Y0SfAEe5EVmcDAVGBQ1HkYSkq/R2lig1Y9BTNg== 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=g1Ck7eR8Y5jcoKuDktoYyETZVNDV4sjQZ+m3Gcsqekc=; b=yz0V2x8KVJApDb02s3m4q78ZNrmguHn/ImKtG2vujNA7vU0xhnwgNgsgtGNpLNZjnFDpe+ZQQkwlYqZfCuoFZKbbIe+/q6pgo2i7LKQ8Bof57+IYZmH76blPaYrSES/FLP6KQTvIV48Tcv2Uc8sOF/ejce5C3xiaWMVoHa1Hbrw= Received: from MN2PR14CA0010.namprd14.prod.outlook.com (2603:10b6:208:23e::15) by SA3PR12MB9089.namprd12.prod.outlook.com (2603:10b6:806:39f::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7386.31; Thu, 21 Mar 2024 18:47:55 +0000 Received: from BL6PEPF0001AB72.namprd02.prod.outlook.com (2603:10b6:208:23e:cafe::dc) by MN2PR14CA0010.outlook.office365.com (2603:10b6:208:23e::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.13 via Frontend Transport; Thu, 21 Mar 2024 18:47:55 +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 BL6PEPF0001AB72.mail.protection.outlook.com (10.167.242.165) 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:47:55 +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:47:49 -0500 From: Sivaprasad Tummala To: , , , , , , , , , , CC: , Subject: [PATCH v6 01/14] examples/l3fwd: fix queue ID restriction Date: Thu, 21 Mar 2024 19:47:07 +0100 Message-ID: <20240321184721.69040-2-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 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: BL6PEPF0001AB72:EE_|SA3PR12MB9089:EE_ X-MS-Office365-Filtering-Correlation-Id: a7c3a7da-85e2-49e5-5bc2-08dc49d76bfa X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: SpEzCe7vGoH9G6BN3Bd6AUCQRr2wPQ+QgaNvv7IRKkwPcEhWn8eZwiinEsl8jWeF7cJ9tmlErU/VP2Um4cSx/OM4oEM3q2RsRJtMWUmVAhtQLKhASzM0rx9pUfR2/nH52pAJr1c6/xHcyOE8LNT19tSWSbblTTbMvNCgPnDy2SjsvSeZ6TUiDCA9V+fGOISMAZZDhH5b/dxoOEiDRy17wwZEvGBrP6gsIh/mdqtQAFmRf0FcYYxEmMimt6cK1xYFNTw5if045dpqQ4Of42adeCYen2BO9huRzyN4/6ABO97iJexIgAfoVyjTzQxUo20Gf8Cx4YdUwk/7pPhG5J/sCa6ydE0F44DD+WgMZyEhGy34EKGkUWIBk/s6JU43v7ve+VVJqgci0Rdg36Dh3D6gQVu/oYAJ4aoLrfO85CS5WojOTwOSq7a8hsWgQJARuFaeHkZQrTk46x/n5o95ujP4F2hGCc3UICD883Z5Jl0L2xpqw89R9PAQtmyGknsgYVmm15iK7x2Rp7Pg7rD9AqeUc91PJLxMNoSatsmhRF4WKBfph8QEWZCheJr/FZMnOffRHRJk7iarGhhSPuCSOYmBFVYgrbmsIE5y+hf+R6r8CmMy1jop5AFbCp8uE4dR1uN1kFf+0YHnzxtDAyiFCzyf4FBFRKzYu8GW3hPCjN+FwAOe3GI5VC9NBmH67fy/vykiFV10FbxRhZbINeZn+45qjumYu8omdP1+9U8zeFOW7OA/UWy9eB7AjP3999E6rEpEBCVY193PknntS9RXhSI/AQ== 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)(376005)(7416005)(82310400014)(1800799015)(921011); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Mar 2024 18:47:55.6883 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a7c3a7da-85e2-49e5-5bc2-08dc49d76bfa 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: BL6PEPF0001AB72.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA3PR12MB9089 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: af75078fece3 ("first public release") Cc: stable@dpdk.org Signed-off-by: Sivaprasad Tummala Acked-by: Konstantin Ananyev Acked-by: Morten Brørup Acked-by: Ferruh Yigit --- examples/l3fwd/l3fwd.h | 2 +- examples/l3fwd/l3fwd_acl.c | 4 ++-- examples/l3fwd/l3fwd_em.c | 4 ++-- examples/l3fwd/l3fwd_event.h | 2 +- examples/l3fwd/l3fwd_fib.c | 4 ++-- examples/l3fwd/l3fwd_lpm.c | 5 ++--- examples/l3fwd/main.c | 28 ++++++++++++++++------------ 7 files changed, 26 insertions(+), 23 deletions(-) diff --git a/examples/l3fwd/l3fwd.h b/examples/l3fwd/l3fwd.h index e7ae0e5834..12c264cb4c 100644 --- a/examples/l3fwd/l3fwd.h +++ b/examples/l3fwd/l3fwd.h @@ -74,7 +74,7 @@ struct mbuf_table { struct lcore_rx_queue { uint16_t port_id; - uint8_t queue_id; + uint16_t queue_id; } __rte_cache_aligned; struct lcore_conf { diff --git a/examples/l3fwd/l3fwd_acl.c b/examples/l3fwd/l3fwd_acl.c index 401692bcec..2bd63181bc 100644 --- a/examples/l3fwd/l3fwd_acl.c +++ b/examples/l3fwd/l3fwd_acl.c @@ -997,7 +997,7 @@ acl_main_loop(__rte_unused void *dummy) uint64_t prev_tsc, diff_tsc, cur_tsc; int i, nb_rx; uint16_t portid; - uint8_t queueid; + uint16_t queueid; struct lcore_conf *qconf; int socketid; const uint64_t drain_tsc = (rte_get_tsc_hz() + US_PER_S - 1) @@ -1020,7 +1020,7 @@ acl_main_loop(__rte_unused void *dummy) portid = qconf->rx_queue_list[i].port_id; queueid = qconf->rx_queue_list[i].queue_id; RTE_LOG(INFO, L3FWD, - " -- lcoreid=%u portid=%u rxqueueid=%hhu\n", + " -- lcoreid=%u portid=%u rxqueueid=%hu\n", lcore_id, portid, queueid); } diff --git a/examples/l3fwd/l3fwd_em.c b/examples/l3fwd/l3fwd_em.c index 40e102b38a..cd2bb4a4bb 100644 --- a/examples/l3fwd/l3fwd_em.c +++ b/examples/l3fwd/l3fwd_em.c @@ -586,7 +586,7 @@ em_main_loop(__rte_unused void *dummy) unsigned lcore_id; uint64_t prev_tsc, diff_tsc, cur_tsc; int i, nb_rx; - uint8_t queueid; + uint16_t queueid; uint16_t portid; struct lcore_conf *qconf; const uint64_t drain_tsc = (rte_get_tsc_hz() + US_PER_S - 1) / @@ -609,7 +609,7 @@ em_main_loop(__rte_unused void *dummy) portid = qconf->rx_queue_list[i].port_id; queueid = qconf->rx_queue_list[i].queue_id; RTE_LOG(INFO, L3FWD, - " -- lcoreid=%u portid=%u rxqueueid=%hhu\n", + " -- lcoreid=%u portid=%u rxqueueid=%hu\n", lcore_id, portid, queueid); } diff --git a/examples/l3fwd/l3fwd_event.h b/examples/l3fwd/l3fwd_event.h index 9aad358003..c6a4a89127 100644 --- a/examples/l3fwd/l3fwd_event.h +++ b/examples/l3fwd/l3fwd_event.h @@ -78,8 +78,8 @@ struct l3fwd_event_resources { uint8_t deq_depth; uint8_t has_burst; uint8_t enabled; - uint8_t eth_rx_queues; uint8_t vector_enabled; + uint16_t eth_rx_queues; uint16_t vector_size; uint64_t vector_tmo_ns; }; diff --git a/examples/l3fwd/l3fwd_fib.c b/examples/l3fwd/l3fwd_fib.c index 6a21984415..7da55f707a 100644 --- a/examples/l3fwd/l3fwd_fib.c +++ b/examples/l3fwd/l3fwd_fib.c @@ -186,7 +186,7 @@ fib_main_loop(__rte_unused void *dummy) uint64_t prev_tsc, diff_tsc, cur_tsc; int i, nb_rx; uint16_t portid; - uint8_t queueid; + uint16_t queueid; struct lcore_conf *qconf; const uint64_t drain_tsc = (rte_get_tsc_hz() + US_PER_S - 1) / US_PER_S * BURST_TX_DRAIN_US; @@ -208,7 +208,7 @@ fib_main_loop(__rte_unused void *dummy) portid = qconf->rx_queue_list[i].port_id; queueid = qconf->rx_queue_list[i].queue_id; RTE_LOG(INFO, L3FWD, - " -- lcoreid=%u portid=%u rxqueueid=%hhu\n", + " -- lcoreid=%u portid=%u rxqueueid=%hu\n", lcore_id, portid, queueid); } diff --git a/examples/l3fwd/l3fwd_lpm.c b/examples/l3fwd/l3fwd_lpm.c index a484a33089..01d38bc69c 100644 --- a/examples/l3fwd/l3fwd_lpm.c +++ b/examples/l3fwd/l3fwd_lpm.c @@ -148,8 +148,7 @@ lpm_main_loop(__rte_unused void *dummy) unsigned lcore_id; uint64_t prev_tsc, diff_tsc, cur_tsc; int i, nb_rx; - uint16_t portid; - uint8_t queueid; + uint16_t portid, queueid; struct lcore_conf *qconf; const uint64_t drain_tsc = (rte_get_tsc_hz() + US_PER_S - 1) / US_PER_S * BURST_TX_DRAIN_US; @@ -171,7 +170,7 @@ lpm_main_loop(__rte_unused void *dummy) portid = qconf->rx_queue_list[i].port_id; queueid = qconf->rx_queue_list[i].queue_id; RTE_LOG(INFO, L3FWD, - " -- lcoreid=%u portid=%u rxqueueid=%hhu\n", + " -- lcoreid=%u portid=%u rxqueueid=%hu\n", lcore_id, portid, queueid); } diff --git a/examples/l3fwd/main.c b/examples/l3fwd/main.c index 8d32ae1dd5..4d4738b92b 100644 --- a/examples/l3fwd/main.c +++ b/examples/l3fwd/main.c @@ -98,7 +98,7 @@ struct parm_cfg parm_config; struct lcore_params { uint16_t port_id; - uint8_t queue_id; + uint16_t queue_id; uint8_t lcore_id; } __rte_cache_aligned; @@ -292,14 +292,14 @@ setup_l3fwd_lookup_tables(void) static int check_lcore_params(void) { - uint8_t queue, lcore; - uint16_t i; + uint16_t queue, i; + uint8_t lcore; int socketid; 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; @@ -336,7 +336,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; @@ -352,7 +352,7 @@ get_port_n_rx_queues(const uint16_t port) lcore_params[i].port_id); } } - return (uint8_t)(++queue); + return (uint16_t)(++queue); } static int @@ -366,7 +366,7 @@ init_lcore_rx_queues(void) nb_rx_queue = lcore_conf[lcore].n_rx_queue; if (nb_rx_queue >= MAX_RX_QUEUE_PER_LCORE) { printf("error: too many queues (%u) for lcore: %u\n", - (unsigned)nb_rx_queue + 1, (unsigned)lcore); + (unsigned int)nb_rx_queue + 1, (unsigned int)lcore); return -1; } else { lcore_conf[lcore].rx_queue_list[nb_rx_queue].port_id = @@ -500,6 +500,8 @@ parse_config(const char *q_arg) char *str_fld[_NUM_FLD]; int i; unsigned size; + uint16_t max_fld[_NUM_FLD] = {USHRT_MAX, + USHRT_MAX, UCHAR_MAX}; nb_lcore_params = 0; @@ -518,7 +520,8 @@ parse_config(const char *q_arg) for (i = 0; i < _NUM_FLD; i++){ errno = 0; int_fld[i] = strtoul(str_fld[i], &end, 0); - if (errno != 0 || end == str_fld[i] || int_fld[i] > 255) + if (errno != 0 || end == str_fld[i] || int_fld[i] > + max_fld[i]) return -1; } if (nb_lcore_params >= MAX_LCORE_PARAMS) { @@ -529,7 +532,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; @@ -630,7 +633,7 @@ parse_event_eth_rx_queues(const char *eth_rx_queues) { struct l3fwd_event_resources *evt_rsrc = l3fwd_get_eventdev_rsrc(); char *end = NULL; - uint8_t num_eth_rx_queues; + uint16_t num_eth_rx_queues; /* parse decimal string */ num_eth_rx_queues = strtoul(eth_rx_queues, &end, 10); @@ -1211,7 +1214,8 @@ config_port_max_pkt_len(struct rte_eth_conf *conf, static void l3fwd_poll_resource_setup(void) { - uint8_t nb_rx_queue, queue, socketid; + uint8_t socketid; + uint16_t nb_rx_queue, queue; struct rte_eth_dev_info dev_info; uint32_t n_tx_queue, nb_lcores; struct rte_eth_txconf *txconf; @@ -1535,7 +1539,7 @@ main(int argc, char **argv) struct lcore_conf *qconf; uint16_t queueid, portid; unsigned int lcore_id; - uint8_t queue; + uint16_t queue; int ret; /* init EAL */ From patchwork Thu Mar 21 18:47:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Sivaprasad Tummala X-Patchwork-Id: 138674 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 086B243D0F; Thu, 21 Mar 2024 19:48:17 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E21F142E3D; Thu, 21 Mar 2024 19:48:16 +0100 (CET) Received: from NAM02-DM3-obe.outbound.protection.outlook.com (mail-dm3nam02on2077.outbound.protection.outlook.com [40.107.95.77]) by mails.dpdk.org (Postfix) with ESMTP id 3933D42E39; Thu, 21 Mar 2024 19:48:15 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PpuLl29IHoMeuIE1WL1+3t6Cflj9LBoZFm0USMnKO9GYiU1IWP+hRVFb1XLWnTKB17x0dZgZoQeOxwdTD5ZG2dg9J9lCCpd4x12XEK+H8B0Xzg4B+ohrm5QENo/TYfFz8VJu6g+OtwdkRVxG6nD3FewuZ8cEBUcVD4gsWxFnk0ApnNhr9aZcjedqjhK1BNIfZQrg5be4jYROtZB8uY1zKsin45jKwVAGUhCroGKpJqAveeOPaW5EkXiHGYDjtQ3o02+lGf3Jr80aNIIXFNneu0+uxPwvGypWwioBEaWmqxOsiW3Dxi2TMO3CouF+aP6deDkI8SkUuridLOZL/yEuLQ== 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=MpvFq3mJzbEFT5jcC2FFZdD+kg0AmbZQg2mWmIpHbG4=; b=Xq72HMOzcbsIPRjFhH5Jx6BbypRjUaRfqXZy5UZSIThEsiSO/3w0Vcp3+ny7lOPihJ3dmZAHHX99oOaB1Y3H66HMj+xgZEkj8fT3sfy0jpoTrytvcN5pmqe380pa380ZF28tMzLyMHjoK6ZyS2VXQKuAu9C0CLQewNA1IIKCkUOHylGzezeE9RyEVaD3YiIw3V2jKr2jnw7KXUf07xSsT55BEwIQ4N6vJRrClstnZ9MkxyWoNtLK8wSlvI+S/l+zmOR1HCFmZ4ajwxxGx6NWVereURi2PQuKAVjZHfEnti8fzq0k5ru5fNJKGuhUlLYDEXrRu5/QUSVGtxoZ2mX8pA== 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=MpvFq3mJzbEFT5jcC2FFZdD+kg0AmbZQg2mWmIpHbG4=; b=u6dB+GFhyD7Hwymbvg0AxcEGCF4LwLeS+ExSYKKB3xNTiTjcUig1ZYnsEAZhAV8ymEEAwFyy43ElfKzMoLrJK9pwfaout0M/Fq8l/bWox14x1BAOrDbpGM9Wmcp8K9vrqKwT7CYuKyhjJa0njgLu+NgDzJgFFlpFT9qicGROGzA= Received: from BL1PR13CA0351.namprd13.prod.outlook.com (2603:10b6:208:2c6::26) by DM3PR12MB9435.namprd12.prod.outlook.com (2603:10b6:0:40::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7386.31; Thu, 21 Mar 2024 18:48:10 +0000 Received: from BL6PEPF0001AB71.namprd02.prod.outlook.com (2603:10b6:208:2c6:cafe::e0) by BL1PR13CA0351.outlook.office365.com (2603:10b6:208:2c6::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.12 via Frontend Transport; Thu, 21 Mar 2024 18:48:10 +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 BL6PEPF0001AB71.mail.protection.outlook.com (10.167.242.164) 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:10 +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:47:55 -0500 From: Sivaprasad Tummala To: , , , , , , , , , , CC: , Subject: [PATCH v6 02/14] examples/l3fwd-power: fix queue ID restriction Date: Thu, 21 Mar 2024 19:47:08 +0100 Message-ID: <20240321184721.69040-3-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 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: BL6PEPF0001AB71:EE_|DM3PR12MB9435:EE_ X-MS-Office365-Filtering-Correlation-Id: e1a467ac-5c0d-479c-ace7-08dc49d774a2 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: zO+ObygXAlI6nbWkWtqWLeJegO3L/9jKoiGK49ZDlxKusiejarXsjRsLR1NaQgJX8sLi+lmzF/Z5zevjvocfqFwEdRpRIBAiQznxkV/mrgTQJkUTWUa3cFPhrvKIj2W2pJX/nPqCZy3QtUCAYUKjQ1w7NUVD0z2whIJ2FiK/chGZ0SsfGwTbxwzK/sWOw6EU7mgk29y9xPZZdjb3SE1531RWD5Drgi8/M6XsFPY+kfs1ShVckA02gUoRJEAj3kxTsmGBFFS57k7GavEquwNUQ6O9tAKkExKInQRhA9mXKoCeO6Del4Kxpl2pSNZl//+EiZvEUiv3XfCTUUH56Zw0x4TTTfpCLpO2Iwe3n3JL6rHQ+r12lFBLnZ1xFagSnO/nvzZkaF0LEvH10tq9BZ29A+waSH8Gpt9zPep7kGTbqTo9MwYG2vb4KzTe7lfM+s2/Wxso7pdbEL1RFOEGextXbvtvKob1TkdCotVGnnCg66BsHG/SM0r6z2NCCSHWZpQbRVcz0RzHXJmwxaJx7xvyl1q3Nnh66ZLwQ0/n3+x3UWf8nM6pv3dWp2fxQFs8fqm8Qiw7RKottESOQiOXDg1mWk/lzBv4B4YGpArQItKFirzCUVgi3sfIr8LwLMSMHJALblxAzNM81Opsjr+3M5WbEKwwkD7E4DL4v2lsEYEgd87YzWh5haDTJUD7eE8L7IG42y+i0R+r8+h8p2IXL4bkRaO257WkqhI9NLLbI+q3GsmV9idaljvy2nU2EuqrcPclKS3T5jPaFi+kPUpW8B645Q== 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)(376005)(1800799015)(36860700004)(7416005)(82310400014)(921011); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Mar 2024 18:48:10.2132 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e1a467ac-5c0d-479c-ace7-08dc49d774a2 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: BL6PEPF0001AB71.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM3PR12MB9435 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: 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 | 49 ++++++++++++++++---------------- examples/l3fwd-power/main.h | 2 +- examples/l3fwd-power/perf_core.c | 10 +++++-- 3 files changed, 32 insertions(+), 29 deletions(-) diff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.c index f4adcf41b5..1881b1b194 100644 --- a/examples/l3fwd-power/main.c +++ b/examples/l3fwd-power/main.c @@ -214,7 +214,7 @@ enum freq_scale_hint_t struct lcore_rx_queue { uint16_t port_id; - uint8_t queue_id; + uint16_t queue_id; enum freq_scale_hint_t freq_up_hint; uint32_t zero_rx_packet_count; uint32_t idle_hint; @@ -838,7 +838,7 @@ sleep_until_rx_interrupt(int num, int lcore) struct rte_epoll_event event[num]; int n, i; uint16_t port_id; - uint8_t queue_id; + uint16_t queue_id; void *data; if (status[lcore].wakeup) { @@ -850,9 +850,9 @@ sleep_until_rx_interrupt(int num, int lcore) n = rte_epoll_wait(RTE_EPOLL_PER_THREAD, event, num, 10); for (i = 0; i < n; i++) { data = event[i].epdata.data; - port_id = ((uintptr_t)data) >> CHAR_BIT; + port_id = ((uintptr_t)data) >> (sizeof(uint16_t) * CHAR_BIT); queue_id = ((uintptr_t)data) & - RTE_LEN2MASK(CHAR_BIT, uint8_t); + RTE_LEN2MASK((sizeof(uint16_t) * CHAR_BIT), uint16_t); RTE_LOG(INFO, L3FWD_POWER, "lcore %u is waked up from rx interrupt on" " port %d queue %d\n", @@ -867,7 +867,7 @@ static void turn_on_off_intr(struct lcore_conf *qconf, bool on) { int i; struct lcore_rx_queue *rx_queue; - uint8_t queue_id; + uint16_t queue_id; uint16_t port_id; for (i = 0; i < qconf->n_rx_queue; ++i) { @@ -887,7 +887,7 @@ static void turn_on_off_intr(struct lcore_conf *qconf, bool on) static int event_register(struct lcore_conf *qconf) { struct lcore_rx_queue *rx_queue; - uint8_t queueid; + uint16_t queueid; uint16_t portid; uint32_t data; int ret; @@ -897,7 +897,7 @@ static int event_register(struct lcore_conf *qconf) rx_queue = &(qconf->rx_queue_list[i]); portid = rx_queue->port_id; queueid = rx_queue->queue_id; - data = portid << CHAR_BIT | queueid; + data = portid << (sizeof(uint16_t) * CHAR_BIT) | queueid; ret = rte_eth_dev_rx_intr_ctl_q(portid, queueid, RTE_EPOLL_PER_THREAD, @@ -917,8 +917,7 @@ static int main_intr_loop(__rte_unused void *dummy) unsigned int lcore_id; uint64_t prev_tsc, diff_tsc, cur_tsc; int i, j, nb_rx; - uint8_t queueid; - uint16_t portid; + uint16_t portid, queueid; struct lcore_conf *qconf; struct lcore_rx_queue *rx_queue; uint32_t lcore_rx_idle_count = 0; @@ -946,7 +945,7 @@ static int main_intr_loop(__rte_unused void *dummy) portid = qconf->rx_queue_list[i].port_id; queueid = qconf->rx_queue_list[i].queue_id; RTE_LOG(INFO, L3FWD_POWER, - " -- lcoreid=%u portid=%u rxqueueid=%hhu\n", + " -- lcoreid=%u portid=%u rxqueueid=%hu\n", lcore_id, portid, queueid); } @@ -1083,8 +1082,7 @@ main_telemetry_loop(__rte_unused void *dummy) unsigned int lcore_id; uint64_t prev_tsc, diff_tsc, cur_tsc, prev_tel_tsc; int i, j, nb_rx; - uint8_t queueid; - uint16_t portid; + uint16_t portid, queueid; struct lcore_conf *qconf; struct lcore_rx_queue *rx_queue; uint64_t ep_nep[2] = {0}, fp_nfp[2] = {0}; @@ -1114,7 +1112,7 @@ main_telemetry_loop(__rte_unused void *dummy) portid = qconf->rx_queue_list[i].port_id; queueid = qconf->rx_queue_list[i].queue_id; RTE_LOG(INFO, L3FWD_POWER, " -- lcoreid=%u portid=%u " - "rxqueueid=%hhu\n", lcore_id, portid, queueid); + "rxqueueid=%hu\n", lcore_id, portid, queueid); } while (!is_done()) { @@ -1205,8 +1203,7 @@ main_legacy_loop(__rte_unused void *dummy) uint64_t prev_tsc, diff_tsc, cur_tsc, tim_res_tsc, hz; uint64_t prev_tsc_power = 0, cur_tsc_power, diff_tsc_power; int i, j, nb_rx; - uint8_t queueid; - uint16_t portid; + uint16_t portid, queueid; struct lcore_conf *qconf; struct lcore_rx_queue *rx_queue; enum freq_scale_hint_t lcore_scaleup_hint; @@ -1234,7 +1231,7 @@ main_legacy_loop(__rte_unused void *dummy) portid = qconf->rx_queue_list[i].port_id; queueid = qconf->rx_queue_list[i].queue_id; RTE_LOG(INFO, L3FWD_POWER, " -- lcoreid=%u portid=%u " - "rxqueueid=%hhu\n", lcore_id, portid, queueid); + "rxqueueid=%hu\n", lcore_id, portid, queueid); } /* add into event wait list */ @@ -1399,14 +1396,14 @@ main_legacy_loop(__rte_unused void *dummy) static int check_lcore_params(void) { - uint8_t queue, lcore; - uint16_t i; + uint16_t queue, i; + uint8_t lcore; int socketid; 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; @@ -1451,7 +1448,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; @@ -1462,7 +1459,7 @@ get_port_n_rx_queues(const uint16_t port) lcore_params[i].queue_id > queue) queue = lcore_params[i].queue_id; } - return (uint8_t)(++queue); + return (uint16_t)(++queue); } static int @@ -1661,6 +1658,8 @@ parse_config(const char *q_arg) char *str_fld[_NUM_FLD]; int i; unsigned size; + unsigned int max_fld[_NUM_FLD] = {USHRT_MAX, + USHRT_MAX, UCHAR_MAX}; nb_lcore_params = 0; @@ -1681,7 +1680,7 @@ parse_config(const char *q_arg) errno = 0; int_fld[i] = strtoul(str_fld[i], &end, 0); if (errno != 0 || end == str_fld[i] || int_fld[i] > - 255) + max_fld[i]) return -1; } if (nb_lcore_params >= MAX_LCORE_PARAMS) { @@ -1692,7 +1691,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; @@ -2501,8 +2500,8 @@ main(int argc, char **argv) uint64_t hz; uint32_t n_tx_queue, nb_lcores; uint32_t dev_rxq_num, dev_txq_num; - uint8_t nb_rx_queue, queue, socketid; - uint16_t portid; + uint8_t socketid; + uint16_t portid, nb_rx_queue, queue; const char *ptr_strings[NUM_TELSTATS]; /* init EAL */ diff --git a/examples/l3fwd-power/main.h b/examples/l3fwd-power/main.h index 258de98f5b..40b5194726 100644 --- a/examples/l3fwd-power/main.h +++ b/examples/l3fwd-power/main.h @@ -9,7 +9,7 @@ #define MAX_LCORE_PARAMS 1024 struct lcore_params { uint16_t port_id; - uint8_t queue_id; + uint16_t queue_id; uint8_t lcore_id; } __rte_cache_aligned; diff --git a/examples/l3fwd-power/perf_core.c b/examples/l3fwd-power/perf_core.c index 41ef6d0c9a..3088935ee0 100644 --- a/examples/l3fwd-power/perf_core.c +++ b/examples/l3fwd-power/perf_core.c @@ -22,7 +22,7 @@ static uint16_t nb_hp_lcores; struct perf_lcore_params { uint16_t port_id; - uint8_t queue_id; + uint16_t queue_id; uint8_t high_perf; uint8_t lcore_idx; } __rte_cache_aligned; @@ -132,6 +132,8 @@ parse_perf_config(const char *q_arg) char *str_fld[_NUM_FLD]; int i; unsigned int size; + unsigned int max_fld[_NUM_FLD] = {USHRT_MAX, USHRT_MAX, + UCHAR_MAX, UCHAR_MAX}; nb_prf_lc_prms = 0; @@ -152,7 +154,9 @@ parse_perf_config(const char *q_arg) for (i = 0; i < _NUM_FLD; i++) { errno = 0; int_fld[i] = strtoul(str_fld[i], &end, 0); - if (errno != 0 || end == str_fld[i] || int_fld[i] > 255) + if (errno != 0 || end == str_fld[i] || int_fld[i] > + max_fld[i]) + return -1; } if (nb_prf_lc_prms >= MAX_LCORE_PARAMS) { @@ -163,7 +167,7 @@ parse_perf_config(const char *q_arg) prf_lc_prms[nb_prf_lc_prms].port_id = (uint8_t)int_fld[FLD_PORT]; prf_lc_prms[nb_prf_lc_prms].queue_id = - (uint8_t)int_fld[FLD_QUEUE]; + (uint16_t)int_fld[FLD_QUEUE]; prf_lc_prms[nb_prf_lc_prms].high_perf = !!(uint8_t)int_fld[FLD_LCORE_HP]; prf_lc_prms[nb_prf_lc_prms].lcore_idx = From patchwork Thu Mar 21 18:47:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Sivaprasad Tummala X-Patchwork-Id: 138675 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org 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 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; From patchwork Thu Mar 21 18:47:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Sivaprasad Tummala X-Patchwork-Id: 138676 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 5DAAC43D0F; Thu, 21 Mar 2024 19:48:35 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1E94342E6B; Thu, 21 Mar 2024 19:48:34 +0100 (CET) Received: from NAM04-MW2-obe.outbound.protection.outlook.com (mail-mw2nam04on2064.outbound.protection.outlook.com [40.107.101.64]) by mails.dpdk.org (Postfix) with ESMTP id 651CE42E6B for ; Thu, 21 Mar 2024 19:48:32 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AIDbig1W8dO5EG7zVuFqd7UAGxiEiaXCqELdjHlbOu/opN7ihhiShJcU+BbHdKDWJ1A44YApu39oc9RkQHPhb5Sla0oltkfKwn02B2sYXg/OFXIKvfriGCNdIJw/6spethrJI3nVzMlMCEq/H0Ghk7o52MLhGRWTDrzEpDYecMci/P6P2kV6/6Oz4UaAGU1riSXJ35kUoY2n5c5B8+mNghzWWQ7ARMgbhXlCF93oZ0dfGavMHgHJ0A/CjHB8kYi7iwVbYeCqG+Nqf8ic4Y9zKOPu51sNxovAIVHeNAJmOhRKC9FqFh05oHeV0eGxHJvIbYuDgkuR/ctBFCMKliUBqw== 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=7B9NXtAogO5duT3T8ebCvhVu80cSN9+05fr8y4JFmMs=; b=SD3FvK5s0hR0sf9ybGeAyP+ZXNHEHouV3sFud3ftnsg9wx/SLY/wlhjKm6YAEBKRov5FLVyqEAQErD1b/G65jZlRUjLwqiD9F0a78x6kAkH7sP0Nnymq0gpz6/VYGfWfClgzlshrnndYnAyurPQvU2EITmUO7XWAxHQwIR1ye/s/7x5QyQnwL83niUsqp8lXJY4ftXJ0HXz5HJr4We+Spbca+PBXKR4L0jYCe5Kla5qJwa5pGuG+N6FwTXjty0cG/9CYK85jv+sTCQZLhd/AcfXX8ZZd2C0kRO6wHNA/c7Y0lrb08X60gH0E1RnlKrpcl9LTz8yHhHEQiH8yOhTZcg== 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=7B9NXtAogO5duT3T8ebCvhVu80cSN9+05fr8y4JFmMs=; b=rdjr8GCtH1rxRg3NOPgbnC+K9M1vMJLnPqB0ZvR6Vp/5AzCp16MHEaSKBbN0TjIjnifLEbjBqB23WY8WcCq7Ka2/SxE9xuwF2yPSjtNb/u8w7uDyio6AGVJQzh6SIsRgmCEIi7r4IaoANJJcuxg+lUmRt5EMovkqY1M8ydgBlSs= Received: from MN2PR04CA0005.namprd04.prod.outlook.com (2603:10b6:208:d4::18) by PH8PR12MB7374.namprd12.prod.outlook.com (2603:10b6:510:216::15) 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:29 +0000 Received: from BL6PEPF0001AB78.namprd02.prod.outlook.com (2603:10b6:208:d4:cafe::16) by MN2PR04CA0005.outlook.office365.com (2603:10b6:208:d4::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7386.27 via Frontend Transport; Thu, 21 Mar 2024 18:48:29 +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 BL6PEPF0001AB78.mail.protection.outlook.com (10.167.242.171) 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:28 +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:25 -0500 From: Sivaprasad Tummala To: , , , , , , , , , , CC: Subject: [PATCH v6 04/14] examples/ipsec-secgw: fix queue ID restriction Date: Thu, 21 Mar 2024 19:47:10 +0100 Message-ID: <20240321184721.69040-5-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 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: BL6PEPF0001AB78:EE_|PH8PR12MB7374:EE_ X-MS-Office365-Filtering-Correlation-Id: 70021199-8c17-429c-b60a-08dc49d77fc0 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: w5CJr9mF7CfePnX4JjIrIYkeJvNFj6TofYsdLjewboolzlC1ibFwfu+P9pY8q671dLGlJ/J1T8B8Ew/LCH02TpR+kAxBp+4qeRTE8+Ih72aKkYcYdM3GA06zbnORDIo3NG5B87ir5EJemwmVrc7R90b1VlywGua5OJGouerO0hIKxbpr7HLh1HBtCo4Hj67H1oYvgFUGbwd4WfM7XaN4oRNe6DK7p7VvMT5CMC6f1jnKMxl4R5s3Py0jbDbfB80tQep61Y8a5yhtHIF7F+NoH7o6QHn78wjJB8/q+HEqCiFYpVPSCdm6qhmglp0EuJmL9wWZOWkSCyOgXXFJawNF6pW6f+J1sa324vtGyYtVGlNvXajnCPinjqTI6hSpT+NwUGSRE+kWazCyvg1MZ2AUEcLtUrZSIk7tYtWPHfPUhzkeqPU4RGnbuWtCBWk1Gov/va95iUk67M6JYgV6LZMlJjgQk9eU+4WI8dT4K3Wp9TY0PgmjoNM1lcTDOAqCxMdIvnxLh4QuZukn/9PKDB0sikCImOe3xyDz6pliliAAykV54i/qvWzBRTp31wZIkuIKaPrHx1jxkFLaDwxksv7zjcVSM6eSZopUEHFF5Fj/SvE+/kGl9i5EEen7VbDH8KSRrs2V2nNaJQ0OceT3WDhskerDPYxiD02p1n/VOVU7f66o78AIBDIHC919IKYyrLrvahtKsOkHD5rj2ma0Iv4eebXIjuH8G1xvA57qsU6J3cOUBgpBJPIRn3eyOwZlajlVeB4eFI9ABrUzfcc9aJsA6g== 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)(82310400014)(36860700004)(1800799015)(7416005)(376005)(921011); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Mar 2024 18:48:28.8649 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 70021199-8c17-429c-b60a-08dc49d77fc0 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: BL6PEPF0001AB78.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH8PR12MB7374 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. Signed-off-by: Sivaprasad Tummala Acked-by: Konstantin Ananyev Acked-by: Morten Brørup Acked-by: Ferruh Yigit --- examples/ipsec-secgw/ipsec-secgw.c | 20 ++++++++++---------- examples/ipsec-secgw/ipsec.h | 2 +- examples/ipsec-secgw/ipsec_worker.c | 10 ++++------ 3 files changed, 15 insertions(+), 17 deletions(-) diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ipsec-secgw.c index 45a303850d..106a058b60 100644 --- a/examples/ipsec-secgw/ipsec-secgw.c +++ b/examples/ipsec-secgw/ipsec-secgw.c @@ -220,7 +220,7 @@ static const char *cfgfile; struct lcore_params { uint16_t port_id; - uint8_t queue_id; + uint16_t queue_id; uint8_t lcore_id; } __rte_cache_aligned; @@ -695,8 +695,7 @@ ipsec_poll_mode_worker(void) struct rte_mbuf *pkts[MAX_PKT_BURST]; uint32_t lcore_id; uint64_t prev_tsc, diff_tsc, cur_tsc; - uint16_t i, nb_rx, portid; - uint8_t queueid; + uint16_t i, nb_rx, portid, queueid; struct lcore_conf *qconf; int32_t rc, socket_id; const uint64_t drain_tsc = (rte_get_tsc_hz() + US_PER_S - 1) @@ -743,7 +742,7 @@ ipsec_poll_mode_worker(void) portid = rxql[i].port_id; queueid = rxql[i].queue_id; RTE_LOG(INFO, IPSEC, - " -- lcoreid=%u portid=%u rxqueueid=%hhu\n", + " -- lcoreid=%u portid=%u rxqueueid=%hu\n", lcore_id, portid, queueid); } @@ -788,8 +787,7 @@ int check_flow_params(uint16_t fdir_portid, uint8_t fdir_qid) { uint16_t i; - uint16_t portid; - uint8_t queueid; + uint16_t portid, queueid; for (i = 0; i < nb_lcore_params; ++i) { portid = lcore_params_array[i].port_id; @@ -851,7 +849,7 @@ check_poll_mode_params(struct eh_conf *eh_conf) return 0; } -static uint8_t +static uint16_t get_port_nb_rx_queues(const uint16_t port) { int32_t queue = -1; @@ -862,7 +860,7 @@ get_port_nb_rx_queues(const uint16_t port) lcore_params[i].queue_id > queue) queue = lcore_params[i].queue_id; } - return (uint8_t)(++queue); + return (uint16_t)(++queue); } static int32_t @@ -1050,6 +1048,8 @@ parse_config(const char *q_arg) char *str_fld[_NUM_FLD]; int32_t i; uint32_t size; + uint32_t max_fld[_NUM_FLD] = {USHRT_MAX, + USHRT_MAX, UCHAR_MAX}; nb_lcore_params = 0; @@ -1070,7 +1070,7 @@ parse_config(const char *q_arg) for (i = 0; i < _NUM_FLD; i++) { errno = 0; int_fld[i] = strtoul(str_fld[i], &end, 0); - if (errno != 0 || end == str_fld[i] || int_fld[i] > 255) + if (errno != 0 || end == str_fld[i] || int_fld[i] > max_fld[i]) return -1; } if (nb_lcore_params >= MAX_LCORE_PARAMS) { @@ -1081,7 +1081,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; diff --git a/examples/ipsec-secgw/ipsec.h b/examples/ipsec-secgw/ipsec.h index bdcada1c40..29b9b283f0 100644 --- a/examples/ipsec-secgw/ipsec.h +++ b/examples/ipsec-secgw/ipsec.h @@ -285,7 +285,7 @@ struct cnt_blk { struct lcore_rx_queue { uint16_t port_id; - uint8_t queue_id; + uint16_t queue_id; void *sec_ctx; } __rte_cache_aligned; diff --git a/examples/ipsec-secgw/ipsec_worker.c b/examples/ipsec-secgw/ipsec_worker.c index 8d122e8519..90a4c38ba4 100644 --- a/examples/ipsec-secgw/ipsec_worker.c +++ b/examples/ipsec-secgw/ipsec_worker.c @@ -1598,8 +1598,7 @@ ipsec_poll_mode_wrkr_inl_pr(void) int32_t socket_id; uint32_t lcore_id; int32_t i, nb_rx; - uint16_t portid; - uint8_t queueid; + uint16_t portid, queueid; prev_tsc = 0; lcore_id = rte_lcore_id(); @@ -1633,7 +1632,7 @@ ipsec_poll_mode_wrkr_inl_pr(void) portid = rxql[i].port_id; queueid = rxql[i].queue_id; RTE_LOG(INFO, IPSEC, - " -- lcoreid=%u portid=%u rxqueueid=%hhu\n", + " -- lcoreid=%u portid=%u rxqueueid=%hu\n", lcore_id, portid, queueid); } @@ -1729,8 +1728,7 @@ ipsec_poll_mode_wrkr_inl_pr_ss(void) uint32_t i, nb_rx, j; int32_t socket_id; uint32_t lcore_id; - uint16_t portid; - uint8_t queueid; + uint16_t portid, queueid; prev_tsc = 0; lcore_id = rte_lcore_id(); @@ -1764,7 +1762,7 @@ ipsec_poll_mode_wrkr_inl_pr_ss(void) portid = rxql[i].port_id; queueid = rxql[i].queue_id; RTE_LOG(INFO, IPSEC, - " -- lcoreid=%u portid=%u rxqueueid=%hhu\n", + " -- lcoreid=%u portid=%u rxqueueid=%hu\n", lcore_id, portid, queueid); } From patchwork Thu Mar 21 18:47:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Sivaprasad Tummala X-Patchwork-Id: 138677 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 5456643D0F; Thu, 21 Mar 2024 19:48:42 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8E47642E74; Thu, 21 Mar 2024 19:48:36 +0100 (CET) Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2087.outbound.protection.outlook.com [40.107.223.87]) by mails.dpdk.org (Postfix) with ESMTP id DB57742E5B; Thu, 21 Mar 2024 19:48:34 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jIzN04Sv/wLqicSkZMEEvJob+TCcD4Ts13WnBhQF7w5kd6rVy4TjGNkhGxt8abFqqIQGWoBInz7WVhc6Fh0eVPFQk1lhBhHFar5FGndCW38U5wyqyVIY7t8O7w2wIujtZhmrFRlToMo+yNmqDZECv/o8BUBm2QdLMV4cYr293xgWn2I3UjvphoboAXaTcvLnE9aZRmxhTh1z+NQGMUcYQMPa193jv44ojngrW6CPIMgRALuVnmgtrOh8SKiyXHLmc1X/bezz4C+pqRC5aQhKHEUOM3Sj28CT80ERqvGPxvSz8gT2+LmkhZgrtsUWObVm/sl5jhDC+T+XEPtPlL0vXA== 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=2cIPxJ6WoP0UR009QDMIhlifdalowhoqiBAnVYhkh/Q=; b=Fmw/Xr4WNUg0ysIs/EhQg6qgRPas/VqLtYlhjL7+d3MU6x434YQtGeBvMfFJAJqVO1a9UhcbDbzpMolIRllCTD1LLq04fxLRkAR+SQlhp/vFto2Fkk0qpMUFQk9Sbyd3ajviOdjU9Tqc9aWz24eTdZUAg7RSP8990SMQNHbMzM0QFOkqDaBb9YHSC9coHWBU4dHJWWdmkQL84F4gkMZvHq+NRwdvcfOYPhKVIXMghy84qEqcyqvqncrq32C45h8+2ieFS1vRPgSnuqTapdIew274QUn6TnI64cNudQHqAxE3/EfdPxno4uYZh/EzLNLEp26XeUSlWFrVhmVoFEU9YQ== 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=2cIPxJ6WoP0UR009QDMIhlifdalowhoqiBAnVYhkh/Q=; b=VQCKUHmjUnmvq4v81OK2Ka0L7SudyF3MpEqBm4P7hgDfgORweU7eo/+1gTDjE8F00DkQOfx6erlCkLEG8CmJcV/IVS/QAll3PWqC0z4lHRtdtl/cajsswzFBv1EZS0WTOo+8Q74A9v1+NeJ7tMNLfJ2m6vlpK21o4VyKUygLDRk= Received: from BLAPR03CA0032.namprd03.prod.outlook.com (2603:10b6:208:32d::7) by LV2PR12MB5917.namprd12.prod.outlook.com (2603:10b6:408:175::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.15; Thu, 21 Mar 2024 18:48:32 +0000 Received: from BL6PEPF0001AB76.namprd02.prod.outlook.com (2603:10b6:208:32d:cafe::bf) by BLAPR03CA0032.outlook.office365.com (2603:10b6:208:32d::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7386.28 via Frontend Transport; Thu, 21 Mar 2024 18:48:32 +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:32 +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:28 -0500 From: Sivaprasad Tummala To: , , , , , , , , , , CC: , Subject: [PATCH v6 05/14] examples/l3fwd: fix lcore ID restriction Date: Thu, 21 Mar 2024 19:47:11 +0100 Message-ID: <20240321184721.69040-6-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 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_|LV2PR12MB5917:EE_ X-MS-Office365-Filtering-Correlation-Id: 952ecda8-ad2a-44c1-178f-08dc49d781ec X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: RcmlMQDrg/4P+3NF31n+dSZ2Ti1GWfCxfPsXRQrIZVqGF+jk0bHTutqzR87mQ28vYxp97b54h4inHk1WgZhTzqkRRqP5m7n7lQnv2bg+7tA1Lzb9dd+Rq72u2+WiZf92t6hyIhHtVzy9hGlAJHfbe0TXkAo9gq2M5tQqAY+az5SN6SLPGdA9m8FfwTjrmXh5SP5vF3CcPnRg0HbxF0ZVprfx0QdG0FPKhYTmem8LkjNykOMywOgUqJJalE0aHBwpyFTBNMBU7Dc+iqgD1D2JNFMZw+3p80yZnUaECjOS2xQiRw7fMIfYufqoCCZdPib3P1bhjt3gma8tENylXmbadiXCo0do9UpZGITbiSXnm/neywUFXbyWz7aKduhCYo1o+iPhQeqkPb+cNkRoKFHAysHQBqvxIlsHda71mxe9xjuV1lRaQN0be9ZXH0QH4t4l/S3exJWRMZdYk4NNmw4XyU50TtTf/mT7KXPPOatJY8Nm9xkDepGmvdTAUZQ4fhbKp5y+Ua/gFaAJfWuCojnB8b4CduXIBUdMsLVer+3XlARkt0J2esVpTvmrlfyCr1XtgBw3nfRiAll5dGzYi6D4P3Z6yABY4V96uvXY1rrzV1nVViOcq6LmUV/BXwRhCKz2yhhmYEVIgREr7hXVh813g2DpOn6uUMU4rFwrCFPCaMpXZGomlnWovlL/vz34V8hV7FpSp/4RUUYb+jsTnR5rnQEK/3AQ8DkcRH6rhKCjXhA7PoAqzUHh4h+95hRGc9oorcnOqLbjBvMr/smJJMQU0Q== 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)(1800799015)(82310400014)(376005)(7416005)(36860700004)(921011); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Mar 2024 18:48:32.5203 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 952ecda8-ad2a-44c1-178f-08dc49d781ec 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: LV2PR12MB5917 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 the config option allows lcore IDs up to 255, irrespective of RTE_MAX_LCORES and needs to be fixed. The patch fixes these constraints by allowing all lcore IDs up to RTE_MAX_LCORES. Fixes: af75078fece3 ("first public release") Cc: stable@dpdk.org Signed-off-by: Sivaprasad Tummala Acked-by: Konstantin Ananyev Acked-by: Morten Brørup Acked-by: Ferruh Yigit --- examples/l3fwd/main.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/examples/l3fwd/main.c b/examples/l3fwd/main.c index 4d4738b92b..9fb4fe97d4 100644 --- a/examples/l3fwd/main.c +++ b/examples/l3fwd/main.c @@ -99,7 +99,7 @@ struct parm_cfg parm_config; struct lcore_params { uint16_t port_id; uint16_t queue_id; - uint8_t lcore_id; + uint32_t lcore_id; } __rte_cache_aligned; static struct lcore_params lcore_params_array[MAX_LCORE_PARAMS]; @@ -293,7 +293,7 @@ static int check_lcore_params(void) { uint16_t queue, i; - uint8_t lcore; + uint32_t lcore; int socketid; for (i = 0; i < nb_lcore_params; ++i) { @@ -304,12 +304,12 @@ 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", lcore); + printf("error: lcore %u is not enabled in lcore mask\n", lcore); return -1; } if ((socketid = rte_lcore_to_socket_id(lcore) != 0) && (numa_on == 0)) { - printf("warning: lcore %hhu is on socket %d with numa off \n", + printf("warning: lcore %u is on socket %d with numa off\n", lcore, socketid); } } @@ -359,14 +359,14 @@ static int init_lcore_rx_queues(void) { uint16_t i, nb_rx_queue; - uint8_t lcore; + uint32_t lcore; for (i = 0; i < nb_lcore_params; ++i) { lcore = lcore_params[i].lcore_id; nb_rx_queue = lcore_conf[lcore].n_rx_queue; if (nb_rx_queue >= MAX_RX_QUEUE_PER_LCORE) { printf("error: too many queues (%u) for lcore: %u\n", - (unsigned int)nb_rx_queue + 1, (unsigned int)lcore); + (unsigned int)nb_rx_queue + 1, lcore); return -1; } else { lcore_conf[lcore].rx_queue_list[nb_rx_queue].port_id = @@ -500,8 +500,8 @@ parse_config(const char *q_arg) char *str_fld[_NUM_FLD]; int i; unsigned size; - uint16_t max_fld[_NUM_FLD] = {USHRT_MAX, - USHRT_MAX, UCHAR_MAX}; + uint32_t max_fld[_NUM_FLD] = {USHRT_MAX, + USHRT_MAX, RTE_MAX_LCORE}; nb_lcore_params = 0; @@ -534,7 +534,7 @@ parse_config(const char *q_arg) lcore_params_array[nb_lcore_params].queue_id = (uint16_t)int_fld[FLD_QUEUE]; lcore_params_array[nb_lcore_params].lcore_id = - (uint8_t)int_fld[FLD_LCORE]; + (uint32_t)int_fld[FLD_LCORE]; ++nb_lcore_params; } lcore_params = lcore_params_array; From patchwork Thu Mar 21 18:47:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Sivaprasad Tummala X-Patchwork-Id: 138678 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 810C743D0F; Thu, 21 Mar 2024 19:48:51 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4283942E6F; Thu, 21 Mar 2024 19:48:43 +0100 (CET) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2068.outbound.protection.outlook.com [40.107.94.68]) by mails.dpdk.org (Postfix) with ESMTP id BCF1642D45; Thu, 21 Mar 2024 19:48:41 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QJZsM8uaA9yyMosG+Sp24aaD5a+4lKXFRy6ExhbZtUdGkoEk4dDmrMXR1RU1BR/j4X7ibZRRN3FOdfZieKwVfeeERIsGfTrGlUA6CXMM80S4WO5vkbEaNItuILKo1j/GE1okRibOIsERGpzUdiWBGar6+gvn6rZBLvZ54SlHNRY4IJ7DmZ3r5rdmVURxfwU5qsJjH9zw/1st/3YOWqXEuJYuuTOmh9Kcn/jk2ANz0CNabMzeXQUbuSmCLwVL61qoZaFf/+xvaNtwwdaiQzjQ8q+SjuaozIw931hnYy0one35rirlc1cy2L7Ly5gwgfSEhwI3D/1nmhOBL/AemB3HfQ== 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=dgk3MjHB87xfL7NBJ0GsRCFFRDqIA08on88ah/03Sr0=; b=aAg18xNhWqVzyjrdoxqW/6IAnU2DazlQlyuNHDtn8vHbGTgKGeEQiWBRzBAY/5cGNzxd2nEqPRYPV3eLAFMIlEIaZNux8antnOz1L0XGbNhi/QZXSDSwfHQY218eAqmIWX3WaGdG4ZM/lyWycsujGJNNVDPK1NFMXh2WXJRqaXmOm75ApkWbho3112xBFG3LCRBTyE3KLjyWYSYP7TJE2Rlhl8tOTzHXtBKILWTH0Yd1QSGG5SJnSdG52FMl1R1Y9ksH8oN8I/ECZYwl4rUCqaQD+TxCURFWbIjLkZ/zlM5WEYRJMBRIEmQNvhvFyE1EUXWRvsX4VlsgrOHJ4sl4HA== 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=dgk3MjHB87xfL7NBJ0GsRCFFRDqIA08on88ah/03Sr0=; b=LHWrWc9ik0/I6+Fre2TRd04v1Wv5uPtpta0o5ZAeRsBRIr5wUUKjPwKEUe334FgtsawF3to2yybfl2Xp7nzYvehuPdk0DB7e2rPyOyqtwEROEmPnAoEGhIpRkS8XwXJ1Ihr7G96m+TCKC3jvXVmkaI+JCwBKy36AnlW4pYCpb4c= Received: from BL0PR02CA0124.namprd02.prod.outlook.com (2603:10b6:208:35::29) by MW6PR12MB9000.namprd12.prod.outlook.com (2603:10b6:303:24b::11) 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:36 +0000 Received: from BL6PEPF0001AB75.namprd02.prod.outlook.com (2603:10b6:208:35:cafe::a9) by BL0PR02CA0124.outlook.office365.com (2603:10b6:208:35::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7386.27 via Frontend Transport; Thu, 21 Mar 2024 18:48:36 +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 BL6PEPF0001AB75.mail.protection.outlook.com (10.167.242.168) 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:35 +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:32 -0500 From: Sivaprasad Tummala To: , , , , , , , , , , CC: , Subject: [PATCH v6 06/14] examples/l3fwd-power: fix lcore ID restriction Date: Thu, 21 Mar 2024 19:47:12 +0100 Message-ID: <20240321184721.69040-7-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 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: BL6PEPF0001AB75:EE_|MW6PR12MB9000:EE_ X-MS-Office365-Filtering-Correlation-Id: a38e83a0-e6ce-4b6c-3d71-08dc49d783f8 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: O1aBVpOmu9fQZ/SqF8T9YF9rUvllO87MOWMngupvGTdVzt1+WWZNVo7E8KezZF+XLIYQFTpVsorciUy5pXErKuC3EolLAjUOC3l/wSkM6B0Fuljhk4/r+awPrRI0B4abyz0HMnIGnPrrnudRrUiLX9KNBiy2ychUqfHJej0XkQVeI+thbCjCjmWOo4NOy+QyAi6kunUu4jojSvJE4fy0gGn6UpckoPIPj6EBOFNs50lbtr/xlLGTjxx6DXWF8F0F8DPmZzAeblPwnkE2FZbbuZWkdZV3ujgKQ/6FAJ78AkrDgfpEeLzhLrBswLZNEwYynhIjeX3PBSuNTdICxZ4G62IslAU/CYKd/BLETyE1KcCdp9G5C0+BIVJXSP0xd730SGR+fNXAAciWxg2mrJH1QjzVeE8FxQBUc+fjBtWOjEPYXzWD7J324yBYd6Y27c62i3qRKiWvkZ/xLeTGQoY7rDAiC5Pfbs3944522qiBN4/NX9fmQNU6BfPWKFz+n7lanXrXJpavJqyADqhawwFdeHTEj6HXmOE3AqfUwgaIv+IeSl+zl7HqKVzbTfIIcQfgJcc3pt0AASCVuLM9wwbuYi+/lzKb3Fd5t6URPABojGbqbyfrDTQ4014oIep9eYnHqXeQaK754ie6D/dLd4EHmu/CwF3j0P/xXMMW312mVR8mYDelQtnYCaBClLPYcXLrxyF6sjIvS3IT5taOwa8P1jLmQaoLBodLf7DLdj4P3uEr8trlMbkFKfnLXai1Za2kLfyX/y0l+1M9NGpW5jAIEw== 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)(376005)(82310400014)(7416005)(1800799015)(921011); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Mar 2024 18:48:35.9710 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a38e83a0-e6ce-4b6c-3d71-08dc49d783f8 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: BL6PEPF0001AB75.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW6PR12MB9000 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 the config option allows lcore IDs up to 255, irrespective of RTE_MAX_LCORES and needs to be fixed. The patch fixes these constraints by allowing all lcore IDs up to RTE_MAX_LCORES. 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 | 14 +++++++------- examples/l3fwd-power/main.h | 2 +- examples/l3fwd-power/perf_core.c | 6 +++--- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.c index 1881b1b194..5411592dca 100644 --- a/examples/l3fwd-power/main.c +++ b/examples/l3fwd-power/main.c @@ -1397,7 +1397,7 @@ static int check_lcore_params(void) { uint16_t queue, i; - uint8_t lcore; + uint32_t lcore; int socketid; for (i = 0; i < nb_lcore_params; ++i) { @@ -1408,13 +1408,13 @@ 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 " + printf("error: lcore %u is not enabled in lcore " "mask\n", lcore); return -1; } if ((socketid = rte_lcore_to_socket_id(lcore) != 0) && (numa_on == 0)) { - printf("warning: lcore %hhu is on socket %d with numa " + printf("warning: lcore %u is on socket %d with numa " "off\n", lcore, socketid); } if (app_mode == APP_MODE_TELEMETRY && lcore == rte_lcore_id()) { @@ -1466,14 +1466,14 @@ static int init_lcore_rx_queues(void) { uint16_t i, nb_rx_queue; - uint8_t lcore; + uint32_t lcore; for (i = 0; i < nb_lcore_params; ++i) { lcore = lcore_params[i].lcore_id; nb_rx_queue = lcore_conf[lcore].n_rx_queue; if (nb_rx_queue >= MAX_RX_QUEUE_PER_LCORE) { printf("error: too many queues (%u) for lcore: %u\n", - (unsigned)nb_rx_queue + 1, (unsigned)lcore); + (unsigned int)nb_rx_queue + 1, lcore); return -1; } else { lcore_conf[lcore].rx_queue_list[nb_rx_queue].port_id = @@ -1659,7 +1659,7 @@ parse_config(const char *q_arg) int i; unsigned size; unsigned int max_fld[_NUM_FLD] = {USHRT_MAX, - USHRT_MAX, UCHAR_MAX}; + USHRT_MAX, RTE_MAX_LCORE}; nb_lcore_params = 0; @@ -1693,7 +1693,7 @@ parse_config(const char *q_arg) lcore_params_array[nb_lcore_params].queue_id = (uint16_t)int_fld[FLD_QUEUE]; lcore_params_array[nb_lcore_params].lcore_id = - (uint8_t)int_fld[FLD_LCORE]; + (uint32_t)int_fld[FLD_LCORE]; ++nb_lcore_params; } lcore_params = lcore_params_array; diff --git a/examples/l3fwd-power/main.h b/examples/l3fwd-power/main.h index 40b5194726..194bd82102 100644 --- a/examples/l3fwd-power/main.h +++ b/examples/l3fwd-power/main.h @@ -10,7 +10,7 @@ struct lcore_params { uint16_t port_id; uint16_t queue_id; - uint8_t lcore_id; + uint32_t lcore_id; } __rte_cache_aligned; extern struct lcore_params *lcore_params; diff --git a/examples/l3fwd-power/perf_core.c b/examples/l3fwd-power/perf_core.c index 3088935ee0..d8b35d062c 100644 --- a/examples/l3fwd-power/perf_core.c +++ b/examples/l3fwd-power/perf_core.c @@ -24,7 +24,7 @@ struct perf_lcore_params { uint16_t port_id; uint16_t queue_id; uint8_t high_perf; - uint8_t lcore_idx; + uint32_t lcore_idx; } __rte_cache_aligned; static struct perf_lcore_params prf_lc_prms[MAX_LCORE_PARAMS]; @@ -133,7 +133,7 @@ parse_perf_config(const char *q_arg) int i; unsigned int size; unsigned int max_fld[_NUM_FLD] = {USHRT_MAX, USHRT_MAX, - UCHAR_MAX, UCHAR_MAX}; + UCHAR_MAX, RTE_MAX_LCORE}; nb_prf_lc_prms = 0; @@ -171,7 +171,7 @@ parse_perf_config(const char *q_arg) prf_lc_prms[nb_prf_lc_prms].high_perf = !!(uint8_t)int_fld[FLD_LCORE_HP]; prf_lc_prms[nb_prf_lc_prms].lcore_idx = - (uint8_t)int_fld[FLD_LCORE_IDX]; + (uint32_t)int_fld[FLD_LCORE_IDX]; ++nb_prf_lc_prms; } From patchwork Thu Mar 21 18:47:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Sivaprasad Tummala X-Patchwork-Id: 138679 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 379B743D0F; Thu, 21 Mar 2024 19:49:00 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AF6C842E96; Thu, 21 Mar 2024 19:48:44 +0100 (CET) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2087.outbound.protection.outlook.com [40.107.237.87]) by mails.dpdk.org (Postfix) with ESMTP id 8689942E6F; Thu, 21 Mar 2024 19:48:42 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lfpS5s7SGVcZCo+4YpK1sfnv3O6icnIEt5n3/TdJuzWXmSzYxxQzM4k5gXQyUw1+oGu89FlDnh5FCLNKcqp4CNSfQDczXaLtuFQGSGUO7C250ug8IwohX99aU5P0kWv1nLKFYGz6UWtjH9tafQXgvi1pJCdI4Yc0eKWkpA9AZWeMwEguQTeDfCTG9086YaYXhReEG1N+m818XJ6kY8fXyPHmR3pU5+cZfR/Q1LRAHLSi8y1O1LfZmD06CeJvE8DJUHxek+RzKVzcwL9NIM9So4J5btl/ZJIYXTLG3Mz62c4TJYyZpG/gna/9wrOgZaB2slPsWdChczpL6DHoR74+rA== 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=EspoIvIFA/qG6YxpnYVUOYfvkYaGmiiNTw5dvFE2OZQ=; b=d/y2E85d3Lzwn/R9fyydDNnSxpi2456tEtSaoDV6MUdhYrZ1nj6mLxI+HxPdWM+TVcQ+mBOrCaQuKy+yBUho3Sfy5+bQgOYg2o8x+Tij8TGbKpMcB4NloRrkZjkxQ71OwvNQWOc6yDo7UTeea+4fIKGJguo74ZK9aWmUXXwXpTTxobG+UIrjX7Vpgx6M0hVdHfafDbMpQcGbHmMm4Rev2R6IgLQbWp3NEmYjYZ+yQwTAOheGwGs89NR5urH+Jlg5TUTbSgohXazgR8PS1E3Hwt5Myy+PDVSI9Ca1bBTZloznjd/ouVKRIkqWtr0gbTU+gJUPIACdSslItCuM0KUNMg== 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=EspoIvIFA/qG6YxpnYVUOYfvkYaGmiiNTw5dvFE2OZQ=; b=lHXfXmG37HMhVGd4wgG5tdJucEDBNkS/FEWASo2ctNDSxMK/7Kj81ML0EqOUNPBEvjGH+D152Caiq6lLSHLTx7PW62Z8OBDN6EE8IFg+5JM198Br4wX66mYDU5JfJ7vlVBE3AYB3vw7h7Eqz6f1O21WtWLuxB+OquJkGrGUicYM= Received: from MN2PR01CA0055.prod.exchangelabs.com (2603:10b6:208:23f::24) by BL3PR12MB6644.namprd12.prod.outlook.com (2603:10b6:208:3b1::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7386.30; Thu, 21 Mar 2024 18:48:40 +0000 Received: from BL6PEPF0001AB74.namprd02.prod.outlook.com (2603:10b6:208:23f:cafe::31) by MN2PR01CA0055.outlook.office365.com (2603:10b6:208:23f::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7386.28 via Frontend Transport; Thu, 21 Mar 2024 18:48:40 +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 BL6PEPF0001AB74.mail.protection.outlook.com (10.167.242.167) 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:40 +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:35 -0500 From: Sivaprasad Tummala To: , , , , , , , , , , CC: , , Subject: [PATCH v6 07/14] examples/l3fwd-graph: fix lcore ID restriction Date: Thu, 21 Mar 2024 19:47:13 +0100 Message-ID: <20240321184721.69040-8-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 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: BL6PEPF0001AB74:EE_|BL3PR12MB6644:EE_ X-MS-Office365-Filtering-Correlation-Id: 15fe6d3b-3529-4d39-baaa-08dc49d78676 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 0mvyJXiPaMnt/3K1JP8JWCG4UCzAElrqS9TkY5l2LzLUMzdVoVZytbekxjbjicrY2KMNr1DXxw/gNZGJ6BzXs1tb1wpePdK4wLvq8ejXCS9UpAGHYwniU5QPMYMawmDzEk/x0qHT/U6KVjSk53Flf3o26Fu2uvUJkOaa8KPT/iloJ42ijAjcLpnOPo+6kYiAyUq+Wh12UbO9wC6vvcBAfhJV6sp5UtXIEo4cgdK4fI/vepmtPAlWvf8CUtzPhV3O+f3wRcS4+QX42fBL2etNvnFJB6PdRJ7D90JbYUYU43du7NGeE1n9czSWJTbMf4u5yB2znebQAPzRIYtj8E1Obs+pOCt/vGeeIytndjxGE9N0axxiPFPDyiDFrigplE7bCdOuZu/ebLfOEPmQ3qXSUtnD9F9MODEmXEx2qVBEtNkGxYSBkhr1yvG86gBE0uuLumP28JGu39uVQtWfkfnWYcrbHbdcrlwyLnSWsXtaOyM2FNw4SbnCj1McSrlG84LPafBTe6UtnwWPtoQ9bQB1J3ScWhGK4D7/IkehWNkjBh719OhSqUNQNeMSMZFmzoMaRdB0kxS/yGBzyEhZ8kfPkC/aRSmjNVT2YHL+ogzXlx3yYrpJquC0+7nn0FpMnbdBFgR5Nfph/nG13D83Ud8M4LaXBziCYaNnrjiM4XFTZLSifkHq2NwvhyKO3pL5CWorLwWMOhugx48Kiz6g+pw5X9i3EV074bEJZjzieYZrGh+raScAQZS1oCoGj+c6H19sIyxV1pbhXNOtuWM09RZoQQ== 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)(1800799015)(7416005)(36860700004)(82310400014)(376005)(921011); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Mar 2024 18:48:40.1398 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 15fe6d3b-3529-4d39-baaa-08dc49d78676 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: BL6PEPF0001AB74.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL3PR12MB6644 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 the config option allows lcore IDs up to 255, irrespective of RTE_MAX_LCORES and needs to be fixed. The patch fixes these constraints by allowing all lcore IDs up to RTE_MAX_LCORES. Also the queue IDs are increased 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 | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/examples/l3fwd-graph/main.c b/examples/l3fwd-graph/main.c index c3a7b267e9..8b7aa6642b 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; uint16_t queue_id; - uint8_t lcore_id; + uint32_t lcore_id; } __rte_cache_aligned; static struct lcore_params lcore_params_array[MAX_LCORE_PARAMS]; @@ -207,7 +207,7 @@ check_lcore_params(void) { uint16_t queue, i; int socketid; - uint8_t lcore; + uint32_t 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 %u 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 %u 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; + uint32_t lcore; for (i = 0; i < nb_lcore_params; ++i) { lcore = lcore_params[i].lcore_id; @@ -290,7 +290,7 @@ init_lcore_rx_queues(void) if (nb_rx_queue >= MAX_RX_QUEUE_PER_LCORE) { printf("Error: too many queues (%u) for lcore: %u\n", (unsigned int)nb_rx_queue + 1, - (unsigned int)lcore); + lcore); return -1; } @@ -452,7 +452,7 @@ parse_config(const char *q_arg) lcore_params_array[nb_lcore_params].queue_id = (uint16_t)int_fld[FLD_QUEUE]; lcore_params_array[nb_lcore_params].lcore_id = - (uint8_t)int_fld[FLD_LCORE]; + (uint32_t)int_fld[FLD_LCORE]; ++nb_lcore_params; } lcore_params = lcore_params_array; From patchwork Thu Mar 21 18:47:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Sivaprasad Tummala X-Patchwork-Id: 138680 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id EF12D43D0F; Thu, 21 Mar 2024 19:49:07 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EDFCA42E9C; Thu, 21 Mar 2024 19:48:49 +0100 (CET) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2057.outbound.protection.outlook.com [40.107.220.57]) by mails.dpdk.org (Postfix) with ESMTP id 7EE8C42E5F; Thu, 21 Mar 2024 19:48:48 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mQrLMv/15VSKS0v8M6KYp5oEI904jphLXolyo6psaIniG9ZNT5v9WPF/4TH3SscMJANq3TqHYSlEr5LGqb8vB3wg6Mw1r7/CF/wtz/7wnlC4rYzCwDEod8zFa+CIXly5bLaKupOFuT1kUZ4hIqnOOS95QA0YMdim5BVIUVukEtjM0r7fg65wp/TuTD9iYGJT1RLlNbjlDFGNh8ax9NOpJapThFW5/+/aGXVPwb4xmy3o98erl/iBuWYrhiRJQx2FBOOJw61w77Hv541AS3bukpqmHl49P5ZkUQqwtp/kUzpS6SsWOjt5t5em+lpoUuLNFQ8MFSpv9L1XbEDpsiCmUw== 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=w0LUmsBtACr86bK8HSkX/siVY7pgc1z/JMnDIgURu/w=; b=Bh9O4EFsV/JwIFsDowCRgZCTMvPMiGYdJJNkKcb9HuHZnDXhLTxhz7OqTC94P/ZCdOf5BtGZiqKdJWfaqSxdF/s4QWJ3NlmXBjQqlgbDwP237rmYV9XFOvKnM8J9PRy3XrsqZ+SmiXeTNA7rKCFdzFqKAzhvr0fFC7zdCHyHQkWAOL9yDOoJKu0t6yeEIxCldCgaUY4oMRFOPRAxsyllfq2pIaN7IuPkCZ5EHADgnDb04FgngZd1KLSKrjpTD9k7rv0W+QuogKEFISCWIAQvILrcmCwI3pSCnLU7ZDSR6nXG0SOqtKXVabNMbYjfQYFmwTiHu2NtGbnhBndQtFx/hg== 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=w0LUmsBtACr86bK8HSkX/siVY7pgc1z/JMnDIgURu/w=; b=y55UI6DauYi4ZTw2JwmeXC0WdTeY9eeF6H4M4pbVrpb9nzSOT2v7vhqnlKZCTwWewvgP6Klkm3NBV5NqmLU/4n7gHnszUw0kBeIjtBTMBbW/ooJnRvaxM0i9vIUkOWIjB7m3Ac1HEdeBd2UN7fIB/liTC5NyiUiGeNqBxw5fBNk= Received: from MN2PR04CA0033.namprd04.prod.outlook.com (2603:10b6:208:d4::46) by CH2PR12MB4038.namprd12.prod.outlook.com (2603:10b6:610:7b::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.23; Thu, 21 Mar 2024 18:48:44 +0000 Received: from BL6PEPF0001AB78.namprd02.prod.outlook.com (2603:10b6:208:d4:cafe::83) by MN2PR04CA0033.outlook.office365.com (2603:10b6:208:d4::46) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7386.28 via Frontend Transport; Thu, 21 Mar 2024 18:48:44 +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 BL6PEPF0001AB78.mail.protection.outlook.com (10.167.242.171) 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:44 +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:39 -0500 From: Sivaprasad Tummala To: , , , , , , , , , , CC: , , Subject: [PATCH v6 08/14] examples/ipsec-secgw: fix lcore ID restriction Date: Thu, 21 Mar 2024 19:47:14 +0100 Message-ID: <20240321184721.69040-9-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 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: BL6PEPF0001AB78:EE_|CH2PR12MB4038:EE_ X-MS-Office365-Filtering-Correlation-Id: 233a4c35-8ad5-4f07-0c7a-08dc49d788c7 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: g+C1YGVcN3eouuZOs2UqjTtoz40AQX+0iPgSEBUxZ48Yd2gJF4qwu65nx0e5Oi/3Ba1W/EPsVQ5hDtMx59kX+mDoEVw6s5YNo11vDEQrs3C8gLNqe9Ep1O0LachoXhrVqqDk36NMxUhRDQAqdnQem318gitxHUrkdCJr4eC4TeNdamir53+IAoz8XNFUXfN9Bgiwl21iht/gKN3BxlM7tOqb1OcD6Q+0tWQHCE7UeAMM3k5Ic/576lhORwQS1NlZrimyd74A6M6WTYta7n2gh6JX6cOVnc6Ha2AnsG/gq8wV2bojIDplACxRc0U797GdAHJ6dRDx0hqLDE5hISRKnHXmEF1l1D0AAqsEsHM0mWtzRnte+jXmWgNUrAvns+vz92f130l3dH8qSeHoRAKuUM1rpH2eNDFh9r5MNGzoV1XG69oahgWgJ2Zg2MXfHlTnBg/3fAemnEgQq+U7nNTZJDJmuhEuXR8Al1DepLItYmirWMumC992z7qivDQITS2WG5V91VyfHOmW8L9VeXWlmxJilODShpH8vPLjZyUKnNdh7eEOEm8ipNbsf523PaoNsh9Udwk0KDVG1b4BQIYxdC2/HVBHEuZFDivABxjWm923RUqfEdQYcgvvUIi2Z6EzymgpXa0PC2IkQfcoMgYnPOxnnJ7hgTgE++LtVyruLLWaKxB+z2pg33Hnke2YmGJMyfaljcMNYiAeyxwiPzElYi9EPTFklG5Aq/DKwDLrID5a7Aiztg5UvlaYGtuep1zQEWvjsgEqj/iv8OF/PW8afA== 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)(376005)(82310400014)(36860700004)(1800799015)(7416005)(921011); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Mar 2024 18:48:44.0372 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 233a4c35-8ad5-4f07-0c7a-08dc49d788c7 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: BL6PEPF0001AB78.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR12MB4038 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 the config option allows lcore IDs up to 255, irrespective of RTE_MAX_LCORES and needs to be fixed. The patch fixes these constraints by allowing all lcore IDs up to RTE_MAX_LCORES. Also the queue IDs are increased to support up to 65535. Fixes: d299106e8e31 ("examples/ipsec-secgw: add IPsec sample application") Cc: sergio.gonzalez.monroy@intel.com Cc: stable@dpdk.org Signed-off-by: Sivaprasad Tummala Acked-by: Konstantin Ananyev Acked-by: Morten Brørup Acked-by: Ferruh Yigit --- examples/ipsec-secgw/event_helper.h | 2 +- examples/ipsec-secgw/ipsec-secgw.c | 17 +++++++++-------- examples/ipsec-secgw/ipsec.c | 2 +- examples/ipsec-secgw/ipsec.h | 4 ++-- 4 files changed, 13 insertions(+), 12 deletions(-) diff --git a/examples/ipsec-secgw/event_helper.h b/examples/ipsec-secgw/event_helper.h index dfb81bfcf1..be635685b4 100644 --- a/examples/ipsec-secgw/event_helper.h +++ b/examples/ipsec-secgw/event_helper.h @@ -102,7 +102,7 @@ struct eh_event_link_info { /**< Event port ID */ uint8_t eventq_id; /**< Event queue to be linked to the port */ - uint8_t lcore_id; + uint32_t lcore_id; /**< Lcore to be polling on this port */ }; diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ipsec-secgw.c index 106a058b60..0fa9622626 100644 --- a/examples/ipsec-secgw/ipsec-secgw.c +++ b/examples/ipsec-secgw/ipsec-secgw.c @@ -221,7 +221,7 @@ static const char *cfgfile; struct lcore_params { uint16_t port_id; uint16_t queue_id; - uint8_t lcore_id; + uint32_t lcore_id; } __rte_cache_aligned; static struct lcore_params lcore_params_array[MAX_LCORE_PARAMS]; @@ -807,7 +807,7 @@ check_flow_params(uint16_t fdir_portid, uint8_t fdir_qid) static int32_t check_poll_mode_params(struct eh_conf *eh_conf) { - uint8_t lcore; + uint32_t lcore; uint16_t portid; uint16_t i; int32_t socket_id; @@ -826,13 +826,13 @@ check_poll_mode_params(struct eh_conf *eh_conf) for (i = 0; i < nb_lcore_params; ++i) { lcore = lcore_params[i].lcore_id; if (!rte_lcore_is_enabled(lcore)) { - printf("error: lcore %hhu is not enabled in " + printf("error: lcore %u is not enabled in " "lcore mask\n", lcore); return -1; } socket_id = rte_lcore_to_socket_id(lcore); if (socket_id != 0 && numa_on == 0) { - printf("warning: lcore %hhu is on socket %d " + printf("warning: lcore %u is on socket %d " "with numa off\n", lcore, socket_id); } @@ -867,7 +867,7 @@ static int32_t init_lcore_rx_queues(void) { uint16_t i, nb_rx_queue; - uint8_t lcore; + uint32_t lcore; for (i = 0; i < nb_lcore_params; ++i) { lcore = lcore_params[i].lcore_id; @@ -1049,7 +1049,7 @@ parse_config(const char *q_arg) int32_t i; uint32_t size; uint32_t max_fld[_NUM_FLD] = {USHRT_MAX, - USHRT_MAX, UCHAR_MAX}; + USHRT_MAX, RTE_MAX_LCORE}; nb_lcore_params = 0; @@ -1083,7 +1083,7 @@ parse_config(const char *q_arg) lcore_params_array[nb_lcore_params].queue_id = (uint16_t)int_fld[FLD_QUEUE]; lcore_params_array[nb_lcore_params].lcore_id = - (uint8_t)int_fld[FLD_LCORE]; + (uint32_t)int_fld[FLD_LCORE]; ++nb_lcore_params; } lcore_params = lcore_params_array; @@ -1919,7 +1919,8 @@ port_init(uint16_t portid, uint64_t req_rx_offloads, uint64_t req_tx_offloads, struct rte_eth_dev_info dev_info; struct rte_eth_txconf *txconf; uint16_t nb_tx_queue, nb_rx_queue; - uint16_t tx_queueid, rx_queueid, queue, lcore_id; + uint16_t tx_queueid, rx_queueid, queue; + uint32_t lcore_id; int32_t ret, socket_id; struct lcore_conf *qconf; struct rte_ether_addr ethaddr; diff --git a/examples/ipsec-secgw/ipsec.c b/examples/ipsec-secgw/ipsec.c index c321108119..b52b0ffc3d 100644 --- a/examples/ipsec-secgw/ipsec.c +++ b/examples/ipsec-secgw/ipsec.c @@ -259,7 +259,7 @@ create_lookaside_session(struct ipsec_ctx *ipsec_ctx_lcore[], continue; /* Looking for cryptodev, which can handle this SA */ - key.lcore_id = (uint8_t)lcore_id; + key.lcore_id = lcore_id; key.cipher_algo = (uint8_t)sa->cipher_algo; key.auth_algo = (uint8_t)sa->auth_algo; key.aead_algo = (uint8_t)sa->aead_algo; diff --git a/examples/ipsec-secgw/ipsec.h b/examples/ipsec-secgw/ipsec.h index 29b9b283f0..6526a80d81 100644 --- a/examples/ipsec-secgw/ipsec.h +++ b/examples/ipsec-secgw/ipsec.h @@ -256,11 +256,11 @@ extern struct offloads tx_offloads; * (hash key calculation reads 8 bytes if this struct is size 5 bytes). */ struct cdev_key { - uint16_t lcore_id; + uint32_t lcore_id; uint8_t cipher_algo; uint8_t auth_algo; uint8_t aead_algo; - uint8_t padding[3]; /* padding to 8-byte size should be zeroed */ + uint8_t padding; /* padding to 8-byte size should be zeroed */ }; struct socket_ctx { From patchwork Thu Mar 21 18:47:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Sivaprasad Tummala X-Patchwork-Id: 138681 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 312D043D0F; Thu, 21 Mar 2024 19:49:16 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9DC2D42EAD; Thu, 21 Mar 2024 19:48:54 +0100 (CET) Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2062.outbound.protection.outlook.com [40.107.92.62]) by mails.dpdk.org (Postfix) with ESMTP id 8F7E242EAB; Thu, 21 Mar 2024 19:48:52 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=S36ci2rTsMEU+Qwbj9z9lbxiEyZS+NrBdRUOZQEcatTKTD7Zao5HFlENcubtPnTW8TaR+IJW6Pq2H2Bcz86nB0hblHdxT4q+/UopuTl4AekIHBi3YAITg47XbdQKk5KHnEa8AhZLEmtcfGG/IbV0iEPjLWSH3EwEfZa5ZKQzIrha8oiG8JOLodxzQBvcakFzK68cy6EeWI3OeVgq4y0yNzKWmZXOQoyKV85TU3pvNFaXgLOtXBgwiDIRPr1ioyGlc07m/wZnbQb/hSnVkvZxOgcdF4D8Cywi9lS2UBwnu6ltM3LlNfZaEfHO3O++XXwFjGKFNY7ONj50N4PoR2g/dw== 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=JYLrGFFBRLgVxo6vRwFFDSJHGEbHxeTI3v+SkcW2H4Y=; b=mpxT9Nkn9jj/w7KMIFVqpfS0oQdOJT/oxzAz4sHw/XkUx5yN1mOf5D+pv54HHdhsvYYLU70oT+LI9YvrgB53/H+N+3oUa18ENuCRfVYi+j0j+poOMYLZ9hksIq1mDmnGHqANwaTRwEWQldGpvc4/uC5JrKzPSfaS4rTQOIS9C1zTRZtOvGrcQrbgflwyyR0thDk0faf43Q0N40LtGt+9Fm9OdM+VXkkm3zHRi1BZBqZhTw55WcSHHObuDrDtIxAI6vom2Y7VOZmbiuyu7u7pjbTov3WJ8rR9PqSghGf2MsNaa6NGDECN42cHyjbIoP1nAwenI76WBhVq0HlXStClnQ== 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=JYLrGFFBRLgVxo6vRwFFDSJHGEbHxeTI3v+SkcW2H4Y=; b=QMgXw5H6VaodW9NzJ07wM7t7JGEslLWMXibIOUAGOp8aOxzrcCwogS49ZBdX+uynzeZ9BKxYE2IndUUcoZ5v9mKknKt+H0lzQNBl9Zs0buFGJZP2lX8/IqMPuRXVezrLS/W+6xhLadsCRtuTOb42YAo1jJjfEF+/ngOd2NOmjG4= Received: from BL1PR13CA0354.namprd13.prod.outlook.com (2603:10b6:208:2c6::29) by SJ2PR12MB9114.namprd12.prod.outlook.com (2603:10b6:a03:567::11) 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:48 +0000 Received: from BL6PEPF0001AB71.namprd02.prod.outlook.com (2603:10b6:208:2c6:cafe::a3) by BL1PR13CA0354.outlook.office365.com (2603:10b6:208:2c6::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.12 via Frontend Transport; Thu, 21 Mar 2024 18:48:47 +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 BL6PEPF0001AB71.mail.protection.outlook.com (10.167.242.164) 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:47 +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:43 -0500 From: Sivaprasad Tummala To: , , , , , , , , , , CC: , Subject: [PATCH v6 09/14] examples/qos_sched: fix lcore ID restriction Date: Thu, 21 Mar 2024 19:47:15 +0100 Message-ID: <20240321184721.69040-10-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 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: BL6PEPF0001AB71:EE_|SJ2PR12MB9114:EE_ X-MS-Office365-Filtering-Correlation-Id: b8b6c617-86e8-43b9-f711-08dc49d78af7 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 79Ltyyzv8jGewsCGWn3y+kopEnDLjEx9VdbGpjCdmkXjVgV+t0RUJ43mjP+5v8MCfNSvUO5K2QQVm+Gt9ql2xsQ0mKHZzWjjXr62STGndjf3wrYqRK8TPZT6jHmDH0XZm73cXoNP3PB1mIZFR/6oExpElhdVKAJ8eXSKhApjVqMJ7Q08d8oB70KyTxchbKjZCrlc+F3mmgJV4QQ+PQfAqpRDsBUkXDvSOm5kK8sN1mXFY4G8QBLpXydkkSfgQ0HEKW9fDXhNIb+KA99U1mdK2ZqObczE0g1kAsvA+cq//poQJMJ0NIGHFKWKNbpLnv+0hyMPYQdSn5klJJvJOfZvwFoz8MzFJ7r301rhYxUcX1YgCVwo/X2207YzZ4negE0wemiNDGmgkmgyCRfXk8v+A6CV1SDwda1zVTeYIQpoJRslAynIMFmuUm/7+R1fQIsVs/I4rM/v0GZZGNAJgBRPjuvWKC08k4Sr0zcbUo561+NmHrWDrvbGgkjM7yCihsi0jH8/fg9eHHYoBmcuGEgTl3ptkK+Ggotl1fJNinROO60cbH+xvqZ1bWibPai8yTzyd/5EzU3xUZBeXOvxtVlGMF7SvoZt39ogjRdz9bHA1v8h5R3ETYJYHM1Hg8DUovFk48/S6AF29kf/QVweCW0uM4J1kxwgU+FnBXp8d5K4qLE0j97BC9wYQ2fBdB8txAJ65hmB3Moo/gPZq0Pt/qvR03yX7G5xmgq0O/xXDxW9sqElCZib+Q+dvhMDP5BTD1m+tVtZouYdXkiwgtv5uyVZ4g== 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)(376005)(82310400014)(921011); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Mar 2024 18:48:47.6820 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b8b6c617-86e8-43b9-f711-08dc49d78af7 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: BL6PEPF0001AB71.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ2PR12MB9114 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 the config option allows lcore IDs up to 255, irrespective of RTE_MAX_LCORES and needs to be fixed. The patch fixes these constraints by allowing all lcore IDs up to RTE_MAX_LCORES. Also the queue IDs are increased to support up to 65535. Fixes: de3cfa2c9823 ("sched: initial import") Cc: stable@dpdk.org Signed-off-by: Sivaprasad Tummala Acked-by: Morten Brørup Acked-by: Ferruh Yigit --- examples/qos_sched/args.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/qos_sched/args.c b/examples/qos_sched/args.c index 8d61d3e454..886542b3c1 100644 --- a/examples/qos_sched/args.c +++ b/examples/qos_sched/args.c @@ -184,10 +184,10 @@ app_parse_flow_conf(const char *conf_str) pconf->rx_port = vals[0]; pconf->tx_port = vals[1]; - pconf->rx_core = (uint8_t)vals[2]; - pconf->wt_core = (uint8_t)vals[3]; + pconf->rx_core = vals[2]; + pconf->wt_core = vals[3]; if (ret == 5) - pconf->tx_core = (uint8_t)vals[4]; + pconf->tx_core = vals[4]; else pconf->tx_core = pconf->wt_core; From patchwork Thu Mar 21 18:47:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Sivaprasad Tummala X-Patchwork-Id: 138682 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 5768943D0F; Thu, 21 Mar 2024 19:49:24 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4304342EBB; Thu, 21 Mar 2024 19:48:56 +0100 (CET) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2074.outbound.protection.outlook.com [40.107.93.74]) by mails.dpdk.org (Postfix) with ESMTP id 5BE0C42E5F; Thu, 21 Mar 2024 19:48:54 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aHOrInAkThexBD5UnQB2OwW/k/Scz4TL1uFrrmFP1wlPvYOjwXuGeXIz13iXyFgCEbIc+M5LCvZFq2oZdUDsTfgZnmjIdGINVFKRcQaiF3pz+qoXv1DQ57vG/OAXngsdGE1JhDt6v9KpMc42aZtKyVEdhVZUdNy5hbkHFhjw17Kz0k9hHFSVS0QTUTJUH9CAhDf6J5KAoFEyh3g0iOkpyfURSKPiMRInYOOuBxA+Of6shirqj1XVVdOz7Rk5WEKjAoJWn89DqK19GYUnWCBYKixaEK+hB7xyr5Cn++U4LHOgYriIhWa4kmY0zRJq8lJZfZUZGt5YaZpp6/LqTbfieQ== 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=wUgrGQJdcjiMgAPRrjFfeqR51WHyd4QzgQccekPXka8=; b=ic/MgLoTjQQmlJeQY+hxKmzeXd/l++OphFEFMl5++2OkvN4Ll8nhLw7G6AMwSPabFMWA0bSDmfpBfRHSt1OC9xae5w4vizXfN06J550eAH0sVl02v9H8n3f80/d3mYQbX+oiBOqhxXsxHPwx9PzTtwVRrTMTlU+kldLle39trYerDBxtato5a340BBwErYBseQp/pQuK2OA0yHY8Auc83wBuOqP6kGVTMObvmOr/ZOQEYkbX6MKCnkrZPLDCKt+TolOO1+aMKk/Hc/RBTqmuxKDnVhxWIyOK7On9VlBqg+WY1HHxvQsuNfRBiuBhSnrdS1U8tKBDW9+HEu7YPaxGVA== 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=wUgrGQJdcjiMgAPRrjFfeqR51WHyd4QzgQccekPXka8=; b=saXLlynmQS3mu9/hBT4oaIJfyCUKerq1ie14tJaUjiQ/It7X4G5Vm8jV/0SrAjhCS2Lpv4q4DyimMFFpEzgzV0tEs7nOep9oGtcb8H60Cl05rwku4Qz6ZJU8cf7BYT3eb9/DdZ2/He0eRg2bejignr1INoLVB6ydCVB1AyIuj1Y= Received: from MN2PR08CA0006.namprd08.prod.outlook.com (2603:10b6:208:239::11) by DS7PR12MB5983.namprd12.prod.outlook.com (2603:10b6:8:7e::18) 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:51 +0000 Received: from BL6PEPF0001AB73.namprd02.prod.outlook.com (2603:10b6:208:239:cafe::4b) by MN2PR08CA0006.outlook.office365.com (2603:10b6:208:239::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7386.27 via Frontend Transport; Thu, 21 Mar 2024 18:48:51 +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 BL6PEPF0001AB73.mail.protection.outlook.com (10.167.242.166) 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:51 +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:47 -0500 From: Sivaprasad Tummala To: , , , , , , , , , , CC: , , Subject: [PATCH v6 10/14] examples/vm_power_manager: fix lcore ID restriction Date: Thu, 21 Mar 2024 19:47:16 +0100 Message-ID: <20240321184721.69040-11-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 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: BL6PEPF0001AB73:EE_|DS7PR12MB5983:EE_ X-MS-Office365-Filtering-Correlation-Id: 999c9575-c71b-4f13-307d-08dc49d78d50 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: vcAc/uHd+qvDdODPfm1Aq8D10HWN6GxY8DKRGwTWdet/jfYGZs4fzsvrg4FWzKjWHXe+4kiNdRk9386z+uRb2x43VNprHYW1Xd3Xt0lFJGIAGc0Y49M1h0FEvCoyKRHvCX4G303NSnKJi2sYYCSlbz7Rb42HzcbUZa7ipi4TnF62fY4D2/aH6OEwKTgDFKiFiwiLKsGF1MDng/2otQnp/qR7nwsIM27pd7TRo4qg1binWaFtqeYT34omAZpfaXjxjQ5iHr0qqtFlferf5hKmeeb/cjb9F/H5uF0ogabhaosxCjW8snw38anFJjR1yByQs/kKU4DNaW+Y3Mi2MBuWuqSZZ+XBeWRjFCPdizB+rGri6hgfzJ57BkURpNLKmrb5f85tGhHmGeVbheB+nuE8alhPhwed8G/GY6mLJvLKfh/VUkIcGbA/6IRT9GFmSQPKihP0M4CPmLu4ZgCuXs2QQqzQMCqj3M2DL4e2l2w0DOJAc45vEWGQrNeNwgWf9QsGJD66Tg/W3/tLAqUOIQWfRiOcEfKTdQdGqEWAFWNh6YqRe4vGH4BzTvFgVVbsYLKi83yi8tUfP4M8iTJaF0fE90i+dDjKLSW2zTmN1iYLJdG3jpLC2M3sh5VetDPn46dlYeNA5Q3gGPZchYmKznvP5QNhWCyZ8mmLh91qjmQRtjsTfm5Sp6d9qfce2scldLlQYX6FUxXgSg1IcfojPDRDVhri8EWzv2TEpVgIaeLuSpvc6RiKKSGULHHS87j9s3T7k6RkxAoxZBMXXQeGhY1+jA== 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)(82310400014)(36860700004)(376005)(7416005)(1800799015)(921011); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Mar 2024 18:48:51.6313 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 999c9575-c71b-4f13-307d-08dc49d78d50 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: BL6PEPF0001AB73.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR12MB5983 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 the config option allows lcore IDs up to 255, irrespective of RTE_MAX_LCORES and needs to be fixed. The patch fixes these constraints by allowing all lcore IDs up to RTE_MAX_LCORES. Also the queue IDs are increased to support up to 65535. Fixes: 0e8f47491f09 ("examples/vm_power: add command to query CPU frequency") Cc: marcinx.hajkowski@intel.com Cc: stable@dpdk.org Signed-off-by: Sivaprasad Tummala Acked-by: Morten Brørup Acked-by: Ferruh Yigit --- examples/vm_power_manager/guest_cli/vm_power_cli_guest.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/vm_power_manager/guest_cli/vm_power_cli_guest.c b/examples/vm_power_manager/guest_cli/vm_power_cli_guest.c index 94bfbbaf78..5eddb47847 100644 --- a/examples/vm_power_manager/guest_cli/vm_power_cli_guest.c +++ b/examples/vm_power_manager/guest_cli/vm_power_cli_guest.c @@ -401,7 +401,7 @@ check_response_cmd(unsigned int lcore_id, int *result) struct cmd_set_cpu_freq_result { cmdline_fixed_string_t set_cpu_freq; - uint8_t lcore_id; + uint32_t lcore_id; cmdline_fixed_string_t cmd; }; @@ -444,7 +444,7 @@ cmdline_parse_token_string_t cmd_set_cpu_freq = set_cpu_freq, "set_cpu_freq"); cmdline_parse_token_num_t cmd_set_cpu_freq_core_num = TOKEN_NUM_INITIALIZER(struct cmd_set_cpu_freq_result, - lcore_id, RTE_UINT8); + lcore_id, RTE_UINT32); cmdline_parse_token_string_t cmd_set_cpu_freq_cmd_cmd = TOKEN_STRING_INITIALIZER(struct cmd_set_cpu_freq_result, cmd, "up#down#min#max#enable_turbo#disable_turbo"); From patchwork Thu Mar 21 18:47:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Sivaprasad Tummala X-Patchwork-Id: 138683 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 1D0F043D0F; Thu, 21 Mar 2024 19:49:31 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BB0EB42EC0; Thu, 21 Mar 2024 19:49:01 +0100 (CET) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2087.outbound.protection.outlook.com [40.107.243.87]) by mails.dpdk.org (Postfix) with ESMTP id 1A78B42E87; Thu, 21 Mar 2024 19:49:00 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=B/Mbyp4Qbrhn5HWsog5rxu3ztC13ODviiMUW7zQygUVBSgfOMulxk41tuy6p2ooSnb9tFeZjx+bVgADXusBdfsryJScvThHMsDPDQiE8RcMP2zhykAik4aYGe301Yn1xIsFZ/ENTvWWLVu7XVPgMY3zZ6cb1pBtyI8wpxDsQ4IODSkXvFy0jMXgktSxZafMLlrPPttxD1O7Ms59uclpItcXTP7HS3Lp0F+wXsSwuzrNbmfbK1N9p7KvQlzvLn6wL9EOCZMZJORZNtJqxlkZKFilAydXxPgfZ8toLxvYnJAI6NxSurbDRU0tcByspLc3VFmJcq1Ctm7TTnF70+r6Rbg== 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=4VTpoK07L9IEANWMa0kmXYAU/okrjuC7TrRFjsOQdkY=; b=Ho9hhAg3vb+DQ3KH9HHaWZSxRPG9LIWZz2+OmdefHF8dlvLX095KfYFhbzOb2oI8oY1TUpEHYBwDNtbnT/YAbE3sMqTfhd+pw8pAoT2uoh+i/j42kuzU+GxMJBYEnjU21tp+VBkGrfdRFEEdt84xiVVto2aEwd8CSfz5MYMoLt4zFiSDn//2BKP8modWZOL7kK/NER3aTXFhAmuDc7A+voo7BqekoVtyItn6uJt9ia6/Wm9o60uAQy23fxZSBQsaW2bz8+U+RZfxlC82VWanZWQijQ/xoib0CNMMW/5pr8WTBBpbcJPbfSN22WsW5IcG0qePXEO+MmQFnNrxC+WrAA== 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=4VTpoK07L9IEANWMa0kmXYAU/okrjuC7TrRFjsOQdkY=; b=Uk/U/1uO+avyRuudI0L0SJtmDCpKiiXlIg6SlJfab9vxxHaUXQX7t3e/Ttc9xd4wPaEJ875uWRKuB3G+Qs0kbSNtBKXWpjX8DHgcQVa28tQO+moAhTJVoEo1T/ug4dAm1s4CDmeAQ5ljbn4uboL0FKov6q5DjokAuRCr+xnWbzM= Received: from BL0PR02CA0126.namprd02.prod.outlook.com (2603:10b6:208:35::31) by SJ0PR12MB6967.namprd12.prod.outlook.com (2603:10b6:a03:44b::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7386.31; Thu, 21 Mar 2024 18:48:55 +0000 Received: from BL6PEPF0001AB75.namprd02.prod.outlook.com (2603:10b6:208:35:cafe::fe) by BL0PR02CA0126.outlook.office365.com (2603:10b6:208:35::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.13 via Frontend Transport; Thu, 21 Mar 2024 18:48:55 +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 BL6PEPF0001AB75.mail.protection.outlook.com (10.167.242.168) 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:55 +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:51 -0500 From: Sivaprasad Tummala To: , , , , , , , , , , CC: , Subject: [PATCH v6 11/14] examples/l3fwd: fix port ID restriction Date: Thu, 21 Mar 2024 19:47:17 +0100 Message-ID: <20240321184721.69040-12-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 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: BL6PEPF0001AB75:EE_|SJ0PR12MB6967:EE_ X-MS-Office365-Filtering-Correlation-Id: 85bc8132-ddb8-4f90-c24c-08dc49d78f6c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: u52yiL95cBq8k5Nhz2VEIiqG+TvBoATsnqMbUxs2ZIszhX7PQomt1/HFUHsyZ1q1+iSRWrPf6N7gIbkjm4AziZORnZhlslhfQEW+nvBWN272IgB6m0+4g2HqeiDxUtlncRDA5TxuPZ7LzSHA0wWhMeFkG9X74xtxhKCw6hmWg5u8LzDek4reCnJUTZTSA/u6xeUJ1Rs+Oj3S5dQTzBblxzct/AKfqQzhk51cTBq2h42PL+MsKrlg5HMtpNr1vs/yfXrJfekIw1hcbA6AXZAHsZdsV9FlWv9RLu/exeOMS5NN7Lp9stU1vHr16cekbN9x1Xl73I86Y7lL80zIO+4UvQDaeAmPE7wezFsr2ExXmxZDnxj7TvUvsdtGqvPrp1xKDFnSBtozG42B0DO6CeXvsRrpkTDg2jmnVcNv05HcMze/h3DWPs1R5hWyZIPmy/RXqfJF1Oan9wIp3qLXBhAWgW7Wnr2fSCXh/KcD/v8lygcpIpPnoJVj5dmabymjHrYuBOzE+TxV0O5FISkX5JwXAVBprE89I58GEMl0lA2c0DtYL9VSPwsGxxgUkzowGTQ5Ql3PuFm3AULeojUqr6oeRd9MwXBiK6KaW33rhRxCWKNbUb0hJknPSvEw9khzuWKAjsIyEL+MShPHl1clhk7oGjg0DTBhGXhfhNqpQpL+Z8R4FoOd7krEjsQoeo6MI2ib4Xw6XqoIL70JJPZtL4UibYxfUD/6Di+dVpzMlLPI0a6J1H+4uQy1cEbRwS8l+n2770MqHS7N7c3hEfLdkCf4PA== 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)(1800799015)(7416005)(376005)(36860700004)(82310400014)(921011); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Mar 2024 18:48:55.1739 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 85bc8132-ddb8-4f90-c24c-08dc49d78f6c 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: BL6PEPF0001AB75.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR12MB6967 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 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: af75078fece3 ("first public release") Cc: stable@dpdk.org Signed-off-by: Sivaprasad Tummala Acked-by: Konstantin Ananyev Acked-by: Morten Brørup Acked-by: Ferruh Yigit --- examples/l3fwd/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/l3fwd/main.c b/examples/l3fwd/main.c index 9fb4fe97d4..19e4d9dfa2 100644 --- a/examples/l3fwd/main.c +++ b/examples/l3fwd/main.c @@ -500,7 +500,7 @@ parse_config(const char *q_arg) char *str_fld[_NUM_FLD]; int i; unsigned size; - uint32_t max_fld[_NUM_FLD] = {USHRT_MAX, + uint32_t max_fld[_NUM_FLD] = {RTE_MAX_ETHPORTS, USHRT_MAX, RTE_MAX_LCORE}; nb_lcore_params = 0; @@ -530,7 +530,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 = From patchwork Thu Mar 21 18:47:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Sivaprasad Tummala X-Patchwork-Id: 138684 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id AED5D43D0F; Thu, 21 Mar 2024 19:49:36 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 004AB42EB6; Thu, 21 Mar 2024 19:49:04 +0100 (CET) Received: from NAM04-MW2-obe.outbound.protection.outlook.com (mail-mw2nam04on2075.outbound.protection.outlook.com [40.107.101.75]) by mails.dpdk.org (Postfix) with ESMTP id 381D642E3D; Thu, 21 Mar 2024 19:49:01 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QXDAszQynZZxanG3k4E05OF1H50OAdSsJ29SCjrucLJRv4wcyP13d51hELDzzproc3txzW+3GGwoXCtOHQ57jVaZe7P/ZvxahiI48SjjHEbz+O9E+AU7lwVmrFVI02X4+tjSPAWO8HTU21Q+dhkhyZCRCgzHJhtKKAnm4aRY1X5zcs6swPYkxlvJLvYZwl6/BJKFkq73V0n7KnTAXJGGPPzJPG5VpJVwZTf7/FUN2K1Vamx0jrhKGVobG+7skyHu7rJxkI13Di74DwXCUlpGAJCBdxNeZxqySRlMwOPKWRsnJaKj/9g6IK+ModdoM3V90YpVyd7WS5gsfgMODpj8tg== 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=YnpzaTgNRbkVfpAhYFln1MKTJNdti8z8CxT6ezt9zeM=; b=NU20mmmxVKEDv3uqkw3mPRUJZC/wFcvJyxK1arweMPvRTlSjtRse9oKxcKfoqPqmUZ9KMBVPise3e0AlBV43plN+bUKrm0uBChveYfDLLdDSQKfLnPA5l5hh0Bi8QSabD6jx2Dcxojj57j8C8apyEU/74WHrpfKo5weWi2s9+oYA1pHFyzUFcv6yHFKgWgnUOMkYjC1BTBG0YQctpWXCYCnGxj0bL+fY2SWTDy/7429ef0MBYMLPySuXSKcpiqT4A9IIR/yzGs7cIRxO8yxbiXe2RW97LYvqNvb4vQNuWvW0H7ottFD5KTUfdkvqyQdzKJvHD4W1BLZJCSl/nx74tg== 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=YnpzaTgNRbkVfpAhYFln1MKTJNdti8z8CxT6ezt9zeM=; b=c4XI/HdDxBa7ZnBO2k010MOxZfNIGyu/oknuMDGT4Z1V6U+064U4tD9vfbTpbTYZk1reRifJlmtsBruVnFaXH2UpUIyBL7Zch0kG1/cbp4AUMgDyPAeXtL1YaRGnQGuHdSyzc/338gdYxDjCPvTqgPTSSHNrkisPxMmEBeZwTDk= Received: from MN2PR06CA0001.namprd06.prod.outlook.com (2603:10b6:208:23d::6) by SA0PR12MB4480.namprd12.prod.outlook.com (2603:10b6:806:99::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7386.31; Thu, 21 Mar 2024 18:48:58 +0000 Received: from BL6PEPF0001AB76.namprd02.prod.outlook.com (2603:10b6:208:23d:cafe::52) by MN2PR06CA0001.outlook.office365.com (2603:10b6:208:23d::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7386.28 via Frontend Transport; Thu, 21 Mar 2024 18:48:58 +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:58 +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:54 -0500 From: Sivaprasad Tummala To: , , , , , , , , , , CC: , Subject: [PATCH v6 12/14] examples/l3fwd-power: fix port ID restriction Date: Thu, 21 Mar 2024 19:47:18 +0100 Message-ID: <20240321184721.69040-13-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 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_|SA0PR12MB4480:EE_ X-MS-Office365-Filtering-Correlation-Id: d1ffb5a8-9422-4034-4ffb-08dc49d7918a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: BSAAOwNBDmqiW6ix3tGQMfooyEq3jWgVwPQ1l4jRukxSc7bqoXhI3CinCYQg2W/z6iFle/1Emk7hAgjRlgMHsU0DkfW6TcZIiU/uBXNHUKVdDjDXJfvFmygFIHvhicBucfdZxIgyPxGUXSdEYLdb0jAvT6LNJH08MIlOa83NGJBQVvyPFMEqg9JJxODM8SuaTgRAgByPh0bFrQY6DiJ2uXbLzggdAWc6BD/aAlyyekQcb/EGbAYjFqcNltH1V5DK14uppKCIMG7nnN6qRxFeczy/HBRrJLD0GQh72N4xyN7R+T+5BOxj+46qZTRm6Bo0tMp+mF4Llmi7hjf8MSDsS8pvSBrqLnJyomkwOocMYBslZoH8HgCofoTFnxrLfhpzGz355vgOm1r6cySyMKXxFC4NaFq4nzl5wOLIQ1DaD8VqZI/pXsj7i+aagSUjEWiI/4kxqyrw0ge7N63NuR4tQMjXFVlsaau7xy4AzGVmWK9ZD046JYnuHtb6JxS3VIRoohZJYYZX8MBV+gpIiPcbwRYC3B6kJTsZyvesl8+8rDuL876GmGu2DS0PydtSKqWqB6HYGtw9y9RKYGL6h3rP9HOyc8I7/6oG8zMnAAzdxfSDgQ2ZZojizlBo1M3AEVbTkrs7fICBwlehCmGQakwGosRr7e/DnEkHkIGGkWsxixjiznB9M4HGK6VsTvlOkGqX82mRTULO0q6BPHARs0cz3fX2Y+9C/l5wKjyK0OYAcLCZzyHQA75EcLGYH0vMBh8+1VEUekCUz6ffIIpllrO2+A== 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)(7416005)(1800799015)(376005)(921011); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Mar 2024 18:48:58.7074 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d1ffb5a8-9422-4034-4ffb-08dc49d7918a 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: SA0PR12MB4480 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 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 5411592dca..822b802f29 100644 --- a/examples/l3fwd-power/main.c +++ b/examples/l3fwd-power/main.c @@ -1658,7 +1658,7 @@ parse_config(const char *q_arg) char *str_fld[_NUM_FLD]; int i; unsigned size; - unsigned int max_fld[_NUM_FLD] = {USHRT_MAX, + unsigned int max_fld[_NUM_FLD] = {RTE_MAX_ETHPORTS, USHRT_MAX, RTE_MAX_LCORE}; nb_lcore_params = 0; @@ -1689,7 +1689,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 d8b35d062c..c2cdc4bf49 100644 --- a/examples/l3fwd-power/perf_core.c +++ b/examples/l3fwd-power/perf_core.c @@ -132,7 +132,7 @@ parse_perf_config(const char *q_arg) char *str_fld[_NUM_FLD]; int i; unsigned int size; - unsigned int max_fld[_NUM_FLD] = {USHRT_MAX, USHRT_MAX, + unsigned int max_fld[_NUM_FLD] = {RTE_MAX_ETHPORTS, USHRT_MAX, UCHAR_MAX, RTE_MAX_LCORE}; nb_prf_lc_prms = 0; @@ -165,7 +165,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 = From patchwork Thu Mar 21 18:47:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Sivaprasad Tummala X-Patchwork-Id: 138686 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3DE5743D0F; Thu, 21 Mar 2024 19:49:55 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 522A042ED9; Thu, 21 Mar 2024 19:49:16 +0100 (CET) Received: from NAM04-DM6-obe.outbound.protection.outlook.com (mail-dm6nam04on2054.outbound.protection.outlook.com [40.107.102.54]) by mails.dpdk.org (Postfix) with ESMTP id 8C90742EAA; Thu, 21 Mar 2024 19:49:13 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WX17oc0pvDrD7XyvndglOwhZ8YU960t/aoBbua2DgE4o+iaYfNmQHvjq/R60dkmDHiSlXwRDUrLmNSVeoqfR/d88FASWAARX36t1ZvuGhQPCTVLhsajxr8ekSmQVtYUGms7zdRUU4yzihySBaA7uWnw4pa2hqssBjmD+Z0zsGLM7m7K5XoHXkjHDmCszFjDppQPvN8JrtdoHToXuqmOOZhGoKdr6UyTIjga3mLhNW/q2Nk1aaPn+lpFZm+4zJbTvOEjtUgOxlKjdIxDhJqMDyrWDqwYhcOGqt2sGfAbkhEpB9PdrDsy3OkZ25zoL0rapEBBIwYoJu8PlEPfEpiy/Eg== 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=h39QCPfPAvpSScOMeC/ZrzpE5/H5BhqJ0AlLETNPv3I=; b=bgfDFgjgC8J/2quBzuvYol7hFS6zhdLGcUvuy89XxhJd2ureMCJlxzz8QNfldDzcDiE9EL/hyR4C0UeZQo2BOU+3w7b8Ne68wgi5PObFIKo5ocHsBczYf3MfEqY4ZsOL5l6+XdTEA5x0CNu/n65ydO/fdRZRKRHqEMs26zcC4/KMDtKsbPnNj5lliaBphnAcuKr1jGh4oSRYENHH4Qd+AJXSF9dW6NndP4i0p8xxP5lfeyCwdRRgfRmGhOf2fRqil7vtVL99DMBMxKvl3itUy/xTKlyoeMwMLltYQr/8pSpNNxG1RTp2lUBkpMJqhOAlPWr330z9L0kZBw7ctrK/fQ== 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=h39QCPfPAvpSScOMeC/ZrzpE5/H5BhqJ0AlLETNPv3I=; b=dq30Kwr2PDdQTXvGwUEjLfUM+rH7Gtj9ZYhHMcC2o0c85Sd6MO7kBgCgHsfW1z9SU6qpVhjep1smytz51LHzOabOcg2bxPV678K6hxUxEznP3JF5rfbzCZKaUqGX3Cb9PoUBiAqZrvgNenOnUvF6Yynvibop204rcH21ULdi7qI= Received: from MN2PR01CA0054.prod.exchangelabs.com (2603:10b6:208:23f::23) by CH3PR12MB7665.namprd12.prod.outlook.com (2603:10b6:610:14a::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7386.29; Thu, 21 Mar 2024 18:49:02 +0000 Received: from BL6PEPF0001AB74.namprd02.prod.outlook.com (2603:10b6:208:23f:cafe::5) by MN2PR01CA0054.outlook.office365.com (2603:10b6:208:23f::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.13 via Frontend Transport; Thu, 21 Mar 2024 18:49:02 +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 BL6PEPF0001AB74.mail.protection.outlook.com (10.167.242.167) 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:49:02 +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:58 -0500 From: Sivaprasad Tummala To: , , , , , , , , , , CC: , , Subject: [PATCH v6 13/14] examples/l3fwd-graph: fix port ID restriction Date: Thu, 21 Mar 2024 19:47:19 +0100 Message-ID: <20240321184721.69040-14-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 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: BL6PEPF0001AB74:EE_|CH3PR12MB7665:EE_ X-MS-Office365-Filtering-Correlation-Id: 13e5faec-957c-4e1a-0e39-08dc49d793d4 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 8w9DY0PhQQ7mNXzuO8TZAwMhNEgDIKdd6dzOY4Gpg7HfHMAl1L59vcJ7+AXY8HBWyhIz1pNbBoPErUbIGFBtuNGmTcCyB7vilJmBPQuO/qy/zc81Q561n/skP1M6YpTkrjGdpjgB0nVr25VvHv+okr4FqnhQOAqdQoBxt+uTXUnoihDlRy1s12Ojy3Q9hWWldH2xmXp991friu5q/nvzv1CcxQ/E636j79VeOyaNZAHlJylkx29hTDsylE/rhfMd28Bvhrn84sGBPpqu3Y5NnqOE0tWJv9C5ajv0IngsLU9dfKrxg/mG7wjH/3eJucYmpNnrvosVA5TFMbsxjZdAt4OTqZbWMz8FmXj9TOWbap4kdmRZY4LS2teljHla76i5nqsfK+X0oFjZHxIKhsyyOrKyolUwRQYCso4e/EZYjG+bMFT4s83WPcOmfAEk+3LvcNqJz663Mg/i+6si04JazHt5lCnVxQNuAVFWRkWb4gAHjCHNNKZvRMUop+qLosrNzj168w+qdFQhc59X1ehnBeQQNbRGnupXOsNr3bBiO0ugMve6Gid7Wi92wZBjgZRkE/FDfPN8RFhXdHu/13eKIbJD4ZiCQ7LEC6cfGi4KpxOkOMtX0uLK6MZ98gT4e4RUDNOS2GFlg7Tuj44nwa3My/CDEkRQYaBjx8ckwWDgxEMJgHqRpGpCup1x9TFclTYYnr2E5kO85opgSVk/SrisnNTOM0I8dYXlzUmRXnzS8tj059ddybpBAfdvY5DtDBpuKC2PVE6w/92o1Lfj0wZ36w== 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)(82310400014)(7416005)(376005)(36860700004)(1800799015)(921011); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Mar 2024 18:49:02.5774 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 13e5faec-957c-4e1a-0e39-08dc49d793d4 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: BL6PEPF0001AB74.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR12MB7665 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 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: 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/l3fwd-graph/main.c b/examples/l3fwd-graph/main.c index 8b7aa6642b..557ac6d823 100644 --- a/examples/l3fwd-graph/main.c +++ b/examples/l3fwd-graph/main.c @@ -448,7 +448,7 @@ parse_config(const char *q_arg) } 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 = From patchwork Thu Mar 21 18:47:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Sivaprasad Tummala X-Patchwork-Id: 138685 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8383B43D0F; Thu, 21 Mar 2024 19:49:44 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BB0AC42E8A; Thu, 21 Mar 2024 19:49:10 +0100 (CET) Received: from NAM04-MW2-obe.outbound.protection.outlook.com (mail-mw2nam04on2086.outbound.protection.outlook.com [40.107.101.86]) by mails.dpdk.org (Postfix) with ESMTP id 505E142E69; Thu, 21 Mar 2024 19:49:09 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Rl2Gg5BuAnvY76rFg/7YL+aCH1g/ZRpPqVv42es8xZgmIiMAIFno+H0oV1URl2k2i4FNf5V1ESJKu+b+mpxZ1iLcRLA40q1gMNfj6DjFB3+YBVukK1CCpTwCtLCAvgsZlZ/lW3tjgFLJ+Je9NMsghX054nXP3yZeikzaJYzAeyY0CqVmtvqwj7EV6ajM0eo08TW+yuqW7AamiI38V7W0ufqlnoci9PTdFYa9XwQMDSZRNeA0cpXShBJDKe3A27GpY2g6kaTHPYcn/xeQsckUgWSlhHyh/6F7eBJFSyeC9EO2OpfvWmmnmOAnPEFR5M8QvV60V92rpWCO8Dga/l4SCQ== 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=x8ZGktrsk9d+8qT2FS66Hv4CQnwMyBabidDzYcjVUUo=; b=ZB0XSL9z/5UaPMCPIIaAj7/8/xfo8TBb0ng6cCDv5adKrolVSmedRcTMZlkvbLHUYF05oZGK5n3VgQaB6yjnskQzFK8GhqzgYL51FSBKjzVsCb27ERPBhlpzOQW/cmpqWo/oFI8iD+Edk7IdAwEiqHZJMJQdnDuDzJLTSMqMl43GOqXbt9vmacjhJFv8jLut/jdCEbCh8JT968Jui+G8X7s4/f0prtLpiBeBGpu8yRtki8NcwKEmCbgBiLlhXXcKkYmWyDOltFtTyY3vxOy67MBu2MQ5INUzlIpzVcR6YsbGw3yOz7jx8ydoicKGo1byPFYw2mWuT1nC1GTzyd6Efg== 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=x8ZGktrsk9d+8qT2FS66Hv4CQnwMyBabidDzYcjVUUo=; b=EoMTNjr5MMllB6hI+dhL3i55Palqon8L6wx2TdxTx/dsv4X9uiLxRSdUNUYwePt6Q7kg8No8Q/nlDORhiW2RmNxQBHvbD/j3ytFWgNqK5ZuLr9xtdzYNHPUEfbUI+grUgQrSOJF4yZXxgqiClDGoBTXQLPC5/VnY9rD9d34kuLs= Received: from MN2PR08CA0015.namprd08.prod.outlook.com (2603:10b6:208:239::20) by IA1PR12MB6281.namprd12.prod.outlook.com (2603:10b6:208:3e7::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7386.31; Thu, 21 Mar 2024 18:49:06 +0000 Received: from BL6PEPF0001AB73.namprd02.prod.outlook.com (2603:10b6:208:239:cafe::9e) by MN2PR08CA0015.outlook.office365.com (2603:10b6:208:239::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7386.28 via Frontend Transport; Thu, 21 Mar 2024 18:49:06 +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 BL6PEPF0001AB73.mail.protection.outlook.com (10.167.242.166) 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:49:06 +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:49:02 -0500 From: Sivaprasad Tummala To: , , , , , , , , , , CC: , , Subject: [PATCH v6 14/14] examples/ipsec-secgw: fix port ID restriction Date: Thu, 21 Mar 2024 19:47:20 +0100 Message-ID: <20240321184721.69040-15-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 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: BL6PEPF0001AB73:EE_|IA1PR12MB6281:EE_ X-MS-Office365-Filtering-Correlation-Id: 2daf9f7b-110e-467d-b6c4-08dc49d79613 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: vTWBumaeFBTEeeRMklVvu1/paoIhJCjlAHPUg0wk+FpIyQApAU6kKaZheT4B51SYarRKfvFErxDLOthEXHyGiKPAufo2N0CY5CT7V0FBQJTLo0390Nnx5vpQNuFZuh+xUXjZ9Oa3wHNXBiA46KB1XDO2LjRPea/QBu25f4eLlkxlNz5bpT1hMyQ2ldrHuKaJa9hEDHwdEt94wSYbZuOQOp0dbvWRITvnH1EfAR+27+Sxj7wfj3rpeI3SVGG7dPNqx13q2co35Z7NzRXWTuBsqise9tRuffiViCHRpjYXCCFEaoeVH+BBGULO9ZNnwTrW8AZlWDMJ1oOnSPnK3a0JzBaZS5D1+Rst5v2JReKCHrAXutLeOoy5nhVIqeEIQY3muLsNBI/QcV4Xm+fykI0NOjlL0TCfPlmwDckkpwy9T3I3WAMELflbQsabT6OMxZWazt04s5HUUVNPKg4fahfHfgzqIRJVQ5rdiHgkS2qZmrPuvAQDiHMxrPaJ7MpqUdqcf7nM+miN4qn7WOqmljYWNGTKCuLGV6MWNgQM/YYkf8wHfotCZZwEq9nicOMm9HvkdTWljC57RF1BaOyzi3/psKgbbt/T0d2oRy1+MArcW3BjqfkZwVx5CM2jiWTmwjypEu3nAk+8ck8+w6age0Pa2fUoYQgkcJcC0GJmOgkb/hKrI8m3OAZ6d+/xn0u6bmXjlSQsVetr6ETQUOXYNUWcZWwjwUGCmcO3Bu7V1Xcew602LxHf2vMbb4YlpGzyYRSV041+E1r1wS5rtI2HIJoCvQ== 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)(1800799015)(7416005)(82310400014)(36860700004)(376005)(921011); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Mar 2024 18:49:06.3500 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2daf9f7b-110e-467d-b6c4-08dc49d79613 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: BL6PEPF0001AB73.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR12MB6281 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 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: d299106e8e31 ("examples/ipsec-secgw: add IPsec sample application") Cc: sergio.gonzalez.monroy@intel.com Cc: stable@dpdk.org Signed-off-by: Sivaprasad Tummala Acked-by: Konstantin Ananyev Acked-by: Morten Brørup Acked-by: Ferruh Yigit --- examples/ipsec-secgw/ipsec-secgw.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ipsec-secgw.c index 0fa9622626..dc7491a2b9 100644 --- a/examples/ipsec-secgw/ipsec-secgw.c +++ b/examples/ipsec-secgw/ipsec-secgw.c @@ -1048,7 +1048,7 @@ parse_config(const char *q_arg) char *str_fld[_NUM_FLD]; int32_t i; uint32_t size; - uint32_t max_fld[_NUM_FLD] = {USHRT_MAX, + uint32_t max_fld[_NUM_FLD] = {RTE_MAX_ETHPORTS, USHRT_MAX, RTE_MAX_LCORE}; nb_lcore_params = 0; @@ -1079,7 +1079,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 =