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 5635443C12 for ; Fri, 1 Mar 2024 18:17:47 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 73CC1433D4; Fri, 1 Mar 2024 18:17:44 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 66E5643354; Fri, 1 Mar 2024 18:17:31 +0100 (CET) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 4219mtpH013854; Fri, 1 Mar 2024 09:17:30 -0800 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 3wkcq59bbk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 01 Mar 2024 09:17:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Kt6VfFxyQBAerAhIfdn/naeYFBrGHAYREHoIKenqLLtlaK+WwSYryLIDpxfkeTaEGcJKcEqC6R+phNoLwCaK1XoC5Y6dY7s+DChXk4ED9Mall0klBy2RTRb7NbO/Mig46RwfRGwRyFr51wwZWdIC/+Mbjcr4V07T+3X0nfl9iEXSDvDgnVFaFTHcCfprsE7ePQfOzmXl4lANF1uewgUa/vGJ6LD+1ijHHVbMVdBf5K79wmHJgG2FhIwf2Ioit+xVYvbp+WvPRiu3LgcUVwCYvrxUE4FOE1zlex5OoMiu/KyhUhEkx/SVpnxAnMpVUyFtDr+A0zI7E6HO43YtNgbfmA== 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=zzNnii1nLQQwFu2jXxU4PynQoHADeEfGaJnYi48DmOc=; b=Ywe+i6FGZ47LYEris/I+25vi4Ybd9sRcgl0YbAUQ8UrwvNsbfAxoYiM6lpJqTpnoLk1jrb+TQ46X7HDgSjn/e8ceXMzR6Ovffl8rQCZrDDP6NEadJkl+Dw4GtOM5wCVCEq+E+o2XZLEnSR5auO5oIzUlJKkEL0SU9fN1jHunfs4klD5UvIGNUdhxNUYgM97tZaAX2pZEa5YdRAzJc5t0RBnY2ioW6pLnNLN8JdO31vQIp8rAjs+tvnUHEOeeTbyPDr7ghI42tNb54cGF3qhCiEF6ZczkUke49Pi85WCDKeMQZ7lHMDwXw/YCcJCwUwAuL0qwxwcw3e6jqjQEy3/wVA== 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=zzNnii1nLQQwFu2jXxU4PynQoHADeEfGaJnYi48DmOc=; b=g/c4+tbl6iw/IOfsFyxls5OuQDJ8vPnt0DttlcUbEjC+sxPQrVhbY+V3VM1hGgI4na5x8UiScFQNSuup4CfDVJVstK56eor/vLURJX5pxon6X7luyKO6Y33HA0K3AWiQRbq8CoMSBw+tSa/FIF9LulpVDMaamyOWe4Rz0H9vZ04= Received: from PH0PR18MB4086.namprd18.prod.outlook.com (2603:10b6:510:3::9) by PH7PR18MB5827.namprd18.prod.outlook.com (2603:10b6:510:15d::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7339.34; Fri, 1 Mar 2024 17:17:28 +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 17:17:28 +0000 From: Pavan Nikhilesh Bhagavatula To: Konstantin Ananyev , Konstantin Ananyev , "dev@dpdk.org" CC: Jerin Jacob , "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+L4ZabEjGIVQgAAG1wCAAADlQA== Date: Fri, 1 Mar 2024 17:17:28 +0000 Message-ID: References: <20240301163931.107036-1-konstantin.v.ananyev@yandex.ru> <8d7c91e9d91446a8b57d9d690e4a7ec3@huawei.com> In-Reply-To: <8d7c91e9d91446a8b57d9d690e4a7ec3@huawei.com> 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_|PH7PR18MB5827:EE_ x-ms-office365-filtering-correlation-id: b404983d-4f36-4a7a-d30a-08dc3a13789c x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: ocXaHK1g7OXHwHnysPMDwVGckG6rFJOo3XEsWDw2vPR0t922eId3lMpqUxDAUG0X35cBErphtiYkWrxSDNsHridtdv6k3fKJUsfjThnp9j0J54QZ4QVdsbjuWjB937uIeC+BlVsJUYFc4OuAQA3wKOQOmH9rPXP4Zg1Ev3yN79ui1GCajOPmCUAQyf3h5mRc+toJZIdTmzKTak6Cgrv3qdW9xd9X9Zud01Nf5iy//XN8Fq8MwgGqm4bJH9H5P7uQIAa65DWYCD4ih9HUZXpxP9uXIGulgYBaRrXQ4pineDD4qlnQTqP94sFcx+i6zJ3at1jiZhfLlF9FU+fLaLD7/i4oFC7gdpoiPdY3Tu7hGPDZ3Hv31ZkR/56WtFoTAQiV6QIuJoi/CBktJQTPPzYgYYbgTLWj/gKCxRx2PTNkhB3fsOdWZM+CSjnW0psDCZyV/V/uyiQEyI4bJutJg15n13wM34zvyHo9z4oTwKKSAKEkb82+VUtPU64YHAPuQo8Ch7tx8ablOsbJ3qnIO7KeWSjI4fK4msUpXzvyE3oRy2J4eSlOmbYLggNVRxr7vud8uOnH3iYAsI8paGJrqlkdSdMv5hpnVAnqctlavyR5s0JPi1hYjkO0IEZilhcEudXxDQrVtMUShKsPrUAwpShdo5Dozjhd4+1EurwkbJai18abYDEl+IDxfXh6I5kIZcapnbtKoZLpkyerXlMwZah+Uw== 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?Ue9C+iagj2wGBn/YRMgWb6dQr1pVc7meiw+dSN6LDPfdEzGjOagM/eF4O1oJ?= =?us-ascii?Q?wdA3h2u7iGcMB5vm1MfqoF0GMlYno8GVol05Q6woTbpT478U1nwGuLUiPwmV?= =?us-ascii?Q?Yf6fwm/189VU/rVlTi+ag4VH3v8385nLPIMuLQpCn/HykuPp5M7iVicMoW03?= =?us-ascii?Q?4TwsSldRYY9J5Imk2YP0CwpNmKXE1Bf7UPvYk8jUJ3xKvayaMKT11rMzwBQh?= =?us-ascii?Q?dcfd7+mZ0VTRwUCbVb7N2FMC+tvG5VYKd5scv4Xrxngs/fMuJGvAHQ+oGmRp?= =?us-ascii?Q?VnFrrJxH0BtC4PEDtjibDtEIyQlnOs8RTHuKl+MCTxAB19U4AsC26GWcA97O?= =?us-ascii?Q?V1GwjfbExeZZhsntcEezg6S4fCExiuvQys3WwO4gYFq5OxXnR37DO/GVRjA1?= =?us-ascii?Q?3HHUIQ7QXW9WAZTZnltMTNYX1ZueR7Y1Mq6l1Zx/15TWY/6nB0anKevjZGC7?= =?us-ascii?Q?PYUSjRAIhsQE4nldtc+HRMvi6SreMFGVuoxKFDmW0qUizTVB95eLtDtcm//D?= =?us-ascii?Q?5Akq1hfDanxaqxothH/6ukzPlbeepTIVlDUdTiaP2rtrntWRjF2YFf2b1FBc?= =?us-ascii?Q?LczIQdDR1tXwHyUneKUxxBvkSSafmF8LFss1641hkCaM4cDpURtZ6KI7/Jl1?= =?us-ascii?Q?adHlZAC19Xm0bKEJWYzNm5FglF99JQKgb8ShMEJq1ORXUxXgPpgOn2lOfMxU?= =?us-ascii?Q?FiCXisBgMDul/8bLaz13HcJaa6LIuTyrrJevdTqG2OHSSSCr0x8bV+XwcKEN?= =?us-ascii?Q?qv0drn9uUkrm4206fcVbR4DDpAGbgoP/6gpN9ITrtiZfoePqFPVLvFylFzMA?= =?us-ascii?Q?Wn62oRNLTwSFTDbGMty1WtJeM1PFUsquof3OP9QwPT4vDNlSkXzEi2hIQtn5?= =?us-ascii?Q?f9zYfkSEmxT3sFidNr1Yas8UIDheBbDITlmssHVkEVzG1ONhliu/IyHzIJmg?= =?us-ascii?Q?rzBZlsg5KOmiGmsH3Ce/KszTAvT4XENo7NXZ0faZwKRvV2IvMSOPIxGZfHj0?= =?us-ascii?Q?4VjVk/Wr8s9XlXLVo3vDkA35fuNZL3V5iFXygOr4MQIkfef0ORfueKvPlr/k?= =?us-ascii?Q?wPszJbb+IBJCgi+8c5Jw2g9qps296M2LH+MoVYqJnhWu19azPvO6WMXaelFv?= =?us-ascii?Q?BUjZvUSL2cBUcvWmIbA8GxNmzA5fUWP+LdQyeu/BH6gqlp76thzsY/2fqtBG?= =?us-ascii?Q?gl7a3la0qrD38s6cGw5VpcUWb7gRVAu+08aSAwqXdwwg5x9sYEWtL4GYPG1c?= =?us-ascii?Q?wREmhOQafXe7rIjrqTJHixLhw2akYtlqdZ/u+gPOJLxQ1V/8zHQKBCrW+bRt?= =?us-ascii?Q?1eZsVkf0G23YG+Aphhmx8jM9yp8aKIaln65ILHg9BPzaKMmMinpaB74gqtMg?= =?us-ascii?Q?C9ruTzOqZ/J/6n0I+LPQezMQkDUyAF9NAWfzqvYPeSf2OursLoQmzgffP1DF?= =?us-ascii?Q?MTv3aZf2yaQ44W7ytOypcR6+u+DjUr1do2Ay7YJ837g6F4SI+XJAbxRjoQSr?= =?us-ascii?Q?vsmVAzvZTV+ube9vdSCcQlJ47razibujnOnYZO6cLnqfpzG+62xLicYNRpr2?= =?us-ascii?Q?OAou0T/OqiQ0FgsnZeOmu4m6Okg+LucAT+pqlZ5q?= 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: b404983d-4f36-4a7a-d30a-08dc3a13789c X-MS-Exchange-CrossTenant-originalarrivaltime: 01 Mar 2024 17:17:28.1637 (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: WYNkTAi7WwawjHsdEjq6j2+chjgAll6qmUxAsbk3onR1MCHgNwCP9vuZ/mPu8modslhgXWupDJk99OTYew9lA22P7cocFzViPyoNJYoYwck= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR18MB5827 X-Proofpoint-GUID: WS9TVgkumjgfXtVyomg88UHX1Abth_tM X-Proofpoint-ORIG-GUID: WS9TVgkumjgfXtVyomg88UHX1Abth_tM 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_19,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:43 PM > To: Pavan Nikhilesh Bhagavatula ; Konstantin > Ananyev ; dev@dpdk.org > Cc: Jerin Jacob ; stable@dpdk.org > Subject: RE: [EXTERNAL] [PATCH] examples/l3fwd: fix Rx over not ready por= t >=20 >=20 >=20 > > > 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 por= t > > > > > > Prioritize security for external emails: Confirm sender and content s= afety > > > before clicking links or opening attachments > > > > > > ---------------------------------------------------------------------= - > > > From: Konstantin Ananyev > > > > > > 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 > > > > > > 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] > > > ... > > > > > > And then all depends how luck/unlucky you are. > > > If there are some actual packet in HW RX queue, then the app will mos= t > > > 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. > > > > > > Bugzilla ID: 1390 > > > Fixes: 8bd537e9c6cf ("examples/l3fwd: add service core setup based on > > > caps") > > > Cc: stable@dpdk.org > > > > > > Signed-off-by: Konstantin Ananyev > > > Signed-off-by: Konstantin Ananyev Acked-by: Pavan Nikhilesh > > > --- > > > examples/l3fwd/main.c | 6 +++++- > > > 1 file changed, 5 insertions(+), 1 deletion(-) > > > > > > 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) > > > } > > > } > > > > > > +#ifdef RTE_LIB_EVENTDEV > > > > Is the ifdef required? >=20 > Well, right now l3fwd_event_service_setup() is defined only when > RTE_LIB_EVENTDEV is defined, see examples/l3fwd/main.c. > So, I suppose, yes. >=20 My bad I was looking at wrong DPDK version (22.11). > > > > > + if (evt_rsrc->enabled) > > > + l3fwd_event_service_setup(); > > > +#endif > > > + > > > printf("\n"); > > > > > > for (lcore_id =3D 0; lcore_id < RTE_MAX_LCORE; lcore_id++) { > > > -- > > > 2.35.3