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 448F5BDAE for ; Fri, 5 Feb 2016 15:54:12 +0100 (CET) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga102.fm.intel.com with ESMTP; 05 Feb 2016 06:54:12 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,401,1449561600"; d="scan'208";a="43042527" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by fmsmga004.fm.intel.com with ESMTP; 05 Feb 2016 06:54:10 -0800 Received: from shecgisg003.sh.intel.com (shecgisg003.sh.intel.com [10.239.29.90]) by shvmail01.sh.intel.com with ESMTP id u15Es8jh010985; Fri, 5 Feb 2016 22:54:08 +0800 Received: from shecgisg003.sh.intel.com (localhost [127.0.0.1]) by shecgisg003.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id u15Es6sF031463; Fri, 5 Feb 2016 22:54:08 +0800 Received: (from yliu84x@localhost) by shecgisg003.sh.intel.com (8.13.6/8.13.6/Submit) id u15Es6h0031459; Fri, 5 Feb 2016 22:54:06 +0800 From: Yong Liu To: dts@dpdk.org Date: Fri, 5 Feb 2016 22:54:00 +0800 Message-Id: <1454684041-31420-2-git-send-email-yong.liu@intel.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1454684041-31420-1-git-send-email-yong.liu@intel.com> References: <1454684041-31420-1-git-send-email-yong.liu@intel.com> Subject: [dts] [PATCH 2/3] test_plan: add vf jumbo frame test plan X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Feb 2016 14:54:12 -0000 Signed-off-by: Marvin Liu diff --git a/test_plans/vf_jumboframe_test_plan.rst b/test_plans/vf_jumboframe_test_plan.rst new file mode 100644 index 0000000..68e7e5b --- /dev/null +++ b/test_plans/vf_jumboframe_test_plan.rst @@ -0,0 +1,141 @@ +.. 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 EXPRESS 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. + + + +The support of jumbo frames by Poll Mode Drivers consists in enabling a port +to receive Jumbo Frames with a configurable maximum packet length that is +greater than the standard maximum Ethernet frame length (1518 bytes), up to +a maximum value imposed by the hardware. + + +Prerequisites +============= +1. Create VF device from PF devices. + ./dpdk_nic_bind.py --st + 0000:87:00.0 'Ethernet Controller X710 for 10GbE SFP+' if=ens259f0 drv=i40e unused= + 0000:87:00.1 'Ethernet Controller X710 for 10GbE SFP+' if=ens259f1 drv=i40e unused= + + echo 1 > /sys/bus/pci/devices/0000\:87\:00.0/sriov_numvfs + echo 1 > /sys/bus/pci/devices/0000\:87\:00.1/sriov_numvfs + + ./dpdk_nic_bind.py --st + + 0000:87:00.0 'Ethernet Controller X710 for 10GbE SFP+' if=ens259f0 drv=i40e unused= + 0000:87:02.0 'XL710/X710 Virtual Function' unused= + 0000:87:0a.0 'XL710/X710 Virtual Function' unused= + +2. Detach VFs from the host, bind them to pci-stub driver, + + /sbin/modprobe pci-stub + + using `lspci -nn|grep -i ethernet` got VF device id, for example "8086 154c", + + echo "8086 154c" > /sys/bus/pci/drivers/pci-stub/new_id + echo 0000:87:02.0 > /sys/bus/pci/devices/0000:87:02.0/driver/unbind + echo 0000:87:02.0 > /sys/bus/pci/drivers/pci-stub/bind + + echo "8086 154c" > /sys/bus/pci/drivers/pci-stub/new_id + echo 0000:87:0a.0 > /sys/bus/pci/devices/0000:87:0a.0/driver/unbind + echo 0000:87:0a.0 > /sys/bus/pci/drivers/pci-stub/bind + +3. Passthrough VFs 87:02.0 & 87:02.1 to vm0 and start vm0, + + /usr/bin/qemu-system-x86_64 -name vm0 -enable-kvm \ + -cpu host -smp 4 -m 2048 -drive file=/home/image/sriov-fc20-1.img -vnc :1 \ + -device pci-assign,host=87:02.0,id=pt_0 \ + -device pci-assign,host=87:0a.0,id=pt_1 + +4. Login vm0 and them bind VF devices to igb_uio driver. + + ./tools/dpdk_nic_bind.py --bind=igb_uio 00:04.0 00:05.0 + +5. Start testpmd, set it in mac forward mode + testpmd -c 0x0f-- -i --portmask=0x1 \ + --txqflags=0 --max-pkt-len=9000--port-topology=loop + testpmd> set fwd mac + testpmd> start + +Start packet forwarding in the ``testpmd`` application with the ``start`` +command. Then, make the Traffic Generator transmit to the target's port +packets of lengths (CRC included) 1517, 1518, 8999, and 9000 respectively. +Check that the same amount of frames and bytes are received back by the +Traffic Generator from its port connected to the target's port. + +Note: 8259x family VF device jumbo frame setting only take effect when +VF rx mode jumbo frame is enable. VF device jumbo frame size setting shared +with PF device and testpmd parameter ``max-pkt-len`` has no effect. + +Functional Tests of Jumbo Frames +================================ + +Testing the support of Jumbo Frames in Poll Mode Drivers consists in +configuring the maximum packet length with a value greater than 1518, and in +sending to the test machine packets with the following lengths (CRC included): + +#. packet length = 1518 - 1 + +#. packet length = 1518 + +#. packet length = 1518 + 1 + +#. packet length = maximum packet length - 1 + +#. packet length = maximum packet length + +#. packet length = maximum packet length + 1 + + +Test Case: Normal frames with no jumbo frame support +==================================================== +Check that packets of standard lengths are still received with setting +max-pkt-len. + +Test Case: Normal frames with jumbo frame support +================================================= +Check that packets of standard lengths are still received when enabling the +receipt of Jumbo Frames. + +Test Case: Jumbo frames with no jumbo frame support +==================================================== +Check that with jumbo frame support, packet lengths greater than the standard +maximum frame (1518) can not received. + +Test Case: Jumbo frames with jumbo frame support +================================================ +Check that Jumbo Frames of lengths greater than the standard maximum frame +(1518) and lower or equal to the maximum frame length can be received. + +Test Case: Jumbo frames over jumbo frame support +================================================ +Check that packets larger than the configured maximum packet length are +effectively dropped by the hardware. -- 1.9.3