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 B9FF7A00E6 for ; Mon, 5 Aug 2019 19:06:15 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C14411BDE1; Mon, 5 Aug 2019 19:06:14 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by dpdk.org (Postfix) with ESMTP id 28B541BCB8; Mon, 5 Aug 2019 19:06:13 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id x75GkJTr026596; Mon, 5 Aug 2019 10:06:12 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=pfpt0818; bh=jhKk+kUDM6/bCOlxzqRw0urIW4QxstLB0+zw7gE9jrM=; b=pgDR1l4MAOiN0soEtcAortzuVTbM12xnjiX0vshGFocNl/NsdCM4ZlJkRYNvreYYwLMa lOeR/nJFh/Zbwcg5ArQsN4tJ9dEv1Hdm9RqjOV63cdEHD/xKxt4IJ9BC6w3+JNnDiZBd 4AisQS6eFdCDtpecB4WyjmUUcae630axOl2HKrWfVqKQvSLgCSLH6K8bEKoPUSpagKpd whBTk81KjG8I3a0HQyPtWWe+OhV6Xj+rO1P5R+L23g4YWn5YLfp8/o2KhTB+668tHcW8 aqCrXL7Z2Ipit5TlSCGXoWhpYea6ZXNAp5uVCRE5lAynlFmsrW69kMSudVRgJl2E6Gct 6A== Received: from sc-exch04.marvell.com ([199.233.58.184]) by mx0b-0016f401.pphosted.com with ESMTP id 2u59skq3vy-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Mon, 05 Aug 2019 10:06:11 -0700 Received: from SC-EXCH03.marvell.com (10.93.176.83) by SC-EXCH04.marvell.com (10.93.176.84) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Mon, 5 Aug 2019 10:05:57 -0700 Received: from NAM01-SN1-obe.outbound.protection.outlook.com (104.47.32.53) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server (TLS) id 15.0.1367.3 via Frontend Transport; Mon, 5 Aug 2019 10:05:56 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jnwuzaslaqAMxWh1G7IZJ1zyLzMsJc3x0ZObRU5n1pc9DMa8VUG+mU+XMTaeI6eZxiPoVzL0DVBd7YdbrEAaG45sPQC0o8J8/qSDwx+fP3hIjOc170bOdE/kW4mhrkaVrnfNIIjMns3Q48oIYRYVk3qxrIbIfTksLazInb5gormnj2hjAHp05fMrbfs4ivO+uhvWIT/ubLdAZqcdBR2E6ndDpvnZfLOseaviYEMhHEQLHlMaJ95Rqg5YBdjFZboy1IVQWRquSbGaLazaxuNSVFjBRfsYzguTbX6dCbK0VTI/SMHRYpssR9iksLSyMf7AEDlcChsBpo6Z9y+8bEw3Fg== 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=jhKk+kUDM6/bCOlxzqRw0urIW4QxstLB0+zw7gE9jrM=; b=D9Ecol+C4U4fCczX6MLnT5fUapBaFrGwH8w8G5djxW+RwkFOZVNpQkegHmeQJC3w3ZoV1glqvDgxNCaKJpbre6hzHMZjhuCzRsfA+qVvPqjBnTZQ5QQJSzkztvmGwuRUCamIYXwxFHc1mVprwIDF9hpwbftIz7xZMOxT5eyYa0Zkh3A7+m8yh1tXN2LoIksoW/Jv1bzh1a+l2xaJlVE6WwSGH7iVSFMZzLb80CiYkkXVBqvKXbFqxL1e1RsAAPkpfjdRRtBePJ4jed0T73vqfBrJTcUbEeK6dtCgd4WyZvRdDW5nO9yUMbqQHyB87VdtsJ450jzm3f2pziG3ipCG1Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1;spf=pass smtp.mailfrom=marvell.com;dmarc=pass action=none header.from=marvell.com;dkim=pass header.d=marvell.com;arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.onmicrosoft.com; s=selector2-marvell-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=jhKk+kUDM6/bCOlxzqRw0urIW4QxstLB0+zw7gE9jrM=; b=GFR/rggoXs9GwxnW8wZFVpbdSFDRTegUX0FVXYbnod0z1kON5aoXuCX1TK0iAblfHVOXD3FMqLOP5b2aUSFyBrAyI/93GlHbp88TOZfa1MvE5yFErRyAuR71kf1PTMX8GmppZJnihoFFa7Pt4niYw3iLSJQ/g0p8rMtiDg4itKI= Received: from BYAPR18MB2424.namprd18.prod.outlook.com (20.179.91.149) by BYAPR18MB2902.namprd18.prod.outlook.com (20.179.58.217) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2136.20; Mon, 5 Aug 2019 17:05:52 +0000 Received: from BYAPR18MB2424.namprd18.prod.outlook.com ([fe80::5877:72b7:40cf:2013]) by BYAPR18MB2424.namprd18.prod.outlook.com ([fe80::5877:72b7:40cf:2013%3]) with mapi id 15.20.2136.018; Mon, 5 Aug 2019 17:05:52 +0000 From: Jerin Jacob Kollanukkaran To: Amit Gupta , Maciej Czekaj , Anatoly Burakov CC: "dev@dpdk.org" , "stable@dpdk.org" , "Amit Gupta" Thread-Topic: [PATCH] net/thunderx: fix nicvf cleanup on detaching PCI dev Thread-Index: AQHVS2P0bICye73I2k6BeZ3q9FIm5qbsyPSQ Date: Mon, 5 Aug 2019 17:05:52 +0000 Message-ID: References: <1564992051-11150-1-git-send-email-agupta3@marvell.com> In-Reply-To: <1564992051-11150-1-git-send-email-agupta3@marvell.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [171.61.87.186] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: c5dd46a5-417e-4baf-63dd-08d719c72c2a x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(2017052603328)(7193020); SRVR:BYAPR18MB2902; x-ms-traffictypediagnostic: BYAPR18MB2902: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:2449; x-forefront-prvs: 01208B1E18 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(376002)(366004)(396003)(346002)(136003)(39860400002)(13464003)(199004)(189003)(229853002)(68736007)(26005)(86362001)(6116002)(3846002)(7736002)(305945005)(107886003)(74316002)(6246003)(81156014)(8676002)(6436002)(55016002)(14444005)(33656002)(53936002)(9686003)(256004)(8936002)(76176011)(316002)(25786009)(4326008)(110136005)(54906003)(66556008)(64756008)(66446008)(76116006)(66946007)(14454004)(71190400001)(7696005)(71200400001)(81166006)(66476007)(2906002)(6506007)(53546011)(102836004)(186003)(11346002)(478600001)(99286004)(486006)(52536014)(5660300002)(476003)(446003)(66066001); DIR:OUT; SFP:1101; SCL:1; SRVR:BYAPR18MB2902; H:BYAPR18MB2424.namprd18.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: marvell.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: 4/KUx3AgVLTNcxK9iRrPNJRl3oxmklyy1piZEtM9U1mFnK1SdAoNxXeeoPxdpxeGBzAbqVTp/1H1XZoxqYEi6rrDxYhm7w7t7RYhOLWKt2cQg2bBLB8fHJBFxjryx7KVBS0exesBXpzuhHTdKPgAbbmxZbkKKeuEixvJBBzgk8jhdatF5ybawQgVVdOZqqeWVz72Dcr/jVjTW4WIwX4LAEF007KXl0pbEH8zojWCV0B3lPIMbbRiRPbgx8fBUu9rUN7gJkw4F12zJR4hViMS1pNYVZ6jjqlb4KThVkAqtjKhtH2u5utbIL5vbRCjubtvTGNNgAqxPqzQjyOlO2TRM/J2QXynX0jiZnKv/fQ4kR8YLdjbw68p8V2NQDkDqJ3Zrjj259Mh/XOvdSywkz/eJK8k22QFUSAPIQyASwINOhQ= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: c5dd46a5-417e-4baf-63dd-08d719c72c2a X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Aug 2019 17:05:52.3937 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: jerinj@marvell.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR18MB2902 X-OriginatorOrg: marvell.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:5.22.84,1.0.8 definitions=2019-08-05_08:2019-07-31,2019-08-05 signatures=0 Subject: Re: [dpdk-dev] [PATCH] net/thunderx: fix nicvf cleanup on detaching PCI dev 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" > -----Original Message----- > From: agupta3@marvell.com > Sent: Monday, August 5, 2019 1:31 PM > To: Jerin Jacob Kollanukkaran ; Maciej Czekaj > ; Anatoly Burakov > Cc: dev@dpdk.org; stable@dpdk.org; Amit Gupta > Subject: [PATCH] net/thunderx: fix nicvf cleanup on detaching PCI dev >=20 > From: Amit Gupta >=20 > There was a bug while doing PCI detach because of that app gets seg fault= as > eth_dev is released without stopping/cleaning up mapped nicvf. >=20 > Fixed this bug by adding nicvf cleanup stupport on PCI detach. >=20 > Fixes: fdf91e0f2fac ("drivers/net: do not use ethdev driver") > Signed-off-by: Amit Gupta Cc: stable@dpdk.org Acked-by: Jerin Jacob Fixed check-git-log.sh issues and applied to dpdk-next-net-mrvl/master. Tha= nks > --- > drivers/net/thunderx/nicvf_ethdev.c | 12 +++++++++++- > 1 file changed, 11 insertions(+), 1 deletion(-) >=20 > diff --git a/drivers/net/thunderx/nicvf_ethdev.c > b/drivers/net/thunderx/nicvf_ethdev.c > index ec57692..56769ef 100644 > --- a/drivers/net/thunderx/nicvf_ethdev.c > +++ b/drivers/net/thunderx/nicvf_ethdev.c > @@ -2083,6 +2083,16 @@ static void nicvf_vf_stop(struct rte_eth_dev *dev, > struct nicvf *nic, > return ret; > } > static int > +nicvf_eth_dev_uninit(struct rte_eth_dev *dev) { > + PMD_INIT_FUNC_TRACE(); > + > + if (rte_eal_process_type() =3D=3D RTE_PROC_PRIMARY) > + nicvf_dev_close(dev); > + > + return 0; > +} > +static int > nicvf_eth_dev_init(struct rte_eth_dev *eth_dev) { > int ret; > @@ -2256,7 +2266,7 @@ static int nicvf_eth_pci_probe(struct rte_pci_drive= r > *pci_drv __rte_unused, >=20 > static int nicvf_eth_pci_remove(struct rte_pci_device *pci_dev) { > - return rte_eth_dev_pci_generic_remove(pci_dev, NULL); > + return rte_eth_dev_pci_generic_remove(pci_dev, > nicvf_eth_dev_uninit); > } >=20 > static struct rte_pci_driver rte_nicvf_pmd =3D { > -- > 1.8.3.1