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 0E08545A68 for ; Mon, 21 Oct 2024 09:13:27 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DB49F4028C; Mon, 21 Oct 2024 09:13:26 +0200 (CEST) Received: from mx0a-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 87E034028C; Mon, 21 Oct 2024 09:13:25 +0200 (CEST) Received: from pps.filterd (m0431384.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 49L5R0eb018219; Mon, 21 Oct 2024 00:13:23 -0700 Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2173.outbound.protection.outlook.com [104.47.59.173]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 42dgtd05un-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 21 Oct 2024 00:13:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=sjQPwLxYVWe2WskvUAq4hPafQan+cVWpgm/TOZw6IJr16uXv7tFX6qrdQ8ZDkVyJeIRriib0vywyHZ1IQJUQj+gY5RMcYz+/GMutKMKeC5o0AcVZ5BkCrR2onM1V82nv5CKCzZAeLl/emEfgmHx/bFiR5gfx4k/sohioQL3LrYD37gR1KGYXFhh3oiIolSNr19BORNkmrjRF5N1IGjsl64xmEGofOASR7bHdM8iED0oG1pKwXzv1j8jnaUVmK0M7gwrOBkyYzdGBcGYAejL6HjWBXmOOZcbTDmHgz8ax20iR9fWAXrA91graV2zqcvZxahB3xXOytWQu/WFEFoHjXA== 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=jrlJ6fCuWZrUn3jt0lR7z+VfugQZdDaG2m9STS0nfOI=; b=YP7jVxw16mzkcLsv+6LABH5vnDYkFTECw6zBytSGNEmXNHirQsNPkGyLeVZMgb9q4DcKl4gKcZlTYBGmmoO7miqg19Mc13hQM9uXKjaqwa81345pO2JqTJykVtdq3zTydO8gbhXNKa/8pTMFJcGXrJc7CHGMQYwAJI4v1x+gbaC6ABiHSrgpwDC9mAtV+1nqAkiJ5jpfjBe3bEm5ez9qxwh2kHy3JJSvmYN6h7QnVyNGsOkM9QE3mTGiJi8ogQgy1WtO6Ut8ytwHaMWJCKhpQIMzidFzJce2jMMNa7iZr1N2rJlMk48PsRBLKxg8G5c1ArYMsiLMmzavWk3AJr3ASQ== 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=jrlJ6fCuWZrUn3jt0lR7z+VfugQZdDaG2m9STS0nfOI=; b=v3gVoALZzDb3WxaMuGAVy2ONJrDwGTkR54ars608zFn3mz/lmlQe5FDBVSRnnaW6aJmJSMGdlwOFg5tBcOclqnz0XUIEFhI7mru38SkO8cU5wkchN3ShcZT9nR1QfeuLAsYMslDZ42WpcnNwakts9tRc756Z07XZm8r/4+0Ak6Y= Received: from DM4PR18MB4255.namprd18.prod.outlook.com (2603:10b6:5:396::17) by SA1PR18MB4648.namprd18.prod.outlook.com (2603:10b6:806:1d7::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.28; Mon, 21 Oct 2024 07:13:19 +0000 Received: from DM4PR18MB4255.namprd18.prod.outlook.com ([fe80::9060:7014:db69:ca1c]) by DM4PR18MB4255.namprd18.prod.outlook.com ([fe80::9060:7014:db69:ca1c%7]) with mapi id 15.20.8069.027; Mon, 21 Oct 2024 07:13:19 +0000 From: Rakesh Kudurumalla To: Stephen Hemminger CC: "ferruh.yigit@amd.com" , "andrew.rybchenko@oktetlabs.ru" , "orika@nvidia.com" , "thomas@monjalon.net" , "dev@dpdk.org" , Jerin Jacob , Nithin Kumar Dabilpuram , "stable@dpdk.org" Subject: RE: [EXTERNAL] Re: [PATCH v5 1/1] examples/l2fwd-jobstats: fix lock availability Thread-Topic: [EXTERNAL] Re: [PATCH v5 1/1] examples/l2fwd-jobstats: fix lock availability Thread-Index: AQHa7AeKprgkBtY9/ke7CCtlF8mKCbIiO9GAgAclClCAZ9gysA== Date: Mon, 21 Oct 2024 07:13:19 +0000 Message-ID: References: <20240811065819.575759-1-rkudurumalla@marvell.com> <20240811155957.576645-1-rkudurumalla@marvell.com> <20240811091719.37512e55@hermes.local> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: DM4PR18MB4255:EE_|SA1PR18MB4648:EE_ x-ms-office365-filtering-correlation-id: 46cecc41-fa54-41fb-57f5-08dcf19fd744 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; ARA:13230040|376014|366016|1800799024|38070700018; x-microsoft-antispam-message-info: =?utf-8?B?dHZOWS9rSXVjZzIvOCtnRm11Q2ZPUUNFUVRlU2k2UVpMZmZIY3FRUmZULzBr?= =?utf-8?B?UmZ4eGdyRk1jbjBBKys4cmplWEZYbzRGWVY3eVhKNWZ5SXFFWkg3WnNuRXpX?= =?utf-8?B?VzRoWnhyZEw5RFBLSUF2UDN0TFZpWG1IeVd1c3N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VlgvbnBySDNvcjViY1J0N1ZEdUlrZ01E?= =?utf-8?B?eW1aRDcxdGxJdThwdHl4cWlLenFvdGMwYStiVzNMSEd2ZG1wMk5mdkhUT2ta?= =?utf-8?B?VWlER1FIUHM3cytVblJ1c0pYbHdWcjhXaFh5a0ZkZndLYkZNNkljWEVjMVVt?= =?utf-8?B?VEg1UHVaWWhZTkY1VTVJaXJmK2FpSUd0TGIvc0N3WVZVaXlOL3hZU3NlR3Yy?= =?utf-8?B?akZaUU80TjZ1cTZIK2pnWVd6THpxSHFXeG9PVzRLNVUzaWcxQytwM2VRWjBr?= =?utf-8?B?TjR3anN2SmdXYnZtLzgrd3pVZEV1ZjdDWTFXYUhyb08vT3FXS2J4MVErY25W?= =?utf-8?B?V3hvZnJwSHBtSDJhM3JCS2dSZnJsbHpRM2tZRWhrSVo2MDY0Mmg3ZFFwL2Ey?= =?utf-8?B?dkpORXBLUkNiWGMvUjBCYmFVR1kyK3duelBUSllOMVNCNzRTODlvNm4yTEVw?= =?utf-8?B?R0VKay91QkpRdGZsUzUrSHRVRkJRM0sxYkJTY0gyaEtqeGgxZmRPdytGQXU5?= =?utf-8?B?a3l6TWoybDQ3b0xITWRVV2pLNWdOeFpJTklTUmRtdk1WMmhabi9yM25Vekpu?= =?utf-8?B?aW9IK2ZsWXY4dHY1MkZ5NHpTYjZteDl5azZ0bnZSTHdSNFNWVytZZ05KZGdC?= =?utf-8?B?V2h2dTlSdldVdmNGbXdsTzYvMnNrWGt4TVJRVEE5dUFDQWZkbkxRODNIc3gr?= =?utf-8?Q?UchmPYXIa0bjwMk3zMzl5g5TST0afc+52wlI3P/?= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM4PR18MB4255.namprd18.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(376014)(366016)(1800799024)(38070700018); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-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nhUNWZ5MGJHbEE0Q2JBQXlwamVibVFHZWxy?= =?utf-8?B?ZWl1TDdEaE9URW1NOWpUT3diQ1V4R1U2QkxJRDh1RHVZM3NDeWNVYmcrbndu?= =?utf-8?B?SlJRWmROZUgzZkZ4cWZRT0l1TlhXdXdZUWxBZXl2enQ1d2FIbDlSU3FRaFg0?= =?utf-8?B?eFBoVFZHdHY3Ym1ONEpOck1LWE9IMnM2cGhZcU11Q2IyY0lrN1YyYmYwK3pa?= =?utf-8?B?djRuc2IwQWlsUXFlSG95M3FuY2dmTnBYN2RwUEZXOXVmZGZpeEEvQlVQS2RJ?= =?utf-8?B?L0JDanVVdTM3VGdlU3hLSWhmQ2JHa1FCUDZ2ZzV1R0NyQ2UzWHBZTkhVeldW?= =?utf-8?Q?yg9m+JU4BLIHxocA3ApVKPJko?= MIME-Version: 1.0 X-OriginatorOrg: marvell.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM4PR18MB4255.namprd18.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 46cecc41-fa54-41fb-57f5-08dcf19fd744 X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Oct 2024 07:13:19.3182 (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: /wX9ucSJM8r+Rmjh/AUpvMVNdNXZR0fdkIGp1MjMzKaqzw3E7GKYd8IuWRgdStBtLcmeQEgYmR+duc0YL5p5z+QJVvhFO76KfKTiAKOCTFk= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR18MB4648 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Proofpoint-GUID: C1Dm2cr2bqqs-x2YbaQezQ23-aPSwmfs X-Proofpoint-ORIG-GUID: C1Dm2cr2bqqs-x2YbaQezQ23-aPSwmfs X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.687,Hydra:6.0.235,FMLib:17.0.607.475 definitions=2020-10-13_15,2020-10-13_02,2020-04-07_01 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 ping > -----Original Message----- > From: Rakesh Kudurumalla > Sent: Friday, August 16, 2024 10:55 AM > To: Stephen Hemminger > Cc: ferruh.yigit@amd.com; andrew.rybchenko@oktetlabs.ru; > orika@nvidia.com; thomas@monjalon.net; dev@dpdk.org; Jerin Jacob > ; Nithin Kumar Dabilpuram > ; stable@dpdk.org > Subject: RE: [EXTERNAL] Re: [PATCH v5 1/1] examples/l2fwd-jobstats: fix l= ock > availability >=20 >=20 >=20 > > -----Original Message----- > > From: Stephen Hemminger > > Sent: Sunday, August 11, 2024 9:47 PM > > To: Rakesh Kudurumalla > > Cc: ferruh.yigit@amd.com; andrew.rybchenko@oktetlabs.ru; > > orika@nvidia.com; thomas@monjalon.net; dev@dpdk.org; Jerin Jacob > > ; Nithin Kumar Dabilpuram > > ; stable@dpdk.org > > Subject: [EXTERNAL] Re: [PATCH v5 1/1] examples/l2fwd-jobstats: fix > > lock availability > > > > On Sun, 11 Aug 2024 21:=E2=80=8A29:=E2=80=8A57 +0530 Rakesh Kudurumalla > > marvell.=E2=80=8Acom> wrote: > Race condition between jobstats and time > > metrics > for forwarding and flushing is maintained using spinlock. > > > Timer metrics are not displayed=20 > > On Sun, 11 Aug 2024 21:29:57 +0530 > > Rakesh Kudurumalla wrote: > > > > > Race condition between jobstats and time metrics for forwarding and > > > flushing is maintained using spinlock. > > > Timer metrics are not displayed properly due to the frequent > > > unavailability of the lock.This patch fixes the issue by introducing > > > a delay before acquiring the lock in the loop. This delay allows for > > > betteravailability of the lock, ensuring that show_lcore_stats() can > > > periodically update the statistics even when forwarding jobs are > > > running. > > > > > > Fixes: 204896f8d66c ("examples/l2fwd-jobstats: add new example") > > > Cc: stable@dpdk.org > > > > > > Signed-off-by: Rakesh Kudurumalla > > > > Would be better if this code used RCU and not a lock >=20 > Currently the jobstats app uses the lock only for collecting single snaps= hot of > different statistics and printing the same from main core. With RCU since= we > cannot pause the worker core to collect such a single snapshot, integrati= ng > RCU would need a full redesign of the application and would take lot of > effort.