DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Xu, Qian Q" <qian.q.xu@intel.com>
To: "Xu, Qian Q" <qian.q.xu@intel.com>,
	Thomas Monjalon <thomas.monjalon@6wind.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>, "Michael S. Tsirkin" <mst@redhat.com>
Subject: Re: [dpdk-dev] [PATCH v3 6/8] driver/virtio:enqueue vhost TX offload
Date: Fri, 6 Nov 2015 08:24:06 +0000	[thread overview]
Message-ID: <82F45D86ADE5454A95A89742C8D1410E03173818@shsmsx102.ccr.corp.intel.com> (raw)
In-Reply-To: <82F45D86ADE5454A95A89742C8D1410E03172E9B@shsmsx102.ccr.corp.intel.com>

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

- Test Commit: c4d404d7c1257465176deb5bb8c84e627d2d5eee
- OS/Kernel: Fedora 21/4.1.8
- 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, 1 passed, 0 failed. Legacy vhost + virtio-pmd can work well with TSO. 

Test Case 1:  test_legacy_vhost+ virtio-pmd tso 
=======================================

On host:

1. Start VM with legacy-vhost 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 \
    -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

2.  Set up the bridge on host: 

brctl addbr br1
brctl addif br1 ens260f0 # The interface is 85:00.0 connected to ixia card3 port9
brctl addif br1 tap0
brctl addif br1 tap1

ifconfig ens260f0 up
ifconfig ens260f0 promisc
ifconfig tap0 up
ifconfig tap1 up
ifconfig tap0 promisc
ifconfig tap1 promisc
brctl stp br1 off
ifconfig br1 up
brctl show

3. Disable firewall and Network manager on host:

systemctl stop firewalld.service
systemctl disable firewalld.service
systemctl stop ip6tables.service
systemctl disable ip6tables.service
systemctl stop iptables.service
systemctl disable iptables.service
systemctl stop NetworkManager.service
systemctl disable NetworkManager.service

4.  Let br1 learn the MAC : 02:00:00:00:00:00, since in the VM, the virtio device run testpmd, then it will send packets with the DEST MAC as 02:00:00:00:00:00. Then the br1 will know this packet can go to the NIC and then it will go back to the traffic generator. So here we send a packet from IXIA with the SRC MAC=02:00:00:00:00:00 and DEST MAC=52:54:00:00:00:01 to let the br1 know the MAC. We can verify the macs that the bridge knows by running: brctl br1 showmacs

port no mac addr                is local?       ageing timer
  3     02:00:00:00:00:00       no                 6.06
  1     42:fa:45:4d:aa:4d       yes                0.00
  1     42:fa:45:4d:aa:4d       yes                0.00
  1     52:54:00:00:00:01       no                 6.06
  2     8e:d7:22:bf:c9:8d       yes                0.00
  2     8e:d7:22:bf:c9:8d       yes                0.00
  3     90:e2:ba:4a:55:1c       yes                0.00
  3     90:e2:ba:4a:55:1c       yes                0.00


On guest:

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

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

    $ >start 

6.  Send TCP packets to virtio1, and the packet size is 5000, then at the virtio side, it will receive 1 packet ant let vhost to do TSO, vhost will let NIC do TSO, so at IXIA, we expected 5 packets, each ~1k size, then also capture the received packets and check if the checksum is correct.

Result:  All the behavior is expected and cksum is correct. So the case is PASS.


Thanks
Qian


-----Original Message-----
From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Xu, Qian Q
Sent: Thursday, November 05, 2015 6:45 PM
To: Thomas Monjalon
Cc: dev@dpdk.org; Michael S. Tsirkin
Subject: Re: [dpdk-dev] [PATCH v3 6/8] driver/virtio:enqueue vhost TX offload

OK, I will check it tomorrow. 
Another comment is that "Legacy vhost + virtio-pmd" is not the common use case. Firstly, in this case, virtio-pmd has no TCP/IP stack, TSO is not very meaningful; secondly, we can't get performance benefit from this case compared to "Legacy vhost+ legacy virtio". So I'm afraid no customer would like to try this case since the fake TSO and poor performance. 


Thanks
Qian


-----Original Message-----
From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com] 
Sent: Thursday, November 05, 2015 5:02 PM
To: Xu, Qian Q
Cc: Liu, Jijiang; dev@dpdk.org; Michael S. Tsirkin
Subject: Re: [dpdk-dev] [PATCH v3 6/8] driver/virtio:enqueue vhost TX offload

2015-11-05 08:49, Xu, Qian Q:
> Test Case 1:  test_dpdk vhost+ virtio-pmd tso 
[...]
> Test Case 2:  test_dpdk vhost+legacy virtio iperf tso
[...]
> Yes please, I'd like to see a test report showing this virtio running with Linux vhost and without vhost.
> We must check that the checksum is well offloaded and sent packets are valids.
> Thanks

Thanks for doing some tests.
I had no doubt it works with DPDK vhost.
Please could you do some tests without vhost and with kernel vhost?
We need to check that the checksum is not missing in such cases.

  reply	other threads:[~2015-11-06  8:24 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-04 10:54 [dpdk-dev] [PATCH v3 0/8] add vhost TX offload support Jijiang Liu
2015-11-04 10:54 ` [dpdk-dev] [PATCH v3 1/8] driver/virtio:add virtual addr for virtio net header Jijiang Liu
2015-11-04 10:54 ` [dpdk-dev] [PATCH v3 2/8] driver/virtio: record virtual address of " Jijiang Liu
2015-11-04 10:54 ` [dpdk-dev] [PATCH v3 3/8] driver/virtio:add vhost TX checksum support capability in virtio-net Jijiang Liu
2015-11-04 10:54 ` [dpdk-dev] [PATCH v3 4/8] driver/virtio:fill virtio device info for TX offload Jijiang Liu
2015-11-04 10:54 ` [dpdk-dev] [PATCH v3 5/8] driver/virtio:enqueue vhost " Jijiang Liu
2015-11-04 10:54 ` [dpdk-dev] [PATCH v3 6/8] " Jijiang Liu
2015-11-04 11:17   ` Thomas Monjalon
2015-11-04 12:52     ` Liu, Jijiang
2015-11-04 13:18       ` Thomas Monjalon
2015-11-05  8:49         ` Xu, Qian Q
2015-11-05  9:02           ` Thomas Monjalon
2015-11-05 10:44             ` Xu, Qian Q
2015-11-06  8:24               ` Xu, Qian Q [this message]
2015-11-04 13:06     ` Liu, Jijiang
2015-11-04 13:08     ` Liu, Jijiang
2015-11-04 13:15       ` Liu, Jijiang
2015-11-04 10:54 ` [dpdk-dev] [PATCH v3 7/8] lib/librte_vhost:dequeue " Jijiang Liu
2015-11-09  4:00   ` Yuanhan Liu
2015-11-09  5:27     ` Liu, Jijiang
2015-11-04 10:54 ` [dpdk-dev] [PATCH v3 8/8] examples/vhost:support TX offload in vhost sample Jijiang Liu
2015-11-09  4:17   ` Yuanhan Liu
2015-11-09  8:17     ` Liu, Jijiang
2015-11-09  8:51       ` Yuanhan Liu
2015-11-09  8:18     ` Liu, Jijiang
2015-11-11  6:47     ` Liu, Jijiang
2015-11-04 11:14 ` [dpdk-dev] [PATCH v3 0/8] add vhost TX offload support Tan, Jianfeng
2015-11-05 14:24   ` Glynn, Michael J
  -- strict thread matches above, loose matches on Subject: below --
2015-11-04  8:35 Jijiang Liu
2015-11-04  8:35 ` [dpdk-dev] [PATCH v3 6/8] driver/virtio:enqueue vhost TX offload Jijiang Liu

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=82F45D86ADE5454A95A89742C8D1410E03173818@shsmsx102.ccr.corp.intel.com \
    --to=qian.q.xu@intel.com \
    --cc=dev@dpdk.org \
    --cc=mst@redhat.com \
    --cc=thomas.monjalon@6wind.com \
    /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).