From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v2] vhost: add support for dynamic vhost PMD creation Date: Fri, 20 May 2016 14:03:20 +0200 Message-ID: <1638192.xyCv6GChDS@xps13> References: <20160509213124.GK5641@yliu-dev.sh.intel.com> <1891939.OmQDtN0y3O@xps13> <20160520103746.GA19260@bricha3-MOBL3> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: Ferruh Yigit , dev@dpdk.org, Tetsuya Mukawa , Yuanhan Liu To: Bruce Richardson Return-path: Received: from mail-wm0-f41.google.com (mail-wm0-f41.google.com [74.125.82.41]) by dpdk.org (Postfix) with ESMTP id DD71BADEB for ; Fri, 20 May 2016 14:03:22 +0200 (CEST) Received: by mail-wm0-f41.google.com with SMTP id n129so79624815wmn.1 for ; Fri, 20 May 2016 05:03:22 -0700 (PDT) In-Reply-To: <20160520103746.GA19260@bricha3-MOBL3> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 2016-05-20 11:37, Bruce Richardson: > On Thu, May 19, 2016 at 06:44:44PM +0200, Thomas Monjalon wrote: > > 2016-05-19 17:28, Ferruh Yigit: > > > On 5/19/2016 9:33 AM, Thomas Monjalon wrote: > > > > 2016-05-18 18:10, Ferruh Yigit: > > > >> Add rte_eth_from_vhost() API to create vhost PMD dynamically from > > > >> applications. > > > > > > > > How is it different from rte_eth_dev_attach() calling rte_eal_vdev_init()? > > > > > > > > > > When used rte_eth_dev_attach(), application also needs to do: > > > rte_eth_dev_configure() > > > rte_eth_rx_queue_setup() > > > rte_eth_tx_queue_setup() > > > rte_eth_dev_start() > > > > > > rte_eth_from_vhost() does these internally, easier to use for applications. > > > > This argument is not sufficient. > > We are not going to add new APIs just for wrapping others. > > Why not - if there is a sufficient increase in developer usability by doing so? > Having one API that saves an app from having to call 5 other APIs looks like > something that should always be given fair consideration. There will obviously > be other factors to take into account too, like numbers and types of parameters > to the replacement call vs the sub-calls, but I don't think a blanket ban is > justified. Yes, everything can be discussed, especially the ethdev API which is far from being perfect :)