From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f177.google.com (mail-wr0-f177.google.com [209.85.128.177]) by dpdk.org (Postfix) with ESMTP id 019BB137C for ; Mon, 28 Aug 2017 13:12:50 +0200 (CEST) Received: by mail-wr0-f177.google.com with SMTP id p8so667537wrf.2 for ; Mon, 28 Aug 2017 04:12:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=V/oB6JVi58MLsT2FvbRmjyzPptcTC6Lv29yLOql7DDE=; b=gzC8CUVFf6xU0ND5+cFW7HLUwElgoVK1z5byUKqRHPg/1ytICnxnK35WIKBRZa3+k1 g7nzgkas/NNBXNG/9f3YKDX7OZEmlWGDmcic+d/T744Cgjc1hAYA5rmwmKs3csx4zykD VMed9ylMMOAE66er5MO6ymgGw1gqUDW5yZf41r/ItIiFzd7VPUrmzDDbQDGJN752/MCh Q6fK2Ows7DxIVcCnsfFsjJU28UCothP4rnbHoKHHAM9hrMbPp15Qy+me38zmA5WPyaDH KggE4ea8wUsw1d4B1IfOzNeu999DRV0wOBi/gvPEtgQdv+B3HWWp/CdqWyCvE/9NSImj Nodw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=V/oB6JVi58MLsT2FvbRmjyzPptcTC6Lv29yLOql7DDE=; b=Ck9TLpegPFqV1/M9U8hM3V5SP9+2fAHe/rpkvzVM5AnsqfFpFyvHwf/v/yxZUkgIEF 0h77sjHXoUp6v0f4Y2OcrdJsIRvlj6/Rf0s5piQRK2r7NKeVcdQd5pO9c6tKEMTeym7Y Bku1AsxZR3QuogYsPqu/Cp+oQ5jQgcSlZ08sXJGiAqpM8TtG7wvCMj5qCJkYmbLj4eQm MHLwSmf9A8eA8BgvYhM3pgjrTOw3if4EeYyF4a2l9wPe7hBR2K3d82PSDyfF3RraFjms GtdrmDEosmI0L4LIeFcPv7QvaR6dvR4TYpW3w9spK/LRfMvdm0DULOSyh+hEhbjnC64f vZ4g== X-Gm-Message-State: AHYfb5hLK8Y2Uo7EWXJogzOAXTNivmYrT6zBcMSkcE95I+cEdMC7u5rV A5x4pt8UM7iTaJ/0vKY= X-Received: by 10.223.188.84 with SMTP id a20mr178510wrh.288.1503918770576; Mon, 28 Aug 2017 04:12:50 -0700 (PDT) Received: from bidouze.vm.6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id d5sm182536wma.6.2017.08.28.04.12.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 28 Aug 2017 04:12:49 -0700 (PDT) Date: Mon, 28 Aug 2017 13:12:40 +0200 From: =?iso-8859-1?Q?Ga=EBtan?= Rivet To: Ferruh Yigit Cc: Raslan Darawsheh , thomas@monjalon.net, jingjing.wu@intel.com, dev@dpdk.org, salehals@mellanox.com Message-ID: <20170828111240.GF8124@bidouze.vm.6wind.com> References: <1503499024-12480-1-git-send-email-rasland@mellanox.com> <20170828095523.GE8124@bidouze.vm.6wind.com> <2200a72f-92bb-c4e6-db9d-b00961fc328b@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <2200a72f-92bb-c4e6-db9d-b00961fc328b@intel.com> User-Agent: Mutt/1.5.23 (2014-03-12) 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: Mon, 28 Aug 2017 11:12:51 -0000 On Mon, Aug 28, 2017 at 11:30:47AM +0100, Ferruh Yigit wrote: > On 8/28/2017 10:55 AM, Gaëtan Rivet wrote: > > Hi Raslan, > > > > Redoing the review with the remarks from Thomas in mind. > > > > On Wed, Aug 23, 2017 at 05:37:04PM +0300, Raslan Darawsheh wrote: > >> Added hotplug in testpmd, to be able to test hotplug function > >> in the PMD's. > >> > >> Signed-off-by: Raslan Darawsheh > >> --- > >> app/test-pmd/cmdline.c | 44 ++++++++++++++++++++++++++++++++++++++++++++ > >> app/test-pmd/testpmd.c | 18 ++++++++++++++++++ > >> app/test-pmd/testpmd.h | 1 + > >> 3 files changed, 63 insertions(+) > >> > >> diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c > >> index cd8c358..b32a368 100644 > >> --- a/app/test-pmd/cmdline.c > >> +++ b/app/test-pmd/cmdline.c > >> @@ -716,6 +716,9 @@ static void cmd_help_long_parsed(void *parsed_result, > >> "port config (port_id|all) l2-tunnel E-tag" > >> " (enable|disable)\n" > >> " Enable/disable the E-tag support.\n\n" > >> + > >> + " device remove (device)\n" > > > > I think (device) might be hard to understand for a user. > > Maybe (device name)? > > I am suspicious on adding new root level command to testpmd, it is > getting bigger, each command looks OK on its own context, but as a whole > app getting more confusing [1]. > > 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" > Those two commands deal with the etherdev hotplug API. The new command should test the rte_dev one. As Thomas pointed out, the etherdev one deals only with eth ports, while hotplug could be generalized to other devices, such as cryptodev. > perhaps it can be good to keep "attach", "detach" keywords for device to > be consistent? > > "device attach #name" > "device detach #name" > 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. 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. > Also a show equivalent can be added to work in device level: > "show device info" > I think it would be useful. > > [1] > http://dpdk.org/ml/archives/dev/2017-August/072764.html > > -- Gaëtan Rivet 6WIND