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 CA141A0548; Thu, 11 Aug 2022 17:42:45 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 62328427F2; Thu, 11 Aug 2022 17:42:45 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mails.dpdk.org (Postfix) with ESMTP id B29D5410FC; Thu, 11 Aug 2022 17:42:42 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1660232563; x=1691768563; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=zKZWVdSMxLZD+B6kawM1uUB7LeXoyGEvXaPESvjHsqY=; b=nx2FIcXJAGwmyZXlke17HxvXl7weIrs2Eg5NWV68V4WL6Q2X6WectoA0 O3DjRwXes7+Zj9oudifdDh4E/YF5X6xVhd8ghhS6AE1ouHTVlehtgLXgk 8w/RwDODfVlQgCHEckULMFmQdy7LJTLGAiB+/twxAqJLCnVqONhbX/Zto pH9rr1upKI9ZCfpEB+6xuzH2PoiRPbaN1fwXRtumBbfY/B9xIrJrMwUvn KR5fkvRrMJ7HP7/dEi/ZhQRFy5gAuYvlCfFB+dxErFp74D1lpiW7ihDlw Y80fM37u7DvAJRQJD5ftFIwtE9MKDSXBoy0dz5uYCOU4250GziDqmLhk2 A==; X-IronPort-AV: E=McAfee;i="6400,9594,10436"; a="292643258" X-IronPort-AV: E=Sophos;i="5.93,230,1654585200"; d="scan'208";a="292643258" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Aug 2022 08:42:41 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,230,1654585200"; d="scan'208";a="581718991" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by orsmga006.jf.intel.com with ESMTP; 11 Aug 2022 08:42:41 -0700 Received: from fmsmsx608.amr.corp.intel.com (10.18.126.88) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28; Thu, 11 Aug 2022 08:42:41 -0700 Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) by fmsmsx608.amr.corp.intel.com (10.18.126.88) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28; Thu, 11 Aug 2022 08:42:40 -0700 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx611.amr.corp.intel.com (10.18.126.91) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28 via Frontend Transport; Thu, 11 Aug 2022 08:42:40 -0700 Received: from NAM04-BN8-obe.outbound.protection.outlook.com (104.47.74.46) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2375.28; Thu, 11 Aug 2022 08:42:39 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IEKfg9xbD+DoHOCfC9C4vniZd+4gpQ2uVMvP0/5bndIxKYlUZsBBDeJkT2Gbgpb3tDTA4vca5QDRDs7fBwrhooS/LnOf8eOVMfnjzYGq5euFuZmEn54svksnVAQDLASxKrj5IUKUrnHuO4fWWMFg1mnbETDOqTHSIaAX0lQ0M2Rl3bKW4LVKiLnQy1MMa0tJu2MN22Ku+/U7dhFX4FsfqmViQbfaYheeSrf/EXmxXFBJq6FVM61ZOYn2wpPkAiTjl1dlns9ekHaLVxrUgGh2sRlmvs8MzTj+CYULYBF657RgACEIA0p/kGE8103tVEkpAdH+ibWJ71A4udQY/85v4g== 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=QZGaEfkVWNLC6EJGE+le377tQpxkxBctKVdOqZho8nQ=; b=CcSHTkkjxOXeq5iGlE8Y0rdn3OatmNfcN+N6seH+ptMFFeGlTW+UXV/PXJ7KJwdnVif36C5YMbXH7e/g/2lcgzW0MgeW7lhWpWmckD2L8Nq/LGXRqcMlFrWFZxMOhi7hmwMvEfJ+qcOJFJqG+qECzPG5BIjdPJg/uGvvdVU/iiMtxpkz29D8cw2H5rLVsrfK+XK3XvN5/ANOBTwdo51ElfrP9uXlJZpxtWLJp0Cgap35uyocrzBGQYV9OGPLdXDLlhAq5K2W98jP6Y958a1sbt9gKvC5A9ZuIArcqZpY5P94pBmWDJMbe16uSbMzfcaYE1tsCHmRjLZJpuBXXsR/bA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from DM6PR11MB3868.namprd11.prod.outlook.com (2603:10b6:5:19f::13) by SJ0PR11MB4989.namprd11.prod.outlook.com (2603:10b6:a03:2d9::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5504.18; Thu, 11 Aug 2022 15:42:37 +0000 Received: from DM6PR11MB3868.namprd11.prod.outlook.com ([fe80::128:9f09:dd7:d6b9]) by DM6PR11MB3868.namprd11.prod.outlook.com ([fe80::128:9f09:dd7:d6b9%6]) with mapi id 15.20.5504.020; Thu, 11 Aug 2022 15:42:37 +0000 From: "Naga Harish K, S V" To: "Carrillo, Erik G" CC: "dev@dpdk.org" , "stable@dpdk.org" Subject: RE: [PATCH v2 3/4] timer: fix function to stop all timers Thread-Topic: [PATCH v2 3/4] timer: fix function to stop all timers Thread-Index: AQHYrIhKOLKimfKbcUS+PSihT/gI0K2ogcvAgAFWy6A= Date: Thu, 11 Aug 2022 15:42:37 +0000 Message-ID: References: <20220803162651.3145945-1-s.v.naga.harish.k@intel.com> <20220810070958.3111119-1-s.v.naga.harish.k@intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.6.500.17 authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: b49480eb-cad5-4d47-55fc-08da7bb01dd0 x-ms-traffictypediagnostic: SJ0PR11MB4989:EE_ x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: pzCQakfZ6WrKKgo3VzYpTePens8hTuNsuSU8BuGuIJGxASwE8iV/ABUSuEriVmcsJSqwGnpxQ5GWKvCcuVKPMgEjYca/M9+q/h+EKcvnprruAoqDGWzQ5tRW7QiOqfyRyheBaFDWBzKAw41Oj612ldWwKYrRip9nntJI5mOE1XnrDXljQLXqo+D5I0w4mJS9k4i8WtkvmvTVTYiZlGPfg7icZDHVRlhAhJHDhtZ/O7pQpC+okzD/LyBnaSm33A2VzZJ7gJ8VrLTlx6O2PrF/Vd5q7DgkluxYx38Wp7BQsZ501IzL4lyMQe+ndOKVlPeWs1bizJ4GDY/tKvAl291NKJwJprsNZ5zaIHC500aaTm7Tin43mV1EyS5r8uOLxnxeHNCJ2bRmzJj18PEZDWduSLP67bLyoQdVg44OC9aSpe1zbu5l3tbFWGKilBPB7ZDRHyb8YJqrmKouDR+86i6DB3f/9KcJlu00yfzkCTk9P8on7tcYkeq7HpdwgiuRLJU+lk8ypjBZAQGD3ZojlLW51CfiqG7b1jZPSWKu6Al4IvlLt8s/a4TAcfn9EGajvrwjSOJt1y8MBAMCEJbc/X0RapwZNFPySqLdaxif4R/yWnJsXk6gAXYSoiYPpwoXOj+QPhtVG/pdJVRdSIlkunrOsL3b1VvZsCVMMecbIT5hDUNmrQGqz24omURET7KOFkBiGVBm1jinBct6+/WJ4B+eCaeJbNX7LTuaygtfrdTvLKIyxyGKTfFWb8BMo/eqNvrwKcB7dHrxEr63WS3JqzPs+Xv0IUZ+fj1xaOaRgVVdtWZfnuRfpcqnFp0GT90lGFsF x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR11MB3868.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230016)(346002)(136003)(396003)(39860400002)(366004)(376002)(83380400001)(2906002)(26005)(9686003)(76116006)(66446008)(66556008)(66476007)(38100700002)(450100002)(66946007)(6506007)(186003)(7696005)(33656002)(53546011)(64756008)(5660300002)(86362001)(478600001)(41300700001)(52536014)(6862004)(8936002)(122000001)(4326008)(71200400001)(8676002)(316002)(54906003)(6636002)(55016003)(82960400001)(38070700005); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?GLDOZYslS2W6eoz/SiRQwQR9REsq1N6/iNldLFxji4g0+7iZnscybXevCpu3?= =?us-ascii?Q?sxtk8ZB2gquzt2mpZ9wWX4EEZA79yjtwPr/jzf4oKMVaqTxXr0MxqIygbqlc?= =?us-ascii?Q?dyeXXcc4w6h6SGR2aq9WJO0635kzdfoNEmUWiy4KLePIQjmzHahaOkpm/lZY?= =?us-ascii?Q?cUhzqaBuAaY9AvITrmf4MUnvms4M3N8OXBmUnDoiRALB4O/3KtHzIyfXMdyn?= =?us-ascii?Q?wSCbZS9Pyx++pq+kYGt01RSetlyIjPOmq4Appb6v8lzCO6otH9B8Q+jh8hLK?= =?us-ascii?Q?A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Q1eTHWg5XwqUhkI9n1z?= =?us-ascii?Q?FDDEd5ch0JOoAkbMo2oVslEv2tketiNBAMIDeRE6meAS4tyZe9uB4jIocWRv?= =?us-ascii?Q?FA77LARk4ZbJtm9OMgScfIIoZIdD8CL08IUWzZJMwgFdnVCFHNpkjkC7Zy6o?= =?us-ascii?Q?cvwB/9sx6klAViBVxfisRG7eyhgGHraFvhakOlUnEj1+hFklRRcuvCpq3ms+?= =?us-ascii?Q?ZBPJZ+pml6dVtk8t4ApMyara0bbcX/jPPXR+TWth7OPk/b0AkYW+KFl9QrrG?= =?us-ascii?Q?wu2d2sz+qQgNkHsQKsppKlC/PKYcs+HCgdhaF7mGCsEceV68xCRDyOrGA3P6?= =?us-ascii?Q?P4sCvDQPWFNfsofaqFIVuwqHkrfpPmWPVdFBFZ4KzAM7qL4Kddi8CVeERna4?= =?us-ascii?Q?6oJbNZ79ckaEnIIr4YpLayj4FCuMBlrmsaZ4J0F2D5GnXLul9PAQleAvkwmh?= =?us-ascii?Q?Dg=3D=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM6PR11MB3868.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: b49480eb-cad5-4d47-55fc-08da7bb01dd0 X-MS-Exchange-CrossTenant-originalarrivaltime: 11 Aug 2022 15:42:37.0531 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: fAoaGC4GlZqUyHIDXs2Gg3ngP1B4K5WJrrOlX7DPPyMp6p5ipTt27tkD8fBSsvJfYZocmVqsNVJvDKbdDGUxZ3z3ogNEiC9m4oEo/hgVgSw= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR11MB4989 X-OriginatorOrg: intel.com 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 Hi Gabe, > -----Original Message----- > From: Carrillo, Erik G > Sent: Thursday, August 11, 2022 1:00 AM > To: Naga Harish K, S V > Cc: dev@dpdk.org; stable@dpdk.org > Subject: RE: [PATCH v2 3/4] timer: fix function to stop all timers >=20 > Hi Harish, >=20 > > -----Original Message----- > > From: Naga Harish K, S V > > Sent: Wednesday, August 10, 2022 2:10 AM > > To: Carrillo, Erik G > > Cc: dev@dpdk.org; stable@dpdk.org > > Subject: [PATCH v2 3/4] timer: fix function to stop all timers > > > > There is a possibility of deadlock in this API, as same spinlock is > > tried to be acquired in nested manner. > > > > In timer_del function, if the previous owner and current owner lcore > > are >=20 > It might be clearer to say something like: >=20 > "If the lcore that is stopping the timer is different from the lcore tha= t owns > the timer, the timer list lock is acquired in timer_del(), even if local_= is_locked > is true. Because the same lock was already acquired in rte_timer_stop_al= l(), > the thread will hang." >=20 Incorporated the commit message in v3 version of the patch > Thanks, > Erik >=20 > > different, the lock is tried to be acquired even though the same lock > > is already acquired by the caller of timer_del function. > > > > This patch removes the acquisition of nested locking. > > > > Fixes: 821c51267bcd63a ("timer: add function to stop all timers in a > > list") > > Cc: stable@dpdk.org > > > > Signed-off-by: Naga Harish K S V > > ---