From: Yong Liu <yong.liu@intel.com>
To: dts@dpdk.org
Subject: [dts] [PATCH 2/3] Add vxlan sample test plan.
Date: Thu, 4 Jun 2015 15:21:45 +0800 [thread overview]
Message-ID: <1433402506-3031-2-git-send-email-yong.liu@intel.com> (raw)
In-Reply-To: <1433402506-3031-1-git-send-email-yong.liu@intel.com>
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=UTF-8, Size: 9394 bytes --]
From: Marvin Liu <yong.liu@intel.com>
Vxlan sample simulates a VXLAN Tunnel Endpoint (VTEP) termination in DPDK.
It is used to demonstrate the offload and filtering capabilities of i40 NIC
for VXLAN packet.
Signed-off-by: Marvin Liu <yong.liu@intel.com>
diff --git a/test_plans/vxlan_sample_test_plan.rst b/test_plans/vxlan_sample_test_plan.rst
new file mode 100644
index 0000000..93136fd
--- /dev/null
+++ b/test_plans/vxlan_sample_test_plan.rst
@@ -0,0 +1,225 @@
+.. Copyright (c) <2015>, Intel Corporation
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+
+ - Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+ - Neither the name of Intel Corporation nor the names of its
+ contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ "AS IS" AND ANY EXPR ESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ OF THE POSSIBILITY OF SUCH DAMAGE.
+
+============
+Vxlan Sample
+============
+Vxlan sample simulates a VXLAN Tunnel Endpoint (VTEP) termination in DPDK.
+It is used to demonstrate the offload and filtering capabilities of i40 NIC
+for VXLAN packet.
+
+Vxlan sample uses the basic virtio devices management function from vHOST
+example, and the US-vHost interface and tunnel filtering mechanism to direct
+the traffic to/from a specific VM.
+
+Vxlan sample is also designed to show how tunneling protocols can be handled.
+
+Prerequisites
+=============
+1x Intel® X710 (Fortville) NICs (2x 40GbE full duplex optical ports per NIC)
+plugged into the available PCIe Gen3 8-lane slot.
+
+2x Intel® XL710-DA4 (Eagle Fountain) (1x 10GbE full duplex optical ports per NIC)
+plugged into the avaiable PCIe Gen3 8-lane slot.
+
+DUT board must be two sockets system and each cpu have more than 8 lcores.
+
+Update qemu-system-x86_64 to version 2.2.0 which support hugepage based memory.
+Prepare vhost-use requested modules::
+
+ modprobe fuse
+ modprobe cuse
+ insmod lib/librte_vhost/eventfd_link/eventfd_link.ko
+
+Allocate 4096*2M hugepages for vm and dpdk::
+
+ echo 4096 > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages
+
+Test Case: Vxlan Sample Encap packet
+====================================
+Start vxlan sample with only encapsulation enable::
+
+ tep_termination -c 0xf -n 3 --socket-mem 2048,2048 -- -p 0x1 \
+ --udp-port 4789 --nb-devices 2 --filter-type 3 --tx-checksum 0 \
+ --encap 1 --decap 0
+
+Wait for vhost-net socket device created and message dumped::
+
+ VHOST_CONFIG: bind to vhost-net
+
+Start virtual machine with hugepage based memory and two vhost-user devices::
+
+ qemu-system-x86_64 -name vm0 -enable-kvm -daemonize \
+ -cpu host -smp 4 -m 4096 \
+ -object memory-backend-file,id=mem,size=4096M,mem-path=/mnt/huge,share=on \
+ -numa node,memdev=mem -mem-prealloc \
+ -chardev socket,id=char0,path=./dpdk/vhost-net \
+ -netdev type=vhost-user,id=netdev0,chardev=char0,vhostforce \
+ -device virtio-net-pci,netdev=netdev0,mac=00:00:20:00:00:20 \
+ -chardev socket,id=char1,path=./dpdk/vhost-net \
+ -netdev type=vhost-user,id=netdev1,chardev=char1,vhostforce \
+ -device virtio-net-pci,netdev=netdev1,mac=00:00:20:00:00:21 \
+ -drive file=/storage/vm-image/vm0.img -vnc :1
+Login into virtual machine and start testpmd with additional arguments::
+
+ testpmd -c f -n 3 -- -i --txqflags=0xf00 --disable-hw-vlan
+
+Start packet forward of testpmd and transit several packets for mac learning::
+
+ testpmd> set fwd mac
+ testpmd> start tx_first
+
+Make sure virtIO port registered normally::
+
+ VHOST_CONFIG: virtio is now ready for processing.
+ VHOST_DATA: (1) Device has been added to data core 56
+ VHOST_DATA: (1) MAC_ADDRESS 00:00:20:00:00:21 and VNI 1000 registered
+ VHOST_DATA: (0) MAC_ADDRESS 00:00:20:00:00:20 and VNI 1000 registered
+
+Send normal udp packet to PF device and packet dmac match PF device
+Verify packet has been recevied in virtIO port0 and forwarded by port1::
+
+ testpmd> show port stats all
+
+Verify encapsulated packet received on PF device
+
+Test Case: Vxlan Sample Decap packet
+====================================
+Start vxlan sample with only de-capsulation enable::
+
+ tep_termination -c 0xf -n 3 --socket-mem 2048,2048 -- -p 0x1 \
+ --udp-port 4789 --nb-devices 2 --filter-type 3 --tx-checksum 0 \
+ --encap 0 --decap 1
+
+Start vhost-user test environment like case vxlan_sample_encap.
+
+Send vxlan packet Ether(dst=PF mac)/IP/UDP/vni(1000)/
+ Ether(dst=virtIO port0)/IP/UDP to PF device::
+
+Verify that packet received by virtIO port0 and forwarded by virtIO port1::
+
+ testpmd> show port stats all
+
+Verify that PF received packet just the same as inner packet
+
+Send vxlan packet Ether(dst=PF mac)/IP/UDP/vni(1000)/
+ Ether(dst=virtIO port1)/IP/UDP to PF device
+
+Verify that packet received by virtIO port1 and forwarded by virtIO port0::
+
+ testpmd> show port stats all
+
+Make sure PF received packet received inner packet with mac reversed.
+
+Test Case: Vxlan Sample Encap and Decap
+=======================================
+Start vxlan sample with only de-capsulation enable::
+
+ tep_termination -c 0xf -n 3 --socket-mem 2048,2048 -- -p 0x1 \
+ --udp-port 4789 --nb-devices 2 --filter-type 3 --tx-checksum 0 \
+ --encap 1 --decap 1
+
+Start vhost-user test environment like case vxlan_sample_encap
+
+Send vxlan packet Ether(dst=PF mac)/IP/UDP/vni(1000)/
+ Ether(dst=virtIO port0)/IP/UDP to PF device
+
+Verify that packet received by virtIO port0 and forwarded by virtIO port1::
+
+ testpmd> show port stats all
+
+Verify encapsulated packet received on PF device.
+Verify that inner packet src and dst mac address have been conversed.
+
+Test Case: Vxlan Sample Checksum
+================================
+Start vxlan sample with only decapsulation enable::
+
+ tep_termination -c 0xf -n 3 --socket-mem 2048,2048 -- -p 0x1 \
+ --udp-port 4789 --nb-devices 2 --filter-type 3 --tx-checksum 1 \
+ --encap 1 --decap 1
+
+Start vhost-user test environment like case vxlan_sample_encap
+
+Send vxlan packet with Ether(dst = PF mac)/IP/UDP/vni(1000)/
+ Ether(dst = virtIO port0)/IP wrong chksum/ UDP wrong chksum
+
+Verify that packet recevied by virtIO port0 and forwarded by virtIO port1::
+
+ testpmd> show port stats all
+
+Verify encapsulated packet received on PF device.
+Verify that inner packet src and dst mac address have been conversed.
+Verify that inner packet ip checksum and udp checksum were corrected.
+
+Send vxlan packet with Ether(dst = PF mac)/IP/UDP/vni(1000)/
+ Ether(dst = virtIO port0)/IP wrong chksum/ TCP wrong chksum
+
+Verify that packet recevied by virtIO port0 and forwarded by virtIO port1::
+
+ testpmd> show port stats all
+
+Verify encapsulated packet received on PF device.
+Verify that inner packet src and dst mac address have been conversed.
+Verify that inner packet ip checksum and tcp checksum were corrected.
+
+Send vxlan packet with Ether(dst = PF mac)/IP/UDP/vni(1000)/
+ Ether(dst = virtIO port0)/IP wrong chksum/ SCTP wrong chksum
+
+Verify that packet received by virtIO port0 and forwarded by virtIO port1::
+
+ testpmd> show port stats all
+
+Verify encapsulated packet received on PF device.
+Verify that inner packet src and dst mac address have been conversed.
+Verify that inner packet ip checksum and sctp checksum were corrected.
+
+Test Case: Vxlan Sample TSO
+===========================
+Start vxlan sample with tso enable, tx checksum must enable too.
+For hardware limitation, tso segment size must be larger 256::
+
+ tep_termination -c 0xf -n 3 --socket-mem 2048,2048 -- -p 0x1 \
+ --udp-port 4789 --nb-devices 2 --filter-type 3 --tx-checksum 1 \
+ --encap 1 --decap 1 --tso-segsz 256
+
+Start vhost-user test environment like case vxlan_sample_encap
+
+Send vxlan packet with Ether(dst = PF mac)/IP/UDP/vni(1000)/
+ Ether(dst = virtIO port0)/TCP/892 Bytes data, total length will be 1000
+
+Verify that packet recevied by virtIO port0 and forwarded by virtIO port1::
+
+ testpmd> show port stats all
+
+Verify that four separated vxlan packets received on PF devices.
+Make sure tcp packet payload is 256, 256, 256 and 124.
--
1.9.3
next prev parent reply other threads:[~2015-06-04 7:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-04 7:21 [dts] [PATCH 1/3] Strip hugepage mount directory and netdev numa id for vxlan sample Yong Liu
2015-06-04 7:21 ` Yong Liu [this message]
2015-06-04 7:21 ` [dts] [PATCH 3/3] Add vxlan sample test suite Yong 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=1433402506-3031-2-git-send-email-yong.liu@intel.com \
--to=yong.liu@intel.com \
--cc=dts@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).