From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pa0-f50.google.com (mail-pa0-f50.google.com [209.85.220.50]) by dpdk.org (Postfix) with ESMTP id D2A807E80 for ; Thu, 6 Nov 2014 12:20:29 +0100 (CET) Received: by mail-pa0-f50.google.com with SMTP id eu11so1100751pac.9 for ; Thu, 06 Nov 2014 03:29:56 -0800 (PST) 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; bh=WVK3aXlQeUI1Ct2RiFMp7FBQQmd68y8QcqkciX+eads=; b=Me+QeRVy42EbHbjyYPYaIwxeH2kKC6Gd8qRCMwNrkPTzNiLiZ8LRzUeFWmtQCG4k3A 646PzZYsMhc8IonXb7rqY7Yp3TAjEy3DMmh7tZTfnLFmkuIt252JDxxTJ9LaIzG1S3C1 hjgLrkI6/NRnfll4IcTOhlneP9INOsc+clKaw+c3dfKumhJ2Jq5/4r81EnpsSf6SLg9Z xboP0ocZ1hVFG6N8QYHA33Hu+nmSIArvDv80ctsUmT5TFUpVqs0cpKAa+A92sCkb82iK 9nQJrCRj7nvYsNfKjnl5VPp9w/dwniV+YeT9YJgDG0vlI3dGyJoNHFjx8FvopYZ4hbc6 pwrQ== X-Gm-Message-State: ALoCoQmyW37DkWc1PEDI9iuXzba03PPtdQjeS/OwO/X2B9CJMkS7BGWM0MIf3Yx5Nff3GYwiTiid X-Received: by 10.68.201.226 with SMTP id kd2mr3567066pbc.75.1415273396332; Thu, 06 Nov 2014 03:29:56 -0800 (PST) Received: from localhost.localdomain (napt.igel.co.jp. [219.106.231.132]) by mx.google.com with ESMTPSA id l9sm5722468pbq.26.2014.11.06.03.29.54 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 06 Nov 2014 03:29:55 -0800 (PST) From: Tetsuya Mukawa To: dev@dpdk.org Date: Thu, 6 Nov 2014 20:29:24 +0900 Message-Id: <1415273365-3503-1-git-send-email-mukawa@igel.co.jp> X-Mailer: git-send-email 1.9.1 Cc: nakajima.yoshihiro@lab.ntt.co.jp, masutani.hitoshi@lab.ntt.co.jp Subject: [dpdk-dev] [TEST] vhost pmd for testing vhost-user 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: Thu, 06 Nov 2014 11:20:30 -0000 Hi Xie, I've written vhost PMD to test vhost-user. This patch may be useful when you test vhost-user. Here are steps when I test vhost-user. 1. Start testpmd on the host $ sudo ./x86_64-native-linuxapp-gcc/app/testpmd -c f -n 1 -m 1024 \ --vdev 'eth_vhost0,iface=/tmp/virtq0' \ --vdev 'eth_vhost1,iface=/tmp/virtq1' -- -i 2, Start QEMU like followings. $ sudo qemu-system-x86_64 -M pc-1.0 -cpu host -m 4096 -smp 4 -enable-kvm \ -drive file=,if=none,id=drive-virtio-disk0,format=raw \ -device virtio-blk-pci,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=2 \ -object memory-backend-file,id=mem,size=4096M,mem-path=/mnt/huge,share=on \ -numa node,memdev=mem \ -chardev socket,id=chr0,path=/tmp/virtq0,server \ -netdev vhost-user,id=net0,chardev=chr0,vhostforce \ -device virtio-net-pci,netdev=net0 \ -chardev socket,id=chr1,path=/tmp/virtq1,server \ -netdev vhost-user,id=net1,chardev=chr1,vhostforce \ -device virtio-net-pci,netdev=net1 \ -vnc :2 3. Bind 2 virtio-net devices to igb_uio on the guest. 4. Start testpmd on the guest. $ sudo ./x86_64-native-linuxapp-gcc/app/testpmd -c f -n 1 -m 1024 -- -i 5. Start forwarding on the guest. testpmd> start 6. Start forwarding on the host. testpmd> start tx_first 7. Stop forwading. Thanks, Tetsuya Tetsuya Mukawa (1): lib/librte_pmd_vhost: Add vhost pmd config/common_linuxapp | 5 + lib/Makefile | 1 + lib/librte_pmd_vhost/Makefile | 57 ++++ lib/librte_pmd_vhost/rte_eth_vhost.c | 487 +++++++++++++++++++++++++++++++++++ lib/librte_pmd_vhost/rte_eth_vhost.h | 55 ++++ mk/rte.app.mk | 4 + 6 files changed, 609 insertions(+) create mode 100644 lib/librte_pmd_vhost/Makefile create mode 100644 lib/librte_pmd_vhost/rte_eth_vhost.c create mode 100644 lib/librte_pmd_vhost/rte_eth_vhost.h -- 1.9.1