From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: Testing memnic for VM to VM transfer Date: Wed, 02 Jul 2014 08:59:06 -0700 (PDT) Message-ID: <3856470.KKoi0bR8VV@xps13> References: <7F861DC0615E0C47A872E6F3C5FCDDBD0111B25E@BPXM14GP.gisp.nec.co.jp> <14317893.TJGThdBlHn@xps13> <7F861DC0615E0C47A872E6F3C5FCDDBD0111B348@BPXM14GP.gisp.nec.co.jp> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: "dev-VfR2kkLFssw@public.gmane.org" To: Hiroshi Shimamoto Return-path: In-Reply-To: <7F861DC0615E0C47A872E6F3C5FCDDBD0111B348-ZmjkEB1lVlLt6d3pZDjeaEtBU8KWyXPq@public.gmane.org> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" 2014-06-18 12:06, Hiroshi Shimamoto: > 2014-06-18 13:49, Thomas Monjalon: > > 2014-06-18 11:42, Hiroshi Shimamoto: > > > 2014-06-18 19:26, GongJinrong: > > > > Do you have any idea that how to write a host application > > > > 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. > > > > Such application should be integrated in memnic repository. > > I know Olivier wrote one which could be sent on next week. > > yeah, I just begin to feel to need such a software in the repository. I've pushed the test application (host-sim) that Olivier wrote. Feel free to improve it. I think that we could also use the PMD driver in host side with some modifications. -- Thomas