From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 9B1A2454E9 for ; Tue, 25 Jun 2024 02:01:20 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8A622410DC; Tue, 25 Jun 2024 02:01:20 +0200 (CEST) Received: from mail-lj1-f170.google.com (mail-lj1-f170.google.com [209.85.208.170]) by mails.dpdk.org (Postfix) with ESMTP id F407E40EDD for ; Tue, 25 Jun 2024 02:01:17 +0200 (CEST) Received: by mail-lj1-f170.google.com with SMTP id 38308e7fff4ca-2ec408c6d94so56669831fa.3 for ; Mon, 24 Jun 2024 17:01:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719273677; x=1719878477; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Mhy6PLqwFujEIhikAEplFDD4Uc2a142PQ7AcI5FbuNo=; b=eBBZ8X/vAOt/9vtAXMAKdbDXNB+b7UZEdcNPYKppjYlSiquvlB17m+KzcfMWionSjW Oc0SF8ojSdJzMmMl69nymCp0kc2nUIwt55pqqXrJ816TjaPhMDJygS9ZnLJ7VmULugSK xWZ5ehQJZXaN13Jsm3nYkfPMlrhogjPJSWFx0Qfg+4k9r2OPFyTW5cQlPFwFIEDzHbR2 wTDYa8/OzSzZgHViZczNzm6o430XSWK7KAwG2YhFPAGn+bzjOVF9X9VhHxaX/Op1uVhi xkT5fkRxyMY4usBTbquxipSrCHj6aK0Y27vllz36NGrMNGCRXuh7gsCFcBtOOYXLkh25 tmWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719273677; x=1719878477; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Mhy6PLqwFujEIhikAEplFDD4Uc2a142PQ7AcI5FbuNo=; b=oTg8igLrB7ysENyXU2bjv4wG2xzqiBm9I0cFrveQuIqLVzmtvzqS71HorVh+MYvVet jWOUhUJGY+xPr7LnC5uYr3DFvt1e7hl4fgMDuOzCWZg2l5epKgvtqKKETDDwfzKPWTEl EgPFaLK59E6JA+Bu3BK4436zjuvPE428s7AfLxUJeCL5mtFBSiDslJoxYX8u7IJuh6yN PO+3uP1HyrG2cmPYS0PjUAfBUchVdDrdPmh8dHCGCwVb0Ew9dMvm60rDTyKLFuWfyMw5 dkKNoRhPKROfFM54c66mw+kDKy0Y/8V0i4q5K0DUWIkfkXU3lNBvkv4bG6A+sJMA3Fup m+FA== X-Forwarded-Encrypted: i=1; AJvYcCUV61N0cfddsfXqkJaHI9jshsDsxfMun8Y35N5Cbz+K0/7VnXwsp7GSvn04maFu/2/HKxIMmqAvALryMJjNMvA= X-Gm-Message-State: AOJu0YxNMs/INgnSjyiNG5bbKo0d4IEhkqhmqdj+inEm7+Eyo1V38NiQ s9FTIrsJoOV0eX7gAz34ZY60bh2jvPQMUfDVMF1bFM6CmwVyheBUPNl4FQ== X-Google-Smtp-Source: AGHT+IF1OVXI5XwxN/GMtGliBH2vuvBi1up4OPi32VDxNebYinaWeQGlLAY0XehenbVDXoQES4mYQA== X-Received: by 2002:a2e:8607:0:b0:2ec:5736:e904 with SMTP id 38308e7fff4ca-2ec5938a5d7mr46203031fa.50.1719273677370; Mon, 24 Jun 2024 17:01:17 -0700 (PDT) Received: from localhost ([2a01:4b00:d036:ae00:7aef:1aaa:3dff:d546]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4247d0b6376sm187765365e9.5.2024.06.24.17.01.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Jun 2024 17:01:16 -0700 (PDT) From: luca.boccassi@gmail.com To: Sivaprasad Tummala Cc: Ferruh Yigit , dpdk stable Subject: patch 'app/testpmd: fix lcore ID restriction' has been queued to stable release 22.11.6 Date: Tue, 25 Jun 2024 00:58:26 +0100 Message-Id: <20240624235907.885628-40-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240624235907.885628-1-luca.boccassi@gmail.com> References: <20240624235907.885628-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Hi, FYI, your patch has been queued to stable release 22.11.6 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 06/27/24. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/a4a27aa3e0f8a870de14f33463180c3b9af4c8de Thanks. Luca Boccassi --- >From a4a27aa3e0f8a870de14f33463180c3b9af4c8de Mon Sep 17 00:00:00 2001 From: Sivaprasad Tummala Date: Thu, 6 Jun 2024 11:27:46 +0000 Subject: [PATCH] app/testpmd: fix lcore ID restriction [ upstream commit 2bf44dd14fa50fa95e090058ec83c2eb96b64ac5 ] With modern CPUs, it is possible to have higher CPU count thus we can have higher RTE_MAX_LCORES. In testpmd application, the current config forwarding cores option "--nb-cores" is hard limited to 255. The patch fixes this constraint and also adjusts the lcore data structure to 32-bit to align with rte lcore APIs. Fixes: af75078fece3 ("first public release") Signed-off-by: Sivaprasad Tummala Acked-by: Ferruh Yigit --- app/test-pmd/config.c | 4 ++-- app/test-pmd/parameters.c | 4 ++-- app/test-pmd/testpmd.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c index dca5431b98..1a6d791129 100644 --- a/app/test-pmd/config.c +++ b/app/test-pmd/config.c @@ -4244,9 +4244,9 @@ fwd_stream_on_other_lcores(uint16_t domain_id, lcoreid_t src_lc, continue; printf("Shared Rx queue group %u queue %hu can't be scheduled on different cores:\n", share_group, share_rxq); - printf(" lcore %hhu Port %hu queue %hu\n", + printf(" lcore %u Port %hu queue %hu\n", src_lc, src_port, src_rxq); - printf(" lcore %hhu Port %hu queue %hu\n", + printf(" lcore %u Port %hu queue %hu\n", lc_id, fs->rx_port, fs->rx_queue); printf("Please use --nb-cores=%hu to limit number of forwarding cores\n", nb_rxq); diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c index 2d0a782ee0..d6f07df789 100644 --- a/app/test-pmd/parameters.c +++ b/app/test-pmd/parameters.c @@ -864,8 +864,8 @@ launch_args_parse(int argc, char** argv) } if (!strcmp(lgopts[opt_idx].name, "nb-cores")) { n = atoi(optarg); - if (n > 0 && n <= nb_lcores) - nb_fwd_lcores = (uint8_t) n; + if (n > 0 && (lcoreid_t)n <= nb_lcores) + nb_fwd_lcores = (lcoreid_t) n; else rte_exit(EXIT_FAILURE, "nb-cores should be > 0 and <= %d\n", diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h index 022210a7a9..f7f3587c83 100644 --- a/app/test-pmd/testpmd.h +++ b/app/test-pmd/testpmd.h @@ -84,7 +84,7 @@ extern volatile uint8_t f_quit; /* Maximum number of pools supported per Rx queue */ #define MAX_MEMPOOL 8 -typedef uint8_t lcoreid_t; +typedef uint32_t lcoreid_t; typedef uint16_t portid_t; typedef uint16_t queueid_t; typedef uint16_t streamid_t; -- 2.39.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-06-25 00:22:16.016814195 +0100 +++ 0040-app-testpmd-fix-lcore-ID-restriction.patch 2024-06-25 00:22:13.161185159 +0100 @@ -1 +1 @@ -From 2bf44dd14fa50fa95e090058ec83c2eb96b64ac5 Mon Sep 17 00:00:00 2001 +From a4a27aa3e0f8a870de14f33463180c3b9af4c8de Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 2bf44dd14fa50fa95e090058ec83c2eb96b64ac5 ] + @@ -15 +16,0 @@ -Cc: stable@dpdk.org @@ -26 +27 @@ -index f62ba90c87..66c3a68c1d 100644 +index dca5431b98..1a6d791129 100644 @@ -29 +30 @@ -@@ -4782,9 +4782,9 @@ fwd_stream_on_other_lcores(uint16_t domain_id, lcoreid_t src_lc, +@@ -4244,9 +4244,9 @@ fwd_stream_on_other_lcores(uint16_t domain_id, lcoreid_t src_lc, @@ -42 +43 @@ -index c13f7564bf..22364e09ab 100644 +index 2d0a782ee0..d6f07df789 100644 @@ -45,11 +46,11 @@ -@@ -1071,8 +1071,8 @@ launch_args_parse(int argc, char** argv) - break; - case TESTPMD_OPT_NB_CORES_NUM: - n = atoi(optarg); -- if (n > 0 && n <= nb_lcores) -- nb_fwd_lcores = (uint8_t) n; -+ if (n > 0 && (lcoreid_t)n <= nb_lcores) -+ nb_fwd_lcores = (lcoreid_t) n; - else - rte_exit(EXIT_FAILURE, - "nb-cores should be > 0 and <= %d\n", +@@ -864,8 +864,8 @@ launch_args_parse(int argc, char** argv) + } + if (!strcmp(lgopts[opt_idx].name, "nb-cores")) { + n = atoi(optarg); +- if (n > 0 && n <= nb_lcores) +- nb_fwd_lcores = (uint8_t) n; ++ if (n > 0 && (lcoreid_t)n <= nb_lcores) ++ nb_fwd_lcores = (lcoreid_t) n; + else + rte_exit(EXIT_FAILURE, + "nb-cores should be > 0 and <= %d\n", @@ -57 +58 @@ -index 0afae7d771..9facd7f281 100644 +index 022210a7a9..f7f3587c83 100644