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 E3E5645CE3 for ; Mon, 11 Nov 2024 07:30:09 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D3AC64067A; Mon, 11 Nov 2024 07:30:09 +0100 (CET) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2070.outbound.protection.outlook.com [40.107.237.70]) by mails.dpdk.org (Postfix) with ESMTP id 41D844067A for ; Mon, 11 Nov 2024 07:30:09 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Po6GQgTqXPQVeBNQ+f44C4NCLkhhVnmwBUubj6X3DZcHBT8FxGl5o48JOvk8gLtjZTjFdKGfS0WX88DqfsZuFwMpxBWgeNA+SKJ4oueWf+qWeB8hh2P5YCMfvfnz+kCrXV9UDrbfoZZu1G6gq76hfOrSRu7m++eDLduNFIVAlssrbRXh9T3Ch5CK4pD+/jUap0bwkcTBgLnMJxv4QiVbahSmmKG6mnPIQovEkQfhhaQz35iLoitvB//BwLaDNRsfmqGYLWzAe9Olbmie4GyzgRZolKHcvC8qvzRZv41QrJR2ZiZN4vhfuwylITVcWL1dlngh/bp03e7eiHgW/uejbg== 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=waJduFWck69rg5M84eFmLfXPOXYdwqwS8Sszr7q4Ycs=; b=usX5JvCtBRPTsb4jKbs/wLbogNWVHFJPrRMD3PnvbejmUUxcsY4eL/lx6KxdM+PZyCzwxkhU+j1tBfDFyLP0rqypkONk/EUNKXbuXbC3iy466Dy6f9wfpK7Qnc3gx3wGftSpRB/pRNqLXHUFJ+cTLtc6zSsGr9/GdNGjGKfcEWd5+jsoihCRioel4ehjysSz+UpVqpj+r2s6uCx6/FV7hGq1Nbon9ub/K3VLLj5+9fXYYWsa7cXctnPtLoo5PKo+WLL1IivMjwEhzg3S+v7vsx0vbzDGKQ5wO49TF9NPGzp4du/UFw+04E95JreOZYaOTp5o5bVsjd2IDqWPsfoPqg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) 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=waJduFWck69rg5M84eFmLfXPOXYdwqwS8Sszr7q4Ycs=; b=DwjqbrGkT4A3hFBPPtrZLitHeWzIwhZ7X4dD7TlYPEWMmJ7IAr+QM07vyCndrpmjNGNmG8r9GI/PQ9tpfAIkVBXPaUVrhAbhj7CS9mQsoITsmQeYiiysVvRJ/7nnTIfLTD0ZKhqCNne+v6gGFMGPz/nC0Oz4o0FLAiyn1Pr17064MWjZJKfFjY9DoLHrsONG+EwInSHX0Q7GETPUEorGEePfk5K835qxb04dHdA7+B1rPk/RmHI9soNdEPAojQgS+6URmusHKtlIk4hvwsgNnDGRfJjQUTFUcgfbb9yWPbLILcMBLU5PwEAXmmelgTy6Adl/o3hCHWSNndamCU5UNQ== Received: from DS7PR03CA0144.namprd03.prod.outlook.com (2603:10b6:5:3b4::29) by SA3PR12MB9089.namprd12.prod.outlook.com (2603:10b6:806:39f::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8137.28; Mon, 11 Nov 2024 06:30:04 +0000 Received: from DS1PEPF0001708F.namprd03.prod.outlook.com (2603:10b6:5:3b4:cafe::b1) by DS7PR03CA0144.outlook.office365.com (2603:10b6:5:3b4::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8137.27 via Frontend Transport; Mon, 11 Nov 2024 06:30:04 +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 DS1PEPF0001708F.mail.protection.outlook.com (10.167.17.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8158.14 via Frontend Transport; Mon, 11 Nov 2024 06:30:02 +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; Sun, 10 Nov 2024 22:29:45 -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.1544.4; Sun, 10 Nov 2024 22:29:43 -0800 From: Xueming Li To: Chengwen Feng CC: , Chenxingyu Wang , "Pavan Nikhilesh" , dpdk stable Subject: patch 'examples/eventdev: fix queue crash with generic pipeline' has been queued to stable release 23.11.3 Date: Mon, 11 Nov 2024 14:26:53 +0800 Message-ID: <20241111062847.216344-8-xuemingl@nvidia.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241111062847.216344-1-xuemingl@nvidia.com> References: <20241111062847.216344-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: DS1PEPF0001708F:EE_|SA3PR12MB9089:EE_ X-MS-Office365-Filtering-Correlation-Id: fe0f0099-5203-4118-4d7a-08dd021a464b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|36860700013|376014|82310400026|1800799024; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?iQvAs8dUVMfnAueTvEq2alKPb1+nfbuh/NYbtMK9yRMiaJkdkzWg0RvUOL37?= =?us-ascii?Q?EdVvYLRKg9kvlIAd5AdX6CRjtxTE+aPXsbGGsChg12iCs9sZsbzKDHFNZ+80?= =?us-ascii?Q?Dh9/Bcm4Wtn4nhr2Mk2Y+XURuR2j+XsNqsiY1AfVJXufzXsSVAs/bTBiR5gO?= =?us-ascii?Q?mMfcKwE1mbDcOYkVIs2v7BcnTBX7Ml3Pyo2gMVlFbfX1lMRhP7/D6ImJoPIt?= =?us-ascii?Q?G3YaiyqhQklDuHPC0ZpCCOCjg20vxBvJ3UCS0sCNV82tqDjZYJC7NUR9/XZN?= =?us-ascii?Q?FIj9t+/9v6Is2rXAd2Annl+K6mw2Z8WzJ/CmD/QTiDulBWH/KqhZjOAjH5QF?= =?us-ascii?Q?oXCZKwvy3lO+9gZ58PuIY/ujK/hAZcjGUuxDxGzE593aVtZETfHWZHnxIXH8?= =?us-ascii?Q?hoja6m3eijzhGwz3bBAboJV9XxLIcSz90eLYK9fN/GbGFe42RN0lfiuUv/Cw?= =?us-ascii?Q?w8/5keQpsZr5hrSuoks5QkvOOhlYGqJ6mCaYndTd59GryS/+37LMDjzyeJt8?= =?us-ascii?Q?+lDliXm19O90Kc4En7WozMhhwMxOt/OdeRr68YkgrTYAvM5dnAdwif+axdEi?= =?us-ascii?Q?ldX+3666CkaO+BuWTF1tGrJikFnZiHC0GveQSqpig9AWngP+c0nuxkmaMWS4?= =?us-ascii?Q?2q2UnIoWJMOghs61uwptDqHCTisexlbjPn2L3BUVoTBT+tufNpt/77+M21vv?= =?us-ascii?Q?8muEpfH6PHwQvP4whOdJRlzG28pOf5Oo2AiKzH4gqKVskLdUsKCfSas1Ep8D?= =?us-ascii?Q?daQw8GsHxtKlwhGMkG3XKrZpFunD8b9cWI+rr4RkKcvjT7wwDzbHMmL3DyZ0?= =?us-ascii?Q?vPTSLCw4DXtj4IPLzF4cnwzdC5lEmaB5WHoL6tOnThWO1JV86sCCDpRdaIR5?= =?us-ascii?Q?DLigqDey1Wvfge8qkELGTWy7gLxYQkodOn9A/UoLCS7qCWmUh0rpHXVMfbnL?= =?us-ascii?Q?8dIlWx0hzU8wU70PLsnMuE+IUJwsjNOIuJhYdHLQxhDWjXR9Ma1pviLF85PC?= =?us-ascii?Q?MMGzR/uDjWBEfXj341rNZ6kNZL9hmFTPuvv579QMVDaaMrcrwRve22rrwKd5?= =?us-ascii?Q?+ofNzyfzEEcZ2kg2XewXDQzDM3z6QuzBwhZd9WXF5a5tdMM47ta94iek9aaX?= =?us-ascii?Q?yFrGhjf4WeRKx+EpoWtccWKr/4oLC/YqNx4mwhRboxRWDW/g1gJUeIy+P7aw?= =?us-ascii?Q?WNOs97cfK+4OkGPcP48rHUHvJx8aKUY804K9uXpL9PCnCPVcUqhXqcJW0kRe?= =?us-ascii?Q?HCUYSPV3tXI7Oa0vJ5SX1jqeF8MC89Eu/6dytoArCdbIH237pNHVjHg05Ia5?= =?us-ascii?Q?HQCRHpKJApiZpatco21JRqWH0NhUbuujIRVgnv/928p84KgOoPzDpQAU3fXg?= =?us-ascii?Q?rGSWF/Nc+9aY2GLd3Nlndg8m+NXTrmiyxiJAvLhsAXhAWKDkwQ=3D=3D?= 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)(36860700013)(376014)(82310400026)(1800799024); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Nov 2024 06:30:02.6661 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: fe0f0099-5203-4118-4d7a-08dd021a464b 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: DS1PEPF0001708F.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA3PR12MB9089 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.3 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/30/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=993e9b6fdf97d1ae2b30766c7b273c3e80de94a5 Thanks. Xueming Li --- >From 993e9b6fdf97d1ae2b30766c7b273c3e80de94a5 Mon Sep 17 00:00:00 2001 From: Chengwen Feng Date: Wed, 18 Sep 2024 06:41:42 +0000 Subject: [PATCH] examples/eventdev: fix queue crash with generic pipeline Cc: Xueming Li [ upstream commit f6f2307931c90d924405ea44b0b4be9d3d01bd17 ] There was a segmentation fault when executing eventdev_pipeline with command [1] with ConnectX-5 NIC card: 0x000000000079208c in rte_eth_tx_buffer (tx_pkt=0x16f8ed300, buffer=0x100, queue_id=11, port_id=0) at ../lib/ethdev/rte_ethdev.h:6636 txa_service_tx (txa=0x17b19d080, ev=0xffffffffe500, n=4) at ../lib/eventdev/rte_event_eth_tx_adapter.c:631 0x0000000000792234 in txa_service_func (args=0x17b19d080) at ../lib/eventdev/rte_event_eth_tx_adapter.c:666 0x00000000008b0784 in service_runner_do_callback (s=0x17fffe100, cs=0x17ffb5f80, service_idx=2) at ../lib/eal/common/rte_service.c:405 0x00000000008b0ad8 in service_run (i=2, cs=0x17ffb5f80, service_mask=18446744073709551615, s=0x17fffe100, serialize_mt_unsafe=0) at ../lib/eal/common/rte_service.c:441 0x00000000008b0c68 in rte_service_run_iter_on_app_lcore (id=2, serialize_mt_unsafe=0) at ../lib/eal/common/rte_service.c:477 0x000000000057bcc4 in schedule_devices (lcore_id=0) at ../examples/eventdev_pipeline/pipeline_common.h:138 0x000000000057ca94 in worker_generic_burst (arg=0x17b131e80) at ../examples/eventdev_pipeline/ pipeline_worker_generic.c:83 0x00000000005794a8 in main (argc=11, argv=0xfffffffff470) at ../examples/eventdev_pipeline/main.c:449 The root cause is that the queue_id (11) is invalid, the queue_id comes from mbuf.hash.txadapter.txq which may pre-write by NIC driver when receiving packets (e.g. pre-write mbuf.hash.fdir.hi field). Because this example only enabled one ethdev queue, so fixes it by reset txq to zero in the first worker stage. [1] dpdk-eventdev_pipeline -l 0-48 --vdev event_sw0 -- -r1 -t1 -e1 -w ff0 -s5 -n0 -c32 -W1000 -D When launch eventdev_pipeline with command [1], event_sw Fixes: 81fb40f95c82 ("examples/eventdev: add generic worker pipeline") Signed-off-by: Chengwen Feng Signed-off-by: Chenxingyu Wang Acked-by: Pavan Nikhilesh --- .mailmap | 1 + examples/eventdev_pipeline/pipeline_worker_generic.c | 12 ++++++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.mailmap b/.mailmap index f2883144f3..7aa2c27226 100644 --- a/.mailmap +++ b/.mailmap @@ -229,6 +229,7 @@ Cheng Peng Chengwen Feng Chenmin Sun Chenming Chang +Chenxingyu Wang Chenxu Di Chenyu Huang Cheryl Houser diff --git a/examples/eventdev_pipeline/pipeline_worker_generic.c b/examples/eventdev_pipeline/pipeline_worker_generic.c index 783f68c91e..831d7fd53d 100644 --- a/examples/eventdev_pipeline/pipeline_worker_generic.c +++ b/examples/eventdev_pipeline/pipeline_worker_generic.c @@ -38,10 +38,12 @@ worker_generic(void *arg) } received++; - /* The first worker stage does classification */ - if (ev.queue_id == cdata.qid[0]) + /* The first worker stage does classification and sets txq. */ + if (ev.queue_id == cdata.qid[0]) { ev.flow_id = ev.mbuf->hash.rss % cdata.num_fids; + rte_event_eth_tx_adapter_txq_set(ev.mbuf, 0); + } ev.queue_id = cdata.next_qid[ev.queue_id]; ev.op = RTE_EVENT_OP_FORWARD; @@ -96,10 +98,12 @@ worker_generic_burst(void *arg) for (i = 0; i < nb_rx; i++) { - /* The first worker stage does classification */ - if (events[i].queue_id == cdata.qid[0]) + /* The first worker stage does classification and sets txq. */ + if (events[i].queue_id == cdata.qid[0]) { events[i].flow_id = events[i].mbuf->hash.rss % cdata.num_fids; + rte_event_eth_tx_adapter_txq_set(events[i].mbuf, 0); + } events[i].queue_id = cdata.next_qid[events[i].queue_id]; events[i].op = RTE_EVENT_OP_FORWARD; -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-11-11 14:23:05.843270025 +0800 +++ 0007-examples-eventdev-fix-queue-crash-with-generic-pipel.patch 2024-11-11 14:23:05.012192842 +0800 @@ -1 +1 @@ -From f6f2307931c90d924405ea44b0b4be9d3d01bd17 Mon Sep 17 00:00:00 2001 +From 993e9b6fdf97d1ae2b30766c7b273c3e80de94a5 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit f6f2307931c90d924405ea44b0b4be9d3d01bd17 ] @@ -46 +48,0 @@ -Cc: stable@dpdk.org @@ -57 +59 @@ -index 94fa73aa36..8a832ba4be 100644 +index f2883144f3..7aa2c27226 100644 @@ -60 +62 @@ -@@ -236,6 +236,7 @@ Cheng Peng +@@ -229,6 +229,7 @@ Cheng Peng