From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wg0-f47.google.com (mail-wg0-f47.google.com [74.125.82.47]) by dpdk.org (Postfix) with ESMTP id B5A64B10F for ; Wed, 18 Jun 2014 13:49:29 +0200 (CEST) Received: by mail-wg0-f47.google.com with SMTP id k14so696539wgh.18 for ; Wed, 18 Jun 2014 04:49:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=DGK9O4JFrMXQy4P4YFyWkub+ZpjSIQuvYN0aYKbvP/s=; b=WA1HekInomrsn5d6OFSu16+zaCrbJkn9ZiwkD4bCpNtQDpIpiG1FS197zlyuh9A+zR xAbLnmUWrZFEJTwX6zSHU0621H+9LyIGvcaubExv02+heL6jWZMwL/sS1Vi/8j1T87ZU 1DpKsXoLb0GS76r7PMEqimJrF5P7MpZtxpsfyLLfU4CvrtEw50CdDObkqB/kS4PqTVSm fTwnJJiCeNHBIWvXmqVcZT+uiQoEYklrScAOSxOKRGZnW3hDDOgB8Bx/y+DXMt+TiuZ1 LVxXNCA4dKxduOKz1bPkr8yl7Ff0J+ORagcZcf177/OmAoTSOjHodbv2Za0iOp+8Si0r eUZQ== X-Gm-Message-State: ALoCoQmh7dJtMVOv4ct2IfZxR1L6oyIwMRu+vC/7R2t2/ntHFudWSIHjahxV3GDhaDps9GlgEfRg X-Received: by 10.194.2.75 with SMTP id 11mr47667865wjs.48.1403092186019; Wed, 18 Jun 2014 04:49:46 -0700 (PDT) Received: from xps13.localnet (guy78-3-82-239-227-177.fbx.proxad.net. [82.239.227.177]) by mx.google.com with ESMTPSA id wi9sm2280282wjc.23.2014.06.18.04.49.44 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 18 Jun 2014 04:49:45 -0700 (PDT) From: Thomas Monjalon To: Hiroshi Shimamoto , GongJinrong Date: Wed, 18 Jun 2014 13:49:43 +0200 Message-ID: <14317893.TJGThdBlHn@xps13> Organization: 6WIND User-Agent: KMail/4.13.1 (Linux/3.14.6-1-ARCH; KDE/4.13.1; x86_64; ; ) In-Reply-To: <7F861DC0615E0C47A872E6F3C5FCDDBD0111B25E@BPXM14GP.gisp.nec.co.jp> References: <7F861DC0615E0C47A872E6F3C5FCDDBD0111B25E@BPXM14GP.gisp.nec.co.jp> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Cc: dev@dpdk.org 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:49:30 -0000 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. -- Thomas