From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 04E87A05A1; Wed, 22 Apr 2020 00:37:57 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 2BB941C2E7; Wed, 22 Apr 2020 00:37:57 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id CB6441C2E6; Wed, 22 Apr 2020 00:37:54 +0200 (CEST) IronPort-SDR: fJGKelLDSNRxs2yu6/r37D6LTUxBwIA93dQi5gymMwS2Jg26R3Lm+xkUvlgNwBayOWyWL/gR06 BxGwaaByF/LA== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Apr 2020 15:37:53 -0700 IronPort-SDR: 2q/bWszhVyUYQjZdwbPjyZFHUEDvEMOWv3JkCA+3LcftfEZLK+RvMM2qdWiZH3iZyxNSXsg5I3 drT+LUxRLQfQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,411,1580803200"; d="scan'208";a="244315521" Received: from orsmsx110.amr.corp.intel.com ([10.22.240.8]) by orsmga007.jf.intel.com with ESMTP; 21 Apr 2020 15:37:53 -0700 Received: from ORSEDG002.ED.cps.intel.com (10.7.248.5) by ORSMSX110.amr.corp.intel.com (10.22.240.8) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 21 Apr 2020 15:37:52 -0700 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.168) by edgegateway.intel.com (134.134.137.101) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 21 Apr 2020 15:37:52 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DwvYhwZ5+YkVNWXy0P5QZXLitL3oY5vtZdcGxbP2ESQt/MjcUb4IyRllJWdPJLG3NOhTdIx2YM8YCuxzi45iy3B1ZZFP1zq2nuivMv4YWRBffb9lGzn2UDr169204CTtVGhiS70O68kouWMVwwmRIQ+1fIV48VupfONC34UGfq6+JeZgmY4Ep8qhsu5FIjInRiNPf8TS+HfvMoRQCfzL/FHSQODBod3AkQ5/nVU4RD6shpJks+chsqpv5OHgzvz64bJ+st8do7le45z+g9OYXQvuGLpA0tAy9AsYAlNszjNbIN/x5T7OJMi3/0o2c/Q8dFvSWDHc2b58tOQr97aufA== 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-SenderADCheck; bh=Kwvgwl4XzEWl0R9itXj+UftiwxOsDFQ4jWMcuOdI1MA=; b=kwNxIGgFA676A5M0zUTTZFyG8BnREHsZ7kAAWioRUQFlpYZomORdO0eMQMi9ifRARWwEm9xuO13lvjIt6he2vrZ6QE+wDZtCM1OL1aM1a8xXypPo8wxsa7nyZAOEUqcSUfJV92waTT4s+vxP341penaNikKko7dB7r54fbb6oG8ODZpRpWiGe75O50i72PvmqowmFdFngScbDlIGKnsj04bbm16vd37IY6wui/r1oWNkq1OR5j1QunLJprNHu6RmsXpQc4bf/JASknbutjkMpVAORwfdCQfALHrlY39r+am+IdpWka90LQMgMradkSTZ9pr9jgJimvI66h4s0ODqaw== 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Kwvgwl4XzEWl0R9itXj+UftiwxOsDFQ4jWMcuOdI1MA=; b=kNE0MFqFT4eQnKyI6cFdnHWgbN6YYlayIb/PmXkLzsYxYGXjFuvPvtn0yr/lQch5Y5uzW7FxEdPhTSmqHBkXI04HrUrR4fM7/fK9OVFkAesjBgVC90UU8gsKgitP3DO56AMD/fM2bsbOXlFeg6BdePcMa2qdTGUHH1ihHC/M9wY= Received: from BYAPR11MB3301.namprd11.prod.outlook.com (2603:10b6:a03:7f::26) by BYAPR11MB3718.namprd11.prod.outlook.com (2603:10b6:a03:fd::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2921.29; Tue, 21 Apr 2020 22:37:50 +0000 Received: from BYAPR11MB3301.namprd11.prod.outlook.com ([fe80::f8cb:58cd:e958:fff4]) by BYAPR11MB3301.namprd11.prod.outlook.com ([fe80::f8cb:58cd:e958:fff4%6]) with mapi id 15.20.2937.012; Tue, 21 Apr 2020 22:37:50 +0000 From: "Ananyev, Konstantin" To: "Zhu, TaoX" , "Lu, Wenzhuo" , "Ye, Xiaolong" CC: "dev@dpdk.org" , "martin.weiser@allegro-packets.com" , "stable@dpdk.org" Thread-Topic: [PATCH v5] net/ixgbe: fix resource leak after thread exits normally Thread-Index: AQHWF8VfpPtu0WCchUSIsr9++ykhX6iEKvlQ Date: Tue, 21 Apr 2020 22:37:50 +0000 Message-ID: References: <1586495895-9610-1-git-send-email-taox.zhu@intel.com> <20200421185320.16946-1-taox.zhu@intel.com> In-Reply-To: <20200421185320.16946-1-taox.zhu@intel.com> Accept-Language: en-GB, 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.2.0.6 authentication-results: spf=none (sender IP is ) smtp.mailfrom=konstantin.ananyev@intel.com; x-originating-ip: [192.198.151.180] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 7f707230-a23a-4a28-35d8-08d7e6449faf x-ms-traffictypediagnostic: BYAPR11MB3718: x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:6790; x-forefront-prvs: 038002787A x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR11MB3301.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(10019020)(366004)(2906002)(8676002)(71200400001)(33656002)(55016002)(498600001)(66556008)(52536014)(64756008)(66446008)(9686003)(81156014)(6636002)(66476007)(66946007)(54906003)(4326008)(4744005)(186003)(110136005)(8936002)(5660300002)(76116006)(86362001)(26005)(7696005)(6506007); DIR:OUT; SFP:1102; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: idPvBn6rZsyaXy/bM9FXbsUpRyTsqIRUlyHa8vH/wCGUCs8IGoo0aJNoW4OfG7DnDj1y/awpIJJvifAYyUreytdc8OJqo5e0y+5WuSsg//beU5VPasMdl9ipCI+0gMMVap6xAg+gpl6QiRiBLT8DknltDGGqp/V1vH8/5jcGDoZMiNbSNdxfGm3i5AbEbf+VVSOcpw/Ug6OQSL2BUEsgcr4ZDB4La53fqcAxHsKba9IJzFC/+tJFel9YKgTRDdpahEvzumk6URIhWHIeRc3G4CUA+L6j8Hzk0ZC8ZheMX46U8vOZ33eH7LKh2s19Mhjvx2PxTfNU6b+DKuFSNyu+s1sXmPy6XOg7sO8x54gHlK3LEXwfCAqF871Qj4WyeNBgRTWx0XJVTmU5iQd1ufZnT5cuU/h76RgTTBsa+QTg8Nt/4gzGA0RVLn3jfEAe5hRL x-ms-exchange-antispam-messagedata: l8Cjt3nAO1wi8zFRM3FSbBO0tNIsHrLCjXk9gsZrWhegvQhWqjX2at/ZpurQ6NP2Uf9ILePoFB+z4/JXk5USbin1jhzmNwzSbvoO9+QP9HyMa/HRaQ59Icf/8+o8OYaUG0xL0hbQCGwLTMQKdvoPqg== Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 7f707230-a23a-4a28-35d8-08d7e6449faf X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Apr 2020 22:37:50.5949 (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: nIK3r5nDh5OaU0/GHQXpwlzzI/x/hO1+0MIChabxyEU+xBkjPFYm098/NzMhntn7CyQI5KELW8vRDctpCLAX7242OKZNdjZ5plcbANlX+D0= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR11MB3718 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v5] net/ixgbe: fix resource leak after thread exits normally X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" >=20 > When the thread exits normally, pthread_join() is not called, which can > result in a resource leak. Therefore, the thread is set to separation > mode using function pthread_detach(), so that no program call > pthread_join() is required to recycle, and when the thread exits, > the system automatically reclaims resources. >=20 > Wait for the thread to finish with timeout argument(0 means that it will > not return until link complete), wait until the thread finishes before > returning. Normally, the thread will finish in a shorter time, and give > a warning message if it hasn't finished in a longer time. >=20 > Fixes: 819d0d1d57f1 ("net/ixgbe: fix blocking system events") > Cc: stable@dpdk.org >=20 > Signed-off-by: Zhu Tao > --- Acked-by: Konstantin Ananyev > -- > 1.8.3.1