[dpdk-dev] [PATCH 00/11] net/vhostpci: A new vhostpci PMD supporting VM2VM scenario

Yang, Zhiyong zhiyong.yang at intel.com
Thu Dec 21 09:40:33 CET 2017



> -----Original Message-----
> From: Maxime Coquelin [mailto:maxime.coquelin at redhat.com]
> Sent: Thursday, December 21, 2017 4:26 PM
> To: Yang, Zhiyong <zhiyong.yang at intel.com>; Tan, Jianfeng
> <jianfeng.tan at intel.com>; dev at dpdk.org; yliu at fridaylinux.org
> Cc: Wang, Wei W <wei.w.wang at intel.com>
> Subject: Re: [PATCH 00/11] net/vhostpci: A new vhostpci PMD supporting
> VM2VM scenario
> 
> 
> 
> On 12/21/2017 07:26 AM, Yang, Zhiyong wrote:
> >
> >
> >> -----Original Message-----
> >> From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Yang, Zhiyong
> >> Sent: Thursday, December 21, 2017 2:21 PM
> >> To: Tan, Jianfeng <jianfeng.tan at intel.com>; Maxime Coquelin
> >> <maxime.coquelin at redhat.com>; dev at dpdk.org; yliu at fridaylinux.org
> >> Cc: Wang, Wei W <wei.w.wang at intel.com>
> >> Subject: Re: [dpdk-dev] [PATCH 00/11] net/vhostpci: A new vhostpci
> >> PMD supporting VM2VM scenario
> >>
> >> Hi Jianfeng,
> >>
> >>> -----Original Message-----
> >>> From: Tan, Jianfeng
> >>> Sent: Thursday, December 21, 2017 1:52 PM
> >>> To: Yang, Zhiyong <zhiyong.yang at intel.com>; Maxime Coquelin
> >>> <maxime.coquelin at redhat.com>; dev at dpdk.org; yliu at fridaylinux.org
> >>> Cc: Wang, Wei W <wei.w.wang at intel.com>
> >>> Subject: RE: [PATCH 00/11] net/vhostpci: A new vhostpci PMD
> >>> supporting VM2VM scenario
> >>>
> >>> Hi,
> >>>
> >>>> -----Original Message-----
> >>>> From: Yang, Zhiyong
> >>>> Sent: Wednesday, December 20, 2017 9:52 AM
> >>>> To: Maxime Coquelin; dev at dpdk.org; yliu at fridaylinux.org
> >>>> Cc: Wang, Wei W; Tan, Jianfeng
> >>>> Subject: RE: [PATCH 00/11] net/vhostpci: A new vhostpci PMD
> >>>> supporting VM2VM scenario
> >>>>
> >>>> Hi Maxime,
> >>>>
> >>>>> -----Original Message-----
> >>>>> From: Maxime Coquelin [mailto:maxime.coquelin at redhat.com]
> >>>>> Sent: Tuesday, December 19, 2017 7:15 PM
> >>>>> To: Yang, Zhiyong <zhiyong.yang at intel.com>; dev at dpdk.org;
> >>>>> yliu at fridaylinux.org
> >>>>> Cc: Wang, Wei W <wei.w.wang at intel.com>; Tan, Jianfeng
> >>>>> <jianfeng.tan at intel.com>
> >>>>> Subject: Re: [PATCH 00/11] net/vhostpci: A new vhostpci PMD
> >>>>> supporting VM2VM scenario
> >>>>>
> >>>>
> >>>> <snip>
> >>>>
> >>>>> Thanks for the RFC.
> >>>>> It seems there is a lot of code duplication between this series
> >>>>> and
> >>>>> libvhost-
> >>>> user.
> >>>>>
> >>>>> Does the non-RFC would make reuse of libvhost-user? I'm thinking
> >>>>> of all
> >>>> the
> >>>>> code copied from virtio-net.c for example.
> >>>>>
> >>>>> If not, I think this is problematic as it will double the maintenance cost.
> >>>>
> >>>> Thank you for paying attention to the patchset . TX/RX logic
> >>>> basically comes from vhost user code.
> >>>> but some function interfaces and data structures are different,  So
> >>>> can not reuse them directly, code duplicate should be removed, I'm
> >>>> aware of this point too, when I was writing the vhostpci PMD.
> >>>>   But We should modify the  libvhost-user firstly,  let
> >>>> libvhostuser become more generic.
> >>>> It looks like that more and more PMDs are becoming the member of
> >>>> virtio family or are on the road.
> >>>
> >>> Trying to draw a conclusion here, there are two kinds of code
> >>> duplication in net/vhost-pci.
> >>> - For pci operations in guest driver, it has some duplicated code
> >>> with virtio-net pmd.
> >>> - For the enqueue/dequeuer operations, it has some duplicated code
> >>> with vhost- user lib.
> >>>
> >>> Right?
> >>
> >> Right. If the existing code in DPDK can become more generic, we can
> >> avoid the duplication.
> >>
> >
> > BTW,  wonder why vhost user enqueue/dequeue are put in lib layer,not in
> driver/net/vhost  like virtio PMD?
> 
> Because Vhost PMD is not its only user, it exports an API that can be used
> directly by the application (e.g. ovs-dpdk).
> 

Thanks for your  detailed clarification. Maxime.

Zhiyong

> Regards,
> Maxime
> 


More information about the dev mailing list