From patchwork Tue Sep 1 02:35:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chenxu Di X-Patchwork-Id: 76192 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 141A6A04AC; Tue, 1 Sep 2020 05:04:45 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C83571C0D4; Tue, 1 Sep 2020 05:04:44 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id BF0D61C0BE for ; Tue, 1 Sep 2020 05:04:41 +0200 (CEST) IronPort-SDR: t784WwLDhU1CTyMoQ/8B1vuQLt8o0XBaB7h5C6kRyOWmIkC3+NcFaYVMmhAW91ytC53/tWmNBG n+LHNbkePNaw== X-IronPort-AV: E=McAfee;i="6000,8403,9730"; a="154611223" X-IronPort-AV: E=Sophos;i="5.76,377,1592895600"; d="scan'208";a="154611223" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Aug 2020 20:04:39 -0700 IronPort-SDR: S2P2MDUUC8DCmfSPUdo0bhG724zgibDXrOfqw6tKwRSlVhrmUKu+7RT5SkaistNV3sHoFjAtPm 69eNUgyIS4Sg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,377,1592895600"; d="scan'208";a="314579472" Received: from intel.sh.intel.com ([10.239.255.20]) by orsmga002.jf.intel.com with ESMTP; 31 Aug 2020 20:04:36 -0700 From: Chenxu Di To: dts@dpdk.org Cc: qi.fu@intel.com, Chenxu Di Date: Tue, 1 Sep 2020 02:35:21 +0000 Message-Id: <20200901023522.49731-1-chenxux.di@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [dts] [PATCH v4 1/2] test_plans: add cvl_rss_configure_test_plan.rst 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: , Errors-To: dts-bounces@dpdk.org Sender: "dts" add new test plan for cvl rss cnofigure Signed-off-by: Chenxu Di Acked-by: Fu, Qi --- test_plans/cvl_rss_configure_test_plan.rst | 961 +++++++++++++++++++++ 1 file changed, 961 insertions(+) create mode 100644 test_plans/cvl_rss_configure_test_plan.rst diff --git a/test_plans/cvl_rss_configure_test_plan.rst b/test_plans/cvl_rss_configure_test_plan.rst new file mode 100644 index 0000000..ae16e85 --- /dev/null +++ b/test_plans/cvl_rss_configure_test_plan.rst @@ -0,0 +1,961 @@ +.. 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. + +============================= +CVL: RSS CONFIGURE AND UPDATE +============================= + +Description +=========== + +Initialize and update RSS configure based on user request, dont't remove exist +configure just to make sure all the request has been applied. + +enable or disable corresponding flows' RSS base on rte_eth_rss_conf->rss_hf +parameters in dev_config and rss_hash_update ops. + +1. Enable the flowing command of testpmd: + +Testpmd Command-line Options: + +--rss-ip:set RSS functions for IPv4/IPv6 only. + +--rss-udp: set RSS functions for IPv4/IPv6 and UDP. + +--disable-rss:disable RSS (Receive Side Scaling). + +2. Testpmd Runtime Functions: + +port config all rss: set the RSS (Receive Side Scaling) mode on or off. + +port config all rss ip/udp/tcp/sctp/all/default + +Prerequisites +============= + +1. Hardware: + + - Intel E810 series ethernet cards: columbiaville + +2. Software: + + - dpdk: http://dpdk.org/git/dpdk + - scapy: http://www.secdev.org/projects/scapy/ + +3. bind the CVL port to dpdk driver in DUT:: + + modprobe vfio-pci + usertools/dpdk-devbind.py --force --bind=vfio-pci 0000:18:00.0 + +Test Case: test_command_line_option_rss_ip +========================================== + +1. Launch the testpmd in DUT:: + + testpmd>./x86_64-native-linuxapp-gcc/app/testpmd -c 0xff -n 4 -- -i --rxq=10 --txq=10 --rss-ip + testpmd>set fwd rxonly + testpmd>set verbose 1 + testpmd>start + +2. check ipv4 packets: + send a basic packet, record the hash value:: + + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.2",dst="192.168.0.3")/("X"*40)], iface="enp27s0f2") + + send packets with changed input set, check the received packets have different hash value with the basic packet:: + + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.4",dst="192.168.0.3")/("X"*40)], iface="enp27s0f2") + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.2",dst="192.168.0.5")/("X"*40)], iface="enp27s0f2") + +3. check ipv6 packets: + send a basic packet, record the hash value:: + + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::2",dst="3ffe:2501:200:3::3")/("X"*40)], iface="enp27s0f2") + + send packets with changed input set, check the received packets have different hash value with the basic packet:: + + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::4",dst="3ffe:2501:200:3::3")/("X"*40)], iface="enp27s0f2") + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::2",dst="3ffe:2501:200:3::5")/("X"*40)], iface="enp27s0f2") + +4. check ipv4-udp packets: + send a basic packet, record the hash value:: + + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.2",dst="192.168.0.3")/UDP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + + send packets with changed input set, check the received packets have different hash value with the basic packet:: + + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.4",dst="192.168.0.3")/UDP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.2",dst="192.168.0.5")/UDP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + + send a packet with same input set and changed other parameters. + check the received packet have same hash value with the basic packet:: + + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.2",dst="192.168.0.3")/UDP(sport=1026,dport=1027)/("X"*40)], iface="enp27s0f2") + +5. check ipv6-udp packets: + send a basic packet, record the hash value:: + + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::2",dst="3ffe:2501:200:3::3")/UDP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + + send packets with changed input set, check the received packets have different hash value with the basic packet:: + + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::4",dst="3ffe:2501:200:3::3")/UDP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::2",dst="3ffe:2501:200:3::5")/UDP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + + send a packet with same input set and changed other parameters. + check the received packet have same hash value with the basic packet:: + + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::2",dst="3ffe:2501:200:3::3")/UDP(sport=1026,dport=1027)/("X"*40)], iface="enp27s0f2") + +6. check ipv4-tcp packets: + send a basic packet, record the hash value:: + + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.2",dst="192.168.0.3")/TCP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + + send packets with changed input set, check the received packets have different hash value with the basic packet:: + + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.4",dst="192.168.0.3")/TCP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.2",dst="192.168.0.5")/TCP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + + send a packet with same input set and changed other parameters. + check the received packet have same hash value with the basic packet:: + + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.2",dst="192.168.0.3")/TCP(sport=1026,dport=1027)/("X"*40)], iface="enp27s0f2") + +7. check ipv6-tcp packets: + send a basic packet, record the hash value:: + + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::2",dst="3ffe:2501:200:3::3")/TCP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + + send packets with changed input set, check the received packets have different hash value with the basic packet:: + + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::4",dst="3ffe:2501:200:3::3")/TCP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::2",dst="3ffe:2501:200:3::5")/TCP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + + send a packet with same input set and changed other parameters. + check the received packet have same hash value with the basic packet:: + + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::2",dst="3ffe:2501:200:3::3")/TCP(sport=1026,dport=1027)/("X"*40)], iface="enp27s0f2") + +8. check ipv4-sctp packets: + send a basic packet, record the hash value:: + + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.2",dst="192.168.0.3")/SCTP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + + send packets with changed input set, check the received packets have different hash value with the basic packet:: + + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.4",dst="192.168.0.3")/SCTP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.2",dst="192.168.0.5")/SCTP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + + send a packet with same input set and changed other parameters. + check the received packet have same hash value with the basic packet:: + + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.2",dst="192.168.0.3")/SCTP(sport=1026,dport=1027)/("X"*40)], iface="enp27s0f2") + +9. check ipv6-sctp packets: + send a basic packet, record the hash value:: + + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::2",dst="3ffe:2501:200:3::3")/SCTP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + + send packets with changed input set, check the received packets have different hash value with the basic packet:: + + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::4",dst="3ffe:2501:200:3::3")/SCTP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::2",dst="3ffe:2501:200:3::5")/SCTP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + + send a packet with same input set and changed other parameters. + check the received packet have same hash value with the basic packet:: + + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::2",dst="3ffe:2501:200:3::3")/SCTP(sport=1026,dport=1027)/("X"*40)], iface="enp27s0f2") + +Test Case: test_command_line_option_rss_udp +=========================================== + +1. Launch the testpmd in DUT:: + + testpmd>./x86_64-native-linuxapp-gcc/app/testpmd -c 0xff -n 4 -- -i --rxq=10 --txq=10 --rss-udp + testpmd>set fwd rxonly + testpmd>set verbose 1 + testpmd>start + +2. check ipv4-udp packets: + send a basic packet, record the hash value:: + + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.2",dst="192.168.0.3")/UDP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + + send packets with changed input set, check the received packets have different hash value with the basic packet:: + + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.4",dst="192.168.0.3")/UDP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.2",dst="192.168.0.5")/UDP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.2",dst="192.168.0.3")/UDP(sport=1024,dport=1027)/("X"*40)], iface="enp27s0f2") + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.2",dst="192.168.0.3")/UDP(sport=1026,dport=1025)/("X"*40)], iface="enp27s0f2") + +3. check ipv6-udp packets: + send a basic packet, record the hash value:: + + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::2",dst="3ffe:2501:200:3::3")/UDP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + + send packets with changed input set, check the received packets have different hash value with the basic packet:: + + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::4",dst="3ffe:2501:200:3::3")/UDP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::2",dst="3ffe:2501:200:3::5")/UDP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::2",dst="3ffe:2501:200:3::3")/UDP(sport=1024,dport=1027)/("X"*40)], iface="enp27s0f2") + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::2",dst="3ffe:2501:200:3::3")/UDP(sport=1026,dport=1025)/("X"*40)], iface="enp27s0f2") + +4. check ipv4 packets: + send a basic packet, verify no hash value:: + + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.2",dst="192.168.0.3")/("X"*40)], iface="enp27s0f2") + +5. check ipv6 packets: + send a basic packet, verify no hash value:: + + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::2",dst="3ffe:2501:200:3::3")/("X"*40)], iface="enp27s0f2") + +6. check ipv4-tcp packets: + send a basic packet, verify no hash value:: + + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.2",dst="192.168.0.3")/TCP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + +7. check ipv6-tcp packets: + send a basic packet, verify no hash value:: + + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::2",dst="3ffe:2501:200:3::3")/TCP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + +8. check ipv4-sctp packets: + send a basic packet, verify no hash value:: + + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.2",dst="192.168.0.3")/SCTP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + +9. check ipv6-sctp packets: + send a basic packet, verify no hash value:: + + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::2",dst="3ffe:2501:200:3::3")/SCTP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + +Test Case: test_command_line_option_disable-rss +=============================================== + +1. Launch the testpmd in DUT:: + + testpmd>./x86_64-native-linuxapp-gcc/app/testpmd -c 0xff -n 4 -- -i --rxq=10 --txq=10 --disable-rss + testpmd>set fwd rxonly + testpmd>set verbose 1 + testpmd>start + +2. check all tyep packets: + send basic packets, verify no hash value:: + + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.2",dst="192.168.0.3")/("X"*40)], iface="enp27s0f2") + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::2",dst="3ffe:2501:200:3::3")/("X"*40)], iface="enp27s0f2") + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.2",dst="192.168.0.3")/UDP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::2",dst="3ffe:2501:200:3::3")/UDP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.2",dst="192.168.0.3")/TCP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::2",dst="3ffe:2501:200:3::3")/TCP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.2",dst="192.168.0.3")/SCTP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::2",dst="3ffe:2501:200:3::3")/SCTP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + +Test Case: test_RSS_configure_to_ip +=================================== + +1. Launch the testpmd in DUT:: + + testpmd>./x86_64-native-linuxapp-gcc/app/testpmd -c 0xff -n 4 -- -i --rxq=10 --txq=10 + testpmd>set fwd rxonly + testpmd>set verbose 1 + +2. rss received package type configuration:: + + testpmd> port config all rss ip + testpmd> start + +3. check ipv4 packets: + send a basic packet, record the hash value:: + + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.2",dst="192.168.0.3")/("X"*40)], iface="enp27s0f2") + + send packets with changed input set, check the received packets have different hash value with the basic packet:: + + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.4",dst="192.168.0.3")/("X"*40)], iface="enp27s0f2") + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.2",dst="192.168.0.5")/("X"*40)], iface="enp27s0f2") + +4. check ipv6 packets: + send a basic packet, record the hash value:: + + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::2",dst="3ffe:2501:200:3::3")/("X"*40)], iface="enp27s0f2") + + send packets with changed input set, check the received packets have different hash value with the basic packet:: + + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::4",dst="3ffe:2501:200:3::3")/("X"*40)], iface="enp27s0f2") + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::2",dst="3ffe:2501:200:3::5")/("X"*40)], iface="enp27s0f2") + +5. check ipv4-udp packets: + send a basic packet, record the hash value:: + + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.2",dst="192.168.0.3")/UDP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + + send packets with changed input set, check the received packets have different hash value with the basic packet:: + + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.4",dst="192.168.0.3")/UDP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.2",dst="192.168.0.5")/UDP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + + send a packet with same input set and changed other parameters. + check the received packet have same hash value with the basic packet:: + + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.2",dst="192.168.0.3")/UDP(sport=1026,dport=1027)/("X"*40)], iface="enp27s0f2") + +6. check ipv6-udp packets: + send a basic packet, record the hash value:: + + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::2",dst="3ffe:2501:200:3::3")/UDP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + + send packets with changed input set, check the received packets have different hash value with the basic packet:: + + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::4",dst="3ffe:2501:200:3::3")/UDP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::2",dst="3ffe:2501:200:3::5")/UDP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + + send a packet with same input set and changed other parameters. + check the received packet have same hash value with the basic packet:: + + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::2",dst="3ffe:2501:200:3::3")/UDP(sport=1026,dport=1027)/("X"*40)], iface="enp27s0f2") + +7. check ipv4-tcp packets: + send a basic packet, record the hash value:: + + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.2",dst="192.168.0.3")/TCP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + + send packets with changed input set, check the received packets have different hash value with the basic packet:: + + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.4",dst="192.168.0.3")/TCP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.2",dst="192.168.0.5")/TCP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + + send a packet with same input set and changed other parameters. + check the received packet have same hash value with the basic packet:: + + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.2",dst="192.168.0.3")/TCP(sport=1026,dport=1027)/("X"*40)], iface="enp27s0f2") + +8. check ipv6-tcp packets: + send a basic packet, record the hash value:: + + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::2",dst="3ffe:2501:200:3::3")/TCP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + + send packets with changed input set, check the received packets have different hash value with the basic packet:: + + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::4",dst="3ffe:2501:200:3::3")/TCP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::2",dst="3ffe:2501:200:3::5")/TCP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + + send a packet with same input set and changed other parameters. + check the received packet have same hash value with the basic packet:: + + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::2",dst="3ffe:2501:200:3::3")/TCP(sport=1026,dport=1027)/("X"*40)], iface="enp27s0f2") + +9. check ipv4-sctp packets: + send a basic packet, record the hash value:: + + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.2",dst="192.168.0.3")/SCTP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + + send packets with changed input set, check the received packets have different hash value with the basic packet:: + + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.4",dst="192.168.0.3")/SCTP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.2",dst="192.168.0.5")/SCTP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + + send a packet with same input set and changed other parameters. + check the received packet have same hash value with the basic packet:: + + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.2",dst="192.168.0.3")/SCTP(sport=1026,dport=1027)/("X"*40)], iface="enp27s0f2") + +10. check ipv6-sctp packets: + send a basic packet, record the hash value:: + + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::2",dst="3ffe:2501:200:3::3")/SCTP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + + send packets with changed input set, check the received packets have different hash value with the basic packet:: + + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::4",dst="3ffe:2501:200:3::3")/SCTP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::2",dst="3ffe:2501:200:3::5")/SCTP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + + send a packet with same input set and changed other parameters. + check the received packet have same hash value with the basic packet:: + + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::2",dst="3ffe:2501:200:3::3")/SCTP(sport=1026,dport=1027)/("X"*40)], iface="enp27s0f2") + +Test Case: test_RSS_configure_to_udp +==================================== + +1. Launch the testpmd in DUT:: + + testpmd>./x86_64-native-linuxapp-gcc/app/testpmd -c 0xff -n 4 -- -i --rxq=10 --txq=10 + testpmd>set fwd rxonly + testpmd>set verbose 1 + +2. rss received package type configuration:: + + testpmd> port config all rss udp + testpmd> start + +3. check ipv4 packets: + send a basic packet, record the hash value:: + + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.2",dst="192.168.0.3")/("X"*40)], iface="enp27s0f2") + + send packets with changed input set, check the received packets have different hash value with the basic packet:: + + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.4",dst="192.168.0.3")/("X"*40)], iface="enp27s0f2") + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.2",dst="192.168.0.5")/("X"*40)], iface="enp27s0f2") + +4. check ipv6 packets: + send a basic packet, record the hash value:: + + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::2",dst="3ffe:2501:200:3::3")/("X"*40)], iface="enp27s0f2") + + send packets with changed input set, check the received packets have different hash value with the basic packet:: + + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::4",dst="3ffe:2501:200:3::3")/("X"*40)], iface="enp27s0f2") + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::2",dst="3ffe:2501:200:3::5")/("X"*40)], iface="enp27s0f2") + +5. check ipv4-udp packets: + send a basic packet, record the hash value:: + + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.2",dst="192.168.0.3")/UDP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + + send packets with changed input set, check the received packets have different hash value with the basic packet:: + + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.4",dst="192.168.0.3")/UDP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.2",dst="192.168.0.5")/UDP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.2",dst="192.168.0.3")/UDP(sport=1024,dport=1027)/("X"*40)], iface="enp27s0f2") + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.2",dst="192.168.0.3")/UDP(sport=1026,dport=1025)/("X"*40)], iface="enp27s0f2") + +6. check ipv6-udp packets: + send a basic packet, record the hash value:: + + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::2",dst="3ffe:2501:200:3::3")/UDP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + + send packets with changed input set, check the received packets have different hash value with the basic packet:: + + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::4",dst="3ffe:2501:200:3::3")/UDP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::2",dst="3ffe:2501:200:3::5")/UDP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::2",dst="3ffe:2501:200:3::3")/UDP(sport=1024,dport=1027)/("X"*40)], iface="enp27s0f2") + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::2",dst="3ffe:2501:200:3::3")/UDP(sport=1026,dport=1025)/("X"*40)], iface="enp27s0f2") + +7. check ipv4-tcp packets: + send a basic packet, record the hash value:: + + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.2",dst="192.168.0.3")/TCP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + + send packets with changed input set, check the received packets have different hash value with the basic packet:: + + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.4",dst="192.168.0.3")/TCP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.2",dst="192.168.0.5")/TCP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + + send a packet with same input set and changed other parameters. + check the received packet have same hash value with the basic packet:: + + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.2",dst="192.168.0.3")/TCP(sport=1026,dport=1027)/("X"*40)], iface="enp27s0f2") + +8. check ipv6-tcp packets: + send a basic packet, record the hash value:: + + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::2",dst="3ffe:2501:200:3::3")/TCP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + + send packets with changed input set, check the received packets have different hash value with the basic packet:: + + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::4",dst="3ffe:2501:200:3::3")/TCP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::2",dst="3ffe:2501:200:3::5")/TCP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + + send a packet with same input set and changed other parameters. + check the received packet have same hash value with the basic packet:: + + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::2",dst="3ffe:2501:200:3::3")/TCP(sport=1026,dport=1027)/("X"*40)], iface="enp27s0f2") + +9. check ipv4-sctp packets: + send a basic packet, record the hash value:: + + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.2",dst="192.168.0.3")/SCTP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + + send packets with changed input set, check the received packets have different hash value with the basic packet:: + + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.4",dst="192.168.0.3")/SCTP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.2",dst="192.168.0.5")/SCTP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + + send a packet with same input set and changed other parameters. + check the received packet have same hash value with the basic packet:: + + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.2",dst="192.168.0.3")/SCTP(sport=1026,dport=1027)/("X"*40)], iface="enp27s0f2") + +10. check ipv6-sctp packets: + send a basic packet, record the hash value:: + + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::2",dst="3ffe:2501:200:3::3")/SCTP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + + send packets with changed input set, check the received packets have different hash value with the basic packet:: + + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::4",dst="3ffe:2501:200:3::3")/SCTP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::2",dst="3ffe:2501:200:3::5")/SCTP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + + send a packet with same input set and changed other parameters. + check the received packet have same hash value with the basic packet:: + + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::2",dst="3ffe:2501:200:3::3")/SCTP(sport=1026,dport=1027)/("X"*40)], iface="enp27s0f2") + +Test Case: test_RSS_configure_to_tcp +==================================== + +1. Launch the testpmd in DUT:: + + testpmd>./x86_64-native-linuxapp-gcc/app/testpmd -c 0xff -n 4 -- -i --rxq=10 --txq=10 + testpmd>set fwd rxonly + testpmd>set verbose 1 + +2. rss received package type configuration:: + + testpmd> port config all rss tcp + testpmd> start + +3. check ipv4 packets: + send a basic packet, record the hash value:: + + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.2",dst="192.168.0.3")/("X"*40)], iface="enp27s0f2") + + send packets with changed input set, check the received packets have different hash value with the basic packet:: + + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.4",dst="192.168.0.3")/("X"*40)], iface="enp27s0f2") + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.2",dst="192.168.0.5")/("X"*40)], iface="enp27s0f2") + +4. check ipv6 packets: + send a basic packet, record the hash value:: + + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::2",dst="3ffe:2501:200:3::3")/("X"*40)], iface="enp27s0f2") + + send packets with changed input set, check the received packets have different hash value with the basic packet:: + + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::4",dst="3ffe:2501:200:3::3")/("X"*40)], iface="enp27s0f2") + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::2",dst="3ffe:2501:200:3::5")/("X"*40)], iface="enp27s0f2") + +5. check ipv4-udp packets: + send a basic packet, record the hash value:: + + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.2",dst="192.168.0.3")/UDP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + + send packets with changed input set, check the received packets have different hash value with the basic packet:: + + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.4",dst="192.168.0.3")/UDP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.2",dst="192.168.0.5")/UDP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + + send a packet with same input set and changed other parameters. + check the received packet have same hash value with the basic packet:: + + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.2",dst="192.168.0.3")/UDP(sport=1026,dport=1027)/("X"*40)], iface="enp27s0f2") + +6. check ipv6-udp packets: + send a basic packet, record the hash value:: + + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::2",dst="3ffe:2501:200:3::3")/UDP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + + send packets with changed input set, check the received packets have different hash value with the basic packet:: + + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::4",dst="3ffe:2501:200:3::3")/UDP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::2",dst="3ffe:2501:200:3::5")/UDP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + + send a packet with same input set and changed other parameters. + check the received packet have same hash value with the basic packet:: + + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::2",dst="3ffe:2501:200:3::3")/UDP(sport=1026,dport=1027)/("X"*40)], iface="enp27s0f2") + +7. check ipv4-tcp packets: + send a basic packet, record the hash value:: + + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.2",dst="192.168.0.3")/TCP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + + send packets with changed input set, check the received packets have different hash value with the basic packet:: + + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.4",dst="192.168.0.3")/TCP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.2",dst="192.168.0.5")/TCP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.2",dst="192.168.0.3")/TCP(sport=1026,dport=1025)/("X"*40)], iface="enp27s0f2") + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.2",dst="192.168.0.3")/TCP(sport=1024,dport=1027)/("X"*40)], iface="enp27s0f2") + +8. check ipv6-tcp packets: + send a basic packet, record the hash value:: + + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::2",dst="3ffe:2501:200:3::3")/TCP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + + send packets with changed input set, check the received packets have different hash value with the basic packet:: + + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::4",dst="3ffe:2501:200:3::3")/TCP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::2",dst="3ffe:2501:200:3::5")/TCP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::2",dst="3ffe:2501:200:3::3")/TCP(sport=1026,dport=1025)/("X"*40)], iface="enp27s0f2") + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::2",dst="3ffe:2501:200:3::3")/TCP(sport=1024,dport=1027)/("X"*40)], iface="enp27s0f2") + +9. check ipv4-sctp packets: + send a basic packet, record the hash value:: + + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.2",dst="192.168.0.3")/SCTP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + + send packets with changed input set, check the received packets have different hash value with the basic packet:: + + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.4",dst="192.168.0.3")/SCTP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.2",dst="192.168.0.5")/SCTP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + + send a packet with same input set and changed other parameters. + check the received packet have same hash value with the basic packet:: + + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.2",dst="192.168.0.3")/SCTP(sport=1026,dport=1027)/("X"*40)], iface="enp27s0f2") + +10. check ipv6-sctp packets: + send a basic packet, record the hash value:: + + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::2",dst="3ffe:2501:200:3::3")/SCTP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + + send packets with changed input set, check the received packets have different hash value with the basic packet:: + + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::4",dst="3ffe:2501:200:3::3")/SCTP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::2",dst="3ffe:2501:200:3::5")/SCTP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + + send a packet with same input set and changed other parameters. + check the received packet have same hash value with the basic packet:: + + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::2",dst="3ffe:2501:200:3::3")/SCTP(sport=1026,dport=1027)/("X"*40)], iface="enp27s0f2") + +Test Case: test_RSS_configure_to_sctp +===================================== + +1. Launch the testpmd in DUT:: + + testpmd>./x86_64-native-linuxapp-gcc/app/testpmd -c 0xff -n 4 -- -i --rxq=10 --txq=10 + testpmd>set fwd rxonly + testpmd>set verbose 1 + +2. rss received package type configuration:: + + testpmd> port config all rss sctp + testpmd> start + +3. check ipv4 packets: + send a basic packet, record the hash value:: + + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.2",dst="192.168.0.3")/("X"*40)], iface="enp27s0f2") + + send packets with changed input set, check the received packets have different hash value with the basic packet:: + + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.4",dst="192.168.0.3")/("X"*40)], iface="enp27s0f2") + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.2",dst="192.168.0.5")/("X"*40)], iface="enp27s0f2") + +4. check ipv6 packets: + send a basic packet, record the hash value:: + + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::2",dst="3ffe:2501:200:3::3")/("X"*40)], iface="enp27s0f2") + + send packets with changed input set, check the received packets have different hash value with the basic packet:: + + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::4",dst="3ffe:2501:200:3::3")/("X"*40)], iface="enp27s0f2") + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::2",dst="3ffe:2501:200:3::5")/("X"*40)], iface="enp27s0f2") + +5. check ipv4-udp packets: + send a basic packet, record the hash value:: + + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.2",dst="192.168.0.3")/UDP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + + send packets with changed input set, check the received packets have different hash value with the basic packet:: + + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.4",dst="192.168.0.3")/UDP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.2",dst="192.168.0.5")/UDP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + + send a packet with same input set and changed other parameters. + check the received packet have same hash value with the basic packet:: + + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.2",dst="192.168.0.3")/UDP(sport=1026,dport=1027)/("X"*40)], iface="enp27s0f2") + +6. check ipv6-udp packets: + send a basic packet, record the hash value:: + + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::2",dst="3ffe:2501:200:3::3")/UDP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + + send packets with changed input set, check the received packets have different hash value with the basic packet:: + + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::4",dst="3ffe:2501:200:3::3")/UDP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::2",dst="3ffe:2501:200:3::5")/UDP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + + send a packet with same input set and changed other parameters. + check the received packet have same hash value with the basic packet:: + + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::2",dst="3ffe:2501:200:3::3")/UDP(sport=1026,dport=1027)/("X"*40)], iface="enp27s0f2") + +7. check ipv4-tcp packets: + send a basic packet, record the hash value:: + + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.2",dst="192.168.0.3")/TCP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + + send packets with changed input set, check the received packets have different hash value with the basic packet:: + + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.4",dst="192.168.0.3")/TCP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.2",dst="192.168.0.5")/TCP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + + send a packet with same input set and changed other parameters. + check the received packet have same hash value with the basic packet:: + + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.2",dst="192.168.0.3")/TCP(sport=1026,dport=1027)/("X"*40)], iface="enp27s0f2") + +8. check ipv6-tcp packets: + send a basic packet, record the hash value:: + + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::2",dst="3ffe:2501:200:3::3")/TCP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + + send packets with changed input set, check the received packets have different hash value with the basic packet:: + + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::4",dst="3ffe:2501:200:3::3")/TCP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::2",dst="3ffe:2501:200:3::5")/TCP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + + send a packet with same input set and changed other parameters. + check the received packet have same hash value with the basic packet:: + + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::2",dst="3ffe:2501:200:3::3")/TCP(sport=1026,dport=1027)/("X"*40)], iface="enp27s0f2") + +9. check ipv4-sctp packets: + send a basic packet, record the hash value:: + + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.2",dst="192.168.0.3")/SCTP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + + send packets with changed input set, check the received packets have different hash value with the basic packet:: + + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.4",dst="192.168.0.3")/SCTP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.2",dst="192.168.0.5")/SCTP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + +10. check ipv6-sctp packets: + send a basic packet, record the hash value:: + + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::2",dst="3ffe:2501:200:3::3")/SCTP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + + send packets with changed input set, check the received packets have different hash value with the basic packet:: + + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::4",dst="3ffe:2501:200:3::3")/SCTP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::2",dst="3ffe:2501:200:3::5")/SCTP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + +Test Case: test_RSS_configure_to_all +==================================== + +1. Launch the testpmd in DUT:: + + testpmd>./x86_64-native-linuxapp-gcc/app/testpmd -c 0xff -n 4 -- -i --rxq=10 --txq=10 + testpmd>set fwd rxonly + testpmd>set verbose 1 + +2. rss received package type configuration:: + + testpmd> port config all rss all + testpmd> start + +3. check ipv4 packets: + send a basic packet, record the hash value:: + + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.2",dst="192.168.0.3")/("X"*40)], iface="enp27s0f2") + + send packets with changed input set, check the received packets have different hash value with the basic packet:: + + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.4",dst="192.168.0.3")/("X"*40)], iface="enp27s0f2") + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.2",dst="192.168.0.5")/("X"*40)], iface="enp27s0f2") + +4. check ipv6 packets: + send a basic packet, record the hash value:: + + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::2",dst="3ffe:2501:200:3::3")/("X"*40)], iface="enp27s0f2") + + send packets with changed input set, check the received packets have different hash value with the basic packet:: + + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::4",dst="3ffe:2501:200:3::3")/("X"*40)], iface="enp27s0f2") + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::2",dst="3ffe:2501:200:3::5")/("X"*40)], iface="enp27s0f2") + +5. check ipv4-udp packets: + send a basic packet, record the hash value:: + + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.2",dst="192.168.0.3")/UDP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + + send packets with changed input set, check the received packets have different hash value with the basic packet:: + + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.4",dst="192.168.0.3")/UDP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.2",dst="192.168.0.5")/UDP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.2",dst="192.168.0.3")/UDP(sport=1024,dport=1027)/("X"*40)], iface="enp27s0f2") + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.2",dst="192.168.0.3")/UDP(sport=1026,dport=1025)/("X"*40)], iface="enp27s0f2") + +6. check ipv6-udp packets: + send a basic packet, record the hash value:: + + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::2",dst="3ffe:2501:200:3::3")/UDP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + + send packets with changed input set, check the received packets have different hash value with the basic packet:: + + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::4",dst="3ffe:2501:200:3::3")/UDP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::2",dst="3ffe:2501:200:3::5")/UDP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::2",dst="3ffe:2501:200:3::3")/UDP(sport=1024,dport=1027)/("X"*40)], iface="enp27s0f2") + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::2",dst="3ffe:2501:200:3::3")/UDP(sport=1026,dport=1025)/("X"*40)], iface="enp27s0f2") + +7. check ipv4-tcp packets: + send a basic packet, record the hash value:: + + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.2",dst="192.168.0.3")/TCP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + + send packets with changed input set, check the received packets have different hash value with the basic packet:: + + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.4",dst="192.168.0.3")/TCP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.2",dst="192.168.0.5")/TCP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.2",dst="192.168.0.3")/TCP(sport=1026,dport=1025)/("X"*40)], iface="enp27s0f2") + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.2",dst="192.168.0.3")/TCP(sport=1024,dport=1027)/("X"*40)], iface="enp27s0f2") + +8. check ipv6-tcp packets: + send a basic packet, record the hash value:: + + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::2",dst="3ffe:2501:200:3::3")/TCP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + + send packets with changed input set, check the received packets have different hash value with the basic packet:: + + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::4",dst="3ffe:2501:200:3::3")/TCP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::2",dst="3ffe:2501:200:3::5")/TCP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::2",dst="3ffe:2501:200:3::3")/TCP(sport=1026,dport=1025)/("X"*40)], iface="enp27s0f2") + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::2",dst="3ffe:2501:200:3::3")/TCP(sport=1024,dport=1027)/("X"*40)], iface="enp27s0f2") + +9. check ipv4-sctp packets: + send a basic packet, record the hash value:: + + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.2",dst="192.168.0.3")/SCTP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + + send packets with changed input set, check the received packets have different hash value with the basic packet:: + + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.4",dst="192.168.0.3")/SCTP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.2",dst="192.168.0.5")/SCTP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + +10. check ipv6-sctp packets: + send a basic packet, record the hash value:: + + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::2",dst="3ffe:2501:200:3::3")/SCTP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + + send packets with changed input set, check the received packets have different hash value with the basic packet:: + + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::4",dst="3ffe:2501:200:3::3")/SCTP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::2",dst="3ffe:2501:200:3::5")/SCTP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + +Test Case: test_RSS_configure_to_default +======================================== + +1. Launch the testpmd in DUT:: + + testpmd>./x86_64-native-linuxapp-gcc/app/testpmd -c 0xff -n 4 -- -i --rxq=10 --txq=10 + testpmd>set fwd rxonly + testpmd>set verbose 1 + +2. rss received package type configuration:: + + testpmd> port config all rss default + testpmd> start + +3. check ipv4 packets: + send a basic packet, record the hash value:: + + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.2",dst="192.168.0.3")/("X"*40)], iface="enp27s0f2") + + send packets with changed input set, check the received packets have different hash value with the basic packet:: + + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.4",dst="192.168.0.3")/("X"*40)], iface="enp27s0f2") + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.2",dst="192.168.0.5")/("X"*40)], iface="enp27s0f2") + +4. check ipv6 packets: + send a basic packet, record the hash value:: + + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::2",dst="3ffe:2501:200:3::3")/("X"*40)], iface="enp27s0f2") + + send packets with changed input set, check the received packets have different hash value with the basic packet:: + + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::4",dst="3ffe:2501:200:3::3")/("X"*40)], iface="enp27s0f2") + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::2",dst="3ffe:2501:200:3::5")/("X"*40)], iface="enp27s0f2") + +5. check ipv4-udp packets: + send a basic packet, record the hash value:: + + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.2",dst="192.168.0.3")/UDP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + + send packets with changed input set, check the received packets have different hash value with the basic packet:: + + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.4",dst="192.168.0.3")/UDP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.2",dst="192.168.0.5")/UDP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.2",dst="192.168.0.3")/UDP(sport=1024,dport=1027)/("X"*40)], iface="enp27s0f2") + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.2",dst="192.168.0.3")/UDP(sport=1026,dport=1025)/("X"*40)], iface="enp27s0f2") + +6. check ipv6-udp packets: + send a basic packet, record the hash value:: + + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::2",dst="3ffe:2501:200:3::3")/UDP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + + send packets with changed input set, check the received packets have different hash value with the basic packet:: + + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::4",dst="3ffe:2501:200:3::3")/UDP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::2",dst="3ffe:2501:200:3::5")/UDP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::2",dst="3ffe:2501:200:3::3")/UDP(sport=1024,dport=1027)/("X"*40)], iface="enp27s0f2") + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::2",dst="3ffe:2501:200:3::3")/UDP(sport=1026,dport=1025)/("X"*40)], iface="enp27s0f2") + +7. check ipv4-tcp packets: + send a basic packet, record the hash value:: + + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.2",dst="192.168.0.3")/TCP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + + send packets with changed input set, check the received packets have different hash value with the basic packet:: + + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.4",dst="192.168.0.3")/TCP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.2",dst="192.168.0.5")/TCP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.2",dst="192.168.0.3")/TCP(sport=1026,dport=1025)/("X"*40)], iface="enp27s0f2") + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.2",dst="192.168.0.3")/TCP(sport=1024,dport=1027)/("X"*40)], iface="enp27s0f2") + +8. check ipv6-tcp packets: + send a basic packet, record the hash value:: + + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::2",dst="3ffe:2501:200:3::3")/TCP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + + send packets with changed input set, check the received packets have different hash value with the basic packet:: + + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::4",dst="3ffe:2501:200:3::3")/TCP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::2",dst="3ffe:2501:200:3::5")/TCP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::2",dst="3ffe:2501:200:3::3")/TCP(sport=1026,dport=1025)/("X"*40)], iface="enp27s0f2") + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::2",dst="3ffe:2501:200:3::3")/TCP(sport=1024,dport=1027)/("X"*40)], iface="enp27s0f2") + +9. check ipv4-sctp packets: + send a basic packet, record the hash value:: + + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.2",dst="192.168.0.3")/SCTP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + + send packets with changed input set, check the received packets have different hash value with the basic packet:: + + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.4",dst="192.168.0.3")/SCTP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + sendp([Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.2",dst="192.168.0.5")/SCTP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + +10. check ipv6-sctp packets: + send a basic packet, record the hash value:: + + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::2",dst="3ffe:2501:200:3::3")/SCTP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + + send packets with changed input set, check the received packets have different hash value with the basic packet:: + + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::4",dst="3ffe:2501:200:3::3")/SCTP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") + sendp([Ether(dst="00:00:00:00:01:00")/IPv6(src="3ffe:2501:200:3::2",dst="3ffe:2501:200:3::5")/SCTP(sport=1024,dport=1025)/("X"*40)], iface="enp27s0f2") From patchwork Tue Sep 1 02:35:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chenxu Di X-Patchwork-Id: 76193 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 881EBA04B2; Tue, 1 Sep 2020 05:04:45 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id F373D1C0DB; Tue, 1 Sep 2020 05:04:44 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id E71751C0D2 for ; Tue, 1 Sep 2020 05:04:43 +0200 (CEST) IronPort-SDR: aAwR1q6EWsz7twl3ztzf2WRYLLSSmHaNLP40Phrpgd1hhvOqduURxwmvy/GE7eXDwrzVd+3tB7 +m3+FPEU3uNg== X-IronPort-AV: E=McAfee;i="6000,8403,9730"; a="154611224" X-IronPort-AV: E=Sophos;i="5.76,377,1592895600"; d="scan'208";a="154611224" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Aug 2020 20:04:40 -0700 IronPort-SDR: kffBftlPvq1mqIGwxU/2v214On6WqKf/32hu5g3ednRRgK4d6EKl4iLQlfmD8dmYlog2emHxIm K4LmRRWOLT3w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,377,1592895600"; d="scan'208";a="314579476" Received: from intel.sh.intel.com ([10.239.255.20]) by orsmga002.jf.intel.com with ESMTP; 31 Aug 2020 20:04:39 -0700 From: Chenxu Di To: dts@dpdk.org Cc: qi.fu@intel.com, Chenxu Di Date: Tue, 1 Sep 2020 02:35:22 +0000 Message-Id: <20200901023522.49731-2-chenxux.di@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200901023522.49731-1-chenxux.di@intel.com> References: <20200901023522.49731-1-chenxux.di@intel.com> Subject: [dts] [PATCH v4 2/2] tests: add TestSuite_cvl_rss_configure.py 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: , Errors-To: dts-bounces@dpdk.org Sender: "dts" add new test suite for cvl rss configure Signed-off-by: Chenxu Di Acked-by: Fu, Qi --- tests/TestSuite_cvl_rss_configure.py | 283 +++++++++++++++++++++++++++ 1 file changed, 283 insertions(+) create mode 100644 tests/TestSuite_cvl_rss_configure.py diff --git a/tests/TestSuite_cvl_rss_configure.py b/tests/TestSuite_cvl_rss_configure.py new file mode 100644 index 0000000..c8ca6d5 --- /dev/null +++ b/tests/TestSuite_cvl_rss_configure.py @@ -0,0 +1,283 @@ +import json +import time +import re +import packet +import os +from scapy.contrib.gtp import * +from test_case import TestCase +from pmd_output import PmdOutput +from utils import BLUE, RED +from collections import OrderedDict +from packet import IncreaseIP, IncreaseIPv6 +import rte_flow_common as rfc + +out = os.popen("pip list|grep scapy ") +version_result =out.read() +p=re.compile('scapy\s+2\.3\.\d+') +m=p.search(version_result) + +tv_mac_ip_ipv4 = { + "name":"tv_mac_ip_ipv4", + "scapy_str":['Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.%d", dst="192.168.0.%d")/("X"*480)' %(i, i+10) for i in range(0,100)], + "check_func_param": {"expect_port":0} +} + +tv_mac_ip_ipv6 = { + "name":"tv_mac_ip_ipv6", + "scapy_str": ['Ether(dst="00:00:00:00:01:00")/IPv6(src="2001::%d", dst="2001::%d")/("X"*480)' %(i, i+10) for i in range(0,100)], + "check_func_param": {"expect_port":0} +} + +tv_mac_ipv4_udp_l3_random = { + "name":"tv_mac_ipv4_udp_l3_random", + "scapy_str":['Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.%d", dst="192.168.0.%d")/UDP()/("X"*480)' %(i,i+10) for i in range(0,100)], + "check_func_param": {"expect_port":0} +} + +tv_mac_ipv4_udp_l4_random = { + "name":"tv_mac_ipv4_udp_l4_random", + "scapy_str":['Ether(dst="00:00:00:00:01:00")/IP()/UDP(sport=%d, dport=%d)/("X"*480)' %(i+50,i+55) for i in range(0,100)], + "check_func_param": {"expect_port":0} +} + +tv_mac_ipv6_udp_l3_random = { + "name":"tv_mac_ipv6_udp_l3_random", + "scapy_str":['Ether(dst="00:00:00:00:01:00")/IPv6(src="2001::%d", dst="2001::%d")/UDP()/("X"*480)' %(i,i+10) for i in range(0,100)], + "check_func_param": {"expect_port":0} +} + +tv_mac_ipv6_udp_l4_random = { + "name":"tv_mac_ipv6_udp_l4_random", + "scapy_str":['Ether(dst="00:00:00:00:01:00")/IPv6()/UDP(sport=%d, dport=%d)/("X"*480)' %(i+50,i+55) for i in range(0,100)], + "check_func_param": {"expect_port":0} +} + +tv_mac_ipv4_tcp_l3_random = { + "name":"tv_mac_ipv4_tcp_l3_random", + "scapy_str":['Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.%d", dst="192.168.0.%d")/TCP()/("X"*480)' %(i,i+10) for i in range(0,100)], + "check_func_param": {"expect_port":0} +} + +tv_mac_ipv4_tcp_l4_random = { + "name":"tv_mac_ipv4_tcp_l4_random", + "scapy_str":['Ether(dst="00:00:00:00:01:00")/IP()/TCP(sport=%d, dport=%d)/("X"*480)' %(i+50,i+55) for i in range(0,100)], + "check_func_param": {"expect_port":0} +} + +tv_mac_ipv6_tcp_l3_random = { + "name":"tv_mac_ipv6_tcp_l3_random", + "scapy_str":['Ether(dst="00:00:00:00:01:00")/IPv6(src="2001::%d", dst="2001::%d")/TCP()/("X"*480)' %(i,i+10) for i in range(0,100)], + "check_func_param": {"expect_port":0} +} + +tv_mac_ipv6_tcp_l4_random = { + "name":"tv_mac_ipv6_tcp_l4_random", + "scapy_str":['Ether(dst="00:00:00:00:01:00")/IPv6()/TCP(sport=%d, dport=%d)/("X"*480)' %(i+50,i+55) for i in range(0,100)], + "check_func_param": {"expect_port":0} +} + +tv_mac_ipv4_sctp = { + "name":"tv_mac_ipv4_sctp", + "scapy_str":['Ether(dst="00:00:00:00:01:00")/IP(src="192.168.0.%d", dst="192.168.0.%d")/SCTP()/("X"*480)' %(i,i+10) for i in range(0,100)], + "check_func_param": {"expect_port":0} +} + +tv_mac_ipv6_sctp = { + "name":"tv_mac_ipv6_sctp", + "scapy_str":['Ether(dst="00:00:00:00:01:00")/IPv6(src="2001::%d", dst="2001::%d")/SCTP()/("X"*480)' %(i,i+10) for i in range(0,100)], + "check_func_param": {"expect_port":0} +} + +tvs_mac_rss_ip = [ + tv_mac_ip_ipv4, + tv_mac_ip_ipv6 + ] + +tvs_mac_rss_l3 = [ + tv_mac_ip_ipv4, + tv_mac_ip_ipv6, + tv_mac_ipv4_udp_l3_random, + tv_mac_ipv6_udp_l3_random, + tv_mac_ipv4_tcp_l3_random, + tv_mac_ipv6_tcp_l3_random, + tv_mac_ipv4_sctp, + tv_mac_ipv6_sctp + ] + +tvs_mac_rss_l4 = [ + tv_mac_ipv4_udp_l4_random, + tv_mac_ipv6_udp_l4_random, + tv_mac_ipv4_tcp_l4_random, + tv_mac_ipv6_tcp_l4_random + ] + +tvs_mac_rss_udp = [ + tv_mac_ipv4_udp_l3_random, + tv_mac_ipv4_udp_l4_random, + tv_mac_ipv6_udp_l3_random, + tv_mac_ipv6_udp_l4_random + ] + +tvs_mac_rss_udp_l4 = [ + tv_mac_ipv4_udp_l4_random, + tv_mac_ipv6_udp_l4_random + ] + +tvs_mac_rss_tcp = [ + tv_mac_ipv4_tcp_l3_random, + tv_mac_ipv4_tcp_l4_random, + tv_mac_ipv6_tcp_l3_random, + tv_mac_ipv6_tcp_l4_random + ] + +tvs_mac_rss_tcp_l4 = [ + tv_mac_ipv4_tcp_l4_random, + tv_mac_ipv6_tcp_l4_random + ] + +tvs_mac_rss_sctp = [ + tv_mac_ipv4_sctp, + tv_mac_ipv6_sctp + ] + +tvs_mac_rss_all = [ + tv_mac_ip_ipv4, + tv_mac_ip_ipv6, + tv_mac_ipv4_udp_l3_random, + tv_mac_ipv4_udp_l4_random, + tv_mac_ipv6_udp_l3_random, + tv_mac_ipv6_udp_l4_random, + tv_mac_ipv4_tcp_l3_random, + tv_mac_ipv4_tcp_l4_random, + tv_mac_ipv6_tcp_l3_random, + tv_mac_ipv6_tcp_l4_random, + tv_mac_ipv4_sctp, + tv_mac_ipv6_sctp + ] + +test_results = OrderedDict() + +class RSSConfigureTest(TestCase): + + def set_up_all(self): + """ + Run at the start of each test suite. + Generic filter Prerequistites + """ + self.dut_ports = self.dut.get_ports(self.nic) + # Verify that enough ports are available + self.verify(len(self.dut_ports) >= 1, "Insufficient ports") + #self.cores = "1S/8C/1T" + self.pmdout = PmdOutput(self.dut) + + localPort = self.tester.get_local_port(self.dut_ports[0]) + self.__tx_iface = self.tester.get_interface(localPort) + self.pf_interface = self.dut.ports_info[self.dut_ports[0]]['intf'] + self.pf_mac = self.dut.get_mac_address(0) + self.pf_pci = self.dut.ports_info[self.dut_ports[0]]['pci'] + self.verify(self.nic in ["columbiaville_25g","columbiaville_100g"], "%s nic not support ethertype filter" % self.nic) + + def set_up(self): + """ + Run before each test case. + """ + self.dut.kill_all() + + def tear_down(self): + """ + Run after each test case. + """ + self.dut.kill_all() + + def tear_down_all(self): + """ + Run after each test suite. + """ + self.dut.kill_all() + + def create_testpmd_command(self, line_option): + """ + Create testpmd command for non-pipeline mode + """ + #Prepare testpmd EAL and parameters + all_eal_param = self.dut.create_eal_parameters(ports=[self.pf_pci]) + print(all_eal_param) #print eal parameters + command = "./%s/app/testpmd %s -- -i %s" % (self.dut.target, all_eal_param, "--rxq=10 --txq=10" + line_option) + return command + + def _rss_validate_pattern(self, test_vectors, command, rss_type, is_rss): + + global test_results + out = self.dut.send_expect(command, "testpmd> ", 120) + self.logger.debug(out) #print the log + self.dut.send_expect("set fwd rxonly", "testpmd> ", 15) + self.dut.send_expect("set verbose 1", "testpmd> ", 15) + if rss_type != "": + self.dut.send_expect("port config all rss %s" % rss_type, "testpmd> ", 15) + + test_results.clear() + self.count = 1 + self.mac_count=100 + for tv in test_vectors: + self.dut.send_expect("start", "testpmd> ", 15) + time.sleep(2) + tv["check_func_param"]["expect_port"] = self.dut_ports[0] + print("expect_port is", self.dut_ports[0]) + + #send a packet + pkt = packet.Packet() + pkt.update_pkt(tv["scapy_str"]) + pkt.send_pkt(self.tester, tx_port=self.__tx_iface, count=self.count) + + out = self.dut.send_expect("stop", "testpmd> ",60) + print(out) + check_result = [] + check_result = rfc.check_packets_of_each_queue(out) + self.verify(check_result[0] == is_rss, check_result[1]) + + self.dut.send_expect("quit", "#") + + def test_command_line_option_rss_ip(self): + command = self.create_testpmd_command(line_option = " --rss-ip") + self._rss_validate_pattern(tvs_mac_rss_l3, command, rss_type = "", is_rss = True) + self._rss_validate_pattern(tvs_mac_rss_l4, command, rss_type = "", is_rss = False) + + def test_command_line_option_rss_udp(self): + command = self.create_testpmd_command(line_option = " --rss-udp") + self._rss_validate_pattern(tvs_mac_rss_udp, command, rss_type = "", is_rss = True) + self._rss_validate_pattern(tvs_mac_rss_ip, command, rss_type = "", is_rss = False) + self._rss_validate_pattern(tvs_mac_rss_tcp, command, rss_type = "", is_rss = False) + self._rss_validate_pattern(tvs_mac_rss_sctp, command, rss_type = "", is_rss = False) + + def test_command_line_option_rss_disable(self): + command = self.create_testpmd_command(line_option = " --disable-rss") + self._rss_validate_pattern(tvs_mac_rss_all, command, rss_type = "", is_rss = False) + + def test_rss_configure_to_ip(self): + command = self.create_testpmd_command(line_option = "") + self._rss_validate_pattern(tvs_mac_rss_l3, command, rss_type = "", is_rss = True) + self._rss_validate_pattern(tvs_mac_rss_l4, command, rss_type = "", is_rss = False) + + def test_rss_configure_to_udp(self): + command = self.create_testpmd_command(line_option = "") + self._rss_validate_pattern(tvs_mac_rss_udp, command, rss_type = "udp", is_rss = True) + self._rss_validate_pattern(tvs_mac_rss_tcp_l4, command, rss_type = "udp", is_rss = False) + + def test_rss_configure_to_tcp(self): + command = self.create_testpmd_command(line_option = "") + self._rss_validate_pattern(tvs_mac_rss_tcp, command, rss_type = "tcp", is_rss = True) + self._rss_validate_pattern(tvs_mac_rss_udp_l4, command, rss_type = "tcp", is_rss = False) + + def test_rss_configure_to_sctp(self): + command = self.create_testpmd_command(line_option = "") + self._rss_validate_pattern(tvs_mac_rss_sctp, command, rss_type = "sctp", is_rss = True) + self._rss_validate_pattern(tvs_mac_rss_udp_l4, command, rss_type = "sctp", is_rss = False) + self._rss_validate_pattern(tvs_mac_rss_tcp_l4, command, rss_type = "sctp", is_rss = False) + + def test_rss_configure_to_all(self): + command = self.create_testpmd_command(line_option = "") + self._rss_validate_pattern(tvs_mac_rss_all, command, rss_type = "all", is_rss = True) + + def test_rss_configure_to_default(self): + command = self.create_testpmd_command(line_option = "") + self._rss_validate_pattern(tvs_mac_rss_all, command, rss_type = "default", is_rss = True)