From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR03-VE1-obe.outbound.protection.outlook.com (mail-eopbgr50078.outbound.protection.outlook.com [40.107.5.78]) by dpdk.org (Postfix) with ESMTP id 813F6DE3 for ; Tue, 17 Jan 2017 12:04:26 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=AMQBechzsG5sLZMrSK3pXslCgztwrW2jbUock4uC02E=; b=ANoJOIes9RTkF9Csl7wa4by1GjptH3InzYwbbjqbm1G6v7ffAXA5u+AscKsaYvWy15V2Kug/Hvl8iL/h13F25gH1etgKxQ9EDbT5ApfnCMMa3EC87mcdAA7KmQqP+JcEUH2XAANzKzM/mklCgHTPFolYSfw1kqZH2BT+YU+XZTA= Received: from DB5PR0401MB2054.eurprd04.prod.outlook.com (10.166.11.137) by DB5PR0401MB2056.eurprd04.prod.outlook.com (10.166.11.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.845.12; Tue, 17 Jan 2017 11:04:25 +0000 Received: from DB5PR0401MB2054.eurprd04.prod.outlook.com ([10.166.11.137]) by DB5PR0401MB2054.eurprd04.prod.outlook.com ([10.166.11.137]) with mapi id 15.01.0845.014; Tue, 17 Jan 2017 11:04:25 +0000 From: Shreyansh Jain To: Ferruh Yigit , "david.marchand@6wind.com" CC: "dev@dpdk.org" , "thomas.monjalon@6wind.com" Thread-Topic: [dpdk-dev] [PATCH v7 9/9] eal: enable hotplugging of devices on bus Thread-Index: AQHScKlkHDGTXGYrYEenCtGPJHBAxKE8fP6AgAABk4A= Date: Tue, 17 Jan 2017 11:04:21 +0000 Deferred-Delivery: Tue, 17 Jan 2017 11:03:09 +0000 Message-ID: References: <1484581107-2025-1-git-send-email-shreyansh.jain@nxp.com> <1484647774-28984-1-git-send-email-shreyansh.jain@nxp.com> <1484647774-28984-10-git-send-email-shreyansh.jain@nxp.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=shreyansh.jain@nxp.com; x-originating-ip: [192.88.169.1] x-ms-office365-filtering-correlation-id: 9e265217-4618-4423-6371-08d43ec8996e x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:DB5PR0401MB2056; x-microsoft-exchange-diagnostics: 1; DB5PR0401MB2056; 7:Ib1lGLH82PZGy9bHwcz/ctfqd7wEURzMWbKrglwxBA5kHb/BjiFA1QMttFASDXy1Hi3raQAIvy4Y9qZ8QDSMjW5U37tfWUVJFa6qxinm+SztdoyzRSX218LtPuyBeBAEY2/mUn5u1qYmzx7jbQ9KqJHUBN6qzWnTseXR+S1N7bn4rVsa3XvQd3vnMGA5v6XD+tYEdEPLNkytZ/voUrLUe5VKoJbl2ymxF0ydE3EJiN3j4btzdvBGaB9GU8R0YM7njlahELRYFJ0D6I5auTnGRD9fk/lWpoz7QIAacdguIhWU3VVSE3csBpz7ZEjYOIJ77YcGHcL84Ba/YYnG58yrj7m9S9aIOLhYdv5H7R2K/zgH/kxgd42wx7wLm1f0SfLg3G4AofTDmEEYwvfrPiHJqVw2DENkJceYRTMK4x4yyDheWSMEU+lba9N1+gCcs79m+DaPWYvreO+8ntRBMlkhow== x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(185117386973197)(228905959029699); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(5005006)(8121501046)(10201501046)(3002001)(6055026)(6041248)(20161123555025)(20161123560025)(20161123564025)(20161123562025)(6072148)(6047074); SRVR:DB5PR0401MB2056; BCL:0; PCL:0; RULEID:; SRVR:DB5PR0401MB2056; x-forefront-prvs: 01901B3451 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(6009001)(7916002)(39840400002)(39850400002)(39860400002)(39410400002)(39450400003)(24454002)(13464003)(377454003)(189002)(199003)(77096006)(25786008)(6436002)(74316002)(3846002)(7736002)(106116001)(106356001)(305945005)(2900100001)(7696004)(105586002)(54906002)(4326007)(229853002)(9686003)(2950100002)(6506006)(30001)(3280700002)(66066001)(2906002)(97736004)(38730400001)(6116002)(102836003)(5001770100001)(3660700001)(93886004)(5660300001)(81166006)(54356999)(86362001)(8676002)(5890100001)(6666003)(101416001)(2501003)(81156014)(189998001)(92566002)(33656002)(55016002)(76176999)(50986999)(8936002)(99286003)(68736007)(122556002); DIR:OUT; SFP:1101; SCL:1; SRVR:DB5PR0401MB2056; H:DB5PR0401MB2054.eurprd04.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-originalarrivaltime: 17 Jan 2017 11:04:25.2450 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB5PR0401MB2056 Subject: Re: [dpdk-dev] [PATCH v7 9/9] eal: enable hotplugging of devices on bus 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: , X-List-Received-Date: Tue, 17 Jan 2017 11:04:26 -0000 Hi Ferruh, > -----Original Message----- > From: Ferruh Yigit [mailto:ferruh.yigit@intel.com] > Sent: Tuesday, January 17, 2017 4:18 PM > To: Shreyansh Jain ; david.marchand@6wind.com > Cc: dev@dpdk.org; thomas.monjalon@6wind.com > Subject: Re: [dpdk-dev] [PATCH v7 9/9] eal: enable hotplugging of devices= on > bus >=20 > On 1/17/2017 10:09 AM, Shreyansh Jain wrote: > > Given a bus, attach and detach callbacks allow the implementation to > > handles calls from EAL for attaching or detaching a named device. > > > > Signed-off-by: Shreyansh Jain >=20 > <...> >=20 > > +/** > > + * Search and detach a PCI device from PCI Bus > > + * Implements rte_bus->detach > > + * > > + * @param device_name > > + * Name of the device to search and detach > > + * > > + * @return > > + * 0 for successful detaching of device > > + * >0 if device not found on bus > > + * <0 in case of error in removal. >=20 > These are the return values expected by rte_eal_dev_detach(), but > rte_eal_pci_detach() is not following these right now, which is causing > failure on detaching virtual devices. >=20 > Fix is not complex, it may be an option to fix this as a separate patch > after this patchset applied. Ok. I will have a look and fix it. If possible I will push v8; keeping it pending is lower preference for me. >=20 > > + */ > > +int > > +rte_eal_pci_detach(const char *device_name); > > + > > +/** >=20 > <...>