From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR03-AM5-obe.outbound.protection.outlook.com (mail-eopbgr30071.outbound.protection.outlook.com [40.107.3.71]) by dpdk.org (Postfix) with ESMTP id 9376A1C5CE for ; Fri, 13 Apr 2018 16:58:48 +0200 (CEST) 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; bh=zmqE0ZJxHy3WLsJGRI403paKTHnWICjX2m4dW/QDrrU=; b=BBtO+W8W5Hxl/6Nkf2fvmqHgVfFZN5/C5ALGdPEfzVdDZFi9nxHE/Mt66AJysoMVevha1jsOE23X9IllB6+wdIveuDUZeGKZBG2Ly5VBmQQ87jJh+z/54HKF+LEdS8uBBXt+Czldoq7405QbhR7JLqfjRAlN2k/S4VRgNb1dCm0= Received: from AM4PR0501MB2657.eurprd05.prod.outlook.com (10.172.215.19) by AM4PR0501MB2289.eurprd05.prod.outlook.com (10.165.82.142) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.653.12; Fri, 13 Apr 2018 14:58:47 +0000 Received: from AM4PR0501MB2657.eurprd05.prod.outlook.com ([fe80::6885:c169:afcb:37e6]) by AM4PR0501MB2657.eurprd05.prod.outlook.com ([fe80::6885:c169:afcb:37e6%9]) with mapi id 15.20.0675.014; Fri, 13 Apr 2018 14:58:47 +0000 From: Matan Azrad To: "Guo, Jia" , "stephen@networkplumber.org" , "bruce.richardson@intel.com" , "ferruh.yigit@intel.com" , "konstantin.ananyev@intel.com" , "gaetan.rivet@6wind.com" , "jingjing.wu@intel.com" , Thomas Monjalon , Mordechay Haimovsky , "harry.van.haaren@intel.com" , "jianfeng.tan@intel.com" CC: "jblunck@infradead.org" , "shreyansh.jain@nxp.com" , "dev@dpdk.org" , "helin.zhang@intel.com" Thread-Topic: [dpdk-dev] [PATCH V19 4/4] app/testpmd: use auto handle for hotplug Thread-Index: AQHTzZY/MqP6PEfnnkiDxaxrDsq6x6P6HbdwgARxAwCAAD+LEA== Date: Fri, 13 Apr 2018 14:58:47 +0000 Message-ID: References: <1522779443-1932-6-git-send-email-jia.guo@intel.com> <1523012217-31146-1-git-send-email-jia.guo@intel.com> <1523012217-31146-5-git-send-email-jia.guo@intel.com> <42450faf-7969-9238-823b-26fa144325ac@intel.com> In-Reply-To: <42450faf-7969-9238-823b-26fa144325ac@intel.com> Accept-Language: en-US, he-IL Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [85.64.81.213] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; AM4PR0501MB2289; 7:60Sav0RyhotlRRDy9pQlZku05OkNy2MLGcOBRjb4TGfCXTb81WEjdX0XKxlXNYKAecR4TvUma4GrrUg8DgTtEc5EjgOmcIdz86Qv0A112LvBDH/BAcKJBOQ8c88PtKNzsh1m8vOybpHMph4t+aXmEisUqVDYc6EwM3OVTdcvABnCCAzz9oiWBk7+Cl5Q2o6WGCbCryq4wqkacQF1vcjeimIAu2KdEkx8gOT45E6w1/zRkW6rN+OG+1+jWlNnKxaZ x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(48565401081)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:AM4PR0501MB2289; x-ms-traffictypediagnostic: AM4PR0501MB2289: x-ld-processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3002001)(3231232)(944501327)(52105095)(10201501046)(93006095)(93001095)(6055026)(6041310)(20161123558120)(20161123562045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(6072148)(201708071742011); SRVR:AM4PR0501MB2289; BCL:0; PCL:0; RULEID:; SRVR:AM4PR0501MB2289; x-forefront-prvs: 0641678E68 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(376002)(39860400002)(39380400002)(366004)(346002)(396003)(53754006)(189003)(199004)(51444003)(446003)(110136005)(14454004)(55016002)(11346002)(102836004)(2501003)(8936002)(9686003)(229853002)(53936002)(81156014)(81166006)(5660300001)(478600001)(86362001)(2900100001)(53546011)(3660700001)(186003)(33656002)(93886005)(8656006)(6436002)(99286004)(76176011)(66066001)(26005)(105586002)(7696005)(68736007)(4326008)(6346003)(97736004)(3280700002)(59450400001)(74316002)(54906003)(8676002)(6116002)(476003)(305945005)(106356001)(2201001)(6506007)(486006)(5890100001)(5250100002)(3846002)(25786009)(316002)(7736002)(2906002)(6246003)(7416002)(921003)(1121003); DIR:OUT; SFP:1101; SCL:1; SRVR:AM4PR0501MB2289; H:AM4PR0501MB2657.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) authentication-results: spf=none (sender IP is ) smtp.mailfrom=matan@mellanox.com; x-microsoft-antispam-message-info: 7ct5BaYHhhQ0uVNQMj/xitqPnCJnV2xf55AD3fbRer0A+FiEUeNn2X3nyOTXzUzZkJhDcovtADIYHRJGrDU0ycKAHRGEHQDKGS+I2uiM8Q33/AAJwPWdyrcZn+IjBgY2+lZAb+N3WmFFpfdjw4W7eRqGV7WciGlpwqU7KrNZvSHn0tplp1lC7MSVEuPzP6KX spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 27d2ea90-6824-42ab-b211-08d5a14f0f71 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 27d2ea90-6824-42ab-b211-08d5a14f0f71 X-MS-Exchange-CrossTenant-originalarrivaltime: 13 Apr 2018 14:58:47.3758 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR0501MB2289 Subject: Re: [dpdk-dev] [PATCH V19 4/4] app/testpmd: use auto handle for hotplug 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: Fri, 13 Apr 2018 14:58:48 -0000 Hi Guo From: Guo, Jia, Friday, April 13, 2018 1:48 PM > hi matan >=20 >=20 > On 4/12/2018 1:31 PM, Matan Azrad wrote: > > Hi All > > > > From: Jeff Guo, Friday, April 6, 2018 1:57 PM > >> Use testpmd for example, to show how an application smoothly handle > >> failure when device be hot removal, and show how to auto bind kernal > >> driver to preparing attach device when device being hot insertion. > > I saw the kmod of old devices were saved by name and the app hope that > new device name will be as previous saved name. > > How can the application know which driver should be bind for any new > device? > about which driver should be bind, that is assume that the app record the > previous saved driver type, if the device name match the name list ,just= auto > bind the corresponding saved driver, that is aim to application could bin= d > driver at run time, Looks like you assume that the device is always plugged in while the DPDK a= pplication starts, this is not true. Hot-plug means the device may be plugged-out all the time even in the DPDK = initialization. In this case the plug-in process cannot be completely done by this implemen= tation. > > Moreover, I think that the application should not deal with driver > > binding\remap and all this should be managed by the relevant PMDs - > Looks like the bind mechanism should be managed directly by the PMDs and > not annoying application to deal with it. > > > > Am I missing something? > partial agree, binding/remap could be managed by PMD, or more by hotplu= g > framework. but i don't found the problem to exposure a api to binding > according app's policy. If the application asked the device to be probed (by whithlist\blaclist opt= ions in EAL command line) The device should be probed and do the correct binding no need to request i= t from the user again, because the PMD should have all the knowledge to do the bind in probe time. > because, when device hot insertion, the PMDs default > to bind a kernel driver, then before running testpmd , we bind specific d= river > by "dpdk-devbind.py" to override the driver, then run app. > that override is also the user behavior but not PMDs, so i think the dif= ferent just at run time > or setup time. i don't know if i convinced you here. Maybe this is the time to deprecate that's need(bind device by script befor= e dpdk running) and to forward the binding responsibility to the PMDs. So if the user asked the device it obviously should be bind to DPDK(\userla= nd) so do the binding by DPDK PMDs. > > Did you check the synchronization with the RMV event callback of ethdev= ? > i guess you mean the RMV event from which PMDs have implement this > hotplug event. right?=20 Yes