From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from tyo202.gate.nec.co.jp (TYO202.gate.nec.co.jp [210.143.35.52]) by dpdk.org (Postfix) with ESMTP id AAA2CB0BC for ; Wed, 18 Jun 2014 13:42:18 +0200 (CEST) Received: from mailgate3.nec.co.jp ([10.7.69.197]) by tyo202.gate.nec.co.jp (8.13.8/8.13.4) with ESMTP id s5IBgO2R027839; Wed, 18 Jun 2014 20:42:24 +0900 (JST) Received: from mailsv.nec.co.jp (imss62.nec.co.jp [10.7.69.157]) by mailgate3.nec.co.jp (8.11.7/3.7W-MAILGATE-NEC) with ESMTP id s5IBgOE11059; Wed, 18 Jun 2014 20:42:24 +0900 (JST) Received: from mail02.kamome.nec.co.jp (mail02.kamome.nec.co.jp [10.25.43.5]) by mailsv.nec.co.jp (8.13.8/8.13.4) with ESMTP id s5IBgO89009904; Wed, 18 Jun 2014 20:42:24 +0900 (JST) Received: from bpxc99gp.gisp.nec.co.jp ([10.38.151.143] [10.38.151.143]) by mail03.kamome.nec.co.jp with ESMTP id BT-MMP-360713; Wed, 18 Jun 2014 20:42:09 +0900 Received: from BPXM14GP.gisp.nec.co.jp ([169.254.1.238]) by BPXC15GP.gisp.nec.co.jp ([10.38.151.143]) with mapi id 14.02.0328.011; Wed, 18 Jun 2014 20:42:09 +0900 From: Hiroshi Shimamoto To: GongJinrong , "'John Joyce (joycej)'" , "dev@dpdk.org" Thread-Topic: [dpdk-dev] Testing memnic for VM to VM transfer Thread-Index: Ac+K6I9xrWg0SJi5TnyESQLD6hxJsg== Date: Wed, 18 Jun 2014 11:42:08 +0000 Message-ID: <7F861DC0615E0C47A872E6F3C5FCDDBD0111B25E@BPXM14GP.gisp.nec.co.jp> Accept-Language: ja-JP, en-US Content-Language: ja-JP X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.205.5.123] Content-Type: text/plain; charset="iso-2022-jp" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] Testing memnic for VM to VM transfer X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Jun 2014 11:42:19 -0000 Hi, > Subject: ##freemail## RE: ##freemail## RE: [dpdk-dev] Testing memnic for = VM to VM transfer >=20 > Hi, Hiroshi >=20 > Do you mean I must use DPDK vSwitch in host when I use MEMNIC PMD in > guest VM? actually, I just want a channel which can put the data from hos= t > to guest quickly. Do you have any idea that how to write a host applicati= on > to put the data to guest memnic PMD? Yes, basically I made the MEMNIC interface work with DPDK vSwitch. By the way, you can mmap() the shm which specified as the ivshmem and put the proper data to send a packet to guest PMD. I don't have time to make proper code, but can advise you; please see common/memnic.h and the memory layout. 1) Set magic and version in header on host. 2) Initialize PMD on guest. 3) Check the reset is 1 and set valid to 1, reset to 0 on host. 4) Use uplink area the default block size 4K. Set len and fill ether frame data, then set the status to 2 on host. Guest PMD may receive the packet. Proceed to the next packet block. thanks, Hiroshi >=20 > -----Original Message----- > From: Hiroshi Shimamoto [mailto:h-shimamoto@ct.jp.nec.com] > Sent: Wednesday, June 18, 2014 7:11 PM > To: GongJinrong; 'John Joyce (joycej)'; dev@dpdk.org > Subject: RE: ##freemail## RE: [dpdk-dev] Testing memnic for VM to VM > transfer >=20 > Hi, >=20 > > Subject: ##freemail## RE: [dpdk-dev] Testing memnic for VM to VM > > transfer > > > > Hi, Hiroshi > > > > I just start to learn DPDK and memnic, in memnic guide, you said > > "On host, the shared memory must be initialized by an application > > using memnic", I am not so clear that how to initialize the share > > memory in host, do you means use posix API or DPDK API to create the > > share memory?(it seems memnic guest side use rte_mbuf to transfer > > data), do you have any sample code to demo how to use memnic in host? >=20 > I don't have simple MEMNIC sample to use it on host. > Could you please try DPDK vSwitch and enables MEMNIC vport? > DPDK vSwitch must handle packets between physical NIC port and MEMNIC vpo= rt > exposed to guest with dpdk.org memnic driver. >=20 > thanks, > Hiroshi >=20 > > > > -----Original Message----- > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Hiroshi Shimamoto > > Sent: Wednesday, June 18, 2014 12:02 PM > > To: John Joyce (joycej); dev@dpdk.org > > Subject: Re: [dpdk-dev] Testing memnic for VM to VM transfer > > > > Hi, > > > > > Subject: [dpdk-dev] Testing memnic for VM to VM transfer > > > > > > Hi everyone: > > > We are interested in testing the performance of the memnic > > > driver > > posted at http://dpdk.org/browse/memnic/refs/. > > > We want to compare its performance compared to other techniques to > > > transfer packets between the guest and the kernel, predominately for > > > VM to > > VM transfers. > > > > > > We have downloaded the memnic components and have got it running in > > > a > > guest VM. > > > > > > The question we hope this group might be able to help with is what > > > would be the best way to processes the packets in the kernel to get > > > a VM > > to VM transfer. > > > > I think there is no kernel code work with MEMNIC. > > The recommend switching software on the host is Intel DPDK vSwitch > > hosted on 01.org and github. > > https://github.com/01org/dpdk-ovs/tree/development > > > > Intel DPDK vSwitch runs on userspace not kernel. > > > > I introduced this mechanism to DPDK vSwitch and the guest drivers are > > maintained in dpdk.org. > > > > thanks, > > Hiroshi > > > > > > > > A couple options might be possible > > > > > > > > > 1. Common shared buffer between two VMs. With some utility/cod= e > to > > switch TX & RX rings between the two VMs. > > > > > > VM1 application --- memnic --- common shared memory buffer on the > > > host --- memnic --- VM2 application > > > > > > 2. Special purpose Kernel switching module > > > > > > VM1 application --- memnic --- shared memory VM1 --- Kernel > > > switching module --- shared memory VM2 --- memnic --- > > > VM2 application > > > > > > 3. Existing Kernel switching module > > > > > > VM1 application --- memnic --- shared memory VM1 --- existing > > > Kernel switching module (e.g. OVS/linux Bridge/VETh pair) > > > --- shared memory VM2 --- memnic --- VM2 application > > > > > > Can anyone recommend which approach might be best or easiest? We wo= uld > > like to avoid writing much (or any) kernel code > > > so if there are already any open source code or test utilities that > > > provide one of these options or would be a good starting point to > > > start > > from, a pointer would be much appreciated. > > > > > > Thanks in advance > > > > > > > > > John Joyce