From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 99F60A0350; Tue, 30 Jun 2020 07:55:54 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6F2051B75C; Tue, 30 Jun 2020 07:55:54 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id 7188A1B6B4 for ; Tue, 30 Jun 2020 07:55:52 +0200 (CEST) IronPort-SDR: WZJCb9FR4aeGeuGXzazm09LGSRErbbcZ1qOH09VLpGzSkOJSU9SjZnM+tpVo5R/PF4pKmyxpfR Pp/6bkkZQ5WA== X-IronPort-AV: E=McAfee;i="6000,8403,9666"; a="133599164" X-IronPort-AV: E=Sophos;i="5.75,296,1589266800"; d="scan'208";a="133599164" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Jun 2020 22:55:51 -0700 IronPort-SDR: lOkGt1HawWgBz9lvpJvOxCqXUP6ehfKazm+HrpazGOHVpOWola0GEkf/mTVIDo6U3mtU5OmScH uBztZnUvTnVQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,296,1589266800"; d="scan'208";a="295105762" Received: from unknown (HELO cb-dts.sh.intel.com) ([10.240.183.58]) by orsmga002.jf.intel.com with ESMTP; 29 Jun 2020 22:55:49 -0700 From: ChenBo To: dts@dpdk.org Cc: ChenBo Date: Tue, 30 Jun 2020 13:54:57 +0800 Message-Id: <20200630055457.17939-1-box.c.chen@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [dts] [PATCH V1] test/rss_to_rte_flow: Support of network adapter for sprinville 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" The spinville has only 4 queues, need to adapt in code Signed-off-by: ChenBo --- tests/TestSuite_rss_to_rte_flow.py | 97 +++++++++++++++++++++++------- 1 file changed, 75 insertions(+), 22 deletions(-) diff --git a/tests/TestSuite_rss_to_rte_flow.py b/tests/TestSuite_rss_to_rte_flow.py index 469a271..21ba8dc 100644 --- a/tests/TestSuite_rss_to_rte_flow.py +++ b/tests/TestSuite_rss_to_rte_flow.py @@ -897,18 +897,28 @@ class TestRSS_to_Rteflow(TestCase): """ self.verify(self.nic not in ["fortville_eagle", "fortville_spirit", "carlsville", "fortville_spirit_single", "fortpark_TLV", "fortville_25g","fortpark_BASE-T"], "NIC Unsupported: " + str(self.nic)) - self.pmdout.start_testpmd("%s" % self.cores, "--rxq=8 --txq=8 --port-topology=chained") + if self.nic == 'springville': + self.pmdout.start_testpmd("%s" % self.cores, "--rxq=4 --txq=4 --port-topology=chained") + else: + self.pmdout.start_testpmd("%s" % self.cores, "--rxq=8 --txq=8 --port-topology=chained") self.dut.send_expect("set fwd rxonly", "testpmd> ", 120) self.dut.send_expect("set verbose 1", "testpmd> ", 120) self.dut.send_expect("start", "testpmd> ", 120) time.sleep(2) # Create a rss queue rule - self.dut.send_expect( - "flow create 0 ingress pattern end actions rss queues 1 4 7 end / end", "created") + if self.nic == 'springville': + self.dut.send_expect( + "flow create 0 ingress pattern end actions rss queues 1 2 end / end", "created") + else: + self.dut.send_expect( + "flow create 0 ingress pattern end actions rss queues 1 4 7 end / end", "created") # send the packets and verify the results ptype_list1 = ["ipv4-other", "ipv4-frag", "ipv4-udp", "ipv4-tcp", "ipv4-sctp", "ipv6-other", "ipv6-frag", "ipv6-udp", "ipv6-tcp", "ipv6-sctp"] - self.send_check_100_packet_queue(ptype_list1, ["1","4","7"], port_id=0) + if self.nic == 'springville': + self.send_check_100_packet_queue(ptype_list1, ["1", "2"], port_id=0) + else: + self.send_check_100_packet_queue(ptype_list1, ["1","4","7"], port_id=0) # There can't be more than one RSS queue rule existing. self.dut.send_expect( @@ -930,8 +940,12 @@ class TestRSS_to_Rteflow(TestCase): self.dut.send_expect( "flow create 0 ingress pattern end actions rss queues 8 end / end", "error") # Set all the queues to the rule - self.dut.send_expect( - "flow create 0 ingress pattern end actions rss queues 0 1 2 3 4 5 6 7 end / end", "created") + if self.nic == 'springville': + self.dut.send_expect( + "flow create 0 ingress pattern end actions rss queues 0 1 2 3 end / end", "created") + else: + self.dut.send_expect( + "flow create 0 ingress pattern end actions rss queues 0 1 2 3 4 5 6 7 end / end", "created") self.send_check_100_packet_queue(ptype_list1, "all", port_id=0) def test_different_types_ixgbe_igb(self): @@ -940,15 +954,22 @@ class TestRSS_to_Rteflow(TestCase): """ self.verify(self.nic not in ["fortville_eagle", "fortville_spirit", "carlsville", "fortville_spirit_single", "fortpark_TLV", "fortville_25g","fortpark_BASE-T"], "NIC Unsupported: " + str(self.nic)) - self.pmdout.start_testpmd("%s" % self.cores, "--rxq=8 --txq=8 --port-topology=chained") + if self.nic == 'springville': + self.pmdout.start_testpmd("%s" % self.cores, "--rxq=4 --txq=4 --port-topology=chained") + else: + self.pmdout.start_testpmd("%s" % self.cores, "--rxq=8 --txq=8 --port-topology=chained") self.dut.send_expect("set fwd rxonly", "testpmd> ", 120) self.dut.send_expect("set verbose 1", "testpmd> ", 120) self.dut.send_expect("start", "testpmd> ", 120) time.sleep(2) # Create a rss queue rule - self.dut.send_expect( - "flow create 0 ingress pattern end actions rss types udp ipv4-tcp ipv6-sctp ipv4-other end queues 1 4 7 end / end", "created") + if self.nic == 'springville': + self.dut.send_expect( + "flow create 0 ingress pattern end actions rss types udp ipv4-tcp ipv6-sctp ipv4-other end queues 1 2 3 end / end","created") + else: + self.dut.send_expect( + "flow create 0 ingress pattern end actions rss types udp ipv4-tcp ipv6-sctp ipv4-other end queues 1 4 7 end / end", "created") self.dut.send_expect( "show port 0 rss-hash", "all ipv4-tcp ipv4-udp ipv6-udp ipv6-udp-ex udp tcp") ptype_list1 = ["ipv4-udp", "ipv4-tcp", "ipv6-udp"] @@ -957,18 +978,29 @@ class TestRSS_to_Rteflow(TestCase): # send the packets and verify the results if(self.nic in ["cavium_a063", "cavium_a064"]): self.send_check_100_packet_queue(ptype_list1, ["1","4","7"], port_id=0) + elif self.nic == 'springville': + self.send_check_100_packet_queue(ptype_list1, ["1", "2", "3"], port_id=0) + self.send_check_100_packet_queue(ptype_list2, "0", port_id=0) else: self.send_check_100_packet_queue(ptype_list1, ["1","4","7"], port_id=0) self.send_check_100_packet_queue(ptype_list2, "0", port_id=0) # Create different ptype rss rule. self.dut.send_expect("flow flush 0", "testpmd> ") - self.dut.send_expect( - "flow create 0 ingress pattern end actions rss types ipv4 ipv6 end queues 3 7 end / end", "created") + + if self.nic == 'springville': + self.dut.send_expect( + "flow create 0 ingress pattern end actions rss types ipv4 ipv6 end queues 1 3 end / end", "created") + else: + self.dut.send_expect( + "flow create 0 ingress pattern end actions rss types ipv4 ipv6 end queues 3 7 end / end", "created") self.dut.send_expect( "show port 0 rss-hash", "all ipv4 ipv6 ip") ptype_list3 = ["ipv4-other", "ipv4-frag", "ipv4-udp", "ipv4-tcp", "ipv4-sctp", "ipv6-other", "ipv6-frag", "ipv6-udp", "ipv6-tcp", "ipv6-sctp"] - self.send_check_100_packet_queue(ptype_list3, ["3","7"], port_id=0) + if self.nic == 'springville': + self.send_check_100_packet_queue(ptype_list3, ["1", "3"], port_id=0) + else: + self.send_check_100_packet_queue(ptype_list3, ["3","7"], port_id=0) def test_disable_rss_in_commandline_ixgbe_igb(self): """ @@ -976,7 +1008,10 @@ class TestRSS_to_Rteflow(TestCase): """ self.verify(self.nic not in ["fortville_eagle", "fortville_spirit", "carlsville", "fortville_spirit_single", "fortpark_TLV", "fortville_25g","fortpark_BASE-T"], "NIC Unsupported: " + str(self.nic)) - self.pmdout.start_testpmd("%s" % self.cores, "--rxq=8 --txq=8 --disable-rss --port-topology=chained") + if self.nic == 'springville': + self.pmdout.start_testpmd("%s" % self.cores, "--rxq=4 --txq=4 --disable-rss --port-topology=chained") + else: + self.pmdout.start_testpmd("%s" % self.cores, "--rxq=8 --txq=8 --disable-rss --port-topology=chained") self.dut.send_expect("set fwd rxonly", "testpmd> ", 120) self.dut.send_expect("set verbose 1", "testpmd> ", 120) self.dut.send_expect("start", "testpmd> ", 120) @@ -995,15 +1030,22 @@ class TestRSS_to_Rteflow(TestCase): self.send_check_100_packet_queue(ptype_list1, "0", port_id=0) # Create a rss queue rule - self.dut.send_expect( - "flow create 0 ingress pattern end actions rss types ipv6-tcp ipv4-udp end queues 5 6 7 end / end", "created") + if self.nic == 'springville': + self.dut.send_expect( + "flow create 0 ingress pattern end actions rss types ipv6-tcp ipv4-udp end queues 1 2 3 end / end", "created") + else: + self.dut.send_expect( + "flow create 0 ingress pattern end actions rss types ipv6-tcp ipv4-udp end queues 5 6 7 end / end", "created") self.dut.send_expect( "show port 0 rss-hash", "all ipv4-udp ipv6-tcp udp tcp") # send the packets and verify the results ptype_list2 = ["ipv4-udp", "ipv6-tcp"] ptype_list3 = ["ipv4-other", "ipv4-frag", "ipv4-tcp", "ipv4-sctp", "ipv6-other", "ipv6-frag", "ipv6-udp", "ipv6-sctp"] - self.send_check_100_packet_queue(ptype_list2, ["5","6","7"], port_id=0) + if self.nic == 'springville': + self.send_check_100_packet_queue(ptype_list2, ["1", "2", "3"], port_id=0) + else: + self.send_check_100_packet_queue(ptype_list2, ["5","6","7"], port_id=0) self.send_check_100_packet_queue(ptype_list3, "0", port_id=0) def test_flow_director_rss_rule_combination_ixgbe_igb(self): @@ -1012,19 +1054,27 @@ class TestRSS_to_Rteflow(TestCase): """ self.verify(self.nic not in ["fortville_eagle", "fortville_spirit", "carlsville", "fortville_spirit_single", "fortpark_TLV", "fortville_25g","fortpark_BASE-T"], "NIC Unsupported: " + str(self.nic)) - self.pmdout.start_testpmd("%s" % self.cores, "--rxq=8 --txq=8 --pkt-filter-mode=perfect") + if self.nic == 'springville': + self.pmdout.start_testpmd("%s" % self.cores, "--rxq=4 --txq=4 --disable-rss --port-topology=chained") + else: + self.pmdout.start_testpmd("%s" % self.cores, "--rxq=8 --txq=8 --pkt-filter-mode=perfect") self.dut.send_expect("set fwd rxonly", "testpmd> ", 120) self.dut.send_expect("set verbose 1", "testpmd> ", 120) self.dut.send_expect("start", "testpmd> ", 120) time.sleep(2) # Create a rss queue rule - self.dut.send_expect( - "flow create 0 ingress pattern end actions rss types ipv4-udp end queues 3 4 5 end / end", "created") - self.send_and_check(self.pkt2, ["3", "4", "5"], port_id=0) + if self.nic == 'springville': + self.dut.send_expect( + "flow create 0 ingress pattern end actions rss types ipv4-udp end queues 2 3 end / end", "created") + self.send_and_check(self.pkt2, ["2", "3"], port_id=0) + else: + self.dut.send_expect( + "flow create 0 ingress pattern end actions rss types ipv4-udp end queues 3 4 5 end / end", "created") + self.send_and_check(self.pkt2, ["3", "4", "5"], port_id=0) # Create a flow director rule - if (self.nic in ["bartonhills", "powerville"]): + if (self.nic in ["bartonhills", "powerville" , "springville"]): self.dut.send_expect( "flow create 0 ingress pattern eth / ipv4 proto is 17 / udp dst is 50 / end actions queue index 1 / end", "created") self.send_and_check(self.pkt2, ["1"], port_id=0) @@ -1034,7 +1084,10 @@ class TestRSS_to_Rteflow(TestCase): self.send_and_check(self.pkt2, ["1"], port_id=0) # Delete the fdir rule self.dut.send_expect("flow destroy 0 rule 1", "testpmd> ") - self.send_and_check(self.pkt2, ["3", "4", "5"], port_id=0) + if self.nic == 'springville': + self.send_and_check(self.pkt2, ["2", "3"], port_id=0) + else: + self.send_and_check(self.pkt2, ["3", "4", "5"], port_id=0) def tear_down(self): """ -- 2.17.1