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 3EE7F45610 for ; Fri, 12 Jul 2024 12:50:48 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 39073402E5; Fri, 12 Jul 2024 12:50:48 +0200 (CEST) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2048.outbound.protection.outlook.com [40.107.94.48]) by mails.dpdk.org (Postfix) with ESMTP id 5375740261 for ; Fri, 12 Jul 2024 12:50:46 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=c6hxhrzcbjS6H9bhDPkud8ojK2p5pNtwLpVgSZjAXaD5BASzMrxorP/hPScaYBt8wEKFrbXEAeykQrlN7xaTsJvD6xYjm9M83GnqaTU4Wysqw/UKmZYsGX/AWsQbZMeT/cCuwYQxdsEvV/QVdMpLFmrhBc2u7hkutn5/LlD+oXcr8z5sbvG1CG0nhJKYKFwSCBZjZ/Y2mEEAHeUw07eugmfLtlOBlLKhS8P8oN70avCajK9ThOjSyrRSkaIbXxyVpgLbSKE/BGpWML0cJixbgQ6H4qNGpqK5Z9/DmEQcdEKKAOsV4dnObURwHvyHKhZ8X0ZAV/5tiHd6xs5XFebNFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=oqQfD/VsZnZnC1LMfqCvSMiyKHgtoX8AGTyeQZP2jmA=; b=rQmisyteoUyzQZNFrf0nLar+wcWeprDi3M10y4Oc/EDZ6hVCWx6wmbwQa96o8qeXBMbRnVm0ZYCeWwfrrPI7s3k3+7RgbbDJs0UU1CGmtlpFldtVvC1yhCBWr7640mhzeUCyMvoIKxTOGEzXgWPD1cIFRJVucEWThRtNT+eHm/eVVRtbVE+bsO05XLnXhfzspD2NmzEbRJqtqcxYiae3dSZjQFL66p+Z5kXHjZigz77XWoCWkTC+laHI0/C7lRg+YoaEG30AZt02eX+PUYPuhztjtHf9R4RavfjSp/aPTqWmYj85KDgy/yi1buG52raaRpUxWaT3DUqsdT2q3McoAg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=amd.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=oqQfD/VsZnZnC1LMfqCvSMiyKHgtoX8AGTyeQZP2jmA=; b=HCvGMkvTETqfswE04QP9bmB38QLO6uqzVnzG4sJn/xcUxRQFDhT8woH9xL43eYlV8bYXUOwUiL5S1WIRM0O1GjeBi2BJkDEHoqyzuV8ZqMxo+awc5Fx0FSi3TDLV6ns2Nzs2GbqT/1niyWtNCxBZPHGvOYCXlcZZMfkP12jnJASDwXvYCxZz5ThOmStwkBnVBYASxidY2zbe7OrL1IjilpJyVXHZ1qUMlqESeeZT+9EzegHQGggHDFrFDDcn0yFVOGjPPOPbh2k7whReL6KD6491YLxC7J4in7ccW6/nBp6U2nPxmduhQifN/fsbeHrYxRUnUowducVgMAW39WbtrA== Received: from DM6PR04CA0003.namprd04.prod.outlook.com (2603:10b6:5:334::8) by LV8PR12MB9182.namprd12.prod.outlook.com (2603:10b6:408:192::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7741.38; Fri, 12 Jul 2024 10:50:42 +0000 Received: from DS1PEPF00017096.namprd05.prod.outlook.com (2603:10b6:5:334:cafe::36) by DM6PR04CA0003.outlook.office365.com (2603:10b6:5:334::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7762.23 via Frontend Transport; Fri, 12 Jul 2024 10:50:42 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by DS1PEPF00017096.mail.protection.outlook.com (10.167.18.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7762.17 via Frontend Transport; Fri, 12 Jul 2024 10:50:41 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Fri, 12 Jul 2024 03:50:28 -0700 Received: from nvidia.com (10.126.231.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Fri, 12 Jul 2024 03:50:26 -0700 From: Xueming Li To: Sivaprasad Tummala CC: Ferruh Yigit , dpdk stable Subject: patch 'app/testpmd: fix lcore ID restriction' has been queued to stable release 23.11.2 Date: Fri, 12 Jul 2024 18:44:33 +0800 Message-ID: <20240712104528.308638-48-xuemingl@nvidia.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240712104528.308638-1-xuemingl@nvidia.com> References: <20240712104528.308638-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.231.35] X-ClientProxiedBy: rnnvmail203.nvidia.com (10.129.68.9) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS1PEPF00017096:EE_|LV8PR12MB9182:EE_ X-MS-Office365-Filtering-Correlation-Id: 4cf7c1c3-a0ae-4a30-6c3a-08dca2607999 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|376014|1800799024|36860700013|82310400026; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?TEOshUp5bQkwpmk050kUr0lsvJVjcbJVh9pkziE36x5qCGn6Ss35ZmYMdtDN?= =?us-ascii?Q?N6INd/rrbdauxoEZEO6fmqkRUpzAr0pCwgDCm+ayEfr3cI8FCV2cfyVHCykm?= =?us-ascii?Q?UKftkaCc697YUeN7EfDDGQHWHa7wmbPRx2Q4QZT2RJgDGPVfsCB8AcgNsChc?= =?us-ascii?Q?6Wx1mAR1gmwPVEGiCNHu7LqH5ouJNfh22REKY5UgEtenGxrTEEeVUawpszv+?= =?us-ascii?Q?ZQ5iyy8mOZK3xeGVESOBu7nDz8NXhmPdA5J83PGTk1p17f+PLxX5eaXlbSm5?= =?us-ascii?Q?JXB5T9sBkTYIM3TY615jBFy6NqOhHhbHW9L2KFy3BMErd5PQDWlMRmuKE6EC?= =?us-ascii?Q?U65TWnaN/95j3/k1v22lDPMienxzcayGDeRT8r8Zp3mscsyW6ie39xXMxIFf?= =?us-ascii?Q?TQo4wYK1lCFC+YgYE/a9kUj0a2M1E05jWWHDBydtWZR2O8Y+yOOLaudX5qK1?= =?us-ascii?Q?A0dHNu/dIDj0aQftWZGpvwR6Kp43XI7zgBbF91Yj4YgNWl3zqoHiPvEcGHgd?= =?us-ascii?Q?NinvYogyYMUkpFLGGDG6mnT0rrZET9+uAzxDMSgX4iBeRlqu/BPd1lKAt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jE4horaPloJ30H?= X-Forefront-Antispam-Report: CIP:216.228.117.161; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge2.nvidia.com; CAT:NONE; SFS:(13230040)(376014)(1800799024)(36860700013)(82310400026); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jul 2024 10:50:41.8863 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4cf7c1c3-a0ae-4a30-6c3a-08dca2607999 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.161]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DS1PEPF00017096.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV8PR12MB9182 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 23.11.2 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 07/14/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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging This queued commit can be viewed at: https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=df41307515505e5cda18f987b42b9ede9764f15c Thanks. Xueming Li --- >From df41307515505e5cda18f987b42b9ede9764f15c 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 Cc: Xueming Li [ 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 c7d3a968c1..a09aa3bb85 100644 --- a/app/test-pmd/config.c +++ b/app/test-pmd/config.c @@ -4606,9 +4606,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 a4c09e2a2b..7e23393392 100644 --- a/app/test-pmd/parameters.c +++ b/app/test-pmd/parameters.c @@ -877,8 +877,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 5bb1a79330..db6d0d35f4 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.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-07-12 18:40:16.244674870 +0800 +++ 0047-app-testpmd-fix-lcore-ID-restriction.patch 2024-07-12 18:40:14.076594231 +0800 @@ -1 +1 @@ -From 2bf44dd14fa50fa95e090058ec83c2eb96b64ac5 Mon Sep 17 00:00:00 2001 +From df41307515505e5cda18f987b42b9ede9764f15c Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit 2bf44dd14fa50fa95e090058ec83c2eb96b64ac5 ] @@ -15 +17,0 @@ -Cc: stable@dpdk.org @@ -26 +28 @@ -index f62ba90c87..66c3a68c1d 100644 +index c7d3a968c1..a09aa3bb85 100644 @@ -29 +31 @@ -@@ -4782,9 +4782,9 @@ fwd_stream_on_other_lcores(uint16_t domain_id, lcoreid_t src_lc, +@@ -4606,9 +4606,9 @@ fwd_stream_on_other_lcores(uint16_t domain_id, lcoreid_t src_lc, @@ -42 +44 @@ -index c13f7564bf..22364e09ab 100644 +index a4c09e2a2b..7e23393392 100644 @@ -45,11 +47,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", +@@ -877,8 +877,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 +59 @@ -index 0afae7d771..9facd7f281 100644 +index 5bb1a79330..db6d0d35f4 100644