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 846F043C0C for ; Fri, 1 Mar 2024 17:49:26 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7E3FF402CD; Fri, 1 Mar 2024 17:49:26 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 3E81D402C0; Fri, 1 Mar 2024 17:49:25 +0100 (CET) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 4219pWWk021293; Fri, 1 Mar 2024 08:49:24 -0800 Received: from nam04-bn8-obe.outbound.protection.outlook.com (mail-bn8nam04lp2040.outbound.protection.outlook.com [104.47.74.40]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3wjfay89n4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 01 Mar 2024 08:49:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dj7GJdHpgb8yCuQ+PodFwe2Efl7uSJxuRKFLW5qWvohnDtJUXN5bfHJBT1uxwszImaYFvkc7YdNwlSYfRi9jlGzEPGAhjbw38V2LT2v6hkhctF5bgwNSpiGfgL/0yWWN/A9gBIiyYuSgQ/Z1ig5rL0r9Vz0nvaSA0G/RVYfbmryi7kMKx47GvjYEB/50M+buoeaSRKJeHx4Up3dz/E5E7Sbi8gR2IpXdQH5F/jnIxKw+31lUc0EsJURJI76c2FP+hEBpsgsxQpkGvgHXuMafgpX0P57AVkVUuZl9OFrQrPiRAJSsqGA56/g29rPxCZHcMb4azPS4C6B5Oe1M2Oz7nQ== 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=TeI7U2e39dBsSGYaFK0eybDSFR/cJZ5IJUzDz9jcc9I=; b=m1IO+CQAtfvJm5pq9qoDRkHxmimxfVocFDI3eU5ijXpOuYbmFJtvFPpl66OrNrQr1btz6kJ+8euD345SQW2NxCXSxUYesAlyI058O+P26FaHDKv4piJjRC1yBLsNY1L3gubCKOs9BaX0BJfSUtuKPKfu7/cuX3zENR7KxtFbfYDuy+zyYobrIdzIUfyzn/NkcbMAYJwIS/7fpWyzGjKzz98175ILkjYrXzn65xHUZ2AFjRZSuCGSKJfJIsc9gamUG7IT3WIL+V2ws9Ts1aHXexmT7TxReUxbTPyZwowV+l5Fhy4RUtAk1YvmxYyZC//aJJtVFC7Lpqr7U3haZrZB3A== 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=TeI7U2e39dBsSGYaFK0eybDSFR/cJZ5IJUzDz9jcc9I=; b=i+IMlJblXOjHNZT+B7nJT+kn26o4dVy8zlUAWqy7Cj16svLqd686Wp7jzNCBA+LLzi9gpApgIiXbRnzH/W5md+CwifyRa9gNSZROmE8RSq/nfJ564Di6HLnrhNNgBG/KZWcULmLONT53LjtSIxDUJ19olgW0eb8dSmhOukpWPjE= Received: from PH0PR18MB4086.namprd18.prod.outlook.com (2603:10b6:510:3::9) by PH0PR18MB4982.namprd18.prod.outlook.com (2603:10b6:510:11d::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7339.32; Fri, 1 Mar 2024 16:49:22 +0000 Received: from PH0PR18MB4086.namprd18.prod.outlook.com ([fe80::baf5:a4b6:7776:10f4]) by PH0PR18MB4086.namprd18.prod.outlook.com ([fe80::baf5:a4b6:7776:10f4%7]) with mapi id 15.20.7339.033; Fri, 1 Mar 2024 16:49:22 +0000 From: Pavan Nikhilesh Bhagavatula To: Konstantin Ananyev , "dev@dpdk.org" CC: Jerin Jacob , Konstantin Ananyev , "stable@dpdk.org" Subject: RE: [EXTERNAL] [PATCH] examples/l3fwd: fix Rx over not ready port Thread-Topic: [EXTERNAL] [PATCH] examples/l3fwd: fix Rx over not ready port Thread-Index: AQHaa/duujGxtg/DRkSa3494+L4ZabEjGIVQ Date: Fri, 1 Mar 2024 16:49:21 +0000 Message-ID: References: <20240301163931.107036-1-konstantin.v.ananyev@yandex.ru> In-Reply-To: <20240301163931.107036-1-konstantin.v.ananyev@yandex.ru> Accept-Language: en-US, en-IN Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: PH0PR18MB4086:EE_|PH0PR18MB4982:EE_ x-ms-office365-filtering-correlation-id: 2f7445a3-b504-40b2-debd-08dc3a0f8b92 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: C8KX83tAETvooGUuoFHSgRVIWOkFw+5NoYC1f2LJeOjxp57mOkE1htPuUfOUb99kb+IVEXIl0nLNQNAX7lLLLJM6YiexxdjcGktnLq/6TPoUjwGOIOdK3MNqNSNUDoLxLojL3okJvsqHQZV/ZSkBdP0+4Neu2M+c/TkpA7hIXQBn/4uz1DEapfAjCE4D2EfEyBoJI8leOZE/SWbnUX4WKiuGkT7ZUKFx0nrzEEf9riJw7VQyqIUaH7O+wMSPHPqzxJE8ZdLG4O3nPV7MX4PjiiEVrbdbNPCr102lPl/iy7zAG06sCTbw+iDuF/BP8nu7bO+EXLA1h4yfm2cVe2LGq0Wek2t1wHtjVt8JiVNgcEM3hNqYS6emwZdeJwMpuzMBlrAD8CQbezImV+ePSN+qioHCdcVAxJXxcxr10ZcgXYXCnKciBwscYe7MriiVn+ZVmvoupZm2QX+ASOUYD4RE0YQAUYLhgUylLgzM2yCyrHsA342Y3PNsFi5nKcseB+mAAhllCs1HfQq6yeI+UFK2Myhrxm1b/ALnGMIsWynxp26ObVwecvCdIED/R4SY8S0X6jFicShvWhkvNR/yk+aRAlBzOpPxKCM+17xf3Q32L9QCbezy53aOGdbuvxlaV0xq0nyvP0oqdnCpRud4YGi5VqnPbWhz+Gh+cCkuKdRY+5V2HAaDxx2iD+6PolC0nVVEr4nG5joDoZVawTybJMnjmQ== 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:(13230031)(38070700009); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?MZXKO3uDjp0/Y5AFP0fa9G2v/To/q/XXkaYCXJfgKUL28aYdAq/0Iq1DE3Jg?= =?us-ascii?Q?0gEz8vjzPAVBzCbnOipxa8EL2IE+AcpclfiLcELPNVyJKL1UeE5pYB0VepjK?= =?us-ascii?Q?7BGcdQapEjVSWgZmwaHOezVMgMe++TPNp+B/zW4Fx2Q5tM2VR+RHjtAK4O1l?= =?us-ascii?Q?0GLnVTFJ1WdFJP65o/x9MKtDLd0CJTW8f4C+05Ld83XDJraXB8t5pd2toeZ8?= =?us-ascii?Q?0ec6kFbi7C9xcQ1Pu8ahy05RplbhT2l/BrTbS6UhX/1gWJeJTYtTenJY5/Cu?= =?us-ascii?Q?0erxUbu+VxF1viLwkvUKwDL7hcJ9RClefXKIaGGAPNFGveek8C9aNEcIF/cM?= =?us-ascii?Q?8lczf7IiFKyadk936D6HFbg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ascii?Q?Aopmv7mrlK+lSGmQrtOSOZ3REoDnfmDpOI7KSRmYSc9iy2jJCHarO+NgO/gX?= =?us-ascii?Q?wh081WjvAQQ3cg/Q2z9+MK3QOJCmGrj7znXl6+k6iRqePnTKba1zsLefW3BE?= =?us-ascii?Q?Od+ak23KnQf7fvZ4dOj2yIn8noWsBEZ/fjvQne4HYqfDBPK1iXoTW4CHXcOC?= =?us-ascii?Q?QA65WGt11xdej01CALNm4jc+0nASIpcAIryfLNYE6qImptZewwip8uo3QJPg?= =?us-ascii?Q?JgnoiR4PauY12M3ZXwlwzqQL/oHgwZOWnZgh+UdfVmVfBhBRdLRBR8iFwIpl?= =?us-ascii?Q?Y5Ceb3kfg34pcPmPU5GnzEV4bO3e4GiRkUWtreC4?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable 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: 2f7445a3-b504-40b2-debd-08dc3a0f8b92 X-MS-Exchange-CrossTenant-originalarrivaltime: 01 Mar 2024 16:49:22.0257 (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: tstkHw91HsJoy8BYfdsv8lzraGu6tNWx/snJGco8DBlMSHbe8NN78BrSVmdw70J6hsvMkw7NgIJlOZp4fhDHwlN4vlMs78RZBXe1T/YUflw= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR18MB4982 X-Proofpoint-ORIG-GUID: 0JK3jlMeW5jALLptSY-a6Xi-Lm_rYh4u X-Proofpoint-GUID: 0JK3jlMeW5jALLptSY-a6Xi-Lm_rYh4u X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-03-01_17,2024-03-01_02,2023-05-22_02 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 > -----Original Message----- > From: Konstantin Ananyev > Sent: Friday, March 1, 2024 10:10 PM > To: dev@dpdk.org > Cc: Jerin Jacob ; Pavan Nikhilesh Bhagavatula > ; Konstantin Ananyev > ; stable@dpdk.org > Subject: [EXTERNAL] [PATCH] examples/l3fwd: fix Rx over not ready port >=20 > Prioritize security for external emails: Confirm sender and content safet= y > before clicking links or opening attachments >=20 > ---------------------------------------------------------------------- > From: Konstantin Ananyev >=20 > Running l3fwd in event mode with SW eventdev, service cores > can start RX before main thread is finished with PMD installation. > to reproduce: > ./dpdk-l3fwd --lcores=3D49,51 -n 6 -a ca:00.0 -s 0x8000000000000 \ > --vdev event_sw0 -- \ > -L -P -p 1 --mode eventdev --eventq-sched=3Dordered \ > --rule_ipv4=3Dtest/l3fwd_lpm_v4_u1.cfg --rule_ipv6=3Dtest/l3fwd_lpm_v6_u1= .cfg > \ > --no-numa >=20 > At init stage user will most likely see the error message like that: > ETHDEV: lcore 51 called rx_pkt_burst for not ready port 0 > 0: ./dpdk-l3fwd (rte_dump_stack+0x1f) [15de723] > ... > 9: ./dpdk-l3fwd (eal_thread_loop+0x5a2) [15c1324] > ... >=20 > And then all depends how luck/unlucky you are. > If there are some actual packet in HW RX queue, then the app will most > likely crash, otherwise it might survive. > As error message suggests, the problem is that services are started > before main thread finished with NIC setup and initialization. > The suggested fix moves services startup after NIC setup phase. >=20 > Bugzilla ID: 1390 > Fixes: 8bd537e9c6cf ("examples/l3fwd: add service core setup based on > caps") > Cc: stable@dpdk.org >=20 > Signed-off-by: Konstantin Ananyev > Signed-off-by: Konstantin Ananyev > --- > examples/l3fwd/main.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) >=20 > diff --git a/examples/l3fwd/main.c b/examples/l3fwd/main.c > index 3bf28aec0c..d4fb5d1971 100644 > --- a/examples/l3fwd/main.c > +++ b/examples/l3fwd/main.c > @@ -1577,7 +1577,6 @@ main(int argc, char **argv) > l3fwd_lkp.main_loop =3D evt_rsrc->ops.fib_event_loop; > else > l3fwd_lkp.main_loop =3D evt_rsrc- > >ops.lpm_event_loop; > - l3fwd_event_service_setup(); > } else > #endif > l3fwd_poll_resource_setup(); > @@ -1609,6 +1608,11 @@ main(int argc, char **argv) > } > } >=20 > +#ifdef RTE_LIB_EVENTDEV Is the ifdef required? > + if (evt_rsrc->enabled) > + l3fwd_event_service_setup(); > +#endif > + > printf("\n"); >=20 > for (lcore_id =3D 0; lcore_id < RTE_MAX_LCORE; lcore_id++) { > -- > 2.35.3