From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id EF42A2B94 for ; Thu, 26 May 2016 09:57:07 +0200 (CEST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga103.fm.intel.com with ESMTP; 26 May 2016 00:57:07 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,367,1459839600"; d="scan'208";a="709148931" Received: from yliu-dev.sh.intel.com (HELO yliu-dev) ([10.239.67.162]) by FMSMGA003.fm.intel.com with ESMTP; 26 May 2016 00:57:05 -0700 Date: Thu, 26 May 2016 15:58:56 +0800 From: Yuanhan Liu To: Thomas Monjalon Cc: Bruce Richardson , Ferruh Yigit , dev@dpdk.org, Tetsuya Mukawa , david.marchand@6wind.com Message-ID: <20160526075856.GV5641@yliu-dev.sh.intel.com> References: <20160509213124.GK5641@yliu-dev.sh.intel.com> <20160524094256.GA3264@bricha3-MOBL3> <20160525044159.GS5641@yliu-dev.sh.intel.com> <3536324.AAsUjNi441@xps13> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3536324.AAsUjNi441@xps13> User-Agent: Mutt/1.5.23 (2014-03-12) 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: Thu, 26 May 2016 07:57:08 -0000 On Wed, May 25, 2016 at 01:54:41PM +0200, Thomas Monjalon wrote: > > OTOH, let's assume there is a switch that supports quite many such > > vdevs, as well as the ability to add a new device dynamically by > > corresponding API. And assume there is just one external interface > > from the switch to add a dynamical device (say, "ovs-vsctl add-port"), > > you then also need build some codes to invoke the right API, as well > > as constructing the right parameters, like what you said below. > > > > This let me think of the vhost dequeue/enqueue API. Basically speaking, > > it has the same functionality the rte_eth_rx/tx_burst has, but just > > different API name and different parameters. This results to OVS has > > to write different netdev_class, one for NIC, another one for vhost-user. > > (actually, there is yet another one for vhost-cuse). > > > > And now since we have vhost-pmd, we could just have one netdev_class > > at OVS, saving their (and other application's) effort to build/maintain > > similar codes. > > Yes, it was a good improvement. Yeah, kudos to Tetsuya. > > Thus, I'm __just wondering__ could we add a generic interface to create > > vdev dynamically for all such vdevs? I was thinking something like: > > > > rte_create_vdev(type, char *options); > > Actually, it has more sense to first create the device with an attach() > function and the configure it with devargs. > So neither attaching nor configuring are specific to vdev. > And devargs configuration can happen long after creating the device object. > > I suggest to reject this patch and continue the EAL rework initiated > by David. I'm okay with that: I think it's better to use current interface instead of adding a new one that will be refactored soon. --yliu