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 39D9745804 for ; Fri, 23 Aug 2024 18:20:50 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3504D4337C; Fri, 23 Aug 2024 18:20:50 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 9774E4336D for ; Fri, 23 Aug 2024 18:20:48 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1724430048; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Lik4Hogzi/U7Worl6vDaUFdJFb4N1b195QkUaI/GZRE=; b=Gfl3VmdyQ5V0b2NGOPN5c88kjfrlcuHJA5is0bV1o5WzgjXUDs6KF2aApPPkUh+rrpUs3c mIAmS/SukHIHFcBCYQtHkzgAl4fNMW27aK8lf+OYOycM2CX7goDzJo+sEpSkgsTfrvKmWB k7PoIZJxTRtEDts7zuPCy8adrZoUjXU= Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-447-VEIHO8pdPr2hY6zcaAqwBA-1; Fri, 23 Aug 2024 12:20:45 -0400 X-MC-Unique: VEIHO8pdPr2hY6zcaAqwBA-1 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id EEC111955F43; Fri, 23 Aug 2024 16:20:44 +0000 (UTC) Received: from rh.redhat.com (unknown [10.39.193.224]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 614881956053; Fri, 23 Aug 2024 16:20:43 +0000 (UTC) From: Kevin Traynor To: Sivaprasad Tummala Cc: Ferruh Yigit , dpdk stable Subject: patch 'app/testpmd: fix lcore ID restriction' has been queued to stable release 21.11.8 Date: Fri, 23 Aug 2024 17:17:39 +0100 Message-ID: <20240823161929.1004778-31-ktraynor@redhat.com> In-Reply-To: <20240823161929.1004778-1-ktraynor@redhat.com> References: <20240823161929.1004778-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true 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 21.11.8 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 08/28/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/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/8e20d5d780b4668876035fcf2c8e0c338467a631 Thanks. Kevin --- >From 8e20d5d780b4668876035fcf2c8e0c338467a631 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 cb576732d2..3afa65036c 100644 --- a/app/test-pmd/config.c +++ b/app/test-pmd/config.c @@ -3145,7 +3145,7 @@ fwd_stream_on_other_lcores(uint16_t domain_id, lcoreid_t src_lc, 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", diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c index a6a4bf80f3..411c07c0ea 100644 --- a/app/test-pmd/parameters.c +++ b/app/test-pmd/parameters.c @@ -870,6 +870,6 @@ 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, diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h index e53320e630..41befcce21 100644 --- a/app/test-pmd/testpmd.h +++ b/app/test-pmd/testpmd.h @@ -77,5 +77,5 @@ extern uint8_t cl_quit; #define MIN_TOTAL_NUM_MBUFS 1024 -typedef uint8_t lcoreid_t; +typedef uint32_t lcoreid_t; typedef uint16_t portid_t; typedef uint16_t queueid_t; -- 2.46.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-08-23 17:18:10.891695476 +0100 +++ 0031-app-testpmd-fix-lcore-ID-restriction.patch 2024-08-23 17:18:09.666429917 +0100 @@ -1 +1 @@ -From 2bf44dd14fa50fa95e090058ec83c2eb96b64ac5 Mon Sep 17 00:00:00 2001 +From 8e20d5d780b4668876035fcf2c8e0c338467a631 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 cb576732d2..3afa65036c 100644 @@ -29 +30 @@ -@@ -4783,7 +4783,7 @@ fwd_stream_on_other_lcores(uint16_t domain_id, lcoreid_t src_lc, +@@ -3145,7 +3145,7 @@ fwd_stream_on_other_lcores(uint16_t domain_id, lcoreid_t src_lc, @@ -40 +41 @@ -index c13f7564bf..22364e09ab 100644 +index a6a4bf80f3..411c07c0ea 100644 @@ -43,9 +44,9 @@ -@@ -1072,6 +1072,6 @@ launch_args_parse(int argc, char** argv) - 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, +@@ -870,6 +870,6 @@ 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, @@ -53 +54 @@ -index 0afae7d771..9facd7f281 100644 +index e53320e630..41befcce21 100644 @@ -56,2 +57,2 @@ -@@ -85,5 +85,5 @@ extern volatile uint8_t f_quit; - #define MAX_MEMPOOL 8 +@@ -77,5 +77,5 @@ extern uint8_t cl_quit; + #define MIN_TOTAL_NUM_MBUFS 1024