DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Xu, Qian Q" <qian.q.xu@intel.com>
To: "Ouyang, Changchun" <changchun.ouyang@intel.com>,
	"dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH v2 0/3] Fix vhost startup issue
Date: Mon, 6 Jul 2015 08:09:54 +0000	[thread overview]
Message-ID: <82F45D86ADE5454A95A89742C8D1410E01D78C7B@shsmsx102.ccr.corp.intel.com> (raw)
In-Reply-To: <1436149613-30239-1-git-send-email-changchun.ouyang@intel.com>

Tested-by: Qian Xu <qian.q.xu@intel.com>

- Test Commit: b283164694b6ed18be1856b949e91a80371e44d4
- OS: Fedora 21
- GCC: gcc (GCC) 4.9.2 20141101 (Red Hat 4.9.2-1)
- CPU: Intel(R) Xeon(R) CPU E5-2699 v3 @ 2.30GHz
- NIC: Intel Corporation 82599ES 10-Gigabit SFI/SFP+ Network Connection (rev 01)
- Target: Intel Corporation 82599ES 10-Gigabit SFI/SFP+ Network Connection (rev 01)
- Total 1 cases(Test Case7 plus rerun ), 1 passed, 0 failed.

Test Case 1:  test_perf_virtio_one_vm_dpdk_fwd_vhost-cuse_jumboframe
====================================================================

On host:

1. Start up vhost-switch, mergeable 1 means the jubmo frame feature is enabled. vm2vm 0 means only one vm without vm to vm communication::

    taskset -c 1-3 <dpdk_folder>/examples/vhost/build/vhost-switch -c 0xf -n 4 --huge-dir /mnt/huge --socket-mem 1024,1024 -- -p 1 --mergeable 1 --zero-copy 0 --vm2vm 0
   

2. Start VM with vhost cuse as backend::

    taskset -c 4-6  /home/qxu10/qemu-2.2.0/x86_64-softmmu/qemu-system-x86_64 -object memory-backend-file, id=mem,size=2048M,mem-path=/mnt/huge,share=on -numa node,memdev=mem -mem-prealloc \
    -enable-kvm -m 2048 -smp 4 -cpu host -name dpdk1-vm1 \
    -drive file=/home/img/dpdk1-vm1.img \
    -netdev tap,id=vhost3,ifname=tap_vhost3,vhost=on,script=no \
    -device virtio-net pci,netdev=vhost3,mac=52:54:00:00:00:01,id=net3,csum=off,gso=off,guest_csum=off,guest_tso4=off,guest_tso6=off,guest_ecn=off \
    -netdev tap,id=vhost4,ifname=tap_vhost4,vhost=on,script=no \
    -device virtio-net-pci,netdev=vhost4,mac=52:54:00:00:00:02,id=net4,csum=off,gso=off,guest_csum=off,guest_tso4=off,guest_tso6=off,guest_ecn=off \
    -netdev tap,id=ipvm1,ifname=tap3,script=/etc/qemu-ifup -device rtl8139,netdev=ipvm1,id=net0,mac=00:00:00:00:00:01 \
    -localtime -nographic

On guest:

3. ensure the dpdk folder copied to the guest with the same config file and build process as host. Then bind 2 virtio devices to igb_uio and start testpmd, below is the step for reference::

    ./<dpdk_folder>/tools/dpdk_nic_bind.py --bind igb_uio 00:03.0 00:04.0

    ./<dpdk_folder>/x86_64-native-linuxapp-gcc/app/test-pmd/testpmd -c f -n 4 -- -i --txqflags 0x0f00 --max-pkt-len 9000 
    
    $ >set fwd mac
    
    $ >start tx_first

4. After typing start tx_first in testpmd, user can see there would be 2 virtio device with MAC and vlan id registered in vhost-user, the log would be shown in host's vhost-sample output.

5. Send traffic(30second) to virtio1 and virtio2, and set the packet size from 64 to 1518 as well as the jumbo frame 3000. Check the performance in Mpps. The traffic sent to virtio1 should have the DEST MAC of Virtio1's MAC, Vlan id of Virtio1. The traffic sent to virtio2 should have the DEST MAC of Virtio2's MAC, Vlan id of Virtio2. As to the functionality criteria, The received rate should not be zero. As to the performance criteria, need check it with developer or design doc/PRD.

Test Case 7:  test_perf_virtio_one_vm_dpdk_fwd_vhost-user_jumboframe
====================================================================

This case is similar to TestCase1, just change the backend from vhost cuse to vhost-user, so need rebuild the dpdk in vhost-user on host, other steps are same as TestCase1. The command to launch vm is different, see below as example:: 

    <qemu-2.2.0_folder>/x86_64-softmmu/qemu-system-x86_64 -name us-vhost-vm1 -cpu host -enable-kvm -m 2048 -object memory-backend-file,id=mem,size=2048M,mem-path=/mnt/huge,share=on -numa node,memdev=mem -mem-prealloc -smp 2 -drive file=/home/img/dpdk1-vm1.img -chardev socket,id=char0,path=<dpdk/vhost-net -netdev type=vhost-user,id=mynet1,chardev=char0,vhostforce -device virtio-net-pci,mac=52:54:00:00:00:01,netdev=mynet1 -chardev socket,id=char1,path=/home/qxu10/dpdk/vhost-net -netdev type=vhost-user,id=mynet2,chardev=char1,vhostforce -device virtio-net-pci,mac=52:54:00:00:00:02,netdev=mynet2 -netdev tap,id=ipvm1,ifname=tap3,script=/etc/qemu-ifup -device rtl8139,netdev=ipvm1,id=net0,mac=00:00:00:00:00:09 -nographic

On the guest, need add one parameter at the end of testpmd command line: --disable-hw-vlan-filter.

Rerun the case and make sure no vhost-register issue. 


Thanks
Qian

-----Original Message-----
From: Ouyang, Changchun 
Sent: Monday, July 06, 2015 10:27 AM
To: dev@dpdk.org
Cc: Xie, Huawei; Cao, Waterman; Xu, Qian Q; Ouyang, Changchun
Subject: [PATCH v2 0/3] Fix vhost startup issue

The patch set fix vhost sample fails to start up in second time:
 
It should call api to unregister vhost driver when sample exit/quit, then the socket file will be removed(by calling unlink), and thus make vhost sample work correctly in second time startup.
 
It also adds/refines some log information.

Changchun Ouyang (3):
  vhost: add log when failing to bind a socket
  vhost: fix the comments and log
  vhost: call api to unregister vhost driver

 examples/vhost/main.c                        | 16 ++++++++++++++--
 lib/librte_vhost/vhost_user/vhost-net-user.c |  5 ++++-
 2 files changed, 18 insertions(+), 3 deletions(-)

--
1.8.4.2

  parent reply	other threads:[~2015-07-06  8:10 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-02  3:33 [dpdk-dev] [PATCH " Ouyang Changchun
2015-07-02  3:33 ` [dpdk-dev] [PATCH 1/3] vhost: add log if fails to bind a socket Ouyang Changchun
2015-07-02  9:29   ` Xie, Huawei
2015-07-03  1:57     ` Ouyang, Changchun
2015-07-02  9:31   ` Xie, Huawei
2015-07-02  3:33 ` [dpdk-dev] [PATCH 2/3] vhost: fix the comments and log Ouyang Changchun
2015-07-02  9:25   ` Xie, Huawei
2015-07-03  1:55     ` Ouyang, Changchun
2015-07-02  9:32   ` Xie, Huawei
2015-07-02  3:33 ` [dpdk-dev] [PATCH 3/3] vhost: call api to unregister vhost driver Ouyang Changchun
2015-07-02  9:38   ` Xie, Huawei
2015-07-03  2:03     ` Ouyang, Changchun
2015-07-02 16:04   ` Xie, Huawei
2015-07-03  2:04     ` Ouyang, Changchun
2015-07-06  2:26 ` [dpdk-dev] [PATCH v2 0/3] Fix vhost startup issue Ouyang Changchun
2015-07-06  2:26   ` [dpdk-dev] [PATCH v2 1/3] vhost: add log when failing to bind a socket Ouyang Changchun
2015-07-06  2:26   ` [dpdk-dev] [PATCH v2 2/3] vhost: fix the comments and log Ouyang Changchun
2015-07-06  2:26   ` [dpdk-dev] [PATCH v2 3/3] vhost: call api to unregister vhost driver Ouyang Changchun
2015-07-06  8:09   ` Xu, Qian Q [this message]
2015-07-07  2:31   ` [dpdk-dev] [PATCH v2 0/3] Fix vhost startup issue Ouyang, Changchun
2015-07-10 14:20   ` Xie, Huawei
2015-07-17 13:13     ` Thomas Monjalon

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=82F45D86ADE5454A95A89742C8D1410E01D78C7B@shsmsx102.ccr.corp.intel.com \
    --to=qian.q.xu@intel.com \
    --cc=changchun.ouyang@intel.com \
    --cc=dev@dpdk.org \
    /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).