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 B433843B7D for ; Tue, 5 Mar 2024 10:57:28 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id ACF794026B; Tue, 5 Mar 2024 10:57:28 +0100 (CET) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2044.outbound.protection.outlook.com [40.107.237.44]) by mails.dpdk.org (Postfix) with ESMTP id 884584014F for ; Tue, 5 Mar 2024 10:57:26 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=T1BFSVXOg358IKpbWMxdTV+Wc+owq9x8dkZlSaO5LGIxVTnt9GXeORdSRzddqimxVu3ADBPHjyjFKMoOMhmTrlfRwwLcHbIvrG5aR0VjZU4Z76t40P2pp52vRljGW58ZQEUWQ4O8SvexMIViQrgqoioEqgnvomuNQastQ7yzGO6smtZXMA/FCdxndMCdc7laDd+YapGglG6fM8CuxDL4dvZgIKUHgL4Tine2t5B84gGuFNugH0PgX/3MZqG7kLMKW0pymsCfNvMuwytmht+CUCRJzNJWM019rqhbdmm7FERioEFRofONChpNn9OpDMo1RqDPLJIQ4pue69Zka3jphA== 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=keA76vBPOtQk1pgXSwXjwT0N3OI2JbA7+yhCER92Hbo=; b=PuxxmikZQwlWXKuQWccX4aRlHJyhHSMn1g86zJBInT41FyVcJr+u/z7y/1com3C4XNjSqHyzka74uhNAYB/nVyrcOxhI81KA/TZyZVNOtCf6fAG1uALr9yRfUKcVNW3vVrT4qaQ1Sjzw7eTkyyLrTDg/R/l3DiRV7TNbNJbxY32rwHaOs0TMwLsjCSQlnDbbJ1LESFK8ucvr0iYHOyL5bCDsIC3qwpwCTEslA+1jtA7oyghZ+iScSTm0oOI6m5nZ1a0hFIP/hwydXxYC22Uh/JL2e7Uy7Rr+GRtSr6WbAQdQZepDPZcVyVPtfbEXoP8PJ3mqeoqzcuMwf7FXuqhbOw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=huawei.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=keA76vBPOtQk1pgXSwXjwT0N3OI2JbA7+yhCER92Hbo=; b=KqI0ULGDJPfD57XcUMQ1Lbfr7pD3W34wICQ79W8ltqmRHlaC2GxFm0VgrVeytTaPgwgpnDAuiAj8Chqzce8XlN8c8f05io2kgnS1LngZIerKAKrc2Abh2THKR1a1XOKEC6QeBvO9jHV81XXaPd7bEhU3aQea4athyIc7nRgQHl3vIVWTglnKJF/cDaA6sA6BAatVhB9SR8hT0Lfr1w/ZV5xIZr+goLCJaqcM8qmeJ1mBvaZ3bGrz6taXyhcN0hwjkoF4rq3Ml4LPtZTlpACIF/pVzuZgpCqZdXDHpeZtzlJCvtEBZzF0NaU+hbZ70hQYq5HoHF7PlmPudoaWFUg2RQ== Received: from SJ0PR05CA0125.namprd05.prod.outlook.com (2603:10b6:a03:33d::10) by CH3PR12MB8306.namprd12.prod.outlook.com (2603:10b6:610:12c::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7339.38; Tue, 5 Mar 2024 09:57:24 +0000 Received: from CO1PEPF000042A7.namprd03.prod.outlook.com (2603:10b6:a03:33d:cafe::2e) by SJ0PR05CA0125.outlook.office365.com (2603:10b6:a03:33d::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7362.23 via Frontend Transport; Tue, 5 Mar 2024 09:57:24 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) 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.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by CO1PEPF000042A7.mail.protection.outlook.com (10.167.243.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7362.11 via Frontend Transport; Tue, 5 Mar 2024 09:57:23 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Tue, 5 Mar 2024 01:57:07 -0800 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.1258.12; Tue, 5 Mar 2024 01:57:05 -0800 From: Xueming Li To: Dengdui Huang CC: Chengwen Feng , Ferruh Yigit , dpdk stable Subject: patch 'app/testpmd: fix crash in multi-process forwarding' has been queued to stable release 23.11.1 Date: Tue, 5 Mar 2024 17:47:21 +0800 Message-ID: <20240305094757.439387-101-xuemingl@nvidia.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240305094757.439387-1-xuemingl@nvidia.com> References: <20240305094757.439387-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: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1PEPF000042A7:EE_|CH3PR12MB8306:EE_ X-MS-Office365-Filtering-Correlation-Id: da90abd5-dfcd-4c75-65f7-08dc3cfaa81c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: IXJGGfNkVDozmhNB+ckm9hcvxywL1gnrYXaTLef78Arv+R/vtLE47r51ls6CFJ/zmybNiH2x3kdkkPTnKuIamtqQ1DSSETiQz3BJSPJU5bUZLIJJ5JjuzPs26OIzDZEwUMiKtOqG8isnJxpuC5T30d9ENRoZAEfzj1MXhyEyRgGmbilE97vzV854yxwDAhwi+zhix7kdUetl+uYdY/TpkjV2MNjX4dab+PDfFa+EQVSpu3etIMZ+YCoovd3Z6hp25tgAsXlojDNFEcLCyqaeocSm9JysIVQMey7mzmgCfiHjbTgG26Dv82V+PkeyDYBJDSqZIepQQCQ+GqXVtreJrgNazyLqwBQKNVZsnzADo/X+QcHos1zAWOflPznhlNychr9ZohWOzokf8aL2zzXua56gvAsLzlni3bU/tJdHGHzCfClKg7U52/vYvqQk6fMaLTSHX0VClQh6dJ8UBJNgJVxEA1rBxnu8lLxjqjKOrxPvnu6cIamY7fzGSoiGmtln4fYpu1wIVoCkCCCOFN3WzBH8/M8G2PdsTPl4FXtPOk6eGHplxBcMnik4XVLbbV0zrr2qXdvfHZsnlkpa2dKL9BbTreFy3H1Bg92d62UBAYPUp6skk4OuhMMsfp5y5Hf3uGUARrl1RLCFMzKbHisvAYan9qjTHuNjxTtVyDkk6pu0DR+p41TWOE82hlnxJl6cvgsW2zB4bcE6kfaj9sQftlMqr50USIughVRHXOOizD5wH9O8yz5kXExlXooFv0os X-Forefront-Antispam-Report: CIP:216.228.117.160; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge1.nvidia.com; CAT:NONE; SFS:(13230031)(36860700004)(376005)(82310400014); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Mar 2024 09:57:23.8285 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: da90abd5-dfcd-4c75-65f7-08dc3cfaa81c 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.160]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CO1PEPF000042A7.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR12MB8306 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.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 03/31/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=49b4ce1f949f50caa700026d9128b61231816504 Thanks. Xueming Li --- >From 49b4ce1f949f50caa700026d9128b61231816504 Mon Sep 17 00:00:00 2001 From: Dengdui Huang Date: Tue, 30 Jan 2024 09:32:49 +0800 Subject: [PATCH] app/testpmd: fix crash in multi-process forwarding Cc: Xueming Li [ upstream commit b3a33138f317d1c651cd86f423cc703176eb7b07 ] On multi-process scenario, each process creates flows based on the number of queues. When nbcore is greater than 1, multiple cores may use the same queue to forward packet, like: dpdk-testpmd -a BDF --proc-type=auto -- -i --rxq=4 --txq=4 --nb-cores=2 --num-procs=2 --proc-id=0 testpmd> start mac packet forwarding - ports=1 - cores=2 - streams=4 - NUMA support enabled, MP allocation mode: native Logical Core 2 (socket 0) forwards packets on 2 streams: RX P=0/Q=0 (socket 0) -> TX P=0/Q=0 (socket 0) peer=02:00:00:00:00:00 RX P=0/Q=1 (socket 0) -> TX P=0/Q=1 (socket 0) peer=02:00:00:00:00:00 Logical Core 3 (socket 0) forwards packets on 2 streams: RX P=0/Q=0 (socket 0) -> TX P=0/Q=0 (socket 0) peer=02:00:00:00:00:00 RX P=0/Q=1 (socket 0) -> TX P=0/Q=1 (socket 0) peer=02:00:00:00:00:00 After this commit, the result will be: dpdk-testpmd -a BDF --proc-type=auto -- -i --rxq=4 --txq=4 --nb-cores=2 --num-procs=2 --proc-id=0 testpmd> start io packet forwarding - ports=1 - cores=2 - streams=2 - NUMA support enabled, MP allocation mode: native Logical Core 2 (socket 0) forwards packets on 1 streams: RX P=0/Q=0 (socket 2) -> TX P=0/Q=0 (socket 2) peer=02:00:00:00:00:00 Logical Core 3 (socket 0) forwards packets on 1 streams: RX P=0/Q=1 (socket 2) -> TX P=0/Q=1 (socket 2) peer=02:00:00:00:00:00 Fixes: a550baf24af9 ("app/testpmd: support multi-process") Signed-off-by: Dengdui Huang Acked-by: Chengwen Feng Acked-by: Ferruh Yigit --- app/test-pmd/config.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c index cad7537bc6..2c4dedd603 100644 --- a/app/test-pmd/config.c +++ b/app/test-pmd/config.c @@ -4794,7 +4794,6 @@ rss_fwd_config_setup(void) queueid_t nb_q; streamid_t sm_id; int start; - int end; nb_q = nb_rxq; if (nb_q > nb_txq) @@ -4802,7 +4801,7 @@ rss_fwd_config_setup(void) cur_fwd_config.nb_fwd_lcores = (lcoreid_t) nb_fwd_lcores; cur_fwd_config.nb_fwd_ports = nb_fwd_ports; cur_fwd_config.nb_fwd_streams = - (streamid_t) (nb_q * cur_fwd_config.nb_fwd_ports); + (streamid_t) (nb_q / num_procs * cur_fwd_config.nb_fwd_ports); if (cur_fwd_config.nb_fwd_streams < cur_fwd_config.nb_fwd_lcores) cur_fwd_config.nb_fwd_lcores = @@ -4824,7 +4823,6 @@ rss_fwd_config_setup(void) * the 2~3 queue for secondary process. */ start = proc_id * nb_q / num_procs; - end = start + nb_q / num_procs; rxp = 0; rxq = start; for (sm_id = 0; sm_id < cur_fwd_config.nb_fwd_streams; sm_id++) { @@ -4843,8 +4841,6 @@ rss_fwd_config_setup(void) continue; rxp = 0; rxq++; - if (rxq >= end) - rxq = start; } } -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-03-05 17:39:33.997079900 +0800 +++ 0100-app-testpmd-fix-crash-in-multi-process-forwarding.patch 2024-03-05 17:39:30.873566496 +0800 @@ -1 +1 @@ -From b3a33138f317d1c651cd86f423cc703176eb7b07 Mon Sep 17 00:00:00 2001 +From 49b4ce1f949f50caa700026d9128b61231816504 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit b3a33138f317d1c651cd86f423cc703176eb7b07 ] @@ -33 +35,0 @@ -Cc: stable@dpdk.org