From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 4938B1B221 for ; Thu, 21 Dec 2017 09:26:22 +0100 (CET) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A2EB9C0587E7; Thu, 21 Dec 2017 08:26:21 +0000 (UTC) Received: from [10.36.112.35] (ovpn-112-35.ams2.redhat.com [10.36.112.35]) by smtp.corp.redhat.com (Postfix) with ESMTPS id BE97718009; Thu, 21 Dec 2017 08:26:19 +0000 (UTC) To: "Yang, Zhiyong" , "Tan, Jianfeng" , "dev@dpdk.org" , "yliu@fridaylinux.org" Cc: "Wang, Wei W" References: <20171130094657.11470-1-zhiyong.yang@intel.com> <961a2372-39c8-70ff-41a1-5379122c0427@redhat.com> From: Maxime Coquelin Message-ID: <6c8cb663-cde2-5d71-d661-690551f0d247@redhat.com> Date: Thu, 21 Dec 2017 09:26:17 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Thu, 21 Dec 2017 08:26:21 +0000 (UTC) Subject: Re: [dpdk-dev] [PATCH 00/11] net/vhostpci: A new vhostpci PMD supporting VM2VM scenario X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Dec 2017 08:26:22 -0000 On 12/21/2017 07:26 AM, Yang, Zhiyong wrote: > > >> -----Original Message----- >> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Yang, Zhiyong >> Sent: Thursday, December 21, 2017 2:21 PM >> To: Tan, Jianfeng ; Maxime Coquelin >> ; dev@dpdk.org; yliu@fridaylinux.org >> Cc: Wang, Wei W >> 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 ; Maxime Coquelin >>> ; dev@dpdk.org; yliu@fridaylinux.org >>> Cc: Wang, Wei W >>> 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@dpdk.org; yliu@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@redhat.com] >>>>> Sent: Tuesday, December 19, 2017 7:15 PM >>>>> To: Yang, Zhiyong ; dev@dpdk.org; >>>>> yliu@fridaylinux.org >>>>> Cc: Wang, Wei W ; Tan, Jianfeng >>>>> >>>>> Subject: Re: [PATCH 00/11] net/vhostpci: A new vhostpci PMD >>>>> supporting VM2VM scenario >>>>> >>>> >>>> >>>> >>>>> 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). Regards, Maxime >> Thanks >> Zhiyong >> >>> Thanks, >>> Jianfeng >>> >>>>> >>>>> Cheers, >>>>> Maxime