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 8F851A0545; Wed, 10 Aug 2022 21:29:42 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 73A914068E; Wed, 10 Aug 2022 21:29:42 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mails.dpdk.org (Postfix) with ESMTP id 97C3F4067C; Wed, 10 Aug 2022 21:29:40 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1660159780; x=1691695780; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=O5+Ub8G7XB8HUa9NEWrdsnwOLHp1Fwyi9xw0QdzCf9Y=; b=UrfZLCXqRY03Ou/Gfg8p4uEpRPsPPx7nze5KHgzd6GSY60lYK2M/Gycx p/08caf3juZOmOVj74GkkT7eFAVgu8000PsYHYMCXNavnr2yVbd70B/tq 0zV1ROC7WBlnag9qaIKPDfPSvzE+su45yYZ36a8wfHgaRf3CFDta+D8y3 ZbyVH+f4VEX3Gk+p63lJKaJB6nxZ67pjiNEMjqQmN33CvyiMslU9qXhR6 fgiDPzbSradd630n7yatpfbZPoyukFEJIl8iS95ZQA06/OlVKZ5gLqQxG jRB+7esH4K6nM5b7LmJncPJvQGBTen3JtJHIGki3/Ed2dMHlak8uR6Mbd g==; X-IronPort-AV: E=McAfee;i="6400,9594,10435"; a="270949136" X-IronPort-AV: E=Sophos;i="5.93,228,1654585200"; d="scan'208";a="270949136" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Aug 2022 12:29:39 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,228,1654585200"; d="scan'208";a="708341176" Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by fmsmga002.fm.intel.com with ESMTP; 10 Aug 2022 12:29:39 -0700 Received: from orsmsx607.amr.corp.intel.com (10.22.229.20) by ORSMSX601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28; Wed, 10 Aug 2022 12:29:39 -0700 Received: from orsmsx607.amr.corp.intel.com (10.22.229.20) by ORSMSX607.amr.corp.intel.com (10.22.229.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28; Wed, 10 Aug 2022 12:29:38 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx607.amr.corp.intel.com (10.22.229.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28 via Frontend Transport; Wed, 10 Aug 2022 12:29:38 -0700 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.109) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2375.28; Wed, 10 Aug 2022 12:29:38 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SEMqFkHkYi1Qj4dCNF0uHxnqZ6AsEpDxnC24yp0GMOx41TXq4JifBXkx/wreDRe4bYKAibpnwnqMYAeN5toJCW4N6V3cdR/8LJpuGgAxgseIf31TvhdMSQsGWVlsuLfwk9X5uefNaXNCuOWNYoloYSim+XGiQUoLwb0UzoEbuBQsnbvJ+ObpPHqsi3x0qdIuGuM6KC7s4R8GxAWwj9MN8LFbkJysseDBs1Yj4i/YlTwNHEbSgzwMaFfcs0SVEHUXlqnNGeU6DXQKahnZbGGTwka0zbyno9KJV7sIClLA03c4upZtM/46ufqKKuSxkMhA+nHKVLXd68E1PcIGnHVfCw== 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=vt0kcPry/uhmR6C/F9iEv9BRq8l7XGkjmJssup23eGY=; b=c/8ba43Hy6o32kFW8/ubDQBEwF8SVXNZrdLU2l/ZaMuVOXPuKia0d5HTTZXiN06Nc48TUYdjjvRk+tN/TvUtjW7ZffaX/O2fyv1AL2XCe75XkeBS3pze7s8xon1pvijMiLFgjfVRFmGtWxoCnU6ijP75DjuuVpCfJNBFOi8US5+m0oCNagAml9re5+/fsKhGlbCJokq+AL+9rZebv4wV+ZSwaaaReZlYpMYplXJvYr7QJwQ4HqLYM7ac+8DUAt8i6dBbkAgT7gQHTbB7b5pWpqm/tELZd28ZJPLlicpfeWvx2pGPqVoihKTMUFH1rFY3TypJZu5UDOPnDy9Rcxam5w== 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 IA1PR11MB6418.namprd11.prod.outlook.com (2603:10b6:208:3aa::18) by DM5PR11MB1577.namprd11.prod.outlook.com (2603:10b6:4:a::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5504.15; Wed, 10 Aug 2022 19:29:36 +0000 Received: from IA1PR11MB6418.namprd11.prod.outlook.com ([fe80::186b:95ac:d246:161e]) by IA1PR11MB6418.namprd11.prod.outlook.com ([fe80::186b:95ac:d246:161e%7]) with mapi id 15.20.5504.020; Wed, 10 Aug 2022 19:29:36 +0000 From: "Carrillo, Erik G" 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 Thread-Topic: [PATCH v2 3/4] timer: fix function to stop all timers Thread-Index: AQHYrIhKOLKimfKbcUS+PSihT/gI0K2ogcvA Date: Wed, 10 Aug 2022 19:29:36 +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: <20220810070958.3111119-1-s.v.naga.harish.k@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: 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: 55a05462-9bda-4065-5faf-08da7b06a933 x-ms-traffictypediagnostic: DM5PR11MB1577:EE_ x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: tBXucYAZAd7mKMvoKlpiZEVMCq2yQ0bH7rfoUJCQncjl0H8fa6Q4eXI+MyRKAXIgW9vciA6QckUQB5MPf7MMKxtvBsJJfqfPELwEJ0Ec8sfu/A/LUVpLQkh6MO7a05POmpqQdwkpBLWPYvR7J4abwM2mIZvjQgz8AP+OHkWWrZOzn9zcqWwDUD6IEFWR0RnkzQA/y/i7GhFCZNIXdVvsxLSiA5uC9rdSDqdPTGVtZgcPfU0ozVeMvQ5zWk6c7sVL1icYKRz4GBMKpKkextWcnIqxaE61SaZKinHMkf09ZTgUhjoomlDk+2JWObZCr13Pd0iw6bm24hYbcpCHiacFS2vtboEb8xzpwFsZMoSYFUdo/AJATXs4PvornobpayufOBkb11jw0Eddm2eI21nd7RmRmAOIqIM8yhumFXlSVOIlPnw0azytrX9VdvVhE4Nb9fiY7NDz8LwX+0OtNmT20M612Xq++bOr3U3VsnyVjMgPV6GgHBcxrJTBjoM7RZQj1ABmMwgjiaDUw/EEbN7O342IlDokpLKT2GcVrCoLQRbjLVuwlY205R89HHSrpV7PdUAKREID0L7K/8YV1d6qAg1VdR9rnA3+FeXkmJg88lUi30CBWD13K8oBri6hHACGguZkITaMcg7gIGdkDBFqWPF8VIJ64wO9yDPpLiOYfCrDJt7IwGPIqu7Op4nTP8WJFHOV5/wOspMHCgXGNhNFGwmGIjy1Vtjrty+Ou35jhA5vIRUjmw9RcKwGt4fiqKOghkoLBpemNylGJ7Q/F+2vYK6CQ4LWd8rLBxcT8gQISZb+9bV/2qJ4eNrh+poO0pKM x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:IA1PR11MB6418.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230016)(396003)(136003)(39860400002)(346002)(376002)(366004)(66476007)(38100700002)(122000001)(71200400001)(64756008)(66946007)(66556008)(38070700005)(66446008)(478600001)(53546011)(6862004)(8936002)(55016003)(52536014)(8676002)(54906003)(5660300002)(450100002)(86362001)(76116006)(4326008)(33656002)(26005)(82960400001)(186003)(9686003)(6636002)(83380400001)(41300700001)(6506007)(316002)(2906002)(7696005); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?KMaO5sayCU039z2kfUTz/82ybiMTGjVrfJsQ5N1EAqn6ud6G3vMq+pIiIYV6?= =?us-ascii?Q?WrgAHqOKw/HyNct+E2GJ6grsSCEgVXFzeDwqXm0MmfXMTilU5eOsmrJqUKlj?= =?us-ascii?Q?aAU0+ScuCLdahzAl2KLws1h6TLrd02i5+hLRrttaOshVexJyEwOYX1YcCu0D?= =?us-ascii?Q?YFxnZZqh5fOZ7fP+ZNUB28GyDAtzqhHI79PdnVPluJzNCMkRLMugFo2nXJC5?= =?us-ascii?Q?PNAOtVmS1w6VrSSzcAgD1t5aO3zjY882zCyjh8m78/KIsvCXBMO/6//Bjg8E?= =?us-ascii?Q?RHPhkJa+xkGom5fSDla4oMW8zOkuiT2Zp0GrcFFau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pQCXSWr5tTCHlo8lAVmRwXsbosALTgsszoE2K4?= =?us-ascii?Q?B4e3v+/9NbQaeYYPK1JZKlizecl/jQsnws0qiyBRe8YERr5bdSeRi6pZVzzB?= =?us-ascii?Q?3Kopc9aONXSp0QdjrJBOeST267IK0K7B1K7uGR2HFGFHEnBN5s2GpOQu57pO?= =?us-ascii?Q?2v4cfoLTDcYh5jl+5HxRO/VBqdv43osorehZ8NHxD72606g/mNMt3EYNuZrN?= =?us-ascii?Q?BUVyI0PQBzJ/E6OYglW3SJHkfnPjQ9Yo83n6BQH2JTXU/eiInBa7hxnYFyBF?= =?us-ascii?Q?b3RAYqxjU1wKNYa8he+N6ZOuqdQ7LGuhcpA1JYDkPBbX62q5zxkmZisRYoST?= =?us-ascii?Q?Fmv0cgnA515QtXEG+C1GsqEthiwg9DQdVp5Kp2ZkjX++ZhiWOSOjWf4JTMdd?= =?us-ascii?Q?kA=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: IA1PR11MB6418.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 55a05462-9bda-4065-5faf-08da7b06a933 X-MS-Exchange-CrossTenant-originalarrivaltime: 10 Aug 2022 19:29:36.4458 (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: Cit5XZBhPLkDAxhc2jZEPhM1m1EAx9wwXAReS0FupyXrrgrpoZFHf3574lxPKWJL2gsUouzZOp27QOzqoEmmfJKENDltT4j7+px3W9+RTr4= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR11MB1577 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 Harish, > -----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 >=20 > There is a possibility of deadlock in this API, as same spinlock is tried= to be > acquired in nested manner. >=20 > In timer_del function, if the previous owner and current owner lcore are It might be clearer to say something like: "If the lcore that is stopping the timer is different from the lcore that = owns the timer, the timer list lock is acquired in timer_del(), even if loc= al_is_locked is true. Because the same lock was already acquired in rte_ti= mer_stop_all(), the thread will hang." =20 Thanks, Erik > different, the lock is tried to be acquired even though the same lock is > already acquired by the caller of timer_del function. >=20 > This patch removes the acquisition of nested locking. >=20 > Fixes: 821c51267bcd63a ("timer: add function to stop all timers in a list= ") > Cc: stable@dpdk.org >=20 > Signed-off-by: Naga Harish K S V > ---