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 E6085A0093; Tue, 8 Mar 2022 02:39:17 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7C961410F4; Tue, 8 Mar 2022 02:39:17 +0100 (CET) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mails.dpdk.org (Postfix) with ESMTP id 5A5BB410DD; Tue, 8 Mar 2022 02:39:16 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1646703556; x=1678239556; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=BCRc8QHHYHu+eufG47TEwylXOia1afpCSd+i2SRcEAI=; b=UFhoL89H3/bO7oeXFAvhMfltoNcIwHy1z5BeLSfnN3DXJwmODrzjYNe+ FrwIzVSoPwj2LIhu58zvYGuD+Dw7FhQtTb0SJnlV0SKHo5kzP45J3G2T2 O+OfmBnpb9AiiTG2T8mqv2XO30WPRHgc5vGmbBtlt/R1jj3NpgOCQChgz ouOUvQPW4OI/63y+UPCBM69ucSZUiSrrPH9EDPboUWu96+xQqh2rhwpjr dKDyiCt91A8/AlPxH+M53eqr4xf6m6+9WjoZ5ZK8bhmU3pNA/dFvORTs2 H7SN3YOTqHdVVOxmqfCfLRa16uJinTITEeeShYLNSExYpHySrQuQCp9uB w==; X-IronPort-AV: E=McAfee;i="6200,9189,10279"; a="279269840" X-IronPort-AV: E=Sophos;i="5.90,163,1643702400"; d="scan'208";a="279269840" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Mar 2022 17:39:15 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,163,1643702400"; d="scan'208";a="632055615" Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by FMSMGA003.fm.intel.com with ESMTP; 07 Mar 2022 17:39:15 -0800 Received: from orsmsx603.amr.corp.intel.com (10.22.229.16) 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.2308.21; Mon, 7 Mar 2022 17:39:14 -0800 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21 via Frontend Transport; Mon, 7 Mar 2022 17:39:14 -0800 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.176) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.21; Mon, 7 Mar 2022 17:39:14 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=b9k52Zgz+WbErqd0I6btpp8srAGK7yO7b02pgS4+ZfxKADrtwOnrngIOfUV/H8W7PUCVMl49v9CVSGTGhrJ5DVUhIwn7bLfGuCTBZFzRpJQb4jCfXboXCJ7hK63jzZGpC0ABTGT4jRbFBsINNYNvdL9IO0LP1zTOPPDLftSeSUWORhO6AiIQxFBvz+toeFuBhLDtDNP+AX+ioixfs9AvfQBtVYGsDGP7WoWpZUwbgywFCyXIYHG3E0I/0GA6HhWx0jCm3s1grOC7rdJ8NCcJk9sWUmTrVMVW/sds8SLmC/11/+vnHpB+5XS+VQa7res3V4fQGdOeWhdXwXjkyg8uMg== 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=BCRc8QHHYHu+eufG47TEwylXOia1afpCSd+i2SRcEAI=; b=fqZUYEiv1z1HxxUqVFNc14WGQ003zdmx8Iw5M2K5c1WA7O8Y4e24ZjAkQEKPpDvIvADsWGWvY8NlAhN+yxLI+uh2Vv4PZn8aV0OVdaD+Ru/uPqt3gHgaLL2SdFiTpVp1TwhToSfwrjcud0o4urx0WELWJn3W9mprBbHAjRFbiILdQekfwLAgbMJeOdeeXim0h+tN3+m3+uoEW2Nrzes3qDxcqY/mQrJ8+ub+bOglbsersRkW+TdMGKeEHultsgK9fCmPVykfPyYFyoKAEud382rj0o43sq7aeoKSNn1CMSDHAnby2LGl+8pKbzSppsV2HvGehCCxVgbUAOs7+LgkFg== 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 DM6PR11MB3530.namprd11.prod.outlook.com (2603:10b6:5:72::19) by CH2PR11MB4456.namprd11.prod.outlook.com (2603:10b6:610:48::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5038.15; Tue, 8 Mar 2022 01:39:12 +0000 Received: from DM6PR11MB3530.namprd11.prod.outlook.com ([fe80::4c05:98bd:a369:b759]) by DM6PR11MB3530.namprd11.prod.outlook.com ([fe80::4c05:98bd:a369:b759%3]) with mapi id 15.20.5038.027; Tue, 8 Mar 2022 01:39:12 +0000 From: "Huang, Wei" To: Thomas Monjalon , "Zhang, Tianfei" CC: "dev@dpdk.org" , "Xu, Rosen" , "Zhang, Qi Z" , "nipun.gupta@nxp.com" , "hemant.agrawal@nxp.com" , "stable@dpdk.org" , "Yigit, Ferruh" Subject: RE: [PATCH v1] raw/ifpga: fix monitor thread issues Thread-Topic: [PATCH v1] raw/ifpga: fix monitor thread issues Thread-Index: AQHYLUlo12MlEWq1bUS4GgmDPKgYqay0izUAgAAyqtA= Date: Tue, 8 Mar 2022 01:39:12 +0000 Message-ID: References: <20220301084703.820509-1-wei.huang@intel.com> <7966659.31tnzDBltd@thomas> In-Reply-To: <7966659.31tnzDBltd@thomas> 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.401.20 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: ea79a99c-50f1-444c-b023-08da00a472ac x-ms-traffictypediagnostic: CH2PR11MB4456:EE_ x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: ITKjr7inQ+BPW3BzAyzdPzTfwzNlxZ2fpwRmllVu9KU8xPlLWTODlyvtyb4HS8H1r3XP9BU9PnfO4Z9i96yIrLZ3EbZSlUsewloXmRq+sruv3m29C61ztduMsU7W0Nb/K1t/J4IHgrDeqEVVGDDwkDUKsLMYEEN50pNDLF+SNorAUOJMDZqy8pQ8r7870CzpTsMF+RzO2ZzIS1K+sLlDUVU7ianOG8sjbxXBCpc3sqxrsyAekKLxpBV4QviOoPlZjUNS8DodO5OYta5LtJI+856JI0w+7N13ElUd6rnUHZLS3Jk64FazokGSq9JYHmdB6FDhF1kKZcwlZuNTDnzT5jn4Fd8C6blo1JkUbdXwy6awPKLBPhJKv+2JFTY+l8nXrDMXqwtEuoEx+iRnOCi4E7ChokjMT70GXwiYEvilKC0XGgZUmadRMWuUcXB1oN+Itv5aT2gRbvwYqHBQRxFvcNV8souu84fdYfqbrJiID0zVZQonz7Y6ObZZVospHDxCyyrYqEAzOaFe/7rSAvgzBnb8HEViPAgTpt5T0Nwlowzozet4tXoxnSE2+DSyPOGh+UsixWOIiVwACPVQ9IzzqFeifH1tNjSpdSEOwtzS+vQyCja8D5cPHgJnZfShsB1jxTd94y4DQ3SWaBM8js7eQwg2vbHUpIAekV/y/WPqr+yrW2632W3MzF7wXHYFogSoEYjV6TzJF8TchgpDGOmW/Q== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR11MB3530.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(366004)(9686003)(26005)(508600001)(53546011)(107886003)(186003)(86362001)(71200400001)(82960400001)(83380400001)(38070700005)(38100700002)(6506007)(7696005)(122000001)(8936002)(5660300002)(33656002)(52536014)(66946007)(8676002)(66556008)(66476007)(66446008)(64756008)(76116006)(4326008)(55016003)(2906002)(54906003)(6636002)(110136005)(316002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?5uk21JgPXK4+p1x4G1x0GNdbQgqWdL6lxMyI5c949RthjN7nsW6iKAilBZ0H?= =?us-ascii?Q?ppNqtegogF0WEcOYsQq8Eo3zcsKAkSbQzq35a14bPZ5PX82GlCJ2/QKpy2d1?= =?us-ascii?Q?vIO/m4yv74pSw7J+irY41i6xBk5b0gIevyVCAk2wS6Tu8y20ve/MwHLgD1t+?= =?us-ascii?Q?uzZsxx5tL7zWAX4sHKzMD5s3KblDNKMlkasJSp4vjEnZl5d7XRyRgc1GTtFT?= =?us-ascii?Q?P9w41exRp0oKwTyFh1NFR2TKUEb0ZEX0Eqy+IJlnjaZ1rR7TZlj0dZq0KccL?= =?us-ascii?Q?o0sE9VELTD46sExgvj9Cw9+6N+RhgMFUOi9ozsd3zT3jvb0ELDMbB0lmsFaa?= =?us-ascii?Q?U21KYZU0iQHTix+Y6WJRzKKNv/cnX5LmcUhI41Bmz/t676TivzQsMDaWTcPW?= =?us-ascii?Q?rooGhCFTjNeSXQfxPfF+lEeao2O7ALnq97H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Vvo0n6OcqroLrzG41UTKv6pzWJk2LZWaUg8GtiY7z/fVbPzILIAZqr4qoqb?= =?us-ascii?Q?7NxzO660KiQo3dkURrUUPPZfrEy5zp4hGmJZJESZY1A5231LQ+FZaQ62xYFL?= =?us-ascii?Q?eeUxsRkS7uJfyQP7nnZC0pCQpGpp9BQc7KYZZIwBNuQU5dpd6tGeBl+/MCo+?= =?us-ascii?Q?zqoIyQVekagg3uTkLx8dH4w4hiO0ilFLl4UBypOKHdwkXVSTZMiUUwc7vILa?= =?us-ascii?Q?ZnYIF3XVwhD3GsBLMcPP5/hWyeYuE6SOhoZm7p28fzH+uCcgP0OfPnQAOf9L?= =?us-ascii?Q?xA=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: DM6PR11MB3530.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: ea79a99c-50f1-444c-b023-08da00a472ac X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Mar 2022 01:39:12.2715 (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: eoqML591lmBKGIAex0CZ0NlSjJ3pLsPiGwnUcV5iS1mtXJU9Si7LHyKG6QrM3GEIxDaLAMEZ20Y9l9N9yQRv+g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR11MB4456 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 Thomas, > -----Original Message----- > From: Thomas Monjalon > Sent: Tuesday, March 8, 2022 06:30 > To: Zhang, Tianfei ; Huang, Wei > > Cc: dev@dpdk.org; Xu, Rosen ; Zhang, Qi Z > ; nipun.gupta@nxp.com; hemant.agrawal@nxp.com; > stable@dpdk.org; Yigit, Ferruh > Subject: Re: [PATCH v1] raw/ifpga: fix monitor thread issues >=20 > 01/03/2022 09:47, Wei Huang: > > Monitor thread handles graceful shutdown according to the value of > > specific sensors in device, two issues are found below. > > 1. Thread is not created when card is probed. > > 2. Thread is canceled without checking presence of other cards. > > To fix them, thread is created in pci device probe function, a > > reference count is checked before canceling the thread. > > > > Fixes: 9c006c45 ("raw/ifpga: scan PCIe BDF device tree") > > Cc: stable@dpdk.org > > > > Signed-off-by: Wei Huang > > Acked-by: Tianfei Zhang >=20 > In general, it is better to have 2 separate patches for 2 different issue= s. >=20 These two issue are related, if I split them into two patches, the thread c= annot work correctly with any one of the patches applied. > Applied >=20 >=20