DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [TEST] vhost pmd for testing vhost-user
@ 2014-11-06 11:29 Tetsuya Mukawa
  2014-11-06 11:29 ` [dpdk-dev] [TEST] lib/librte_pmd_vhost: Add vhost pmd Tetsuya Mukawa
  0 siblings, 1 reply; 2+ messages in thread
From: Tetsuya Mukawa @ 2014-11-06 11:29 UTC (permalink / raw)
  To: dev; +Cc: nakajima.yoshihiro, masutani.hitoshi

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-11-06 11:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-06 11:29 [dpdk-dev] [TEST] vhost pmd for testing vhost-user Tetsuya Mukawa
2014-11-06 11:29 ` [dpdk-dev] [TEST] lib/librte_pmd_vhost: Add vhost pmd Tetsuya Mukawa

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).