DPDK patches and discussions
 help / color / mirror / Atom feed
From: Tetsuya Mukawa <mukawa@igel.co.jp>
To: dev@dpdk.org
Cc: nakajima.yoshihiro@lab.ntt.co.jp, masutani.hitoshi@lab.ntt.co.jp
Subject: [dpdk-dev] [TEST] vhost pmd for testing vhost-user
Date: Thu,  6 Nov 2014 20:29:24 +0900	[thread overview]
Message-ID: <1415273365-3503-1-git-send-email-mukawa@igel.co.jp> (raw)

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=<patch to img>,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 <ipaddr>: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

             reply	other threads:[~2014-11-06 11:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-06 11:29 Tetsuya Mukawa [this message]
2014-11-06 11:29 ` [dpdk-dev] [TEST] lib/librte_pmd_vhost: Add vhost pmd Tetsuya Mukawa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1415273365-3503-1-git-send-email-mukawa@igel.co.jp \
    --to=mukawa@igel.co.jp \
    --cc=dev@dpdk.org \
    --cc=masutani.hitoshi@lab.ntt.co.jp \
    --cc=nakajima.yoshihiro@lab.ntt.co.jp \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).