From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yuanhan Liu Subject: Re: [PATCH v7 2/2] vhost: Add VHOST PMD Date: Fri, 5 Feb 2016 14:35:56 +0800 Message-ID: <20160205063556.GA22958@yliu-dev.sh.intel.com> References: <1448355603-21275-2-git-send-email-mukawa@igel.co.jp> <1454570791-19131-3-git-send-email-mukawa@igel.co.jp> <20160204111735.GA30426@sivlogin002.ir.intel.com> <56B44115.6090808@igel.co.jp> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: dev@dpdk.org, ann.zhuangyanying@huawei.com, yuanhan.liu@intel.com To: Tetsuya Mukawa Return-path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 69B132A5F for ; Fri, 5 Feb 2016 07:33:56 +0100 (CET) Content-Disposition: inline In-Reply-To: <56B44115.6090808@igel.co.jp> 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" On Fri, Feb 05, 2016 at 03:28:37PM +0900, Tetsuya Mukawa wrote: > On 2016/02/04 20:17, Ferruh Yigit wrote: > > On Thu, Feb 04, 2016 at 04:26:31PM +0900, Tetsuya Mukawa wrote: > > > > Hi Tetsuya, > > > >> The patch introduces a new PMD. This PMD is implemented as thin wrapper > >> of librte_vhost. It means librte_vhost is also needed to compile the PMD. > >> The vhost messages will be handled only when a port is started. So start > >> a port first, then invoke QEMU. > >> > >> The PMD has 2 parameters. > >> - iface: The parameter is used to specify a path to connect to a > >> virtio-net device. > >> - queues: The parameter is used to specify the number of the queues > >> virtio-net device has. > >> (Default: 1) > >> > >> Here is an example. > >> $ ./testpmd -c f -n 4 --vdev 'eth_vhost0,iface=/tmp/sock0,queues=1' -- -i > >> > >> To connect above testpmd, here is qemu command example. > >> > >> $ qemu-system-x86_64 \ > >> > >> -chardev socket,id=chr0,path=/tmp/sock0 \ > >> -netdev vhost-user,id=net0,chardev=chr0,vhostforce,queues=1 \ > >> -device virtio-net-pci,netdev=net0,mq=on > >> > >> Signed-off-by: Tetsuya Mukawa > > Please find some more comments, mostly minor nits, > > > > please feel free to add my ack for next version of this patch: > > Acked-by: Ferruh Yigit > > > > <...> > >> diff --git a/drivers/net/vhost/rte_eth_vhost.c b/drivers/net/vhost/rte_eth_vhost.c > >> new file mode 100644 > >> index 0000000..b2305c2 > >> --- /dev/null > >> +++ b/drivers/net/vhost/rte_eth_vhost.c > > <...> > >> + > >> +struct pmd_internal { > >> + TAILQ_ENTRY(pmd_internal) next; > >> + char *dev_name; > >> + char *iface_name; > >> + uint8_t port_id; > > You can also get rid of port_id too, if you keep list of rte_eth_dev. > > But this is not so important, keep as it is if you want to. > > Thank you so much for checking and good suggestions. > I will follow your comments without below. You might need update the MAINTAINERS file as well. --yliu