From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <ciara.loftus@intel.com>
Received: from mga11.intel.com (mga11.intel.com [192.55.52.93])
 by dpdk.org (Postfix) with ESMTP id AE4858E7E
 for <dev@dpdk.org>; Mon, 19 Oct 2015 11:32:53 +0200 (CEST)
Received: from orsmga002.jf.intel.com ([10.7.209.21])
 by fmsmga102.fm.intel.com with ESMTP; 19 Oct 2015 02:32:52 -0700
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.17,701,1437462000"; d="scan'208";a="829866171"
Received: from irsmsx105.ger.corp.intel.com ([163.33.3.28])
 by orsmga002.jf.intel.com with ESMTP; 19 Oct 2015 02:32:51 -0700
Received: from irsmsx106.ger.corp.intel.com ([169.254.8.229]) by
 irsmsx105.ger.corp.intel.com ([169.254.7.75]) with mapi id 14.03.0248.002;
 Mon, 19 Oct 2015 10:32:50 +0100
From: "Loftus, Ciara" <ciara.loftus@intel.com>
To: Tetsuya Mukawa <mukawa@igel.co.jp>, "Richardson, Bruce"
 <bruce.richardson@intel.com>
Thread-Topic: [dpdk-dev] [RFC PATCH v2] vhost: Add VHOST PMD
Thread-Index: AQHQ46EZDQst5vy2d0C0oFzvXGhqQZ5uSx8AgAP+EACAAI3P8A==
Date: Mon, 19 Oct 2015 09:32:50 +0000
Message-ID: <74F120C019F4A64C9B78E802F6AD4CC24F7A881E@IRSMSX106.ger.corp.intel.com>
References: <1440993326-21205-1-git-send-email-mukawa@igel.co.jp>
 <1440993326-21205-2-git-send-email-mukawa@igel.co.jp>
 <20151016125254.GA9980@bricha3-MOBL3> <56244C84.4090309@igel.co.jp>
In-Reply-To: <56244C84.4090309@igel.co.jp>
Accept-Language: en-GB, en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
x-originating-ip: [163.33.239.182]
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
Cc: "dev@dpdk.org" <dev@dpdk.org>,
 "ann.zhuangyanying@huawei.com" <ann.zhuangyanying@huawei.com>
Subject: Re: [dpdk-dev] [RFC PATCH v2] vhost: Add VHOST PMD
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: patches and discussions about DPDK <dev.dpdk.org>
List-Unsubscribe: <http://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <http://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Mon, 19 Oct 2015 09:32:54 -0000

> On 2015/10/16 21:52, Bruce Richardson wrote:
> > On Mon, Aug 31, 2015 at 12:55:26PM +0900, Tetsuya Mukawa wrote:
> >> 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 P=
MD.
> >> The PMD can have 'iface' parameter like below to specify a path to
> connect
> >> to a virtio-net device.
> >>
> >> $ ./testpmd -c f -n 4 --vdev 'eth_vhost0,iface=3D/tmp/sock0' -- -i
> >>
> >> To connect above testpmd, here is qemu command example.
> >>
> >> $ qemu-system-x86_64 \
> >>         <snip>
> >>         -chardev socket,id=3Dchr0,path=3D/tmp/sock0 \
> >>         -netdev vhost-user,id=3Dnet0,chardev=3Dchr0,vhostforce \
> >>         -device virtio-net-pci,netdev=3Dnet0
> >>
> >> Signed-off-by: Tetsuya Mukawa <mukawa@igel.co.jp>
> > With this PMD in place, is there any need to keep the existing vhost li=
brary
> > around as a separate entity? Can the existing library be
> subsumed/converted into
> > a standard PMD?
> >
> > /Bruce
>=20
> Hi Bruce,
>=20
> I concern about whether the PMD has all features of librte_vhost,
> because librte_vhost provides more features and freedom than ethdev API
> provides.
> In some cases, user needs to choose limited implementation without
> librte_vhost.
> I am going to eliminate such cases while implementing the PMD.
> But I don't have strong belief that we can remove librte_vhost now.
>=20
> So how about keeping current separation in next DPDK?
> I guess people will try to replace librte_vhost to vhost PMD, because
> apparently using ethdev APIs will be useful in many cases.
> And we will get feedbacks like "vhost PMD needs to support like this usag=
e".
> (Or we will not have feedbacks, but it's also OK.)
> Then, we will be able to merge librte_vhost and vhost PMD.

I agree with the above. One the concerns I had when reviewing the patch was=
 that the PMD removes some freedom that is available with the library. Eg. =
Ability to implement the new_device and destroy_device callbacks. If using =
the PMD you are constrained to the implementations of these in the PMD driv=
er, but if using librte_vhost, you can implement your own with whatever fun=
ctionality you like - a good example of this can be seen in the vhost sampl=
e app.
On the other hand, the PMD is useful in that it removes a lot of complexity=
 for the user and may work for some more general use cases. So I would be i=
n favour of having both options available too.

Ciara

>=20
> Thanks,
> Tetsuya