From patchwork Tue Mar 26 12:55:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Sivaprasad Tummala X-Patchwork-Id: 138797 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 7DC0943D51; Tue, 26 Mar 2024 13:56:30 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6CDAA40E2D; Tue, 26 Mar 2024 13:56:28 +0100 (CET) Received: from NAM04-MW2-obe.outbound.protection.outlook.com (mail-mw2nam04on2072.outbound.protection.outlook.com [40.107.101.72]) by mails.dpdk.org (Postfix) with ESMTP id 5482140E09; Tue, 26 Mar 2024 13:56:26 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZKXHbNpg84A3sTo1NNjJCU6qA93ww77OHr8WbBtKxwrpFbKkxR81UMvIOA4c/T3/ZhCgaxMncx4nsxco5eL1M2stB+5RlRoFaZLQPmusr3gWQkfR+4maV/x0k9s9IQAcBbqs3gEvKrL+i1n3yGfHT509bdWtcPl0tON0Nw1UW/mp0eMJGSwLY5DFwoKr8tU6Vyn735i1tBJ4Ge8XFszJDgaGK8F5KoQeSl3pikoUQkXnVDAYp8Tboevvd0ItgS42m9l7cIDwMLShgH2fK5JdFK+1Umu+WOP/aaVcjy0R5+qGoNhckFAmkPjm5zkaKXclGz/TPLBUHXkEb2Ilm/T6Bw== 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=uDhya/5gQ0C5wd1sginTZcRRZJPcrqso2pgBtXeuJNo=; b=oMUYtVdZtsoELxXkoV+Msw5PGlcUg3qYEcKu6XKG7oX7aQSNzUhXa8E3OvOjP6XtnZGshuvFj1pBar2PUxRnZ99maEwWmkk7LUTPU+yBwlfyZK7uYPkYPSe5T01TRSn/HrU2KgptLr4OGUNqexE96Q8w38bT0l8hLapQAiemoCcy2DfBC4JLAFASBn1nAWEHwyTuE8xSeXW3f7l1bqvCt6Yd6xbgl8OsutuaQumFskg2fh4n68tYeSaBZMqKhU59CeCoijj6LZZrPvPYb5ML4j40bAArV41gLr5rLP9M0XsPhiff/1LErU8q2x6Qwy4qSbcnj1kGnSgrEajXuicxRg== 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=uDhya/5gQ0C5wd1sginTZcRRZJPcrqso2pgBtXeuJNo=; b=Vwk3COtyyvab2fSzo+llMagnrbs/kjpDiIDJAs3L7dHqMPmX6VOa1GM1NDj3iabwKlXnrXFdTWGUpeZ5fWbj+EhZCxbwBXHWSox28si6+BaSnmJQfHymn6bitsea9u8jQAnZ+JiQWWx8p5qcPXLOI9pOInsT69HiZ2npF0ra8Tc= Received: from BN9PR03CA0080.namprd03.prod.outlook.com (2603:10b6:408:fc::25) by IA1PR12MB6602.namprd12.prod.outlook.com (2603:10b6:208:3a2::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.31; Tue, 26 Mar 2024 12:56:23 +0000 Received: from BN1PEPF0000468A.namprd05.prod.outlook.com (2603:10b6:408:fc:cafe::d3) by BN9PR03CA0080.outlook.office365.com (2603:10b6:408:fc::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.13 via Frontend Transport; Tue, 26 Mar 2024 12:56:23 +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 BN1PEPF0000468A.mail.protection.outlook.com (10.167.243.135) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7409.10 via Frontend Transport; Tue, 26 Mar 2024 12:56:23 +0000 Received: from ubuntu2004.linuxvmimages.local (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Tue, 26 Mar 2024 07:56:18 -0500 From: Sivaprasad Tummala To: , , , , , , , , , , CC: , Subject: [PATCH v7 01/14] examples/l3fwd: fix queue ID restriction Date: Tue, 26 Mar 2024 13:55:40 +0100 Message-ID: <20240326125554.138840-2-sivaprasad.tummala@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240326125554.138840-1-sivaprasad.tummala@amd.com> References: <20240321184721.69040-1-sivaprasad.tummala@amd.com> <20240326125554.138840-1-sivaprasad.tummala@amd.com> MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN1PEPF0000468A:EE_|IA1PR12MB6602:EE_ X-MS-Office365-Filtering-Correlation-Id: 6e649229-cc53-40e3-3d30-08dc4d94240e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Y8ULfOePalI7Dov8ba9X+9qIOQegWFHMC4c5HeiHotpiZ7O2PtUvtOZmG3ZQ8d984EtWn9FPdyKcm586Jv4DDPjDTXkmqTQTu37K8lCCCWvTRR68iN5FnrdpzjYj21Q5NsOBEqmkE3zFgnst6bQCTCYch4MGkPsTs8fokFU4yCSdL61I0lE4Qv6bDzGt9EgvkipdeEl6DF7+kCky8HEqIWBlyxYGY/NFZm6IxWofwFmS8tQ9wbc3VLzPPDoAUEK2H3ImAGTSt5w3xPwbMTwJpJgSeLEmNbjSm8UMmbdvKIufxlxG33EKzOeUq8c0v6WaI8tL8rLaeOHQ2ac6zMR406hS4Y7vsACXiXjks50JNQpGWUlQpCFiT8VWym6cfjj5szT+xKXqfNvPiQUpI91YxOMpaBS/I1U6o3RFOPEoGDD8Qiyu7RtG9EGbuY+nGfpRSJ7XBKj5Oy4JxlcHnGPSh5c79EJwJkFl6lv8QoG/i59QxGc471+sI7IWXBiNbC32lj6E5qFH2UUzO/uiCXKyq95CS9dhuDhpKXBp8GTriLbkzKPppdpIzXQS8LxbIdnch+sFfc5VDO03rroD19bekPbgH4NBAVxGyrGJlVC5P/FiLUCk6Q5KVd5Esf/h97JBn4V1rEJOX+nhqbMhKgE4rqrNUkKsdjqG6BJC6790YoAI5gWcZyXHSfipvBCQemMG+ggoj9gDqR+HkrBeWX0ZSzciUS8MFOhDdOrnDxlV24p/0p0psHoBal0xWjKgOaoFHIMlpdIJ/+ef+yR2MbYsfw== X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230031)(7416005)(1800799015)(376005)(36860700004)(82310400014)(921011); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Mar 2024 12:56:23.4710 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6e649229-cc53-40e3-3d30-08dc4d94240e 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: BN1PEPF0000468A.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR12MB6602 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 rx queue IDs up to 255 and max queues of 256 irrespective of device support. This limits the number of active lcores to 256. The patch fixes these constraints by increasing the rx queue IDs to support up to 65535. Fixes: 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 | 24 +++++++++++++----------- 7 files changed, 23 insertions(+), 22 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..eec0361a3e 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=%" PRIu16 "\n", lcore_id, portid, queueid); } diff --git a/examples/l3fwd/l3fwd_em.c b/examples/l3fwd/l3fwd_em.c index 40e102b38a..f18ac0048b 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=%" PRIu16 "\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..f38b19af3f 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=%" PRIu16 "\n", lcore_id, portid, queueid); } diff --git a/examples/l3fwd/l3fwd_lpm.c b/examples/l3fwd/l3fwd_lpm.c index a484a33089..e8fd95aae9 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=%" PRIu16 "\n", lcore_id, portid, queueid); } diff --git a/examples/l3fwd/main.c b/examples/l3fwd/main.c index 8d32ae1dd5..039207b06c 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: %" PRIu16 "\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 @@ -500,6 +500,7 @@ parse_config(const char *q_arg) char *str_fld[_NUM_FLD]; int i; unsigned size; + uint16_t max_fld[_NUM_FLD] = {255, RTE_MAX_QUEUES_PER_PORT, 255}; nb_lcore_params = 0; @@ -518,7 +519,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) { @@ -529,7 +530,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 +631,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 +1212,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 +1537,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 Tue Mar 26 12:55:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Sivaprasad Tummala X-Patchwork-Id: 138798 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 D42F143D51; Tue, 26 Mar 2024 13:56:37 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C6D6240E78; Tue, 26 Mar 2024 13:56:32 +0100 (CET) Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2059.outbound.protection.outlook.com [40.107.92.59]) by mails.dpdk.org (Postfix) with ESMTP id 0720B40E09; Tue, 26 Mar 2024 13:56:31 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DXs1a0tPL6rls4kVuf46CEhAV2PPjO/aTMZxExwkBa5vAC81fFraUmvyo38BfNaNEb8T99tl6PvnUL4M3WCEBe0WOjMz+ybn66S53xIHdqRZ+8iPZf+U6STv1VNzzjBQY1m+zn+/mEV0okmbULTjMduSIVOxpJrzZZp1i0ByVMFeDGFuG941AkrCZb5tc4FCgNWI6E+EQFHsT27CZxk/ufsN4mhW3zXo+pSBJoIqxq8FhEKHTynuntNa7kVugv/ASejqUaw1ZGvqXuDBph2DBiwsR9bSdTqK2p8UhACa/JbY+z+IHPXujb6pgcvBSY7gjrpFFUL7rBj35BOWooILKQ== 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=Mmh8eSB57711L8vj8mmjqj7R020zmeep5e618hI2ebg=; b=Bek3k+2ZnSy0uQZAuT0SwsrZs9jo9lbQVofLYe6/w8cATbwk6QpsmGp5U8dQodPvRkUbsRgpUqWgonle4heg0I4Ap7BsCcnjds2oJHj8WuHJy/s0x2OZt8I4kmxFTyCNkguXetIUpXrAHo1cDLX1qioIFrNUO991FCs665ZDP1a7A6wcyIg2+tclnxJ6TLVM8VKfriH9zTMLWiKsFj1wkzlANP8rhOA+q+Qtts9IMFNT9CDcjAk54s5XxYpMkGSGQcal2Bz0pwKx9ZzenUAH8ty9qPz6ZQ3Nh2l1AesFKTrYCJ+FvJaKwQWWEfMNNaUa9OSAasd26PgPaKaUl1xyFA== 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=Mmh8eSB57711L8vj8mmjqj7R020zmeep5e618hI2ebg=; b=BVafdDQnfAhmTDoePbjLy1gHsE91yQqe1W/q6vfXN/Lw7aRaAlzf+PFqC5zBhobiDm8EWetmPggCUfcvSAFN5XA4A61FmmZ7c0/LWBbTX2TUvv9HGqArTx507d+zN2cZUhFqRJDpSH4oOnjyLflA2l5bD1LWhH5oQmYA7aWjafs= Received: from BN1PR12CA0021.namprd12.prod.outlook.com (2603:10b6:408:e1::26) by BL3PR12MB6523.namprd12.prod.outlook.com (2603:10b6:208:3bf::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.31; Tue, 26 Mar 2024 12:56:28 +0000 Received: from BN1PEPF0000468D.namprd05.prod.outlook.com (2603:10b6:408:e1:cafe::6d) by BN1PR12CA0021.outlook.office365.com (2603:10b6:408:e1::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.13 via Frontend Transport; Tue, 26 Mar 2024 12:56:28 +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 BN1PEPF0000468D.mail.protection.outlook.com (10.167.243.138) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7409.10 via Frontend Transport; Tue, 26 Mar 2024 12:56: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; Tue, 26 Mar 2024 07:56:23 -0500 From: Sivaprasad Tummala To: , , , , , , , , , , CC: , Subject: [PATCH v7 02/14] examples/l3fwd-power: fix queue ID restriction Date: Tue, 26 Mar 2024 13:55:41 +0100 Message-ID: <20240326125554.138840-3-sivaprasad.tummala@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240326125554.138840-1-sivaprasad.tummala@amd.com> References: <20240321184721.69040-1-sivaprasad.tummala@amd.com> <20240326125554.138840-1-sivaprasad.tummala@amd.com> MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN1PEPF0000468D:EE_|BL3PR12MB6523:EE_ X-MS-Office365-Filtering-Correlation-Id: 0bb510e9-8a51-4678-2abe-08dc4d942731 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Z60ia6bAsIqnOYcOTk0dOKxteX1YjSBR9hdIq9SbWqEJ7s5ssxyyBqmBt1g2xR0qdGwIBEiIuP+jCR+KG+9G2/PetXT3moOK5s5Y5KeGUs3A1Y0c6bYl1H4BXZVd8R6fZgl/KWeXesxIBaHDU9NvjeBFTSbrd5YRxgtrVoTj0qqJiDiwsVl9t5oGC4z4RdYcL+0Qf7CPB4lmt4OcMZEcfplYJNpmiLj6BlFvOx25U+TbCcw/Ft6atF0goKUrfxMLMIkn+irBMVmPTVBrZTAcAwQVe7NZ/LIfM5E34GvxlBF3EMZE+3YRxTMVWMlC6bOHhIh7EELDhaceFWpPTjkNp0KwplCLiekAZWRUH+jzJ4NwMGs9z8483ydVuA8He/A5dxtVIU/OUjoQaIl3VpEdNmxy4lnHelyF8/+IFqMvXHoZSTMUY/0BbgxBuo+dgDRAnr4KD43efcld79BLo9TVpwTKrWSdXBlQ2R7m4ZRp+GBqn8aHRddRUEhnxhYeuhZW4TpvRhmduZgbhgRXfvgjICDqZSbcMj6PNBz/m1mup2l7mVm9kjWb8cIQ9mrmxBBNHZvUy+lx8MdRhOY5pduFO7dIWgw+YT8jH0GOxpjkz3jsc7G5PwrJSDcCLrvcgKzpXMrFEAUjGU4HHfchFES/RcPZ5PKD4baZNhHYIjCY3X81iyT7rkaP/jtmBQ8o6RERWgP26Sp/JcJ00RI7l+TP4sc5ocvJk3MqUw9nV0EhEopSsmi5o+ZY9mBAzwWb6mhhnEhrK6cMJ0rd9tP2YrPS5w== 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)(7416005)(1800799015)(36860700004)(82310400014)(921011); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Mar 2024 12:56:28.7331 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0bb510e9-8a51-4678-2abe-08dc4d942731 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: BN1PEPF0000468D.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL3PR12MB6523 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 rx queue IDs up to 255 and max queues of 256 irrespective of device support. This limits the number of active lcores to 256. The patch fixes these constraints by increasing the rx queue IDs to support up to 65535. Fixes: 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 | 8 ++++-- 3 files changed, 29 insertions(+), 30 deletions(-) diff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.c index f4adcf41b5..50aea99428 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=%" PRIu16 "\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=%" PRIu16 "\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=%" PRIu16 "\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: %" PRIu16 "\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,7 @@ parse_config(const char *q_arg) char *str_fld[_NUM_FLD]; int i; unsigned size; + unsigned int max_fld[_NUM_FLD] = {255, RTE_MAX_QUEUES_PER_PORT, 255}; nb_lcore_params = 0; @@ -1680,8 +1678,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) { @@ -1692,7 +1689,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 +2498,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..f34442b9d0 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,7 @@ parse_perf_config(const char *q_arg) char *str_fld[_NUM_FLD]; int i; unsigned int size; + unsigned int max_fld[_NUM_FLD] = {255, RTE_MAX_QUEUES_PER_PORT, 255, 255}; nb_prf_lc_prms = 0; @@ -152,7 +153,8 @@ 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 +165,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 Tue Mar 26 12:55:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Sivaprasad Tummala X-Patchwork-Id: 138799 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 F414243D51; Tue, 26 Mar 2024 13:56:47 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C962140EF0; Tue, 26 Mar 2024 13:56:38 +0100 (CET) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2084.outbound.protection.outlook.com [40.107.220.84]) by mails.dpdk.org (Postfix) with ESMTP id CDC4E40ED6; Tue, 26 Mar 2024 13:56:37 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Gb+VC3hmuO4xtKIyWkZg2ju9L7FE0+mg2WEVuSmGhXZhgXxZtUrNfvK+pLk/90Sq2C0frZHtudpUBu/OJxiFtUYB/5YLPE5CCZzDibL8zZnT5xZxnHsxuT35ocOGY8mdAsKi3eAzda6bamwmFnG6EDue3tYsEn86lcK0P8pWieDb/vii3kAMa3hbi0RX2LpAngg21OyEYupdrAJS1WGJS/0cslJbQ3EbeqfMt7/+vUHzMIgJSskhYkx6gjuhvVfyaR29vCCEJwpLeD7MHEk6sEREyqWmXvaEKS1nzZz49BnfJx5vtUppHpdP95+ol/kWwH2uEcvs+6Cvq1CQ8pQ7VQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Zc9NT7EJc0bDhGp2HQBygNXkRUoySfTR2jPKzNEHDew=; b=j15uYLt1Uz9fPNRRQM1iKbK/CC8M3fleSks2Zcw44vYYxfwX8SxbRsHDq1xMbdeuUBi/qHlZnVrXgMCJA14XeXxSdNpCRxYpqYT8phcZ0moR6D+3yDWzFOozfTepp5lS6aTBExK/PiLl99BmyCI5dfwqm0w583BYAG5d/gWgnnE5JjR01LuqfFLUuO3oZmA8S8Gzy/isUt5zdyxvh+elcEpE9If1KG7GQt24Kz3Ul1xLv8iLrZl4pGnzbLHKDEovc72ub0eCRmJ9VeVyZnQAJh67vY8qh0AOIjr0H5IU2i29wc+cBcetDbXPc9MSujEbAMeKjF6Gp74oDBTkX56WVw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=intel.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Zc9NT7EJc0bDhGp2HQBygNXkRUoySfTR2jPKzNEHDew=; b=T0DPidc0ousnZFp951s4j0DH/i9XjENMtFUs3uVy4JZgeXWH7AL/GN/3s+ZM1ghJJLOXwt2BWqoM9UgFBQ2eD9c2nwR2NM3SkJm7r5OgI8+lksH4SepRoprmZhRRbzQGPgpQ5cgDyWix2d1U+TLAgkR1b5IuSN7f/gvD7PATtHM= Received: from BN9PR03CA0093.namprd03.prod.outlook.com (2603:10b6:408:fd::8) by MN6PR12MB8591.namprd12.prod.outlook.com (2603:10b6:208:471::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.31; Tue, 26 Mar 2024 12:56:35 +0000 Received: from BN1PEPF0000468E.namprd05.prod.outlook.com (2603:10b6:408:fd:cafe::cb) by BN9PR03CA0093.outlook.office365.com (2603:10b6:408:fd::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.13 via Frontend Transport; Tue, 26 Mar 2024 12:56:34 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by BN1PEPF0000468E.mail.protection.outlook.com (10.167.243.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7409.10 via Frontend Transport; Tue, 26 Mar 2024 12:56:34 +0000 Received: from ubuntu2004.linuxvmimages.local (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Tue, 26 Mar 2024 07:56:28 -0500 From: Sivaprasad Tummala To: , , , , , , , , , , CC: , , Subject: [PATCH v7 03/14] examples/l3fwd-graph: fix queue ID restriction Date: Tue, 26 Mar 2024 13:55:42 +0100 Message-ID: <20240326125554.138840-4-sivaprasad.tummala@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240326125554.138840-1-sivaprasad.tummala@amd.com> References: <20240321184721.69040-1-sivaprasad.tummala@amd.com> <20240326125554.138840-1-sivaprasad.tummala@amd.com> MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN1PEPF0000468E:EE_|MN6PR12MB8591:EE_ X-MS-Office365-Filtering-Correlation-Id: 2680a78f-8226-43ba-76c5-08dc4d942aa9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: KYqMWSm9sU+sN9DRke5fiGyiuShRBGA9Ny8sGQoqZHn2mr1dCYv5WZtaUZ7yNKXkCnCUb1ciFLbuEOV3n2ZI9xEyU++VywD9HvrlTCksFcYSPjTfWDUYBzim7dnLa71tT/t7OLkoUcq6gL758pelVvZA6k4V7uP/1ROa5tWI3z+f7c8ajmCQC1jL69F1p1Et6CsIYblwcqnUPB4csKUJSJYcvxNWPdkKeZlnpyTwI3YBEkALcfkCoBW7b1qcq4QFpJndu8yLjs+aITLCMy4r++GEqfLwBAWAJ26mAJc8pqwKP5MZUbuCe9Xg7kV0XI7a2j8epTaNLOSDPeNfWqDQ4ikrSosjWG8HcTagz0L5A7s6v8OZ0xq+zVSAMEcSIum5kFsZQsv0qnta7RcU1regSMyWDKQ6RiyPvMzZjIf0eSs6gfHoZ1KEjYoig2OPt7WhRf+tLelEw92bigqCL1iMZkTBrUGvL+2mW3iEzWYNWQrlZ7WQPPYMdRRpDe5YkHQGO8r064zMzv26WWahruvP8Da9O9S0Yvhze83Fa60oga/Gn0okgdSvbCirQtUwrEzWJcPV8q22urleeV87MbiubXHITJG/2u57HuL0nkWPKIbeJG5qs6P3+WoSkH+iuB+ESfZdtapH3SNhrWMAxdk1fL9kyUs9PYEqWXO3A8ddYrU9GE5JSe7BDWjk37PeTe1L7fDGm6075Z7PFEQ3//0+za87nHX/YSsiaCPfvpAtNTXl/WOMdk6MF5OR33harjt1IPBgWxUwbg9Y83BkNzHgMw== X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230031)(7416005)(1800799015)(36860700004)(376005)(82310400014)(921011); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Mar 2024 12:56:34.5546 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2680a78f-8226-43ba-76c5-08dc4d942aa9 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: BN1PEPF0000468E.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN6PR12MB8591 X-BeenThere: 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 rx queue IDs up to 255 and max queues of 256 irrespective of device support. This limits the number of active lcores to 256. The patch fixes these constraints by increasing the rx queue IDs to support up to 65535. Fixes: 08bd1a174461 ("examples/l3fwd-graph: add graph-based l3fwd skeleton") Cc: ndabilpuram@marvell.com Cc: stable@dpdk.org Signed-off-by: Sivaprasad Tummala Acked-by: Morten Brørup Acked-by: Ferruh Yigit --- examples/l3fwd-graph/main.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/examples/l3fwd-graph/main.c b/examples/l3fwd-graph/main.c index 96cb1c81ff..4b018d1e78 100644 --- a/examples/l3fwd-graph/main.c +++ b/examples/l3fwd-graph/main.c @@ -90,7 +90,7 @@ static int pcap_trace_enable; struct lcore_rx_queue { uint16_t port_id; - uint8_t queue_id; + uint16_t queue_id; char node_name[RTE_NODE_NAMESIZE]; }; @@ -110,7 +110,7 @@ static struct lcore_conf lcore_conf[RTE_MAX_LCORE]; struct lcore_params { uint16_t port_id; - uint8_t queue_id; + uint16_t queue_id; uint8_t lcore_id; } __rte_cache_aligned; @@ -205,14 +205,14 @@ check_worker_model_params(void) static int check_lcore_params(void) { - uint8_t queue, lcore; + uint16_t queue, i; int socketid; - uint16_t i; + uint8_t lcore; for (i = 0; i < nb_lcore_params; ++i) { queue = lcore_params[i].queue_id; if (queue >= MAX_RX_QUEUE_PER_PORT) { - printf("Invalid queue number: %hhu\n", queue); + printf("Invalid queue number: %" PRIu16 "\n", queue); return -1; } lcore = lcore_params[i].lcore_id; @@ -257,7 +257,7 @@ check_port_config(void) return 0; } -static uint8_t +static uint16_t get_port_n_rx_queues(const uint16_t port) { int queue = -1; @@ -275,7 +275,7 @@ get_port_n_rx_queues(const uint16_t port) } } - return (uint8_t)(++queue); + return (uint16_t)(++queue); } static int @@ -450,7 +450,7 @@ parse_config(const char *q_arg) lcore_params_array[nb_lcore_params].port_id = (uint8_t)int_fld[FLD_PORT]; lcore_params_array[nb_lcore_params].queue_id = - (uint8_t)int_fld[FLD_QUEUE]; + (uint16_t)int_fld[FLD_QUEUE]; lcore_params_array[nb_lcore_params].lcore_id = (uint8_t)int_fld[FLD_LCORE]; ++nb_lcore_params; @@ -1011,7 +1011,8 @@ main(int argc, char **argv) "ethdev_tx-*", "pkt_drop", }; - uint8_t nb_rx_queue, queue, socketid; + uint8_t socketid; + uint16_t nb_rx_queue, queue; struct rte_graph_param graph_conf; struct rte_eth_dev_info dev_info; uint32_t nb_ports, nb_conf = 0; From patchwork Tue Mar 26 12:55:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Sivaprasad Tummala X-Patchwork-Id: 138800 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 8879443D51; Tue, 26 Mar 2024 13:56:54 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0B29F40ED3; Tue, 26 Mar 2024 13:56:48 +0100 (CET) Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2087.outbound.protection.outlook.com [40.107.92.87]) by mails.dpdk.org (Postfix) with ESMTP id 03E2740ED2 for ; Tue, 26 Mar 2024 13:56:47 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eLf/MW6JmdNN6QmGKxAeqh68z7YzgMjvSqiZvf4+pZd2WC8D72PZRuk+aqtFdI1Wa7H1yy4plSKOcbG0q05iUdTcayqur2po622shdA4DdodudEKsmSclPLtI2Hcs48Qvsh5pqBrprsrYulomV2Kv8vjweGg2Xmlx3J2QcY6lNMjzbFITRMEu6F9RZUAlmvjSNFGNeczW7YcOY8o+ULtBjT9kMKA1TYQuA9cRABZ+FmssrKenxgbU79GuXDz2dDamZqzeDGAWY/HagaUuyU/ql0BknCgD4oP515qS6z1oIm2IwIREuyirbcRbPsDZBcDcgV2UE6cGc8CrmsMNz7QYQ== 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=Dk323s/FjWY9+Xsjurt3mOL46okCWg+ts+npA9HcNyw=; b=GmpAEZ5SyNhUuqjqxaXxgs723z2Xl0KPUgVeQHhE7YwCNDzvSEbsrWjpwWI/UxnMCmRuZwZvqpdafbCBz5Lb+XV8B+0d/W/oPyGbQRspvHXiVhqUGrGPMaGN6i48dYmmyjyHVC/W7SDjhRFdSdJ6Xu++VWF4+T6Ky53BrHf8Tnsv5z9v9YMwy5m0ALSD5mfdVR+Cv1aVug1PEfg9o7a1CQOZAl1+21kJLvEkhxwXKAooAw521IWEjvbTsQ/6x//Kc9HkZTzSwceJtD2EjkjnZ0s41+YTzrNLrxBRm4Fgc3PifpaZADSFQ+4ibdTqL6eZ3W5F6RiNxlaZ7reozrlbBg== 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=Dk323s/FjWY9+Xsjurt3mOL46okCWg+ts+npA9HcNyw=; b=dTgLCM+U71FB7Dyj51TtrumaB5uOAjCp99RwDvwtG8rIcvcUWJYdXD1OBHCnL1MuOr0yZ4Q8LcHeUpyQ501MiKM0g8a+v3ty6ONmPAY+QntMq8Fqky06BNCXIotco55q8qxdIrpPBy5QzqkgN0G4YrOYLTtxU6Ue3tpAL3S5KIU= Received: from BN0PR04CA0033.namprd04.prod.outlook.com (2603:10b6:408:e8::8) by CH3PR12MB8996.namprd12.prod.outlook.com (2603:10b6:610:170::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.32; Tue, 26 Mar 2024 12:56:39 +0000 Received: from BN1PEPF0000468C.namprd05.prod.outlook.com (2603:10b6:408:e8:cafe::b5) by BN0PR04CA0033.outlook.office365.com (2603:10b6:408:e8::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.13 via Frontend Transport; Tue, 26 Mar 2024 12:56:39 +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 BN1PEPF0000468C.mail.protection.outlook.com (10.167.243.137) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7409.10 via Frontend Transport; Tue, 26 Mar 2024 12:56:39 +0000 Received: from ubuntu2004.linuxvmimages.local (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Tue, 26 Mar 2024 07:56:34 -0500 From: Sivaprasad Tummala To: , , , , , , , , , , CC: Subject: [PATCH v7 04/14] examples/ipsec-secgw: fix queue ID restriction Date: Tue, 26 Mar 2024 13:55:43 +0100 Message-ID: <20240326125554.138840-5-sivaprasad.tummala@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240326125554.138840-1-sivaprasad.tummala@amd.com> References: <20240321184721.69040-1-sivaprasad.tummala@amd.com> <20240326125554.138840-1-sivaprasad.tummala@amd.com> MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN1PEPF0000468C:EE_|CH3PR12MB8996:EE_ X-MS-Office365-Filtering-Correlation-Id: 206e4ede-8d14-4ca7-1c3d-08dc4d942d6e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: XAQ8VGjr3lXRKpnnaozPfglqk1DbXzGemiu3rnxx0IZjt7m6S1zFS1HZwDp87pFeRgtOZASqa4pnzuWwnD1x3t0CavvzJjN6VJZzI1uJ0RZYXc2VGcIsCAmt3xxObDBUVnlIOn0MFGPM9WkCa4zL52+gYhNc+LSPxc8VYiUjcJW8GMjk87xdnbQqgrk1AKLy4xQrr0RORIwNAoY4ZoLpj5gbxOQ3I7jIaZg/npfmIbUAp15nZBnSV3Rbk2pQyuE7TLwZO2OA/SirsIWNTEvDohOkad5P4tSlpJBg1xwOvVgZG1usJV8jQZqe7pGryU1+LXIPH8y/hPpydzZR3ZVJciAY7RK4cp3Ajzw0LE861y327Yo6+El+Zt+E/oTLUWzHWW3+nFvRvu1GhIroyJdyU2h5LytCcqQQLF5E3pLNGLRLVwDxCTt4PufsUh1nIpsfcArvgTBDNagSCSqhMuL5x3iEqtRMrx5MBoil4BgUH0fXwhh4PPx49Gnf8gY30YvJ8sQctezGhH6kLczC+k3HgfGC0sl3Q1Lmex+29U6eQNrtTCwH5OdPqQ8bVgaAtE1o+gvlOof2BAggvWIxx4P9JdWe8QyY5qbtgz13ORaR9X4dtnPihHWQJjNc0H7/tQQmwFMNwBDNvZHVPvKjpt9A5uteJ7RhUgN5ihaZikPGYGAQVVof6v9VJrjv4iYHV/0uHJzBV94vG+8nAeaidG0VewsJ2qwOffEWI8pJxEfINw/ku7a2k3tD97B5ZR78nXmdAI8Db/CAQKUC8li9ah9MYg== 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)(36860700004)(7416005)(82310400014)(1800799015)(921011); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Mar 2024 12:56:39.2144 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 206e4ede-8d14-4ca7-1c3d-08dc4d942d6e 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: BN1PEPF0000468C.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR12MB8996 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 rx queue IDs up to 255 and max queues of 256 irrespective of device support. This limits the number of active lcores to 256. The patch fixes these constraints by increasing the rx queue IDs to support up to 65535. Signed-off-by: Sivaprasad Tummala Acked-by: Konstantin Ananyev Acked-by: Morten Brørup Acked-by: Ferruh Yigit --- examples/ipsec-secgw/ipsec-secgw.c | 19 +++++++++---------- examples/ipsec-secgw/ipsec.h | 2 +- examples/ipsec-secgw/ipsec_worker.c | 10 ++++------ 3 files changed, 14 insertions(+), 17 deletions(-) diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ipsec-secgw.c index 45a303850d..782535f4b5 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=%" PRIu16 "\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,7 @@ parse_config(const char *q_arg) char *str_fld[_NUM_FLD]; int32_t i; uint32_t size; + uint32_t max_fld[_NUM_FLD] = {255, RTE_MAX_QUEUES_PER_PORT, 255}; nb_lcore_params = 0; @@ -1070,7 +1069,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 +1080,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..c9c43ebd2b 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=%" PRIu16 "\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=%" PRIu16 "\n", lcore_id, portid, queueid); } From patchwork Tue Mar 26 12:55:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Sivaprasad Tummala X-Patchwork-Id: 138801 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 2C4BA43D51; Tue, 26 Mar 2024 13:57:01 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 45AD5410DD; Tue, 26 Mar 2024 13:56:51 +0100 (CET) Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2059.outbound.protection.outlook.com [40.107.92.59]) by mails.dpdk.org (Postfix) with ESMTP id 6D48141060; Tue, 26 Mar 2024 13:56:48 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hCKg2D4nLOHuSzDp45d1O8N1lX3t53/DaHEdUy5d5Rikyb6KsYz4GCD9GBkzTyeKxkLvnwEBCwuhdZNFsk4dZHFGH6JBfRXpwbn6K97iTZtgUMu7XRO6fzjJSwX6i9/ZBt+jU5vXV0kOuHH3PDB1aE/exb5ozNvRdRBVUx7q5wdUnnQQczyQkR7MpCMQvKfliBYU0cUoM3FnMYt0hyUn2+bY8iHMa38HrITfEYvHG7hh1je6AMGCnL3JC4V3yhBSv1ajAiTGjf32/3NruyhXJjV3cHXo+aoAmwsJLv3oD+9c2fiQb+vfWihJEC9Qx5XNjDwcArnZKacMQfq+v1397w== 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=dZYT+1yB5efFXrSo0WXRJmDmDr/zqly3szx85WuWMhQ=; b=Aw9clJD1dW6K/BBh1duSTrn8EyRxOjHf4IqzTdv+gkEE4nznk4uxcYRv/dUa5WeevfsSpfA8E++JYuf9WdHleWCVtZlmBS2NThL1cM2fwlrdZMhDTmSiS+vyTipiOr/WIjuwwycvK1crLKlc9VKOxCiF/JrabcJQSBVsfJ/jy7XK12v328m2Zapdk+wr+Hnt9Me+ZcTz1SIwplQS7K6oVW8T0VCfxPbDom6hgMiwKZABC6ZbNENnqVz/pb7ozvoULxSfJ6CHF5VH/db5Lu0sF5dl61nfGL9LkMLk3idfDDMMNxuNS5y7wWIkRwc+bdJbF4BsHbdbswEd/56CLbW0wA== 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=dZYT+1yB5efFXrSo0WXRJmDmDr/zqly3szx85WuWMhQ=; b=qByhrm3obhHBbR98KGWDRib2g0v2V6dek7FLJaAKvoAChK03gcg2oGWXwvyFEdV0LBM6AC3ukXEw0KoCyDNXdN8vQIduc734XjFqgd0Ar6sKcixs6GyhFhPNxtj33VN9wO/9ooTwwMb+ZHURdE/TgOHnfz6o5z8PCUrqNMELhvY= Received: from BN1PR12CA0001.namprd12.prod.outlook.com (2603:10b6:408:e1::6) by CY8PR12MB8244.namprd12.prod.outlook.com (2603:10b6:930:72::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.32; Tue, 26 Mar 2024 12:56:44 +0000 Received: from BN1PEPF0000468D.namprd05.prod.outlook.com (2603:10b6:408:e1:cafe::83) by BN1PR12CA0001.outlook.office365.com (2603:10b6:408:e1::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.13 via Frontend Transport; Tue, 26 Mar 2024 12:56: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 BN1PEPF0000468D.mail.protection.outlook.com (10.167.243.138) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7409.10 via Frontend Transport; Tue, 26 Mar 2024 12:56: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; Tue, 26 Mar 2024 07:56:39 -0500 From: Sivaprasad Tummala To: , , , , , , , , , , CC: , Subject: [PATCH v7 05/14] examples/l3fwd: fix lcore ID restriction Date: Tue, 26 Mar 2024 13:55:44 +0100 Message-ID: <20240326125554.138840-6-sivaprasad.tummala@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240326125554.138840-1-sivaprasad.tummala@amd.com> References: <20240321184721.69040-1-sivaprasad.tummala@amd.com> <20240326125554.138840-1-sivaprasad.tummala@amd.com> MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN1PEPF0000468D:EE_|CY8PR12MB8244:EE_ X-MS-Office365-Filtering-Correlation-Id: 802ef878-05d6-45e1-d19a-08dc4d943077 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: rnb8tBN5KiDWTPqs5q4ZmXH/E1NDiwIR4PgnteKoQ23lOSMaXqJYoLFfsJtfjWuxXWrDLLsg9QRa2peTqbgm8TDG+6qgCipZO4E/BXST+uxsXv4GhpK5ZnTda4GifVA/K0ikLd0Ajf3HaROzDUY+Ql+PuW/Zcau0ReIkc/208qmGQFfDE2dyfiV7a1Au/H4yqur6ctjfX+VJ6MDR5280XgVXH57OLPJbLQhpmCrA/nmSwjZFOubYL2kvew+DlsdcvYjWoVDefYYPZ5GBPCX6+7g/ebkMqsIz8i6mQRm9kp679j3v8D5i0k6mbEQaTWs5IKB5gs6YVesxGi9FgEH4/dNmJi/z9j+LTXU3JZvZaZFrF+flHRlrVCduzNYIGNZ0fk3Pj9UxfAPfOwrdeFDNUthjXqmENAbuHeAHXpuyafJJlnI9SJTs3LXJElaS7dxPzjYlm2C5Bx9mNoQyDnJ5DA2mCsgH17XBrMS+sZ6f34ZkHkl6OwZfRU6hwboyPIxCHb3nvF/1ySdJcussD2rGFvziqeU+XZ12i/5HDWym8VBk0y4A2MtR9uk9e7nmk9Q1bc36eI1kqT/xUM0LlGn3qLAdzIZU/SHldxNosGrdB42gm4sbYehlKZcEtAnDDRx5x429Ut7Bac+oqs0Ba+ZnXirDCgqNXNP2ywZm6UQb8z8U8tdirLDU0gZK9p6D7tIP0bF2sIuhN/EWcUqxhEyFCS0UBT2B8l9VwP8z9WWmpLhME0rNuesNIx1fH7gJm+e0rKjXXEANf9OmwgxTyDmG3A== 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)(376005)(7416005)(1800799015)(921011); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Mar 2024 12:56:44.2956 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 802ef878-05d6-45e1-d19a-08dc4d943077 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: BN1PEPF0000468D.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY8PR12MB8244 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 | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/examples/l3fwd/main.c b/examples/l3fwd/main.c index 039207b06c..47baf464e2 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)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 = @@ -500,7 +500,11 @@ parse_config(const char *q_arg) char *str_fld[_NUM_FLD]; int i; unsigned size; - uint16_t max_fld[_NUM_FLD] = {255, RTE_MAX_QUEUES_PER_PORT, 255}; + uint16_t max_fld[_NUM_FLD] = { + 255, + RTE_MAX_QUEUES_PER_PORT, + RTE_MAX_LCORE + }; nb_lcore_params = 0; @@ -532,7 +536,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 Tue Mar 26 12:55:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Sivaprasad Tummala X-Patchwork-Id: 138802 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 CA62C43D51; Tue, 26 Mar 2024 13:57:08 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BB16B410FC; Tue, 26 Mar 2024 13:56:52 +0100 (CET) Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2081.outbound.protection.outlook.com [40.107.92.81]) by mails.dpdk.org (Postfix) with ESMTP id B688F410E4; Tue, 26 Mar 2024 13:56:51 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LfelOaxlqT8f732gOBQ7nyJzvwsQPxRZyuQVqW84/fLqwn/kcM8mLN6CDKu4tt6D050KSQaJSfiBH3aUY8Ng/uW4E0f2gE9PEwk4zop+Iz8IRlYlg9PTjJqiAnRiQvapw4+XEoi0dCWNFGh4uzxMDOsVqBzmeygkks+ZVELq5TM25U8+TnlwqmKyoex0ZZz7R3RTNDA40uk2odwpkYJjQ8jRG5R+JktH97jjrTKqMeqUHQppqNfMkaCBc2FYFHiVrSIvbRlbfS2sZAxZys8d3gbbZsukWzEcfGQ3xBEGJ1a/GbtgACLOiUDjsIOIsoT+ofcMcTWhxRLzikYHhtO1QQ== 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=eWxD+OuPECvZ8Ex4gp4iRjJ+M5uJeOBkqsVtoYyd7Ec=; b=JtO133XrEWh9/LmvtnyAYOapr8mfKbjit29i379sOxp5IalXb1h/EDV8kJP7XDo/o2AzfuLqRkm/VtGkIqmAss+c7e1SP+Nt0FrTxtG5874u/1rOH6gIg0kBm6a9daJusGc1u1pDq2GmnLMkA1vy+fupCTGG3YFmEGoH8zmQvKwAIg6Y0tSwzgrvc4xNTdZ1X6p7OXLzaj3M95uKc5oVn7uV0HJWYbdFPN87LrFOqGanIXjknoAuQLp9ahJjfuBskvPduvkjT01FxSQ0S3920WrtRotasq2JMuTWFCFI6STuDx0h/zL2MfRvpJWY2N8a37xqmVJpEwpDNQcDNuI1BQ== 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=eWxD+OuPECvZ8Ex4gp4iRjJ+M5uJeOBkqsVtoYyd7Ec=; b=4xM1F1Uss2FoJ1eClZ0lu+WyqAzmlJ2J4JP0qVWNf3AIlKUraOTIW2s21ZjMHP0un2Q+eLf8RsG0qtj0zBwG9TNjSaYlYhBIo79Fh3JcaiulH6MFYUdeIGoXuv4tI1eJ/M5mcbbLsyIWEE1JUE+fqNkGqME6F1BPJ+WUG5eVjzk= Received: from BN8PR15CA0062.namprd15.prod.outlook.com (2603:10b6:408:80::39) by MW4PR12MB7465.namprd12.prod.outlook.com (2603:10b6:303:212::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.32; Tue, 26 Mar 2024 12:56:49 +0000 Received: from BN1PEPF00004687.namprd05.prod.outlook.com (2603:10b6:408:80:cafe::63) by BN8PR15CA0062.outlook.office365.com (2603:10b6:408:80::39) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.13 via Frontend Transport; Tue, 26 Mar 2024 12:56:49 +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 BN1PEPF00004687.mail.protection.outlook.com (10.167.243.132) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7409.10 via Frontend Transport; Tue, 26 Mar 2024 12:56:49 +0000 Received: from ubuntu2004.linuxvmimages.local (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Tue, 26 Mar 2024 07:56:44 -0500 From: Sivaprasad Tummala To: , , , , , , , , , , CC: , Subject: [PATCH v7 06/14] examples/l3fwd-power: fix lcore ID restriction Date: Tue, 26 Mar 2024 13:55:45 +0100 Message-ID: <20240326125554.138840-7-sivaprasad.tummala@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240326125554.138840-1-sivaprasad.tummala@amd.com> References: <20240321184721.69040-1-sivaprasad.tummala@amd.com> <20240326125554.138840-1-sivaprasad.tummala@amd.com> MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN1PEPF00004687:EE_|MW4PR12MB7465:EE_ X-MS-Office365-Filtering-Correlation-Id: 26a2ed49-7024-4d55-ce56-08dc4d943366 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 8vHt8uIhyEb//X7yop69FcM/YYSy8DxFm/cKmMvJQ0V3CNKO3Dkcz18P954uwQbS7nUfZyjy91nP2Oc8vfVNky3mSexIpnRPU9d+4nxbY2r3rgzT6Kmkr/kvKV+ss1U2nMKOgQE9ddPfs56TP7sBGn72QzhLhFi/jiX38xBPuXq97W1NcdNSdNCbRG/wVkKxqZABea0dNYctxbpX1h7RQG2rVGBrpXmFxivNMPrRFIWhJq50LJy21k5Bou4G4SzrhR4jEYhKP65qf7IjolMT9lV+MamWrIvOuWrp4FdUpv9aEj37MYtbpdjx4Z6lVHUe6FA75jPPlhnlw0DKAug+6w7Ho44faRL4+zCP4z7+X8lDGe3VBsArc//AnDMaj4c5+yIhluwZDQ+81KTDj7rw8mGV5LMUI91C9StItsNutZBOxJHhOEX5sMBc6g4kQS87KoTos/F8lIMyshSXoCN5gRHvdPqgDcoo7f+dw98DpFJLs4SS7i4uQ0VOBWte774ZolttUWBrRZFqVTioujvKu/GFZ+bZ6j2m/FmwuyqFxyfj76VlMLFpkVrQkEoQFs1K27am9S6t2OkR1eBd3oX+224iMr37I3Iw0V1H2TtTQj1zWONIDQaOSqDSMZXnF/CQjzDHk7u7sw2Znc7YXIdUQqFxrTkcZQR/Nkp/1iZCZ7npkCuuslbYAabXK3UDzdHampCDxQsLw1ZLRd+TT4q9rn2YPRFrX1k23fhr7l3xQ+UkK4ZSO6Ebj4q+NZhjDhoYUpnG2whNsoGDinXyBG74rw== 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: 26 Mar 2024 12:56:49.2173 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 26a2ed49-7024-4d55-ce56-08dc4d943366 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: BN1PEPF00004687.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR12MB7465 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 | 18 +++++++++++------- examples/l3fwd-power/main.h | 2 +- examples/l3fwd-power/perf_core.c | 11 ++++++++--- 3 files changed, 20 insertions(+), 11 deletions(-) diff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.c index 50aea99428..eac92ef875 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 = @@ -1658,7 +1658,11 @@ parse_config(const char *q_arg) char *str_fld[_NUM_FLD]; int i; unsigned size; - unsigned int max_fld[_NUM_FLD] = {255, RTE_MAX_QUEUES_PER_PORT, 255}; + unsigned int max_fld[_NUM_FLD] = { + 255, + RTE_MAX_QUEUES_PER_PORT, + RTE_MAX_LCORE + }; nb_lcore_params = 0; @@ -1691,7 +1695,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 f34442b9d0..fbd7864cb9 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]; @@ -132,7 +132,12 @@ parse_perf_config(const char *q_arg) char *str_fld[_NUM_FLD]; int i; unsigned int size; - unsigned int max_fld[_NUM_FLD] = {255, RTE_MAX_QUEUES_PER_PORT, 255, 255}; + unsigned int max_fld[_NUM_FLD] = { + 255, + RTE_MAX_QUEUES_PER_PORT, + 255, + RTE_MAX_LCORE + }; nb_prf_lc_prms = 0; @@ -169,7 +174,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 Tue Mar 26 12:55:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Sivaprasad Tummala X-Patchwork-Id: 138803 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 8F66843D51; Tue, 26 Mar 2024 13:57:18 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A357C41109; Tue, 26 Mar 2024 13:57:08 +0100 (CET) Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2061.outbound.protection.outlook.com [40.107.244.61]) by mails.dpdk.org (Postfix) with ESMTP id 2D42A40E28; Tue, 26 Mar 2024 13:56:58 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KQ01B0FtotXcj+DPd8t8VE+qJffxLTfOuKEyx97Lr8eLaIAckEGm21jwYxB/6H4ZcAxGJSpQaFo9fUa4jvx0Um4k2B2K7UTZ+uRGHY2l2OE23kuwHwoSXkQdxWSb7oJ6p1jifPxfVlg4Eh627ypiaXt3Af1rdQzM1O9bWuKhzD8lx5qjm+xaClZHyB9k+yvjkY3jLC6h6KYWxNIaH9mvQ8txcWMhrkvtU2gM1xkj/ocjXyBsBfDKtGC13/TdstIWAU93SfoAWgZXXLkWlhHLBkscs4/a8JybLUwr2ep6EF7njwXJemM3eNg36smv8LADag9WvbVhCtYAckBXqwYpEw== 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=NGQsTgnw8v1k66wultPJhFtCE7E/calaXhg+Ad57HMc=; b=XtoS2saZwZJoHXuTyezJfv74u2gPkgce/d3RvmHeu7BvCL0ZPl44xxcaiXGnFhkhkMuJTYk259dAIFK57eAtZepgDfQWfgTaIZSBywspoM1Dccq0xVrNlK97hP8WLnrhrufaOui0LftXFAHHwA/a+M8qWOOhqOBUI0oqxxR6h9ex83Xw69Sxn5ysSUWerx3QkJU0iAsp8Vyrla6zR3RXAKE+CHHF1jx5IG25EtfgtSecWIWHaDyhjwU3QhuJDv8GcBbFbzDfRGKLOQtdm0J4MYztUMTaFTWVTRIVSudKa/KF0mPLPvOoG3cU/FbV7ABJm5fSwu0hPfTRd2Z0yaYwAA== 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=NGQsTgnw8v1k66wultPJhFtCE7E/calaXhg+Ad57HMc=; b=VQGENfAb2URasbMXlOQcf73w/jrpuNa5ISQcmB54m9FPl+pJfZOsBxWYPKbs7kYYESGjzrwaN9HMIfIN8DCqjyuprL8Y4ngO6NnmFISGLoHl4SoHZjgByLh1mGc7CshGseTW2VkX2CcEEnMNS0/1IZbYafFBRVLZRnXq8kW1UpQ= Received: from CH0PR03CA0441.namprd03.prod.outlook.com (2603:10b6:610:10e::34) by CH3PR12MB8233.namprd12.prod.outlook.com (2603:10b6:610:129::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.33; Tue, 26 Mar 2024 12:56:56 +0000 Received: from DS2PEPF00003441.namprd04.prod.outlook.com (2603:10b6:610:10e:cafe::87) by CH0PR03CA0441.outlook.office365.com (2603:10b6:610:10e::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7362.35 via Frontend Transport; Tue, 26 Mar 2024 12:56: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 DS2PEPF00003441.mail.protection.outlook.com (10.167.17.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7409.10 via Frontend Transport; Tue, 26 Mar 2024 12:56: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; Tue, 26 Mar 2024 07:56:49 -0500 From: Sivaprasad Tummala To: , , , , , , , , , , CC: , , Subject: [PATCH v7 07/14] examples/l3fwd-graph: fix lcore ID restriction Date: Tue, 26 Mar 2024 13:55:46 +0100 Message-ID: <20240326125554.138840-8-sivaprasad.tummala@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240326125554.138840-1-sivaprasad.tummala@amd.com> References: <20240321184721.69040-1-sivaprasad.tummala@amd.com> <20240326125554.138840-1-sivaprasad.tummala@amd.com> MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS2PEPF00003441:EE_|CH3PR12MB8233:EE_ X-MS-Office365-Filtering-Correlation-Id: 1f86c9ef-a7c0-42b2-bb82-08dc4d943751 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: c2CcG/91ZHkQsRBvRTFavsQ9+rxBDxGzOiVR265+NpGaIvkdeNHI8XauYQiD4rsSTfIAWDQ9MNNTUcHp/Lxz1uZtGweDrcX+ou3+S56DGy02JiITQgtin6TAvCiFc8qNLmYZL8nuNEseCzZ9NjgnK5JmJ/UkaicQjEksAXf5fVWrn+Taqm025aN5ZvNia1oAb4ljpcn0itELcArBVz1cMrpoDM/n5DnJl7gIe0nuN8/+kdhxPkZ23gXfxdYvT5CxygLJMkYV1iX7WEXagbXVIyyrh/PQd5Us7eL5cLVuFm0sdqh6wqdIvrw0Z7aykwrKhiNW1VoM5mQFYUorF+eusjxf9i9Ke3G9m4eGsvMNtJAb/EDrablXabGzda3Im8XiNBEby5CJ3FMqieKOkHqSB7pCLmdVwMedmNf6vA/ImisoLvMAeV2yR5nr1IhmJ0qcYv47IMNEjbzS3w/U7tj9HAxoUYK/4DJ8kh5owIXTfymvTxBnvCEe0GbecgkDM8BvLZoyrVEdgsQ94FDfwo6cZV5eoPxl3XFEor3i9KjqLuCaMypxR0Hlth3Ey94SpcSPG1/WltOmLxRyZChAoq6km6YTAOQJ1okMet8FdYBO8FVYnOV5DeygRvIO0kTSbkQ6Zp1TZr7kr3QZfp4WddnTR+06YaalPzwu3lugOewLGSAH1wYtbbEfg9ANS/3iwL7nRdVW1a6pRXnXbUG1QPUBPVGulGEm+xr+oU+JRFQFzfjit+IojzhfWCNP7/dE8D/SouCwkeRMMPJZ6bKuwIlN9Q== 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)(376005)(36860700004)(1800799015)(7416005)(921011); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Mar 2024 12:56:55.7588 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1f86c9ef-a7c0-42b2-bb82-08dc4d943751 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: DS2PEPF00003441.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR12MB8233 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 4b018d1e78..dbc36362c3 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 Tue Mar 26 12:55:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Sivaprasad Tummala X-Patchwork-Id: 138804 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 482FA43D51; Tue, 26 Mar 2024 13:57:26 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0E73341141; Tue, 26 Mar 2024 13:57:10 +0100 (CET) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2075.outbound.protection.outlook.com [40.107.237.75]) by mails.dpdk.org (Postfix) with ESMTP id 7348F40E09; Tue, 26 Mar 2024 13:57:06 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cik1mL3gIi+3oHw4Yz7RTzeim/bJnyttcpV4KhhCvQA62K4dM/6qoC6F0veja3pPbKAvzIDpAtlrrIHPDnlEAYI+lREoUjy/ngLZfqy6lRZm8zt8AsgqKzV/SEwnmBR4Tyk8y63cmSM54eLLd3GrlT6FhhXGBG9G4I+EOi6mzGjlvBlE/Tiall4Pozp9NX+3b7CdFojoLzMah0jzOhd7slGOSx6Xwimd+W4DGOz7M3VuoFOY/viB7IM5adTsHg0mYFsWVnGOgapBR0hBXYkFmS7Qq0egyRnIVBYeGHn6WFDXBaVESpLMOlVgSrzWuUScorDDhQuGZeQoUOyUv5v1jw== 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=c5Wyvs3nPPdiKXM5ZKWrwKAz1v4DyHuQWWoGAeE6Ssk=; b=X/RzWNazpxg2pe39K6d2k7klt9Dj56mFBRfgh7SW4GD0OwVS46kXx1267gUD7caSYdW75pWvBZk4HhUo5wj99fb8iT22SeI5sjYiixD6cJ6AqiSRX3AKVFjhw91JiKpOmY/cKaSnpc7sVTvxGf5NiYNiHsvJPCOkzMTXcXKWaCZHVer8UR2EDzcHLAqg/nCjWgWaSWnD3SFIOeHOjt9LaoANPy/io4q7+f6uiqZ6XOyNp1Axg0Y3b6/KVK8XYT2GoJQR7myopDbzDPb+4WwOqmhbPW56BsBedcWUoGb485ORh9i0CSoO7D+xXQcAyxKLLHj5dz2vsf1m8cNTZRsY9Q== 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=c5Wyvs3nPPdiKXM5ZKWrwKAz1v4DyHuQWWoGAeE6Ssk=; b=hE7lJCWwhml1Tf8yvbJ7cn7a1Snho7k/olV1F7EGJ/xNF1eFqDzwuIUyIirqbMN/OzNicL1loZm8VMNviXbt5dxFLkDQ4Erc/8+Ag6wor8P68lz8DrLAA3KpKn7tWTWxenHsleDCUZ06T1/5cQq0cOucIMlLw0a6pMvuy4/eKsc= Received: from DM6PR18CA0016.namprd18.prod.outlook.com (2603:10b6:5:15b::29) by MN2PR12MB4421.namprd12.prod.outlook.com (2603:10b6:208:26c::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.33; Tue, 26 Mar 2024 12:57:03 +0000 Received: from DS2PEPF00003445.namprd04.prod.outlook.com (2603:10b6:5:15b:cafe::47) by DM6PR18CA0016.outlook.office365.com (2603:10b6:5:15b::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.13 via Frontend Transport; Tue, 26 Mar 2024 12:57:03 +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 DS2PEPF00003445.mail.protection.outlook.com (10.167.17.72) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7409.10 via Frontend Transport; Tue, 26 Mar 2024 12:57: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; Tue, 26 Mar 2024 07:56:54 -0500 From: Sivaprasad Tummala To: , , , , , , , , , , CC: , , Subject: [PATCH v7 08/14] examples/ipsec-secgw: fix lcore ID restriction Date: Tue, 26 Mar 2024 13:55:47 +0100 Message-ID: <20240326125554.138840-9-sivaprasad.tummala@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240326125554.138840-1-sivaprasad.tummala@amd.com> References: <20240321184721.69040-1-sivaprasad.tummala@amd.com> <20240326125554.138840-1-sivaprasad.tummala@amd.com> MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS2PEPF00003445:EE_|MN2PR12MB4421:EE_ X-MS-Office365-Filtering-Correlation-Id: 8fa50ca7-2832-4c20-0bac-08dc4d943b48 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: oRltKVBsR7W9DVio5GiVJH10tQu1O25C2Rgnwwnj5jam5zsnAn6dNe/CjRL3bQosJA7sV6Qd91Vv0G5eEiTyYmvcmdvjV6HFdg2xmIENnHGmZe3L5hI8eozKw4M8D+KFA8wFGw0LlMhN37OnhOXP8R9RyNCkQCc3dYPtm/ngrpNhUprT3IhRPytR/NE9bB6d61s/cbR59HnnkQAUEcGvLO0QogGjRaab18SeqTJmcREGF94Lm8ZqE6UiB0cOjRnbRFMCzDRz+w6nqlP1INDX4Q1dKVFsZRPztR0BMB/RcaAitOnHrQkhI0d4AhE11tu6oS+UEhYE8VyFS0Pjr694u7wKIbiCwyoiaq96zq9uFTYAqDyogEIiOUm2l+PIceBnUVjcjkLGuBOUoFeuZj4wiIHxNmnwXQQVNEB7A18nwGbIEN8MDQwHkSH19eFKSevayKHL3avqaRIsHR8MnEirLFEef1914En1y7t0W1/oq6NkUcHggXWCHinc5X8BvgIhSpfGP9sb+JN07mCytM/ef7yKZZOz0iUWTjXjdft+r3vn/R/wH1yCUlcDeK9Fsr2r4Je4low8gaQ63U1Dh4zXe464pYLFqm33PCwFfCU6MQjWSlUgQ6B9t6jbM6kKzX9uKAbhH2u1xpaxyG61HfCzdNiQcTfDaKAosJSXdgF0H+cicg4GyVaK3JwPZPw83wO6QDd0Twl1g8YeDNLCSSxqFxaGoUvuJhq4c6nwLnmGYYDcoNrqtiFflQz0cqU/50he/F72MZSh5a7WTzmI+BQ2bA== X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230031)(7416005)(376005)(82310400014)(36860700004)(1800799015)(921011); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Mar 2024 12:57:02.3906 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8fa50ca7-2832-4c20-0bac-08dc4d943b48 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: DS2PEPF00003445.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB4421 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 | 21 +++++++++++++-------- examples/ipsec-secgw/ipsec.c | 2 +- examples/ipsec-secgw/ipsec.h | 4 ++-- 4 files changed, 17 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 782535f4b5..2d004d82fd 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; @@ -1048,7 +1048,11 @@ parse_config(const char *q_arg) char *str_fld[_NUM_FLD]; int32_t i; uint32_t size; - uint32_t max_fld[_NUM_FLD] = {255, RTE_MAX_QUEUES_PER_PORT, 255}; + uint32_t max_fld[_NUM_FLD] = { + 255, + RTE_MAX_QUEUES_PER_PORT, + RTE_MAX_LCORE + }; nb_lcore_params = 0; @@ -1082,7 +1086,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; @@ -1918,7 +1922,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 Tue Mar 26 12:55:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Sivaprasad Tummala X-Patchwork-Id: 138805 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 C79B943D51; Tue, 26 Mar 2024 13:57:35 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 086C5410FA; Tue, 26 Mar 2024 13:57:15 +0100 (CET) Received: from NAM02-DM3-obe.outbound.protection.outlook.com (mail-dm3nam02on2071.outbound.protection.outlook.com [40.107.95.71]) by mails.dpdk.org (Postfix) with ESMTP id 82D9B40E72; Tue, 26 Mar 2024 13:57:13 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=G5r7VHTJOk+h6lYxariBmdCluPwOOBgEyw5hl1t6ZWJu+OEMzMFUF4GU/WvlqUp9AUBwIrMaSNZrfy6f9xUjz8DlD1iPjrCwWGiSR6tywliSCEtd/TcGkyiXbQjsg18cBv2mXricpiN6vTBl0Eqg9cpeQbxz7ZZdFHkC2J36L7fDpErQj2YAEgC7XkmZVHp46xoR66vfINOGuqytuAwQ7+L79TMwc+GT3nKZnUsikqn82l7Bj+UYb8lb3x3ouoQg/BshiAjygLy8SF16Xy2F3D965ye3QO9DA4eRsVjI3dKw96wW7l7U1jVMIOzYnUDIFgIGH/6ln4Ltujf1V0Yh5g== 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=yOfKQn5w3dNmsAQwL8ptbd5zP0Cnzd+3reG+O1DcbrA=; b=McT3ev2o6nsDfGDJTPnUHmsIZaMpnhapmB1cVQLKMMu/2j2q03//IM+rHDf84X/gvpCQvqf1j1Isi9lv1uKhBwelDFg9DTutICT+mCtZCFPurTZ/gEuKapRoZTI/grQR+GIBhMDKQZy1p8wpPxqNjApGSoQSVscw2Zv3DytyA+Psw44NdYiG757ODSuGvKRNB7ch3SeDosV0p58WtQ++kkV5k4WFqtIBSKHh0shDQD/HWSSxGrflTvcvZZeJ27qb8XeNUUkk6jOvd2qFa5hKnOATDVABPLrcVuUUc7XKAsAPycG6md5EstxDPWBP6z7cyUdEtRF0hwfapJzuF5xv5w== 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=yOfKQn5w3dNmsAQwL8ptbd5zP0Cnzd+3reG+O1DcbrA=; b=SLSnxpzBUdXTfcAZhvMCRYInm3WbefDW3npr6BYZZ61jnH+ZKisr/bsNty2+6Oy0Ex+S+mtIzB1mE7Nszhu4xDZ31lU9D8hhWPVPA7PhYpTyj18PMGSt4Z5hi1h36mLDOKmUU8UY88H/qDC3fyuM1U/8QXIJXVw8WII12GSDpbM= Received: from DM6PR18CA0023.namprd18.prod.outlook.com (2603:10b6:5:15b::36) by SJ0PR12MB6856.namprd12.prod.outlook.com (2603:10b6:a03:47f::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.33; Tue, 26 Mar 2024 12:57:06 +0000 Received: from DS2PEPF00003445.namprd04.prod.outlook.com (2603:10b6:5:15b:cafe::ce) by DM6PR18CA0023.outlook.office365.com (2603:10b6:5:15b::36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.13 via Frontend Transport; Tue, 26 Mar 2024 12:57:05 +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 DS2PEPF00003445.mail.protection.outlook.com (10.167.17.72) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7409.10 via Frontend Transport; Tue, 26 Mar 2024 12:57:05 +0000 Received: from ubuntu2004.linuxvmimages.local (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Tue, 26 Mar 2024 07:57:00 -0500 From: Sivaprasad Tummala To: , , , , , , , , , , CC: , Subject: [PATCH v7 09/14] examples/qos_sched: fix lcore ID restriction Date: Tue, 26 Mar 2024 13:55:48 +0100 Message-ID: <20240326125554.138840-10-sivaprasad.tummala@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240326125554.138840-1-sivaprasad.tummala@amd.com> References: <20240321184721.69040-1-sivaprasad.tummala@amd.com> <20240326125554.138840-1-sivaprasad.tummala@amd.com> MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS2PEPF00003445:EE_|SJ0PR12MB6856:EE_ X-MS-Office365-Filtering-Correlation-Id: 4fa9045f-8080-49f7-0756-08dc4d943d4b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: rBNoX7g9+Oia9Ltsv4YdKgXLgjy8xJTb6Gf7umsN9qvK+FDPyZrZvSe5TNNzyAyc0Xbbxr+SjeaDM0Vpc7bPGib0pmDLrLfJLFupVL+TFRqxDW8oT67r0jx+sgawg9f8/HnNrKVYuhA1NLrMhCji4wbQZ/FwTfZI0ENMQft3PyZd7CPRnCHywkS1NI7HEHQkmgQt117e5Af7J6wRuJw5xTuc/9dQeV9ZOeNMOzeUY9UZdL4YRA/3u0lFygPFiHbd/qrL/jPstcfQnLdHFhQlKgGWVl8C9BqUNqBMxsU+feIoZ0uGTOarc6hR1bZ+Np+YzQnZFwPZHqM6n/xBT/H+AGrPCHyJ7fSuPFiS61s45UOvtyKo1iekW5CyZIF90/djARMxaQGJ+7fz/FP4c497QARHMHiStCVgNxmNxu1OaSnN8mFo46xUv+c+ELgwqfCo8t/1omg0ivznt0bPnqJYlrxGpwV8CmBTGQACOlhBA93sG/eVeUw4SnsBaFgsQdOyJN/vvSBdb3etQndnfqh/MBxm8vOy0uP1qiP7ASva6pa049sOqZW7wIXv2Y2RROlFVfPor8nR+zsQLTcWNaWOPZkPPi7QtGu+fPrTmSTDEw6YIxkbzAAirHkDLzHOabE6qnboy9ZarRHEjiCyQ7rAuRVvCfAojvaa93pMs1EyZ8rAapkGZuXfxyjh0XtjwQ/2TORRXq+uteNadPY9as5oreBIbj0gwyrInYro+oM56zCNVuspkBHHhxYuGmTABvPV7QnltxWfcXdNlauRZrbqrw== 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)(376005)(7416005)(1800799015)(921011); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Mar 2024 12:57:05.7812 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4fa9045f-8080-49f7-0756-08dc4d943d4b 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: DS2PEPF00003445.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR12MB6856 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 Tue Mar 26 12:55:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Sivaprasad Tummala X-Patchwork-Id: 138807 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 3E96443D51; Tue, 26 Mar 2024 13:57:49 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B246A410D5; Tue, 26 Mar 2024 13:57:28 +0100 (CET) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2043.outbound.protection.outlook.com [40.107.94.43]) by mails.dpdk.org (Postfix) with ESMTP id 3DC1140ED1; Tue, 26 Mar 2024 13:57:22 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=X/j80vUp/axWYvJKJ8/NFb9FwNGsToXdUMqKpSR85sinC641L+zZMrRoTuS/pag2J7964pBPfw6szF+fNsNxlFPQP774I8OIZWSAXvKiJ1d9qpVCQ5mNM1q0n+6ORkq1v8M+8lCEraMjW015ub9iUkff7ChAlbGoe2LuTXAwqv5dGBoSxKk7TzpKq14Xm1ip+Z+BWFalz7HLk5hYva8DLkpWSVsEa6BofMYsKgENyV0NBvOkd3NIS09eKojM96ioTxjVUb2SNGnk8wow8m/m5E6W7UnvMLcyDmDulzZW+oOBeTfhBtleRLIYaP459aaxaX4Fih4oFdo0xau+FZ4J5Q== 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=80os0U90XmUqynG7ZB7T5YeUoEpFWtUMTRoU6jtjkP8=; b=MEYJna8QZoRHmTASD0wk2Jc6cWAEIDzo+dLPJ9kLLn2zURFbb339wn87swXbZmYxfLK6+onAu+OLBIn7+WKo4iPgN9X5hGsISccxT+yG85fl151DLNwvgrzbUlq/eSo6EGKMUrqB7+SNaxbtdt5p0hvVuyfDYmNN0Iv+2r+EjUawNjpyXdi2qh/dEdXvivVrporeYD/PwF88zWOBOd+z3Afpf50lr6WU7ZT5JN3RRpXKJJ5Ra689fFECRUguVCDsfc5hK7okmXXgNJzYNkJgJvBS8m0VhPvEGmCZ1GLLgRlI/xdL5+oc09u4FwUpuGVmX4ljlUX8dpxBdJxVQnl3Iw== 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=80os0U90XmUqynG7ZB7T5YeUoEpFWtUMTRoU6jtjkP8=; b=oQ473s8AavhDJxqzOyeWE0uw0DILtfEMsSRKG75zvgrIfskuQOMt8oOSZUSrZEjJ1ufEpf9QJeGe6lHj5OQW6HGLqb0swlf28t62Nt212tIsWr8at+XfZnsAr/LDiC81cFQ6+Zhz+ng+eHuG2wzr71JW4H4bqDHp8XcK2UjWNrs= Received: from DM6PR18CA0016.namprd18.prod.outlook.com (2603:10b6:5:15b::29) by SN7PR12MB7854.namprd12.prod.outlook.com (2603:10b6:806:32b::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.26; Tue, 26 Mar 2024 12:57:13 +0000 Received: from DS2PEPF00003445.namprd04.prod.outlook.com (2603:10b6:5:15b:cafe::a) by DM6PR18CA0016.outlook.office365.com (2603:10b6:5:15b::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.13 via Frontend Transport; Tue, 26 Mar 2024 12:57:13 +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 DS2PEPF00003445.mail.protection.outlook.com (10.167.17.72) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7409.10 via Frontend Transport; Tue, 26 Mar 2024 12:57:13 +0000 Received: from ubuntu2004.linuxvmimages.local (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Tue, 26 Mar 2024 07:57:05 -0500 From: Sivaprasad Tummala To: , , , , , , , , , , CC: , , Subject: [PATCH v7 10/14] examples/vm_power_manager: fix lcore ID restriction Date: Tue, 26 Mar 2024 13:55:49 +0100 Message-ID: <20240326125554.138840-11-sivaprasad.tummala@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240326125554.138840-1-sivaprasad.tummala@amd.com> References: <20240321184721.69040-1-sivaprasad.tummala@amd.com> <20240326125554.138840-1-sivaprasad.tummala@amd.com> MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS2PEPF00003445:EE_|SN7PR12MB7854:EE_ X-MS-Office365-Filtering-Correlation-Id: e07e28a8-4062-4dca-7f8b-08dc4d944214 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: CUpHguxQc+lMaS1J5vpynDUBqfTnbpYltsOFgVAxhvbxkMCehWFsEYQigHXvGsg8/KTtNhq6kLQ1uYz512IETgBlTKCgkSg5Cjm7hZiugheDC8HAWNVYZmyk/zDEDs6S+Ls4i39nXMo10bNXeVwa5WDWPwgGBkmFthqqMrsvvZ4XtpvIcFjMsdDVRZ2oHA9g6MbFcXS6ISeKx0168cIGUcZiOuHFSBfWur7lDnD1mqFcely9WdjlHrO5QU2CGobyVspWUQ+BtRej452OpHrreEuLQtXu4dhTwuFu2JbNir34cEGPJQfwPDuUJFC6aqaOxTdfd/aQ7EcdMIYBSyuFgUZbhvQbTMYGk4FaXvnJNT5z2MsgHC/unNftX7OxLB0YQyflDEUQqQgC0kWfV9Waqb1b8TK+WCW7g2oJi4B/eapY0uOPnq16ollt7SH5plgA9R6JZ9tp62i72lkHgza428bjSZX3/qWs+GaMP0RbhSXuWK72Ao2KSy4+/hpCEvC1rq79GgOPhA9W4Z5DMwFxrMtVMVpFkFHcKeRRj4zeePPPVJ3VzGqtDa2ZF4wqXQTdFoGxz94MVsBeEWLhYrcKePGIf58saASKeH9BJ/XHP256OyHZnZtxcht6pxtNq+SXaIbWql8RQOe1dgcy79YNuvFJM1yl3l2jL5EftXdPo4xDgqCdqASftF5STYRN6vl83xWDng3xvwpCn3MZOrggEl3j6oae+07cmpyJPl9GXtoE7dv/BboMoSTT8sTPBpuK2iueFyIvagDXdbgaC2SPgQ== X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230031)(7416005)(1800799015)(376005)(82310400014)(36860700004)(921011); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Mar 2024 12:57:13.7968 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e07e28a8-4062-4dca-7f8b-08dc4d944214 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: DS2PEPF00003445.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR12MB7854 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 Tue Mar 26 12:55:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Sivaprasad Tummala X-Patchwork-Id: 138806 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 BBC8143D51; Tue, 26 Mar 2024 13:57:41 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 223A3410E8; Tue, 26 Mar 2024 13:57:25 +0100 (CET) Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2049.outbound.protection.outlook.com [40.107.223.49]) by mails.dpdk.org (Postfix) with ESMTP id 4027F40ED1; Tue, 26 Mar 2024 13:57:21 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Wm576EjN2AegkxtXYaCK1Ua+kQwQzgXTzp2UOPxt6jgcTAdEp4uHoTIb7BkHtA+71qBxIImDrdKCAl7b5o/pflAcbF6zqJ/gdjob3ShxfBGIk8mEcd50EBLaH43eKC1Xisxm7v62UZXrcq1PA+UN3H0Q8UlcP0cr3uBGIqh7DtMC7V2loUpU5SFc56tXUMqmxAt4062ibQTTZMdpfV7znKUbok5rXAfiGyAYbF3PfuVKfQIlgtAbtXMgnGxVXRup9UFLlm7m/5gplg4aMt2GDqqIZYt4gfO4UNYLrkD6LWNKtDAMp57hrt1raYCZGSpeAv72TC1SH7JST7VRVYVcJg== 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=t1oINm/Skehv285IfbSswA8GjdBgVs7jVzsqS3vSzcY=; b=DfqfUkP6B2TKjPrl3dJEO2jsEq3OC6lDWwuCwxwBMFoX/UTXkl99jorI+alP2XJJ3lxmH7pAw2R3oloTn02sgPDCPhTQn49zC8e9Y3xY+EXq77jJewTEePHsCqKjIzWMBGeAZsoISWCOl+/5D2gUwYS37owQbYSFngOsHtSbef2RbxBhccw9QHw3ahlmPsEBqdyQrEM9nHA3/HZFmmfU8wX1SC5qhNEO7Gu3Q3uCIiKv5XJz4rRs4G/2drFeJFMAvbZTXUXy72mI47iixOBD6mTccTvFYhYJM1n+p2d9o216KGcAwvBsz7MoB8BpwBlJrWiK9dn1Dnmsy2W59Ts8/A== 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=t1oINm/Skehv285IfbSswA8GjdBgVs7jVzsqS3vSzcY=; b=IbdPwzFhIPM+b+P9nf9KAW/7337icpt1H6Ycol6YSAV3r9YHkTWHSlDbCLdBdqj2V269OmkAyVJj+X0/0M8WE3Fx8c0dH+B9RTpnJq1DzEeyoQ1yvmQ145YpW54fPu5SHvb6NfOQWYtp8kXtn1hSoJoNEJLQE7kgjq4OxDnqbEg= Received: from DS7PR03CA0077.namprd03.prod.outlook.com (2603:10b6:5:3bb::22) by CY8PR12MB8216.namprd12.prod.outlook.com (2603:10b6:930:78::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.31; Tue, 26 Mar 2024 12:57:17 +0000 Received: from DS2PEPF00003443.namprd04.prod.outlook.com (2603:10b6:5:3bb:cafe::bd) by DS7PR03CA0077.outlook.office365.com (2603:10b6:5:3bb::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.13 via Frontend Transport; Tue, 26 Mar 2024 12:57:16 +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 DS2PEPF00003443.mail.protection.outlook.com (10.167.17.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7409.10 via Frontend Transport; Tue, 26 Mar 2024 12:57:16 +0000 Received: from ubuntu2004.linuxvmimages.local (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Tue, 26 Mar 2024 07:57:11 -0500 From: Sivaprasad Tummala To: , , , , , , , , , , CC: , Subject: [PATCH v7 11/14] examples/l3fwd: fix port ID restriction Date: Tue, 26 Mar 2024 13:55:50 +0100 Message-ID: <20240326125554.138840-12-sivaprasad.tummala@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240326125554.138840-1-sivaprasad.tummala@amd.com> References: <20240321184721.69040-1-sivaprasad.tummala@amd.com> <20240326125554.138840-1-sivaprasad.tummala@amd.com> MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS2PEPF00003443:EE_|CY8PR12MB8216:EE_ X-MS-Office365-Filtering-Correlation-Id: c0397c1b-43af-4a5d-46de-08dc4d94436b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: h0hw1CA74+b1clxegoMrWV3/LsQnoQdvI1UH86cn7P9iKN74pMOa4RJeV0f/iLu8gmTthMG7lfz3r/T4ht0Keg19Wr40/++lPTiSfkvmeC3Gb1ltaN5nWFqlntih25Izb0SopB0ouHIqnz5r26ZhLAXEwCXiHgT06cz1oLvlwRSzWeyJDNd8ZUZzRoXfcJube+rvxn/q82DkLYQPVgdForF5I5TYWcghW7L9C3MJaom84vV69yStrVkHJhIUiPEc6jpg4GoCoyiCAi4gavYj6KLESFySC82j+WGtj7oIgWTsDfhDoSOrZEXfZ9IiGvy3bowlHkzevSK4btT5QQ4jo7bo2wZ6WtQ6c24bk7MRxvL5fuX6qZw9SELL5QJauzW2sXfOn/qmqk+rBiIMCP2L/0GV+ImHJC4NWIe7YuGoyo9Upp7/Ui8NlW6zybrZMNwvZD3nOhkpfMHKGz/UnN7HluIO1m6vtw3XyESOWNjwUIolLBr6ADuQgnDAaEihcwzTRvLhpCwHlJlQ/j0ZTtGr5qKog+JWHTXCr35u4mhER40RWZLU/dD5tG+ZcPorNVcCwOM8xeVSjWyXpBGG5ImfAVV7Ym148iNa3VDQembO99F7VJQifNCvZ0kKP9oL2B/FdNYWpKLjXHvze7oG87OdzJDcgsNl16b69S/I+HyVv8nzV8sXjPFs+UiWpFz+pJRwEp5P2HHfDf1cbC9beyEe+d1Na0BYMP22vm4NRkX8ydDBSbPIV3DW20w7TdIvo8cCxtygSc3538FkXH0SHSFq4w== X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230031)(7416005)(36860700004)(376005)(82310400014)(1800799015)(921011); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Mar 2024 12:57:16.0589 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c0397c1b-43af-4a5d-46de-08dc4d94436b 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: DS2PEPF00003443.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY8PR12MB8216 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 47baf464e2..a239869ada 100644 --- a/examples/l3fwd/main.c +++ b/examples/l3fwd/main.c @@ -501,7 +501,7 @@ parse_config(const char *q_arg) int i; unsigned size; uint16_t max_fld[_NUM_FLD] = { - 255, + RTE_MAX_ETHPORTS, RTE_MAX_QUEUES_PER_PORT, RTE_MAX_LCORE }; @@ -532,7 +532,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 Tue Mar 26 12:55:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Sivaprasad Tummala X-Patchwork-Id: 138808 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 635BE43D51; Tue, 26 Mar 2024 13:57:55 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6CC1541153; Tue, 26 Mar 2024 13:57:30 +0100 (CET) Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on2061.outbound.protection.outlook.com [40.107.96.61]) by mails.dpdk.org (Postfix) with ESMTP id 71FB140ED1; Tue, 26 Mar 2024 13:57:23 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LYJZlJ+pC5nAJIYbShOYXhNpDlb68o4WY8+z2cjDOSyallbMz/VoM2X7ZUmbZ3Gv2LPc2rWpAvrZW79e08VQPOcRkMJKQqQYoNTfcSBmnxPO2/9vmkmZcNUbj10bIQQTQyyv67iZqgCTuwa8BpazHRxgp93S8/QdnkSZk44jB9rlN7ZoemYiTZKoB4QwgFem5CH3tRaAqlYz0i27B4ZHuIZQLKJxDi/xvdbVvfN3pjMaV2OGnCk4cF457gec0ssdVz4HgCGPepzVXVD/Va5+3E8izy1vbHWlIFySb7rUokr4KGHrotbBeT2G5cwxLaShfka1l/FoVAK3LUB0K+AfbA== 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=BceNGHJWg51DOXUp1ZrTZrDZZBcP2+miB77t5SX3CwY=; b=LiQ7ZCu5HQEuY/HbGK2uekyeyC8RvphZEnQsKsErHy0CdK+iNSagEbb3bCiUgEVeRLw22zXcoz3gDiIi9WiBtthIl4oNOB2is/Wy+8RLDPpI4SU6qXmvk3AouoAvU2cAHNtICM8Tv9m2AFgfD2AsA5IAmAfEPttjHFBLq74wfSCDTcDbCmNNkoBjr3R/VCdNxin0Clo+9b2iIzIzr0VSVNEZm24E8MVft+AKywauzbjpTUZ/PijldLGmw+nxT0NpjjM+LbsROXWZNESGeCLpEG8MNGMRiwobiu0VoicGeSjFW1cHe2EZVDfwP8dJQNKdJVEkY+AWN5EPSjC5Fwv6xw== 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=BceNGHJWg51DOXUp1ZrTZrDZZBcP2+miB77t5SX3CwY=; b=RkPRMhKnhE6ae7fGJm7KYJLQBpHGSwhH+9i4YfoXZ4htt36mvH1wNN5dk8BnTBFl4RK9TqXMRMyBzmfYsmonESMTEq86NBMrAPO+U5mxRPhwfxuVcCwkdTBYjcPBGD4Y6QtEE2NxRZV1/MjXPWp0sQjhvVwbLI/duXdYyufh/Ik= Received: from DS7PR03CA0084.namprd03.prod.outlook.com (2603:10b6:5:3bb::29) by CH2PR12MB4183.namprd12.prod.outlook.com (2603:10b6:610:7a::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.32; Tue, 26 Mar 2024 12:57:21 +0000 Received: from DS2PEPF00003443.namprd04.prod.outlook.com (2603:10b6:5:3bb:cafe::9a) by DS7PR03CA0084.outlook.office365.com (2603:10b6:5:3bb::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.13 via Frontend Transport; Tue, 26 Mar 2024 12:57:21 +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 DS2PEPF00003443.mail.protection.outlook.com (10.167.17.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7409.10 via Frontend Transport; Tue, 26 Mar 2024 12:57:21 +0000 Received: from ubuntu2004.linuxvmimages.local (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Tue, 26 Mar 2024 07:57:16 -0500 From: Sivaprasad Tummala To: , , , , , , , , , , CC: , Subject: [PATCH v7 12/14] examples/l3fwd-power: fix port ID restriction Date: Tue, 26 Mar 2024 13:55:51 +0100 Message-ID: <20240326125554.138840-13-sivaprasad.tummala@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240326125554.138840-1-sivaprasad.tummala@amd.com> References: <20240321184721.69040-1-sivaprasad.tummala@amd.com> <20240326125554.138840-1-sivaprasad.tummala@amd.com> MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS2PEPF00003443:EE_|CH2PR12MB4183:EE_ X-MS-Office365-Filtering-Correlation-Id: 81e38557-52fd-477b-84a9-08dc4d944674 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: JZLq74od1y/bIIyIMZLbrDcuE7PIbVTXnRr04u7LhPfSunfyt4MijAvMJ00iIIoW7I7ipTtL4RKvL6nYIJKRbGrNOvQN5Ev8DMrpVxMKi/Bd7FN4yN4Mv9EynnDJdEwAdma8MFZvDHYWin1iL2qBD6W7CL9IEDeuBP3vKNx0SM48QIGuTsESeAph5Lm8yM8ca7UrPD6wGCa9Awyi3yCRWpD++gFDcNiJSe4enGHjwVWtSsZtP9RkILidSb5Yi7QpEZ+5SzeHcxpzuZdlMW6U89S10pGdcyb7qIm7FlopZhKJYVUtvd/HdZyKVKUDnlehkn6tlv8YjpdVgU57Gz35+Bk55rebtk1a1nWOjyT3DQ4yeRziqKQEcmYi2FpvUrfJh8kpFf8yfySLLXq+A/GkYRhE0BZo0eQehvNhFvG9NawYxobNINVhFHWK0xObeW82Q8VkfT7o/ETItbK3Pj2EVDvbNMaNmJpyvjtfiA1LP681ZMgKdfqfhb1pG3E+CDvcROtFxm1m6E3WFG8BwiaPoFu5QOGOvOHK2cz+GIjN70f/Dhtkm5mOhC28rXMMZKl/X3qkmcSBdkcXdtJbP4Ixxu+XOMNLSZbSY0r2ZBgx4sTDeblTe9cNOldhMyrUXyyeJ3TAbtCvEnejFaeT83aeHnkFl8C3vunjPqbQ9Wo6tNjkUzmSvi1jUPvF6KH0WUR2VT8qzGiyaMNG199QgZDiDZI5/Potp6c1aRspSl41eFzMlg8kUXEbQirzcEOSnlsPH9Lc7f/jX+SMPwl+mjDeew== 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)(376005)(7416005)(1800799015)(921011); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Mar 2024 12:57:21.1370 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 81e38557-52fd-477b-84a9-08dc4d944674 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: DS2PEPF00003443.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR12MB4183 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 eac92ef875..a993af0408 100644 --- a/examples/l3fwd-power/main.c +++ b/examples/l3fwd-power/main.c @@ -1659,7 +1659,7 @@ parse_config(const char *q_arg) int i; unsigned size; unsigned int max_fld[_NUM_FLD] = { - 255, + RTE_MAX_ETHPORTS, RTE_MAX_QUEUES_PER_PORT, RTE_MAX_LCORE }; @@ -1691,7 +1691,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 fbd7864cb9..e4bdb62121 100644 --- a/examples/l3fwd-power/perf_core.c +++ b/examples/l3fwd-power/perf_core.c @@ -133,7 +133,7 @@ parse_perf_config(const char *q_arg) int i; unsigned int size; unsigned int max_fld[_NUM_FLD] = { - 255, + RTE_MAX_ETHPORTS, RTE_MAX_QUEUES_PER_PORT, 255, RTE_MAX_LCORE @@ -168,7 +168,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 Tue Mar 26 12:55:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Sivaprasad Tummala X-Patchwork-Id: 138809 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 BBE6743D51; Tue, 26 Mar 2024 13:58:07 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DBAD9427E0; Tue, 26 Mar 2024 13:57:32 +0100 (CET) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2081.outbound.protection.outlook.com [40.107.243.81]) by mails.dpdk.org (Postfix) with ESMTP id 5677540EA5; Tue, 26 Mar 2024 13:57:28 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=D2cV1JrW8Q5UovdvKNZ9ZEtGVeOljH0DBtSzXarsBU79o2yt3w3GEPmHGQCeerrG36d0n65ikD8pFzcbBp6e/vjAcG/6JccH1596F0y4nDsOg8dxdJSxEB47Qn5vyimdowpWdoUR1SW4CD7Rje4hfZxsrRcwHd78pd/e93kIA6kdtnirgypNCIlJCoeQTW9EyEslpmsa8SKFdlyNP2GppZaZzf91tK+WG4lBMozi1ZANkN9zmaCcN2UHqKOmycjrLIQxRBg5we39MtyMCrw2yAYxmvlIP7vC/bZkWJnc+qARSLFqV/sSy56KSGK/+mlYCeELgAXodN3cCxWax6hA5g== 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=uc89xjnNYI4BhAXD85+8FsO2yniSkfwjldK3lbd3NaQ=; b=I0R1vLV32zyvF3f7cLgbnX/PpwWd3emcrLnE5w9L0uR2fjq1Z9IRJtepTlI/bChih/1lLJG7Vvug9mLLD5nUUiWW6r3NfubRtFdP67KRDULc50vjtGez4GR4ky9ddiW3LdXxRaUeG5kgLD31hRz8Jo9XUZXIdAOK6YUsv18zP4cd/o0F8y6R0n5ySo1i0zqS4cS6TMO4aU/N8YjJgx10C3GURwEs7ph0ukJGUqOLORh/6RQ9J2dT9I4aBtGnJ74l1EHiD43DsBxaJ3p1EyKDItTlyPsnkIcR63SScyyy+4wmfYuDcHC5W/72NniP7g7hEG2IVFnlv4Y7Rn/8rB6EpQ== 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=uc89xjnNYI4BhAXD85+8FsO2yniSkfwjldK3lbd3NaQ=; b=R2TBEgBgfJcvf47JMjYvu1dU2cRygDiK+Ww9kBpxNcwz4wut/NdaKS5xNGi9UFpmrOOdYjlACX2PwbuHXSZrOrKNbrC0O8tkHOEfCP8vCjP1zMFjT2y+VYlPYuOn8xDiF5SR7ht7PsJ7IH4Do4YJAx/Pq+iLDTofVg8O0J+l/m0= Received: from DM6PR18CA0025.namprd18.prod.outlook.com (2603:10b6:5:15b::38) by DM4PR12MB6159.namprd12.prod.outlook.com (2603:10b6:8:a8::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.32; Tue, 26 Mar 2024 12:57:26 +0000 Received: from DS2PEPF00003445.namprd04.prod.outlook.com (2603:10b6:5:15b:cafe::3) by DM6PR18CA0025.outlook.office365.com (2603:10b6:5:15b::38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.13 via Frontend Transport; Tue, 26 Mar 2024 12:57:26 +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 DS2PEPF00003445.mail.protection.outlook.com (10.167.17.72) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7409.10 via Frontend Transport; Tue, 26 Mar 2024 12:57:26 +0000 Received: from ubuntu2004.linuxvmimages.local (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Tue, 26 Mar 2024 07:57:21 -0500 From: Sivaprasad Tummala To: , , , , , , , , , , CC: , , Subject: [PATCH v7 13/14] examples/l3fwd-graph: fix port ID restriction Date: Tue, 26 Mar 2024 13:55:52 +0100 Message-ID: <20240326125554.138840-14-sivaprasad.tummala@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240326125554.138840-1-sivaprasad.tummala@amd.com> References: <20240321184721.69040-1-sivaprasad.tummala@amd.com> <20240326125554.138840-1-sivaprasad.tummala@amd.com> MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS2PEPF00003445:EE_|DM4PR12MB6159:EE_ X-MS-Office365-Filtering-Correlation-Id: fb31293f-9df4-4e26-61b5-08dc4d944991 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: M2yMPCztAc6sHIn+c8pBQXrfX3wdrDjQP4pnRiMLypkLkIXXNEhMNTmddl4OEh6Q4V1Rrvj0HeSc7XlrpcSw12HXr7wCcLtbVKlx59pYTZP9m97S4z4jZ24omjoCKm030HV52AwUnFnHxJSST23antxwLi6bTNnnRaUX8ceP/z0LeQr4PIryFEQ0puiKkZHQKMbtaFkNs9ZcBW5bX/Xob3ZLLMSlw1KXmvQj6pBBI6CUbmD+n3snRoaUXtwAn155po3w4+2GvZwVsBUfiLZ+RlxhIBYv6lKr3ttiPL9MhqcutPVrziQtPvUmzkSN5ZYJEkaBOVSg+CTNv8EOJ2coOGf6iwQ52TSAvjRzFGm3ZPEeprmEOvbJIwUCZheHCscupdfyGiqfe/jo/0GU4DOt3c52OZ8irmOBjFgu4xigAUn4JjBg2rC//6EcIw+2tOQF26S4cy3GMePYTaoTwfZD7zpHa92UxvZijBEEdt5xgHVtDIsgTfI1Ij72rn/MJWRbfiTNQj+6OERXW6Tr9O82ZFY0Z9lBNGtlkks53MHnZ1tF03lrtZXEK7NrCOyt4Mahap2nPoLA3Lb3F9plev6DRo0Ie04VRrhcLOuo1j+WaK6LoMOa5MixcYot/mqgZXz98WlLkw79eG8rw8NbG2DukoitPRUk1bAK0eDhwp5N/JDIG+QZe2qDzALM3nPg+IBDIaVxs0sUCoMWNuJS46UAhHUsIiJYpCjstymPjSmREQwUWQaLTr3pp5VotWzcKzAc2Rw4WIklDt7jIePpsBSrbQ== 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)(7416005)(82310400014)(376005)(1800799015)(921011); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Mar 2024 12:57:26.3749 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: fb31293f-9df4-4e26-61b5-08dc4d944991 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: DS2PEPF00003445.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB6159 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 dbc36362c3..4ded69b4a0 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 Tue Mar 26 12:55:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Sivaprasad Tummala X-Patchwork-Id: 138810 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 0750243D51; Tue, 26 Mar 2024 13:58:16 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A16224161A; Tue, 26 Mar 2024 13:57:38 +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 71E1C40ED3; Tue, 26 Mar 2024 13:57:37 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=N8fhib9M351NeqiZrOZKiZ6tlzJdabDl1PgOP5TUvFoZfQ4A3NDTxAC/IbwFjTjwu296plSrzupWSRwa5EmdI3iZpVdgcBnktqfMNZcwXgZ0GAKZ9RpWW7i+g4ortsX9+R55/enLe0JGAQA6zw8OBgjtFN53J3+FNydGSCeFCV/hqIcD+Ht5LII5+IKW2690N5qjq6U7HextGtwpYFRyCZ4MqV3cNIaG/PRNtXYSvMdKo9EUxgVj43QILM+8rGIJOded+YFM6Vv8w7o4I0rro/eRUssxNRBdR6LfPmdbZZlzVtatKF7cuXRIobqwVH+7rVO14yk9MCFRfR7O99ER1A== 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=jQGiLgjV7V7FWhMS0JtpIRZBGGjxKBvxEnBbDyi6A5A=; b=ZUsPHPlA+x8JL0+slZSH5faDv+gjL+vnNQVQqdk/dJg9/b8nuBxmacfkJhXaI9dw4wSjRLBNPQIBhaer+vjbwdYjz+/eokoRCDqvbIu30waBIOsvCj9z9tBiMmY5X+oRSFmUetheUj8Z7rfyipXGSV7NLb6xpPb1Ui+vfGRHkXlb0w44Ww18oBunFqTdt9jmqqDhgCJYReLwGEA2BOaki+N7UhO4HRefB0IMLOd7AU68WY/PC2+rgVxGIOiGh8u29ZmaVFHVG8U3e2BnMg5h52ydxNo0TrChpLSHoWzs6IVUuIRBoDLmtoZVlVjZM5r2Xtlyju30Hq8UG8BiRHDsug== 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=jQGiLgjV7V7FWhMS0JtpIRZBGGjxKBvxEnBbDyi6A5A=; b=W3HicdcBWO2zJ6wwsyXHF9x+US9mGc8+rOCLy+O5mGvvnjoCvIkwBTXOefGvGKDzmESJnvwNqM1jxKa/uslahhzoI2ZfGvDTYK22/H/U0N/8aDEIMNTRJJB1oXyXrZFi7vCaXOOftJyY7G2pNeONwdQyz8a9sXTIUskvH13svBc= Received: from CH0PR03CA0233.namprd03.prod.outlook.com (2603:10b6:610:e7::28) by DM4PR12MB7765.namprd12.prod.outlook.com (2603:10b6:8:113::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.33; Tue, 26 Mar 2024 12:57:33 +0000 Received: from DS2PEPF00003446.namprd04.prod.outlook.com (2603:10b6:610:e7:cafe::bc) by CH0PR03CA0233.outlook.office365.com (2603:10b6:610:e7::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.13 via Frontend Transport; Tue, 26 Mar 2024 12:57:33 +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 DS2PEPF00003446.mail.protection.outlook.com (10.167.17.73) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7409.10 via Frontend Transport; Tue, 26 Mar 2024 12:57:33 +0000 Received: from ubuntu2004.linuxvmimages.local (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Tue, 26 Mar 2024 07:57:26 -0500 From: Sivaprasad Tummala To: , , , , , , , , , , CC: , , Subject: [PATCH v7 14/14] examples/ipsec-secgw: fix port ID restriction Date: Tue, 26 Mar 2024 13:55:53 +0100 Message-ID: <20240326125554.138840-15-sivaprasad.tummala@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240326125554.138840-1-sivaprasad.tummala@amd.com> References: <20240321184721.69040-1-sivaprasad.tummala@amd.com> <20240326125554.138840-1-sivaprasad.tummala@amd.com> MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS2PEPF00003446:EE_|DM4PR12MB7765:EE_ X-MS-Office365-Filtering-Correlation-Id: 70d62e99-bcb2-4c95-c77e-08dc4d944d8c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 4X2gRhsXOusP7lNsDBkcVbMlH7r9x6ZqPDci0aCrJfDyPqY10NsJZaCZzftyuQVv+g9rdDbi1WTmVJjyWPbIVq/vdkqWw9WYHkm0myPJPcvrEUV+gWbMrdKgF/zQBh7TKl6IBN/tW/IVMprNgCBH7c9PEdcVT+fXvc4b+b61ZfEoXM23QEfKoXGYMO32CUHeZJ6irZWV2+VaCqd7VEhAyixq37EQC77RUZi/umGydaV0/14dn1Qr5YBNtY1JQV7B4MimkFsbRWpXu59nn5aIBgYhpJxYfVJexL2z2nMddbsv0efzqXUrsPrknhfuF7SaTFm31BAkunWCK8ML5a1bQJ2+pPY7e1H+SW9BiOfbwarxC9oXxVmB6Xt2qmhjBzArBZwM7EQYffXtjDPjiD7fTo+24i/G0hfivhY41xyHBP/BGz2B09jL/UzoqREQMU3719csfvXCiJlf48wa/DqNbyiMP7oJDgCYaPRSDgulhJNhl2mkPYj/3NURwUSEs8A4Y/HXbyNSbdFoXf+9eOhVPSKfxyoYOSsfLBxabC40kKJkvP05FtpTRrN+UgoKj+kGxu9qvcs+RlcPr8Bz3vJgoEmpUsltB4AFAffzDJc1WC8yqTKA2aTLYNvp0IBhplQ1zke8E0TZumnMcVWAaqPT+9HhPEzV0Z0qVYCHpYwPw3KxA5AAwDBxlPUeDk35kenn9CP3ECGetzCa19Ena6WQPssaiKNPD9tYWz7YFmpHC07ZUHW0qZV0G9R7kSWo90ZsV+ElP6CncdQJw5lUfPH/Lw== X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230031)(7416005)(1800799015)(36860700004)(376005)(82310400014)(921011); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Mar 2024 12:57:33.0400 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 70d62e99-bcb2-4c95-c77e-08dc4d944d8c 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: DS2PEPF00003446.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB7765 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 2d004d82fd..761b9cf396 100644 --- a/examples/ipsec-secgw/ipsec-secgw.c +++ b/examples/ipsec-secgw/ipsec-secgw.c @@ -1049,7 +1049,7 @@ parse_config(const char *q_arg) int32_t i; uint32_t size; uint32_t max_fld[_NUM_FLD] = { - 255, + RTE_MAX_ETHPORTS, RTE_MAX_QUEUES_PER_PORT, RTE_MAX_LCORE }; @@ -1082,7 +1082,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 =