From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id A86AC5688 for ; Mon, 10 Jul 2017 05:28:09 +0200 (CEST) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Jul 2017 20:28:08 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.40,337,1496127600"; d="scan'208";a="991076324" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by orsmga003.jf.intel.com with ESMTP; 09 Jul 2017 20:28:08 -0700 Received: from fmsmsx115.amr.corp.intel.com (10.18.116.19) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.319.2; Sun, 9 Jul 2017 20:28:07 -0700 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by fmsmsx115.amr.corp.intel.com (10.18.116.19) with Microsoft SMTP Server (TLS) id 14.3.319.2; Sun, 9 Jul 2017 20:28:07 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.116]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.122]) with mapi id 14.03.0319.002; Mon, 10 Jul 2017 11:28:05 +0800 From: "Tan, Jianfeng" To: "Avi Cohen (A)" , "dpdk-ovs@lists.01.org" , "users@dpdk.org" Thread-Topic: VIRTIO for containers Thread-Index: AQHS71DPAW0F5G3KC0uKr9UwE/ieeKI5T4MAgAhjEQCACXnKgIABSCvw Date: Mon, 10 Jul 2017 03:28:04 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-users] VIRTIO for containers X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Jul 2017 03:28:10 -0000 > -----Original Message----- > From: Avi Cohen (A) [mailto:avi.cohen@huawei.com] > Sent: Sunday, July 9, 2017 11:32 PM > To: Tan, Jianfeng; dpdk-ovs@lists.01.org; users@dpdk.org > Subject: RE: VIRTIO for containers >=20 > Thanks you Jianfeng - pls see inline marked [Avi Cohen (A)] >=20 > > -----Original Message----- > > From: Tan, Jianfeng [mailto:jianfeng.tan@intel.com] > > Sent: Monday, 03 July, 2017 10:22 AM > > To: Avi Cohen (A); dpdk-ovs@lists.01.org; users@dpdk.org > > Subject: RE: VIRTIO for containers > > > > > > > > > -----Original Message----- > > > From: Avi Cohen (A) [mailto:avi.cohen@huawei.com] > > > Sent: Wednesday, June 28, 2017 2:45 PM > > > To: Tan, Jianfeng; dpdk-ovs@lists.01.org; users@dpdk.org > > > Subject: RE: VIRTIO for containers > > > > > > Thank you Jianfeng > > > > > > > -----Original Message----- > > > > From: Tan, Jianfeng [mailto:jianfeng.tan@intel.com] > > > > Sent: Tuesday, 27 June, 2017 5:22 PM > > > > To: Avi Cohen (A); dpdk-ovs@lists.01.org; users@dpdk.org > > > > Subject: Re: VIRTIO for containers > > > > > > > > > > > > > > > > On 6/26/2017 8:06 PM, Avi Cohen (A) wrote: > > > > > Thank You Jianfeng > > > > > > > > > >> We have developed virtio-user + vhost-kernel as the backend. In > > > > >> that scenario, you can add the tap interface into a container > > > > >> network > > > > namespace. > > > > >> And there's a vhost kthread to push the data out to user space. > > > > >> > > > > >> And I cannot guarantee the performance as it has diametric model > > > > >> in VM > > > > >> (virtio) - OVS-DPDK (vhost). > > > > >> > > > > > [Avi Cohen (A)] > > > > > Can you refer to a document how to run this setup? > > > > > > > > Please refer to > > > > > http://dpdk.org/doc/guides/howto/virtio_user_as_exceptional_path.htm > > > > l > > > > > > > [Avi Cohen (A)] > > > My setup includes a container and ovs-dpdk , i still not sure about: > > > - How to set the virtio backend port in the ovs-dpdk ? > > > > For OVS-DPDK, you need a version above 2.7.0. Below command is used to > > create a virtio-user port with vhost-kernel backend: > > # ovs-vsctl add-port br0 virtiouser0 -- set Interface virtiouser0 type= =3Ddpdk > > options:dpdk-devargs=3Dvirtio_user0,path=3D/dev/vhost-net > > > > > - How to set the container with the virtio frontend ? > > > > No, containers will not hold the virtio frontend in this case. Above ov= s-vsctl > > command will generate a virtio-user port in OVS, and a tap interface in > > kernel, you can assign the tap interface into a net namespace of some > > container so that its networking flow will go through OVS-DPDK then to > > outside. > [Avi Cohen (A)] > Thanks you Jianfeng > I've tested it and the performance looks very good compared to native ovs= . > I have 1 more question: > You wrote " there's a vhost kthread to push the data out to user space " = - > Is that mean a copy from userspace to kernel (and viceversa) or there is = a > zero-copy mmap like in AF_PACKET which handles TX/RX rings in userspace = ? > Best Regards > avi So far it needs data copy at least from kernel to user path; there's an exp= erimental feature, named experimental_zcopytx, to avoid data copy, but not = very useful due to the implementation limitation. Packet mmap (similar to AF_PACKET) is exactly the direction we were discuss= ing for the further optimization. Plus, an optimized vhost thread model (cu= rrent thread model is: one thread for one rx-tx queue pair) is also conside= red. Thanks, Jianfeng > > > > Thanks, > > Jianfeng > > > > > Best Regards > > > avi > > > > > > > Thanks, > > > > Jianfeng > > > > > > > > > Best Regards > > > > > avi > > > > >>> I've tested the performance of a container connected to OVS- > DPDK > > > > >>> via vdev-af_packet and processed by virtual PMD, and its > > > > >>> performance is good [uses mmap'ed to userspace - zero copy > > > > >>> RX/TX ring buffer] but not good as the performance of a VM > > > > >>> connected to OVS-DPDK (@host) via vhost-user virtio. > > > > >>> Best Regards > > > > >>> avi > > > > >>> > > > > >>>> -----Original Message----- > > > > >>>> From: Tan, Jianfeng [mailto:jianfeng.tan@intel.com] > > > > >>>> Sent: Monday, 26 June, 2017 6:15 AM > > > > >>>> To: Avi Cohen (A); dpdk-ovs@lists.01.org; users@dpdk.org > > > > >>>> Subject: RE: VIRTIO for containers > > > > >>>> > > > > >>>> Hi Avi, > > > > >>>> > > > > >>>>> -----Original Message----- > > > > >>>>> From: users [mailto:users-bounces@dpdk.org] On Behalf Of Avi > > > Cohen > > > > >>>>> (A) > > > > >>>>> Sent: Sunday, June 25, 2017 11:13 PM > > > > >>>>> To: dpdk-ovs@lists.01.org; users@dpdk.org > > > > >>>>> Subject: [dpdk-users] VIRTIO for containers > > > > >>>>> > > > > >>>>> Hello, > > > > >>>>> Does anyone know the status of this project > > > > >>>>> http://dpdk.org/ml/archives/dev/2015-November/027732.html > - > > > > >>>>> Implementing a virtio device for containers ? > > > > >>>> It has been upstreamed since v16.07. Here is a howto doc: > > > > >>>> > > > > >>> > > > > > > http://dpdk.org/doc/guides/howto/virtio_user_for_container_networking. > > > > >>> h > > > > >>>> tml > > > > >>>> > > > > >>>> > > > > >>>> Thanks, > > > > >>>> Jianfeng > > > > >>>> > > > > >>>>> Best Regards > > > > >>>>> avi