From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id DFE9E7D4E for ; Thu, 7 Sep 2017 10:17:38 +0200 (CEST) Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 07 Sep 2017 01:17:37 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.42,357,1500966000"; d="scan'208";a="148534436" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by fmsmga005.fm.intel.com with ESMTP; 07 Sep 2017 01:17:37 -0700 Received: from fmsmsx115.amr.corp.intel.com (10.18.116.19) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 7 Sep 2017 01:17:37 -0700 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by fmsmsx115.amr.corp.intel.com (10.18.116.19) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 7 Sep 2017 01:17:37 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.219]) by shsmsx102.ccr.corp.intel.com ([169.254.2.39]) with mapi id 14.03.0319.002; Thu, 7 Sep 2017 16:17:33 +0800 From: "Wu, Jingjing" To: =?iso-8859-1?Q?Ga=EBtan_Rivet?= , "Yigit, Ferruh" CC: Raslan Darawsheh , "thomas@monjalon.net" , "dev@dpdk.org" , "salehals@mellanox.com" Thread-Topic: [dpdk-dev] [PATCH] app/testpmd: app/testpmd: add device removal command Thread-Index: AQHTHB1eyBME6c/sFUKAe3CrWsfA5qKZCTCAgAAJ5ICAAAu0AIAQCOrg Date: Thu, 7 Sep 2017 08:17:33 +0000 Message-ID: <9BB6961774997848B5B42BEC655768F810E4255C@SHSMSX103.ccr.corp.intel.com> References: <1503499024-12480-1-git-send-email-rasland@mellanox.com> <20170828095523.GE8124@bidouze.vm.6wind.com> <2200a72f-92bb-c4e6-db9d-b00961fc328b@intel.com> <20170828111240.GF8124@bidouze.vm.6wind.com> In-Reply-To: <20170828111240.GF8124@bidouze.vm.6wind.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZjZiYWVkNTEtZmQ4MC00YzQ1LWI1NTgtZjdhYjE5ZWQxZWM5IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6IkFwUHpaXC9nUWM5ZjhLM2llaGk5OXY1cW51NXJTY1JmdlJkMExHbHprdE53PSJ9 x-ctpclassification: CTP_IC dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] app/testpmd: app/testpmd: add device removal command 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: Thu, 07 Sep 2017 08:17:39 -0000 > > > > Since dealing with device is kind of new, it can be OK to create new > > command tree, but there are already hotplug commands per port: > > "port attach #PCI|#VDEV_NAME" > > "port detach #P" > > >=20 > Those two commands deal with the etherdev hotplug API. > The new command should test the rte_dev one. >=20 I was confused. The forwarding in testpmd setup is based on port id, right? And all the devices listed in testpmd is etherdev, and all functional testi= ngs are all based on port id, right? Then what is the difference to use port id or device name in testpmd? And if no difference, what is the difference between detach and remove? The only difference here I think is Remove command is using rte_bus hotplug framework. Attach/detach is using rte_eth_dev_detach API. I think remove command should be an important command, and should not have = ambiguity. At least we need to doc it clearly. > As Thomas pointed out, the etherdev one deals only with eth ports, while > hotplug could be generalized to other devices, such as cryptodev. >=20 > > perhaps it can be good to keep "attach", "detach" keywords for device t= o > > be consistent? > > > > "device attach #name" > > "device detach #name" > > >=20 > I made a point of naming the hotplug operations in rte_bus plug/unplug > to avoid the confusion with the etherdev API. hotplug_add / > hotplug_remove also marks the distinction. >=20 > I don't know if it would be helpful for a developer writing a PMD, > searching for a way to test a functionality to have an API name > mismatch. >=20 > > Also a show equivalent can be added to work in device level: > > "show device info" > > >=20 > I think it would be useful. >=20 > > > > [1] > > http://dpdk.org/ml/archives/dev/2017-August/072764.html > > > > >=20 > -- > Ga=EBtan Rivet > 6WIND