From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 151258DB5 for ; Thu, 5 Nov 2015 09:50:54 +0100 (CET) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga102.fm.intel.com with ESMTP; 05 Nov 2015 00:50:52 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,246,1444719600"; d="scan'208";a="843104050" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by orsmga002.jf.intel.com with ESMTP; 05 Nov 2015 00:50:44 -0800 Received: from fmsmsx115.amr.corp.intel.com (10.18.116.19) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.248.2; Thu, 5 Nov 2015 00:50:14 -0800 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by fmsmsx115.amr.corp.intel.com (10.18.116.19) with Microsoft SMTP Server (TLS) id 14.3.248.2; Thu, 5 Nov 2015 00:50:14 -0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.199]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.100]) with mapi id 14.03.0248.002; Thu, 5 Nov 2015 16:49:50 +0800 From: "Xu, Qian Q" To: Thomas Monjalon , "Liu, Jijiang" Thread-Topic: [dpdk-dev] [PATCH v3 6/8] driver/virtio:enqueue vhost TX offload Thread-Index: AQHRFu9RuBd0z9bfVky49JxT4XInnp6LMNoAgAAaWwCAAAdSAIABxy7Q Date: Thu, 5 Nov 2015 08:49:50 +0000 Message-ID: <82F45D86ADE5454A95A89742C8D1410E03172DE7@shsmsx102.ccr.corp.intel.com> References: <1446634456-413-1-git-send-email-jijiang.liu@intel.com> <2611781.I9AKvK5K3K@xps13> <1ED644BD7E0A5F4091CF203DAFB8E4CC22BCFE40@SHSMSX101.ccr.corp.intel.com> <4105806.UIj9otbWQy@xps13> In-Reply-To: <4105806.UIj9otbWQy@xps13> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: "dev@dpdk.org" , "Michael S. Tsirkin" Subject: Re: [dpdk-dev] [PATCH v3 6/8] driver/virtio:enqueue vhost TX offload 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, 05 Nov 2015 08:50:55 -0000 Tested-by: Qian Xu - 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 (re= v 01) - Target: Intel Corporation 82599ES 10-Gigabit SFI/SFP+ Network Connection = (rev 01) - Total 2 cases, 2 passed, 0 failed. DPDK vhost + legacy virtio or virtio-p= md can work well with TSO.=20 Test Case 1: test_dpdk vhost+ virtio-pmd tso=20 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D On host: 1. Start up vhost-switch, mergeable 1 means the jubmo frame feature is enab= led. vm2vm 0 means only one vm without vm to vm communication:: taskset -c 1-3 /examples/vhost/build/vhost-switch -c 0xf -= n 4 --huge-dir /mnt/huge --socket-mem 1024,1024 -- -p 1 --mergeable 1 --zer= o-copy 0 --vm2vm 0 --tso 1 --tx-csum 1 =20 2. Start VM with vhost cuse as backend:: taskset -c 4-6 /home/qxu10/qemu-2.2.0/x86_64-softmmu/qemu-system-x86_6= 4 -object memory-backend-file, id=3Dmem,size=3D2048M,mem-path=3D/mnt/huge,s= hare=3Don -numa node,memdev=3Dmem -mem-prealloc \ -enable-kvm -m 2048 -smp 4 -cpu host -name dpdk1-vm1 \ -drive file=3D/home/img/dpdk1-vm1.img \ -netdev tap,id=3Dvhost3,ifname=3Dtap_vhost3,vhost=3Don,script=3Dno \ -device virtio-net pci,netdev=3Dvhost3,mac=3D52:54:00:00:00:01,id=3Dnet= 3 \ -netdev tap,id=3Dvhost4,ifname=3Dtap_vhost4,vhost=3Don,script=3Dno \ -device virtio-net-pci,netdev=3Dvhost4,mac=3D52:54:00:00:00:02,id=3Dnet= 4 \ -netdev tap,id=3Dipvm1,ifname=3Dtap3,script=3D/etc/qemu-ifup -device rt= l8139,netdev=3Dipvm1,id=3Dnet0,mac=3D00: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 tes= tpmd, below is the step for reference:: .//tools/dpdk_nic_bind.py --bind igb_uio 00:03.0 00:04.0 .//x86_64-native-linuxapp-gcc/app/test-pmd/testpmd -c f -n= 4 -- -i --txqflags 0x0f00 --max-pkt-len 9000=20 =20 $ >set fwd csum =20 $ >tso set 1000 0 $ >tso set 1000 1 $ >start tx_first 4. Send TCP packets to virtio1, and the packet size is 5000, then at the v= irtio side, it will receive 1 packet ant let vhost to do TSO, vhost will le= t NIC do TSO, so at IXIA, we expected 5 packets, each ~1k size, then also c= apture the received packets and check if the checksum is correct. Result: All the behavior is expected as step4. So the case is PASS. Test Case 2: test_dpdk vhost+legacy virtio iperf tso =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Hardware config: Connect one physical port(port1) to another physical port(= port2). Port1 is the NIC port that will do the TSO. 1. Start dpdk vhost sample, the command is same as above case. Port1 is bin= ded to igb_uio 2. start VM with 1 virtio 3. let port2 and 1virtio in VM do iperf test, since iperf test will send ou= t=20 VIRTIO: ifconfig eth0 1.1.1.2 Port2: ifconfig p2p6 1.1.1.8 Make ping work: ping 1.1.1.8=20 Then run iperf server at port2: iperf -s -I 1 Run iperf client at port1: iperf -c 1.1.1.8 -t 60 -I 1 Check the packet size at virtio and port2 to see if there are many 64KB pac= ket, if has, then pass. The reason is that vhost/virtio will first negotiat= e if each other supports tso, if supports, then the TCP/IP stack will compo= se BIG packets such as 64KB, since NIC has the TSO capability, vhost will l= et NIC do the TSO work, then at port2, the small packets will be composed t= o big packets with TCP/IP stack. =20 Result: there are many 64KB packet in both virtio and port2, so it is pass.= =20 =20 Thanks Qian -----Original Message----- From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Thomas Monjalon Sent: Wednesday, November 04, 2015 9:18 PM To: Liu, Jijiang Cc: dev@dpdk.org; Michael S. Tsirkin Subject: Re: [dpdk-dev] [PATCH v3 6/8] driver/virtio:enqueue vhost TX offlo= ad 2015-11-04 12:52, Liu, Jijiang: > From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com] > > Please could you check that your virtio implementation works with a=20 > > vanilla Linux with or without vhost? > > Thanks [...] > Xu Qian can send the test report out. =20 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 vali= ds. Thanks