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 A0AF4A04C1 for ; Wed, 20 Nov 2019 10:02:57 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 82DB35B3E; Wed, 20 Nov 2019 10:02:57 +0100 (CET) Received: from EUR02-VE1-obe.outbound.protection.outlook.com (mail-eopbgr20066.outbound.protection.outlook.com [40.107.2.66]) by dpdk.org (Postfix) with ESMTP id 6294D2BF5; Wed, 20 Nov 2019 10:02:53 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VXcA3tbcN3kZKODI+mX/ZR4GdzRhlWtxDmVE72MoGQJLuJnrwOkpUEKdRfM808/V0oraqnvl0WKMCRUTUNTVVNd+LqsIZMQ6RwZzqzMKlmk28cJ4yOFTccMQjhRwEwDY17JTkEh/HX1lWePN9WqOI1FgD1/CVAO8YzaLHoJDJ8KPYgpjD3EeEg4qSPMaay9OVKOlM7LF5LFj6ujNlKLXodqW2Eg3Xt8pDYIftWsrsBztL8OspIhb/zy8S3DWpsGLh41z2e7QwoPAIKsmix50wXzXd/r1gbKbmQpcUkBIHjYINKd9R2Me9oZQ3+7rnyB8x7RrK17jhrPmrGn6UjLdAw== 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=GozQA1FA8A4zvyUK9yxT2LvXfXVXPzAXNics6G/aYMI=; b=l+v4sbWH+xW+lPqpBYMeJtESrNj8SD7o+tRia7yzIldBLUynYsfU/qdpHYqgAu6k2OLZok0EwHYh3ef5PnBtWDbP+DnO+in8MYAjk5HjS3FtS6b1dW9V/ODXoFKSy0j20kAE4ALHUNWKZx0HnoJUREh73gsEJkX3VXLjT8Uvt+ci8k7hI2VEjsTBqmAtv3o1IT3BsFJNCusibsMKd51BrxfohOFkQVmanuOr7Le/Kwo+xdgNZAqOIcsIJoor9e1YPoC4t9vR2FjZFq6Q7xS4Li1orwPc4dyzKhdYtOv8iz+qAm9BQKFojo/mw7cR1C7KGO9nTlI+Vrhwt8dKbw30+w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=mellanox.com; dmarc=pass action=none header.from=mellanox.com; dkim=pass header.d=mellanox.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=GozQA1FA8A4zvyUK9yxT2LvXfXVXPzAXNics6G/aYMI=; b=NuGytSCBARl9s2DEeS2PMYqfAheI3uGQkg6h3cFckuL/OpTOT4YXKkcCJRZnL22q5hxhJqJ26P0WXyQaSpPyBxIzoyW3k2YRav5VA31e/vxLaYBv7wa2z5mydNgkW84k8teTCufmet5TYzu5WWfGXSkx9rPYfnpOWXypwZKe+0c= Received: from AM0PR0502MB4019.eurprd05.prod.outlook.com (52.133.39.139) by AM0PR0502MB3811.eurprd05.prod.outlook.com (52.133.50.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2451.30; Wed, 20 Nov 2019 09:02:51 +0000 Received: from AM0PR0502MB4019.eurprd05.prod.outlook.com ([fe80::cd03:4e5a:4ef7:6ea5]) by AM0PR0502MB4019.eurprd05.prod.outlook.com ([fe80::cd03:4e5a:4ef7:6ea5%6]) with mapi id 15.20.2474.015; Wed, 20 Nov 2019 09:02:51 +0000 From: Matan Azrad To: Thomas Monjalon CC: "stable@dpdk.org" , "dev@dpdk.org" , Gaetan Rivet , Bernard Iremonger , "mukawa@igel.co.jp" , "david.marchand@redhat.com" Thread-Topic: [dpdk-stable] [PATCH 1/2] bus/pci: fix driver detach clear Thread-Index: AQHVnypXIj3Uiax61UKUHPOsaICzAKeTvgqw Date: Wed, 20 Nov 2019 09:02:51 +0000 Message-ID: References: <1573548459-6931-1-git-send-email-matan@mellanox.com> <1939572.QzvFjc1F9H@xps> In-Reply-To: <1939572.QzvFjc1F9H@xps> Accept-Language: en-US, he-IL Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=matan@mellanox.com; x-originating-ip: [193.47.165.251] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: be2e0f32-3592-40f5-3073-08d76d986c6c x-ms-traffictypediagnostic: AM0PR0502MB3811: x-ld-processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-forefront-prvs: 02272225C5 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(346002)(366004)(396003)(39860400002)(376002)(136003)(189003)(199004)(52536014)(6436002)(7736002)(7696005)(478600001)(74316002)(55016002)(9686003)(99286004)(2906002)(6916009)(4326008)(229853002)(25786009)(186003)(476003)(81156014)(486006)(81166006)(26005)(6506007)(11346002)(8676002)(446003)(76176011)(6246003)(66066001)(66946007)(305945005)(86362001)(33656002)(8936002)(102836004)(256004)(6116002)(3846002)(71200400001)(71190400001)(66556008)(66476007)(64756008)(14444005)(14454004)(54906003)(5660300002)(76116006)(316002)(66446008); DIR:OUT; SFP:1101; SCL:1; SRVR:AM0PR0502MB3811; H:AM0PR0502MB4019.eurprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: ZMyDTWmij5d7R6uSixDV2ZpmGHJeb/80odWzw/mRYXmNxokKeIEut/42JvXXLmZ9tVGGcsZozV6VC7nkC7K8yQU089xQOb6gpkJ0B/O1g0X0s89flad+uPzsslRGaNzRmcef3FW/wivwSk+OZjyfIjcM6BIr2QPQX+3sowMeKOxNVaUYnlAl42myiPcISoy3Wc7CMGqciv+ulN9J3JC6v94VdvjJZKAi2v/MR4gs0uRddbJAjDqekEzmnDsOldP4m+U4ScyB3LvZZ9keIbFecVYgnJQNOS+TwnWb/gnTc+QnfI63gpc08Xv2hvSywg42lOaYMz1ynWG627balyYVRA+hJ2VOLduPJFTP6tGWipaIGMGm3IF1SYhTDi+8nhu8qf2kaequSBeAj3fiuXPN6K2Zrgz7b+yswPqpaHql+CxTGmId5HnTB10Rghha1mF5 x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: be2e0f32-3592-40f5-3073-08d76d986c6c X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Nov 2019 09:02:51.6511 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: woWJ3yY0UD3wuPtvoD1VB+9yhNOrjCpJr0pOt8Lt+GYK0efMFluLD6piMPKjgoApP0ifAO61p+fWQP/1+Ap+Cg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR0502MB3811 Subject: Re: [dpdk-stable] [PATCH 1/2] bus/pci: fix driver detach clear X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 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 Sender: "stable" Hi From: Thomas Monjalon > 12/11/2019 09:47, Matan Azrad: > > When a rte_device is unplugged, the driver should be detached from the > > device. >=20 > Yes >=20 > > The PCI detach driver operation wrongly didn't clear the driver from > > the device structure what remain the device in probe state from the > > EAL point of view. >=20 > Are you aware of an use case which is broken because of that? Yes, will add a small example. >=20 > > --- a/drivers/bus/pci/pci_common.c > > +++ b/drivers/bus/pci/pci_common.c > > @@ -247,6 +247,7 @@ static struct rte_devargs > > *pci_devargs_lookup(struct rte_pci_device *dev) >=20 > The git context above is wrong, it should show the function > rte_pci_detach_dev. >=20 > > /* clear driver structure */ > > dev->driver =3D NULL; > > + dev->device.driver =3D NULL; >=20 > It looks a good fix. > Acked-by: Thomas Monjalon >=20 > I am wondering if there could be a risk for any test application if appli= ed in > 19.11-rc3. > I think we should try to get it and revert if a side effect is discovered= . >=20