From patchwork Wed Jan 13 06:26:27 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Chen, BoX C" X-Patchwork-Id: 86451 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 095A8A09EF; Wed, 13 Jan 2021 07:27:59 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F1A37140E62; Wed, 13 Jan 2021 07:27:58 +0100 (CET) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mails.dpdk.org (Postfix) with ESMTP id 142CF140E40 for ; Wed, 13 Jan 2021 07:27:56 +0100 (CET) IronPort-SDR: Zjj15jefTsSXu/uDe8q/NQJ+r9LpCp6p2/tfKZVc5vRuIagMWRKicrMdH1zshgABFW93qKtBDi TxOIzXRy0bmg== X-IronPort-AV: E=McAfee;i="6000,8403,9862"; a="242230829" X-IronPort-AV: E=Sophos;i="5.79,343,1602572400"; d="scan'208";a="242230829" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Jan 2021 22:27:56 -0800 IronPort-SDR: WkcrhIGuJcEP60dJcd5ArLq4xwz+19V5ZV8WctBxHarSazPL0/YP6jkvDPzsUP8gGDx/7dvhLU CIQwxfIPnfaw== X-IronPort-AV: E=Sophos;i="5.79,343,1602572400"; d="scan'208";a="424447853" Received: from unknown (HELO localhost.localdomain) ([10.240.183.58]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Jan 2021 22:27:55 -0800 From: ChenBo To: dts@dpdk.org Cc: ChenBo Date: Wed, 13 Jan 2021 14:26:27 +0800 Message-Id: <20210113062628.4526-2-box.c.chen@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210113062628.4526-1-box.c.chen@intel.com> References: <20210113062628.4526-1-box.c.chen@intel.com> Subject: [dts] [PATCH V1 1/2] add smoke test plan of nic part X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dts-bounces@dpdk.org Sender: "dts" Add smoke test case plan. case list: jumbo frame, rss, tx and rx queue Signed-off-by: ChenBo --- test_plans/pf_smoke_test.rst | 163 ++++++++++++++++++++++++++++++++ test_plans/vf_smoke_test.rst | 176 +++++++++++++++++++++++++++++++++++ 2 files changed, 339 insertions(+) create mode 100644 test_plans/pf_smoke_test.rst create mode 100644 test_plans/vf_smoke_test.rst diff --git a/test_plans/pf_smoke_test.rst b/test_plans/pf_smoke_test.rst new file mode 100644 index 00000000..d2e9d9a0 --- /dev/null +++ b/test_plans/pf_smoke_test.rst @@ -0,0 +1,163 @@ +.. Copyright (c) <2020>, 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. + +================== +NIC PF Smoke Test +================== + +Description +=========== +Test the basic functions of dpdk. +1. Port connection status. +2. Launch testpmd normally. +3. Basic rx and tx. + +Prerequisites +============= + +1. Hardware: + + niantic/fortville/columbiaville + +2. Software: + + dpdk: http://dpdk.org/git/dpdk + scapy: http://www.secdev.org/projects/scapy/ + +3. Compile DPDK:: + + CC=gcc meson -Denable_kmods=True -Dlibdir=lib --default-library=static x86_64-native-linuxapp-gcc + ninja -C x86_64-native-linuxapp-gcc + +4. Get the pci device id of DUT, for example:: + + ./usertools/dpdk-devbind.py -s + + 0000:86:00.0 'Device 1593' if=enp134s0f0 drv=ice unused=vfio-pci + +7. Bind PF to dpdk driver:: + + modprobe vfio-pci + ./usertools/dpdk-devbind.py -b vfio-pci 0000:86:00.0 + +8. Launch dpdk on PF:: + + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -c 0xf -n 4 -a 0000:86:00.0 --file-prefix=pf -- -i --max-pkt-len=9600 --tx-offloads=0x00008000 --rxq=4 --txq=4 + testpmd> set fwd mac + testpmd> set verbose 3 + testpmd> start + testpmd> show port info all + +Test Case 1: test enable and disable jumbo frame +==================================================== +1. set fwd mode is mac:: + + testpmd> set fwd mac + testpmd> set verbose 3 + testpmd> start + +2. Send a packet with size 9601 bytes :: + + testpmd> show port stats 0 + + ######################## NIC statistics for port 0 ######################## + RX-packets: 0 RX-errors: 1 RX-bytes: 0 + TX-packets: 0 TX-errors: 0 TX-bytes: 0 + ############################################################################ + +Verify that TX-bytes on port 0 and RX-bytes on port 0 are 0. + +3. Send a packet with size 9600 bytes :: + + testpmd> show port stats 0 + + ######################## NIC statistics for port 0 ######################## + RX-packets: 1 RX-errors: 0 RX-bytes: 9600 + TX-packets: 1 TX-errors: 0 TX-bytes: 9600 + ############################################################################ + +Verify that TX-bytes on port 0 and RX-bytes on port 0 are 9600. + +4. Set mtu is 1500 :: + + testpmd> port config mtu 1500 + +5. Send a packet with size 1518 bytes :: + + testpmd> show port stats 0 + + ######################## NIC statistics for port 0 ######################## + RX-packets: 1 RX-errors: 0 RX-bytes: 1518 + TX-packets: 1 TX-errors: 0 TX-bytes: 1518 + ############################################################################ + +Verify that TX-bytes on port 0 and RX-bytes on port 0 are 1518 + +7. Send a packet with size 1519 bytes :: + + testpmd> show port stats 0 + + ######################## NIC statistics for port 0 ######################## + RX-packets: 0 RX-errors: 1 RX-bytes: 0 + TX-packets: 0 TX-errors: 0 TX-bytes: 0 + ############################################################################ + +Verify that TX-bytes on port 0 and RX-bytes on port 1 are 0 + +Test Case 2: test RSS +==================================================== +1. set fwd mode is rxonly:: + + testpmd> set fwd rxonly + testpmd> set verbose 1 + testpmd> start + +4. Send different hash types' packets with different keywords, then check rx port + could receive packets by different queues:: + + sendp([Ether(dst="00:01:23:45:67:89")/IP(src="192.168.0.4", dst=RandIP())], iface="eth3") + +Test Case 3: test reset RX/TX queues +==================================================== +1. Run ``port stop all`` to stop all ports. + +2. Run ``port config all rxq 2`` to change the number of receiving queues to two. + +3. Run ``port config all txq 2`` to change the number of transmitting queues to two. + +4. Run ``port start all`` to restart all ports. + +5. Check with ``show config rxtx`` that the configuration for these parameters changed. + +6. Run ``start`` again to restart the forwarding, then start packet generator to transmit + and receive packets, and check if testpmd is able to receive and forward packets + successfully. diff --git a/test_plans/vf_smoke_test.rst b/test_plans/vf_smoke_test.rst new file mode 100644 index 00000000..35c60256 --- /dev/null +++ b/test_plans/vf_smoke_test.rst @@ -0,0 +1,176 @@ +.. Copyright (c) <2020>, 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. + +================== +NIC VF Smoke Test +================== + +Description +=========== +Test the basic functions of dpdk. +1. Port connection status. +2. Launch testpmd normally. +3. Basic rx and tx. + +Prerequisites +============= + +1. Hardware: + + niantic/fortville/columbiaville + +2. Software: + + dpdk: http://dpdk.org/git/dpdk + scapy: http://www.secdev.org/projects/scapy/ + +3. Compile DPDK:: + + CC=gcc meson -Denable_kmods=True -Dlibdir=lib --default-library=static x86_64-native-linuxapp-gcc + ninja -C x86_64-native-linuxapp-gcc + +4. Get the pci device id of DUT, for example:: + + ./usertools/dpdk-devbind.py -s + + 0000:86:01.0 'Device 1593' if=enp134s0f0 drv=ice unused=vfio-pci + +5. Generate 1 VFs on PF:: + + echo 1 > /sys/bus/pci/devices/0000:86:01.0/sriov_numvfs + + ./usertools/dpdk-devbind.py -s + 0000:86:01.0 'Ethernet Adaptive Virtual Function 1889' if=enp134s1 drv=iavf unused=vfio-pci + +6. Set VF MAC address:: + + ip link set enp134s0f0 vf 0 mac 00:01:23:45:67:89 + +7. Bind VF to dpdk driver:: + + modprobe vfio-pci + ./usertools/dpdk-devbind.py -b vfio-pci 0000:86:01.0 + +8. Launch dpdk on VF:: + + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -c 0xf -n 4 -a 0000:86:01.0 --file-prefix=pf -- -i --max-pkt-len=9600 --tx-offloads=0x00008000 --rxq=4 --txq=4 + testpmd> set fwd mac + testpmd> set verbose 3 + testpmd> start + testpmd> show port info all + + +Test Case 1: test enable and disable jumbo frame +==================================================== + +1. set fwd mode is mac:: + + testpmd> set fwd mac + testpmd> set verbose 3 + testpmd> start + +2. Send a packet with size 9601 bytes :: + + testpmd> show port stats 0 + + ######################## NIC statistics for port 0 ######################## + RX-packets: 0 RX-errors: 1 RX-bytes: 0 + TX-packets: 0 TX-errors: 0 TX-bytes: 0 + ############################################################################ + +Verify that TX-bytes on port 0 and RX-bytes on port 0 are 0. + +3. Send a packet with size 9600 bytes :: + + testpmd> show port stats 0 + + ######################## NIC statistics for port 0 ######################## + RX-packets: 1 RX-errors: 0 RX-bytes: 9600 + TX-packets: 1 TX-errors: 0 TX-bytes: 9600 + ############################################################################ + +Verify that TX-bytes on port 0 and RX-bytes on port 0 are 9600. + +4. Set mtu is 1500 :: + + testpmd> port config mtu 1500 + +5. Send a packet with size 1518 bytes :: + + testpmd> show port stats 0 + + ######################## NIC statistics for port 0 ######################## + RX-packets: 1 RX-errors: 0 RX-bytes: 1518 + TX-packets: 1 TX-errors: 0 TX-bytes: 1518 + ############################################################################ + +Verify that TX-bytes on port 0 and RX-bytes on port 0 are 1518 + +7. Send a packet with size 1519 bytes :: + + testpmd> show port stats 0 + + ######################## NIC statistics for port 0 ######################## + RX-packets: 0 RX-errors: 1 RX-bytes: 0 + TX-packets: 0 TX-errors: 0 TX-bytes: 0 + ############################################################################ + +Verify that TX-bytes on port 0 and RX-bytes on port 1 are 0 + +Test Case 2: test RSS +==================================================== +1. set fwd mode is rxonly:: + + testpmd> set fwd rxonly + testpmd> set verbose 1 + testpmd> start + +4. Send different hash types' packets with different keywords, then check rx port + could receive packets by different queues:: + + sendp([Ether(dst="00:01:23:45:67:89")/IP(src="192.168.0.4", dst=RandIP())], iface="eth3") + +Test Case 3: test reset RX/TX queues +==================================================== +1. Run ``port stop all`` to stop all ports. + +2. Run ``port config all rxq 2`` to change the number of receiving queues to two. + +3. Run ``port config all txq 2`` to change the number of transmitting queues to two. + +4. Run ``port start all`` to restart all ports. + +5. Check with ``show config rxtx`` that the configuration for these parameters changed. + +6. Run ``start`` again to restart the forwarding, then start packet generator to transmit + and receive packets, and check if testpmd is able to receive and forward packets + successfully.