From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id E1761593A for ; Mon, 23 May 2016 19:06:52 +0200 (CEST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga103.jf.intel.com with ESMTP; 23 May 2016 10:06:23 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,356,1459839600"; d="scan'208";a="960611612" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.237.220.66]) ([10.237.220.66]) by orsmga001.jf.intel.com with ESMTP; 23 May 2016 10:06:22 -0700 To: Yuanhan Liu , Bruce Richardson References: <20160509213124.GK5641@yliu-dev.sh.intel.com> <38538365.t1P5Ut1YhZ@xps13> <573DE9BE.4070807@intel.com> <1891939.OmQDtN0y3O@xps13> <20160520103746.GA19260@bricha3-MOBL3> <20160523132426.GK5641@yliu-dev.sh.intel.com> Cc: Thomas Monjalon , dev@dpdk.org, Tetsuya Mukawa From: Ferruh Yigit Message-ID: <5743388D.5080108@intel.com> Date: Mon, 23 May 2016 18:06:21 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 In-Reply-To: <20160523132426.GK5641@yliu-dev.sh.intel.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v2] vhost: add support for dynamic vhost PMD creation X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 May 2016 17:06:53 -0000 On 5/23/2016 2:24 PM, Yuanhan Liu wrote: > On Fri, May 20, 2016 at 11:37:47AM +0100, Bruce Richardson wrote: >> 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. > > Good point. Judging that vhost is not the only virtual device we > support, and it may also look reasonable to add something similar > for others in future (say, IIRC, you proposed two more internally > that also introduced similar APIs). So, instead of introducing a > new API for each such vdev, may we introduce a common one? Say, > a refined rte_eth_dev_attach(), including dev_configure(), > queue_setup(), etc. > This sounds good to me. If there is not objection, I will send a patch and we can discuss based on patch. Something like: rte_eth_dev_attach_and_setup() Regards, ferruh