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 43E8C45802; Sun, 18 Aug 2024 10:36:00 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C7CFB4014F; Sun, 18 Aug 2024 10:35:59 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 919A4400D5 for ; Sun, 18 Aug 2024 10:34:59 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 47I5lJ2q008272; Sun, 18 Aug 2024 01:34:58 -0700 Received: from nam11-dm6-obe.outbound.protection.outlook.com (mail-dm6nam11lp2169.outbound.protection.outlook.com [104.47.57.169]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 4134390tmn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sun, 18 Aug 2024 01:34:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=IoKFGQmsUtu1HAS30ujmOPYTfidbcmPeDWv0P96u1KNMx+X7PBdFX4fbufBqnJb6PC6fvHAgzLtkV0PgtgOis1KMWCjO52q87eu0Us1hSd9WFsrrv0I3n6Ep9P8HQWF80mvBMQ+I3Z/ebOrGj2UTmNWq2wreyNboMxl0+0+uiCL1zsUNWKfwAU7ltfuSvzXl9oM/ABvYe+7Gtzwd/aHVM2ldSEFotPeG6cpoAORHMf++nWhDVVMAAcZgivU4H4Qfz3vqDX394rwlR+IqhM0pg9vwgYnxXbBNxlIjZV7R5xccwM62qv9KYOj85Pd0fao8EyotPo/4BWCy3bq7dcylOQ== 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=3arq0glz7nqau6Jm61yERT0XolayM2J2IjpviLdBriU=; b=ZNUhJeuzxcZE+CmkLdnve6+KGa0lESlyoFlVMAH8wOXapQLYKQDEjdOCJ5DUmxRne1Tbz8ujnvS/zM/NWYNIp0Z5n7FuoXgbtb41KpakOvvAgRex7Ss9HdkTPrODcafmsuH4qlcnls79aqMoT2Zx7q79e8UiR8YjExtEOdbxFAp4VM03SiOumUJ7zq+PpinoG6/zgatYkxgX6nZGHYJRYckWxI4J65NGk7IZE8ClOn4FGfI5DfbHfoxPZQiXuO3fJPNQH4x+hdiMLxY94C6t7Eu45OcKhyrqzgOWFtszy93ZO4DG5E1KmSTevGJscC2xClL7uy5Pl272EDkqLYOj7w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=marvell.com; dmarc=pass action=none header.from=marvell.com; dkim=pass header.d=marvell.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=3arq0glz7nqau6Jm61yERT0XolayM2J2IjpviLdBriU=; b=ZYVJ3YbN+0DRa0wzVybEOjrO8OcVF0pcydQzZ2MJhImTNVioPG9ONCgQlResSSTDxPUW4Sdu0I4FCwsz5x2SiI4ElYmIp+1vmpbeb+NtNRozhweyzWPnes9eSEZ2H2Ff4sgeJmt9+B5QDSe3evft1Ey9CUBxZNqFklMeW9SBDdc= Received: from PH0PR18MB4086.namprd18.prod.outlook.com (2603:10b6:510:3::9) by SN7PR18MB3806.namprd18.prod.outlook.com (2603:10b6:806:109::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7875.20; Sun, 18 Aug 2024 08:34:53 +0000 Received: from PH0PR18MB4086.namprd18.prod.outlook.com ([fe80::ed37:4ea0:6359:f717]) by PH0PR18MB4086.namprd18.prod.outlook.com ([fe80::ed37:4ea0:6359:f717%3]) with mapi id 15.20.7875.019; Sun, 18 Aug 2024 08:34:52 +0000 From: Pavan Nikhilesh Bhagavatula To: "Van Haaren, Harry" , Chengwen Feng , "thomas@monjalon.net" , "dev@dpdk.org" CC: "wangchenxingyu@huawei.com" Subject: RE: [PATCH] examples/eventdev: fix segment fault with generic pipeline Thread-Topic: [PATCH] examples/eventdev: fix segment fault with generic pipeline Thread-Index: AQHa5AQqzz05hc83w0C9q1fCsDA4b7ISVqKygBpz48A= Date: Sun, 18 Aug 2024 08:34:52 +0000 Message-ID: References: <20240801111120.5380-1-fengchengwen@huawei.com> In-Reply-To: Accept-Language: en-US, en-IN Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: PH0PR18MB4086:EE_|SN7PR18MB3806:EE_ x-ms-office365-filtering-correlation-id: 444e7c67-afc4-49ca-7fea-08dcbf60a13d x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; ARA:13230040|1800799024|376014|366016|38070700018; x-microsoft-antispam-message-info: =?utf-8?B?MkxSZHR0U2pYMWdwTkV0dUtvNE1lbDA1Q01NdVRrdjJzQ1hjMnJOVXhzNGti?= =?utf-8?B?ZE5QYjN2VzdxYTBPKzVKc0ptdk9oZlBNYVFOWDBDeFBBNThkbXdFWDhEdks1?= =?utf-8?B?am5yRXA3UlhpQUNPRFp5elpiekFjcWZVNnNLTG5Ob3NoM2ZjZ1R1STBCd2ZP?= =?utf-8?B?VUJ5cnpvZjdHZ1cwRWptb1VvellETm1JSlZBMk0rcGFqVnd0NWJUTWJ3dXNm?= =?utf-8?B?RHgwdk9rNDVDL3B6MGtmb3gxZHNT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rUHVZOTlXRTlPNER6dE1ZT1FKV1gwaHViT2V3aEM1bEwxK1RWTkNz?= =?utf-8?B?MVRXTnJsUStpSVpPdEZyWE9aSng5ak5HOVBEaHY3cmI1Y2NrTlF4M3oyNWFY?= =?utf-8?B?Z3lHSnF2OFFYNnlzczlrekJCZ3ZNZ1k4QkFqRDgyaGFueWg1cHJYSDFvbUhG?= =?utf-8?B?RXJPbWgrUjdac3EwMlFNTnF0VWl5bld1K1M2OS96UVRlOHRWUXJ0ZGZ2V0hh?= =?utf-8?B?cGMwTk9YL2MzbkRJdVE5MDM2SENhVitwL2pFTGt3UFlady9UbGZvaGc5RUdj?= =?utf-8?B?M2M3Sk9MMmdRNWJQdkUvV0VxS1RncldnL3EwNWVZeWhoVXI1bXpTc3diL1JB?= =?utf-8?B?eDlyTTR3N0hxOUhTamRZS0JKRTd3eU1Ma2lzYTRLSGcvM2YzS0FyS3VjYy96?= =?utf-8?B?czBPcEJtYXlGWkZhRmxQTnVMUnVycFVzNlhQN0ZsRzREaUtacjY3d2xOcmNJ?= =?utf-8?B?LzdJSnU2OC9UOXlPdFltM0xBNmxLMGFXQkwvRCs1V0p5YVZCS1ZWRDk0L2RQ?= =?utf-8?B?QUZWREJ3ZnFrWXZVbjVqaFhtSyt5Tmp6M28ya2VNTFZUc1ZBem9YeEd6cklh?= =?utf-8?B?RitwQU5TV2pWY1MyUkoxdHh3UzJLUFBaeEhYMTI4VUQ1Q2ZXcWJ3UkJMRzVY?= =?utf-8?B?S25Id05MZ3RzT0cxUjBWTndyZWpXUWxROEtBc3RZSUhXRHpYeWZYUWRCc2xV?= =?utf-8?B?MWFlSEhpTjBEZ3hEdkhJQnMwQXNBcUhoVGJwTS9OYWo1Smc9PQ==?= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR18MB4086.namprd18.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(1800799024)(376014)(366016)(38070700018);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1NsbnZ5R3h1?= =?utf-8?B?bWZPdnp4QmNYMnlwaGM5QkRQbnNxQzdqQUkxalhncFZvYWp2K3pqZmg2MlNq?= =?utf-8?B?Q2dtYS80YzVFcFRRZExDNUpLcFk1L0ppeUROeWZEaFhoa0xFN0NVdFdVRzF4?= =?utf-8?B?cnJET0h4MHdlNUtBRkF6ZnhEV050SlN0eUxQcVFZdStsYUgwb09rNHlJZXZ0?= =?utf-8?B?Mmh3OERIaDdaMjRsVi94UGVIUEl1VlVZRHc1Q0xDZmNZNWtxcGNLZlJzSFNG?= =?utf-8?B?dGhCZlQ5V0xHcklRbVB4ODRDZ1I4VEJJSE9RYzBZb2xIekJDdE9BckJ0djYx?= =?utf-8?B?TWI1N3gvaGtwRmpwU3Q1SUg3VmxUcHlvVlRtZ2xacFdkYTVDVUFWeW9BUnFw?= =?utf-8?Q?w1Qz3JpaMuinwriKqAlohncKI?= MIME-Version: 1.0 X-OriginatorOrg: marvell.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PH0PR18MB4086.namprd18.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 444e7c67-afc4-49ca-7fea-08dcbf60a13d X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Aug 2024 08:34:52.2555 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: F/lsa7mKDGdBSWmayNR65rc0oDepdCh3FwyjyVYJ+AUktpWNJt/8d5FXdsxCJTzbHOlggeGEppFkyeEjYvN1cwkYSoGwbuttKoItY5gdD+c= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR18MB3806 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Proofpoint-ORIG-GUID: Phn2zA-LUx5EBTUX51KDfm3ShvVBUNnX X-Proofpoint-GUID: Phn2zA-LUx5EBTUX51KDfm3ShvVBUNnX X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.28.16 definitions=2024-08-18_08,2024-08-16_01,2024-05-17_01 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org > -----Original Message----- > From: Van Haaren, Harry > Sent: Thursday, August 1, 2024 6:14 PM > To: Chengwen Feng ; thomas@monjalon.net; > dev@dpdk.org > Cc: wangchenxingyu@huawei.com; Pavan Nikhilesh Bhagavatula > > Subject: [EXTERNAL] Re: [PATCH] examples/eventdev: fix segment fault with > generic pipeline >=20 > > From: Chengwen Feng > Sent:= Thursday, > August 1, 2024 12:=E2=80=8A11 PM > To: thomas@=E2=80=8Amonjalon.=E2=80=8A= net > ; dev@=E2=80=8Adpdk.=E2=80=8Aorg <= dev@=E2=80=8Adpdk.=E2=80=8Aorg> > Cc: Van > Haaren, Harry ; >=20 > > From: Chengwen Feng > > Sent: Thursday, August 1, 2024 12:11 PM > > To: thomas@monjalon.net ; dev@dpdk.org > > > Cc: Van Haaren, Harry ; > wangchenxingyu@huawei.com > > Subject: [PATCH] examples/eventdev: fix segment fault with generic pipe= line > > > > 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=3D0x16f8ed300, > buffer=3D0x100, queue_id=3D11, port_id=3D0) at ../lib/ethdev/rte_ethdev.h= :6636 > > txa_service_tx (txa=3D0x17b19d080, ev=3D0xffffffffe500, n=3D4) at > ../lib/eventdev/rte_event_eth_tx_adapter.c:631 > > 0x0000000000792234 in txa_service_func (args=3D0x17b19d080) at > ../lib/eventdev/rte_event_eth_tx_adapter.c:666 > > 0x00000000008b0784 in service_runner_do_callback (s=3D0x17fffe100, > cs=3D0x17ffb5f80, service_idx=3D2) at ../lib/eal/common/rte_service.c:405 > > 0x00000000008b0ad8 in service_run (i=3D2, cs=3D0x17ffb5f80, > service_mask=3D18446744073709551615, s=3D0x17fffe100, > serialize_mt_unsafe=3D0) > > at ../lib/eal/common/rte_service.c:441 > > 0x00000000008b0c68 in rte_service_run_iter_on_app_lcore (id=3D2, > serialize_mt_unsafe=3D0) at ../lib/eal/common/rte_service.c:477 > > 0x000000000057bcc4 in schedule_devices (lcore_id=3D0) at > ../examples/eventdev_pipeline/pipeline_common.h:138 > > 0x000000000057ca94 in worker_generic_burst (arg=3D0x17b131e80) at > ../examples/eventdev_pipeline/pipeline_worker_generic.c:83 > > 0x00000000005794a8 in main (argc=3D11, argv=3D0xfffffffff470) 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). >=20 > Good bug report, thanks for the detailed info on hash.fdir.hi union-ed wi= th > txadapter fields. > I don't have the specific HW to test, so code review only. >=20 > I don't recall the TXQ quantities etc (been a number of years since I wor= ked on > this code...!) > so I'll +CC Pavan who reworked the logic around generic workers & eventdev > stages, and might recall? >=20 > > 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 f= f0 -s5 > -n0 -c32 -W1000 -D > > When launch eventdev_pipeline with command [1], event_sw > > > > Fixes: 81fb40f95c82 ("examples/eventdev: add generic worker pipeline") > > Cc: stable@dpdk.org > > > > Signed-off-by: Chengwen Feng > > Reported-by: Chenxingyu Wang >=20 > Generally the change looks fine - I'll wait a few days for Pavan's input,= and > otherwise review & Ack assuming no issues found. Harry,=20 The fix looks correct to me. Acked-by: Pavan Nikhilesh >=20 > Thanks for the patch! -Harry