From patchwork Tue Sep 28 18:05:29 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yan Xia X-Patchwork-Id: 99879 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 EE1BCA0032; Tue, 28 Sep 2021 12:04:28 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D679F40E3C; Tue, 28 Sep 2021 12:04:28 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mails.dpdk.org (Postfix) with ESMTP id B225A40DF6 for ; Tue, 28 Sep 2021 12:04:27 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10120"; a="221459602" X-IronPort-AV: E=Sophos;i="5.85,329,1624345200"; d="scan'208";a="221459602" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Sep 2021 03:04:26 -0700 X-IronPort-AV: E=Sophos;i="5.85,329,1624345200"; d="scan'208";a="476235147" Received: from unknown (HELO localhost.localdomain) ([10.240.183.77]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Sep 2021 03:04:25 -0700 From: Yan Xia To: dts@dpdk.org Cc: Yan Xia Date: Tue, 28 Sep 2021 18:05:29 +0000 Message-Id: <20210928180533.143020-1-yanx.xia@intel.com> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Subject: [dts] [PATCH V1 1/5] tests/generic_flow_api: move two cases from generic_filter to generic_flow_api 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" move two cases from generic_filter to generic_flow_api Signed-off-by: Yan Xia --- tests/TestSuite_generic_flow_api.py | 118 ++++++++++++++++++++++++++++ 1 file changed, 118 insertions(+) diff --git a/tests/TestSuite_generic_flow_api.py b/tests/TestSuite_generic_flow_api.py index 3ea76b64..32805e46 100644 --- a/tests/TestSuite_generic_flow_api.py +++ b/tests/TestSuite_generic_flow_api.py @@ -84,6 +84,10 @@ class TestGeneric_flow_api(TestCase): MAX_QUEUE = 3 # Based on h/w type, choose how many ports to use self.dut_ports = self.dut.get_ports(self.nic) + global valports + valports = [_ for _ in self.dut_ports if self.tester.get_local_port(_) != -1] + global portMask + portMask = utils.create_mask(valports[:2]) # Verify that enough ports are available self.verify(len(self.dut_ports) >= 1, "Insufficient ports") self.cores = "1S/8C/1T" @@ -2520,6 +2524,120 @@ class TestGeneric_flow_api(TestCase): self.verify(result_rows[2][1] != result_rows[4][1], "The hash values should be different when setting rss to 's-vlan c-vlan' and sending packet with different ivlan.") self.verify(result_rows[3][1] != result_rows[4][1], "The hash values should be different when setting rss to 's-vlan c-vlan' and sending packet with different ovlan and ivlan") + def test_multiple_filters_10GB(self): + """ + only supported by ixgbe and igb + """ + self.verify(self.nic in ["niantic", "kawela_4", "kawela", + "twinville", "foxville"], "%s nic not support n-tuple filter" % self.nic) + self.pmdout.start_testpmd("%s" % self.cores, "--disable-rss --rxq=%d --txq=%d" % (MAX_QUEUE+1, MAX_QUEUE+1)) + 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) + + self.dut.send_expect( + "flow validate 0 ingress pattern eth / ipv4 / tcp flags spec 0x02 flags mask 0x02 / end actions queue index 1 / end", "validated") + self.dut.send_expect( + "flow validate 0 ingress pattern eth type is 0x0806 / end actions queue index 2 / end", "validated") + self.dut.send_expect( + "flow validate 0 ingress pattern eth / ipv4 dst is 2.2.2.5 src is 2.2.2.4 proto is 17 / udp dst is 1 src is 1 / end actions queue index 3 / end", + "validated") + self.dut.send_expect( + "flow create 0 ingress pattern eth / ipv4 / tcp flags spec 0x02 flags mask 0x02 / end actions queue index 1 / end", "created") + self.dut.send_expect( + "flow create 0 ingress pattern eth type is 0x0806 / end actions queue index 2 / end", "created") + self.dut.send_expect( + "flow create 0 ingress pattern eth / ipv4 dst is 2.2.2.5 src is 2.2.2.4 proto is 17 / udp dst is 1 src is 1 / end actions queue index 3 / end", "create") + time.sleep(2) + self.sendpkt(pktstr='Ether(dst="%s")/IP(src="192.168.0.1", dst="192.168.0.2")/TCP(dport=80,flags="S")/Raw("x" * 20)' % self.pf_mac) + self.verify_result("pf", expect_rxpkts="1", expect_queue="1", verify_mac=self.pf_mac) + + self.sendpkt(pktstr='Ether(dst="ff:ff:ff:ff:ff:ff")/ARP(pdst="192.168.1.1")/Raw("x" * 20)') + self.verify_result("pf", expect_rxpkts="1", expect_queue="2", verify_mac="ff:ff:ff:ff:ff:ff") + + self.sendpkt(pktstr='Ether(dst="%s")/Dot1Q(prio=3)/IP(src="2.2.2.4",dst="2.2.2.5")/UDP(sport=1,dport=1)' % self.pf_mac) + self.verify_result("pf", expect_rxpkts="1", expect_queue="3", verify_mac=self.pf_mac) + # destroy rule 2 + out = self.dut.send_expect("flow destroy 0 rule 2", "testpmd> ") + p = re.compile(r"Flow rule #(\d+) destroyed") + m = p.search(out) + self.verify(m, "flow rule 2 delete failed" ) + self.sendpkt(pktstr='Ether(dst="%s")/IP(src="192.168.0.1", dst="192.168.0.2")/TCP(dport=80,flags="S")/Raw("x" * 20)' % self.pf_mac) + self.verify_result("pf", expect_rxpkts="1", expect_queue="1", verify_mac=self.pf_mac) + + self.sendpkt(pktstr='Ether(dst="ff:ff:ff:ff:ff:ff")/ARP(pdst="192.168.1.1")/Raw("x" * 20)') + self.verify_result("pf", expect_rxpkts="1", expect_queue="2", verify_mac="ff:ff:ff:ff:ff:ff") + + self.sendpkt(pktstr='Ether(dst="%s")/Dot1Q(prio=3)/IP(src="2.2.2.4",dst="2.2.2.5")/UDP(sport=1,dport=1)' % self.pf_mac) + self.verify_result("pf", expect_rxpkts="1", expect_queue="0", verify_mac=self.pf_mac) + # destroy rule 1 + out = self.dut.send_expect("flow destroy 0 rule 1", "testpmd> ") + p = re.compile(r"Flow rule #(\d+) destroyed") + m = p.search(out) + self.verify(m, "flow rule 1 delete failed" ) + + self.sendpkt(pktstr='Ether(dst="ff:ff:ff:ff:ff:ff")/ARP(pdst="192.168.1.1")/Raw("x" * 20)') + self.verify_result("pf", expect_rxpkts="1", expect_queue="0", verify_mac="ff:ff:ff:ff:ff:ff") + + self.sendpkt(pktstr='Ether(dst="%s")/IP(src="192.168.0.1", dst="192.168.0.2")/TCP(dport=80,flags="S")/Raw("x" * 20)' % self.pf_mac) + self.verify_result("pf", expect_rxpkts="1", expect_queue="1", verify_mac=self.pf_mac) + # destroy rule 0 + out = self.dut.send_expect("flow destroy 0 rule 0", "testpmd> ") + p = re.compile(r"Flow rule #(\d+) destroyed") + m = p.search(out) + self.verify(m, "flow rule 0 delete failed" ) + + self.sendpkt(pktstr='Ether(dst="%s")/IP(src="192.168.0.1", dst="192.168.0.2")/TCP(dport=80,flags="S")/Raw("x" * 20)' % self.pf_mac) + self.verify_result("pf", expect_rxpkts="1", expect_queue="0", verify_mac=self.pf_mac) + self.dut.send_expect("stop", "testpmd> ") + + def test_jumbo_frame_size(self): + + self.verify(self.nic in ["niantic", "kawela_4", "kawela", "bartonhills", "twinville", "sagepond", "sageville", + "powerville", "foxville"], "%s nic not support" % self.nic) + if (self.nic in ["cavium_a063", "cavium_a064", "foxville"]): + self.pmdout.start_testpmd( + "%s" % self.cores, "--disable-rss --rxq=4 --txq=4 --portmask=%s --nb-cores=4 --nb-ports=1 --mbcache=200 --mbuf-size=2048 --max-pkt-len=9200" % portMask) + else: + self.pmdout.start_testpmd( + "%s" % self.cores, "--disable-rss --rxq=4 --txq=4 --portmask=%s --nb-cores=4 --nb-ports=1 --mbcache=200 --mbuf-size=2048 --max-pkt-len=9600" % portMask) + port = self.tester.get_local_port(valports[0]) + txItf = self.tester.get_interface(port) + + port = self.tester.get_local_port(valports[1]) + rxItf = self.tester.get_interface(port) + self.tester.send_expect("ifconfig %s mtu %s" % (txItf, 9200), "# ") + self.tester.send_expect("ifconfig %s mtu %s" % (rxItf, 9200), "# ") + 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) + + self.dut.send_expect( + "flow validate 0 ingress pattern eth / ipv4 / tcp flags spec 0x02 flags mask 0x02 / end actions queue index 2 / end", + "validated") + self.dut.send_expect( + "flow create 0 ingress pattern eth / ipv4 / tcp flags spec 0x02 flags mask 0x02 / end actions queue index 2 / end", + "created") + + self.sendpkt(pktstr='Ether(dst="%s")/IP(src="2.2.2.5",dst="2.2.2.4")/TCP(dport=80,flags="S")/Raw(load="\x50"*8962)' % self.pf_mac) + time.sleep(1) + self.verify_result("pf", expect_rxpkts="1", expect_queue="2", verify_mac=self.pf_mac) + + self.sendpkt(pktstr='Ether(dst="ff:ff:ff:ff:ff:ff")/ARP(pdst="192.168.1.1")') + time.sleep(1) + self.verify_result("pf", expect_rxpkts="1", expect_queue="0", verify_mac="ff:ff:ff:ff:ff:ff") + # destroy rule + self.dut.send_expect("flow destroy 0 rule 0", "testpmd> ") + self.sendpkt(pktstr='Ether(dst="%s")/IP(src="2.2.2.5",dst="2.2.2.4")/TCP(dport=80,flags="S")/Raw(load="\x50"*8962)' % self.pf_mac) + time.sleep(1) + self.verify_result("pf", expect_rxpkts="1", expect_queue="0", verify_mac=self.pf_mac) + self.dut.send_expect("stop", "testpmd> ") + + self.tester.send_expect("ifconfig %s mtu %s" % (txItf, 1500), "# ") + self.tester.send_expect("ifconfig %s mtu %s" % (rxItf, 1500), "# ") + def tear_down(self): """ Run after each test case. From patchwork Tue Sep 28 18:05:31 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yan Xia X-Patchwork-Id: 99881 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 387C9A0032; Tue, 28 Sep 2021 12:04:34 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 32CC3410DB; Tue, 28 Sep 2021 12:04:34 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mails.dpdk.org (Postfix) with ESMTP id 7C66140DF6 for ; Tue, 28 Sep 2021 12:04:32 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10120"; a="221459623" X-IronPort-AV: E=Sophos;i="5.85,329,1624345200"; d="scan'208";a="221459623" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Sep 2021 03:04:32 -0700 X-IronPort-AV: E=Sophos;i="5.85,329,1624345200"; d="scan'208";a="476235157" Received: from unknown (HELO localhost.localdomain) ([10.240.183.77]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Sep 2021 03:04:30 -0700 From: Yan Xia To: dts@dpdk.org Cc: Yan Xia Date: Tue, 28 Sep 2021 18:05:31 +0000 Message-Id: <20210928180533.143020-3-yanx.xia@intel.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210928180533.143020-1-yanx.xia@intel.com> References: <20210928180533.143020-1-yanx.xia@intel.com> MIME-Version: 1.0 Subject: [dts] [PATCH V1 2/5] test_plans/generic_filter_test_plan: move two cases from generic_filter to generic_flow_api 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" move two cases from generic_filter to generic_flow_api Signed-off-by: Yan Xia --- test_plans/generic_filter_test_plan.rst | 90 ------------------------- 1 file changed, 90 deletions(-) diff --git a/test_plans/generic_filter_test_plan.rst b/test_plans/generic_filter_test_plan.rst index fda54e0f..10043629 100644 --- a/test_plans/generic_filter_test_plan.rst +++ b/test_plans/generic_filter_test_plan.rst @@ -210,60 +210,6 @@ For instance, enable priority filter(just support niantic):: testpmd> ethertype_filter 0 add ethertype 0x0806 priority enable 1 queue 2 -Test Case 4: 10GB Multiple filters -====================================== - -Enable ethertype filter, SYN filter and 5-tuple Filter on the port 0 at same -time. Assigning different filters to different queues on port 0:: - - testpmd> syn_filter 0 add priority high queue 1 - testpmd> ethertype_filter 0 add ethertype 0x0806 priority disable 0 queue 3 - testpmd> 5tuple_filter 0 add dst_ip 2.2.2.5 src_ip 2.2.2.4 dst_port 1 src_port 1 protocol tcp mask 0x1f priority 3 queue 3 - testpmd> start - -Configure the traffic generator to send different packets. Such as,SYN -packets, ARP packets, IP packets and packets with(`dst_ip` = 2.2.2.5 `src_ip` -= 2.2.2.4 `dst_port` = 1 `src_port` = 1 `protocol` = tcp):: - - testpmd> stop - -Verify that different packets are received (RX-packets incremented)on the -assigned queue. Remove ethertype filter:: - - testpmd> ethertype_filter 0 del ethertype 0x0806 priority disable 0 queue 3 - testpmd>start - -Send SYN packets, ARP packets and packets with (`dst_ip` = 2.2.2.5 `src_ip` = -2.2.2.4 `dst_port` = 1 `src_port` = 1 `protocol` = tcp):: - - testpmd> stop - -Verify that all packets are received (RX-packets incremented)on the assigned -queue except arp packets, remove 5-tuple filter:: - - testpmd>5tuple_filter 0 del dst_ip 2.2.2.5 src_ip 2.2.2.4 dst_port 1 src_port 1 protocol tcp mask 0x1f priority 3 queue 3 - testpmd> start - -Send different packets such as,SYN packets, ARP packets, packets with -(`dst_ip` = 2.2.2.5 `src_ip` = 2.2.2.4 `dst_port` = 1 `src_port` = 1 -`protocol` = tcp):: - - testpmd>stop - -Verify that only SYN packets are received (RX-packets incremented)on the -assigned queue set off SYN filter:: - - testpmd>syn_filter 0 del priority high queue 1 - testpmd>start - -Configure the traffic generator to send 5 SYN packets:: - - testpmd>stop - -Verify that the packets are not received (RX-packets do not increased)on the -queue 1. - - Test Case 5: 2-tuple filter =============================== @@ -451,42 +397,6 @@ Verify that the packet are not received on the queue 1 and queue 3:: testpmd> quit -Test Case 9: jumbo framesize filter -=================================== - -This case is designed for NIC (niantic,I350, 82576 and 82580). Since -``Testpmd`` could transmits packets with jumbo frame size , it also could -transmit above packets on assigned queue. Launch the app ``testpmd`` with the -following arguments:: - - testpmd -c ffff -n 4 -- -i --disable-rss --rxq=4 --txq=4 --nb-cores=8 --nb-ports=2 --rxd=1024 --txd=1024 --burst=144 --txpt=32 --txht=8 --txwt=0 --txfreet=0 --rxfreet=64 --mbcache=200 --mbuf-size=2048 --max-pkt-len=9600 - - testpmd>set stat_qmap rx 0 0 0 - testpmd>set stat_qmap rx 0 1 1 - testpmd>set stat_qmap rx 0 2 2 - testpmd>vlan set strip off 0 - testpmd>vlan set strip off 1 - testpmd>vlan set filter off 0 - testpmd>vlan set filter off 1 - -Enable the syn filters with large size:: - - testpmd> syn_filter 0 add priority high queue 1 - testpmd> start - -Configure the traffic generator to send syn packets(framesize=2000):: - - testpmd> stop - -Then Verify that the packet are received on the queue 1. Remove the filter:: - - testpmd> syn_filter 0 del priority high queue 1 - -Configure the traffic generator to send syn packets and s. Then Verify that -the packet are not received on the queue 1:: - - testpmd> quit - Test Case 10: 128 queues ======================== From patchwork Tue Sep 28 18:05:30 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yan Xia X-Patchwork-Id: 99880 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 1522AA0032; Tue, 28 Sep 2021 12:04:32 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0B8B6410DC; Tue, 28 Sep 2021 12:04:32 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mails.dpdk.org (Postfix) with ESMTP id 000E440DF6 for ; Tue, 28 Sep 2021 12:04:29 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10120"; a="221459613" X-IronPort-AV: E=Sophos;i="5.85,329,1624345200"; d="scan'208";a="221459613" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Sep 2021 03:04:29 -0700 X-IronPort-AV: E=Sophos;i="5.85,329,1624345200"; d="scan'208";a="476235154" Received: from unknown (HELO localhost.localdomain) ([10.240.183.77]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Sep 2021 03:04:28 -0700 From: Yan Xia To: dts@dpdk.org Cc: Yan Xia Date: Tue, 28 Sep 2021 18:05:30 +0000 Message-Id: <20210928180533.143020-2-yanx.xia@intel.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210928180533.143020-1-yanx.xia@intel.com> References: <20210928180533.143020-1-yanx.xia@intel.com> MIME-Version: 1.0 Subject: [dts] [PATCH V1 3/5] test_plans/generic_flow_api_test_plan: move two cases from generic_filter to generic_flow_api 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" move two cases from generic_filter to generic_flow_api Signed-off-by: Yan Xia --- test_plans/generic_flow_api_test_plan.rst | 112 ++++++++++++++++++++++ 1 file changed, 112 insertions(+) diff --git a/test_plans/generic_flow_api_test_plan.rst b/test_plans/generic_flow_api_test_plan.rst index d1fa33bd..760f8e82 100644 --- a/test_plans/generic_flow_api_test_plan.rst +++ b/test_plans/generic_flow_api_test_plan.rst @@ -2042,3 +2042,115 @@ Test case: create different rule after destroy pkt2 = Ether()/IP()/UDP(dport=32)/Raw('x' * 20) verify match pkt2 to queue 2, verify mismatch pkt1 to queue 0. + +Test Case: 10GB Multiple filters +====================================== + +1. config testpmd on DUT + + 1. set up testpmd with Fortville NICs:: + + ./testpmd -l 1,2,3,4,5,6,7,8 -n 4 -- -i --disable-rss --rxq=16 --txq=16 + + 2. verbose configuration:: + + testpmd> set verbose 1 + + 3. PMD fwd only receive the packets:: + + testpmd> set fwd rxonly + + 4. start packet receive:: + + testpmd> start + + 5. create rule,Enable ethertype filter, SYN filter and 5-tuple Filter on the port 0 at same + time. Assigning different filters to different queues on port 0:: + + testpmd> flow validate 0 ingress pattern eth / ipv4 / tcp flags spec 0x02 flags mask 0x02 / end actions queue index 1 / end + testpmd> flow validate 0 ingress pattern eth type is 0x0806 / end actions queue index 2 / end + testpmd> flow validate 0 ingress pattern eth / ipv4 dst is 2.2.2.5 src is 2.2.2.4 proto is 17 / udp dst is 1 src is 1 / end actions queue index 3 / end + testpmd> flow create 0 ingress pattern eth / ipv4 / tcp flags spec 0x02 flags mask 0x02 / end actions queue index 1 / end + testpmd> flow create 0 ingress pattern eth type is 0x0806 / end actions queue index 2 / end + testpmd> flow create 0 ingress pattern eth / ipv4 dst is 2.2.2.5 src is 2.2.2.4 proto is 17 / udp dst is 1 src is 1 / end actions queue index 3 / end + +2. Configure the traffic generator to send different packets. Such as,SYN packets, ARP packets, IP packets and +packets with(`dst_ip` = 2.2.2.5 `src_ip` = 2.2.2.4 `dst_port` = 1 `src_port` = 1 `protocol` = udp):: + + sendp([Ether(dst="90:e2:ba:36:99:34")/IP(src="192.168.0.1", dst="192.168.0.2")/TCP(dport=80,flags="S")/Raw("x" * 20)],iface="ens224f0",count=1,inter=0,verbose=False) + sendp([Ether(dst="ff:ff:ff:ff:ff:ff")/ARP(pdst="192.168.1.1")/Raw("x" * 20)],iface="ens224f0",count=1,inter=0,verbose=False) + sendp([Ether(dst="90:e2:ba:36:99:34")/Dot1Q(prio=3)/IP(src="2.2.2.4",dst="2.2.2.5")/UDP(sport=1,dport=1)],iface="ens224f0",count=1,inter=0,verbose=False) + +3. Verify that all packets are received (RX-packets incremented)on the assigned +queue, remove 5-tuple filter:: + + testpmd> stop + testpmd> start + testpmd> flow destroy 0 rule 2 +4. Send different packets such as,SYN packets, ARP packets, packets with +(`dst_ip` = 2.2.2.5 `src_ip` = 2.2.2.4 `dst_port` = 1 `src_port` = 1 +`protocol` = udp):: + + testpmd> stop + +5. Verify that different packets are received (RX-packets incremented)on the +assigned queue export 5-tuple filter, remove ethertype filter:: + + testpmd> start + testpmd> flow destroy 0 rule 1 + +Send different packets such as,SYN packets, ARP packets, packets with +(`dst_ip` = 2.2.2.5 `src_ip` = 2.2.2.4 `dst_port` = 1 `src_port` = 1 +`protocol` = udp):: + + testpmd>stop + +Verify that only SYN packets are received (RX-packets incremented)on the +assigned queue set off SYN filter,remove syn filter:: + + testpmd>start + testpmd>flow destroy 0 rule 0 + +Configure the traffic generator to send SYN packets:: + + testpmd>stop + +Verify that the packets are not received (RX-packets do not increased)on the +queue 1. + +Test Case: jumbo framesize filter +=================================== + +This case is designed for NIC (niantic,I350, 82576 and 82580). Since +``Testpmd`` could transmits packets with jumbo frame size , it also could +transmit above packets on assigned queue. Launch the app ``testpmd`` with the +following arguments:: + + testpmd -l 1,2,3,4,5,6,7,8 -n 4 -- -i --disable-rss --rxq=4 --txq=4 --portmask=0x3 --nb-cores=4 --nb-ports=1 --mbcache=200 --mbuf-size=2048 --max-pkt-len=9600 + testpmd> set fwd rxonly + testpmd> set verbose 1 + testpmd> start + +Enable the syn filters with large size:: + + testpmd> flow validate 0 ingress pattern eth / ipv4 / tcp flags spec 0x02 flags mask 0x02 / end actions queue index 2 / end + testpmd> flow create 0 ingress pattern eth / ipv4 / tcp flags spec 0x02 flags mask 0x02 / end actions queue index 2 / end + +Configure the traffic generator to send syn packets:: + + sendp([Ether(dst="90:e2:ba:36:99:34")/IP(src="2.2.2.5",dst="2.2.2.4")/TCP(dport=80,flags="S")/Raw(load="P"*8962)],iface="ens224f0",count=1,inter=0,verbose=False) + testpmd> stop + +Then Verify that the packet are received on the queue 2. Configure the traffic generator to send arp packets:: + + testpmd> start + sendp([Ether(dst="ff:ff:ff:ff:ff:ff")/ARP(pdst="192.168.1.1")],iface="ens224f0",count=1,inter=0,verbose=False) + +Then Verify that the packet are not received on the queue 2. Remove the filter:: + + testpmd> flow destroy 0 rule 0 + +Configure the traffic generator to send syn packets. Then Verify that +the packet are not received on the queue 2:: + + testpmd> stop From patchwork Tue Sep 28 18:05:32 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yan Xia X-Patchwork-Id: 99882 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 5DFE5A0032; Tue, 28 Sep 2021 12:04:37 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5645E410E4; Tue, 28 Sep 2021 12:04:37 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mails.dpdk.org (Postfix) with ESMTP id 210AE40DF6 for ; Tue, 28 Sep 2021 12:04:34 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10120"; a="221459629" X-IronPort-AV: E=Sophos;i="5.85,329,1624345200"; d="scan'208";a="221459629" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Sep 2021 03:04:34 -0700 X-IronPort-AV: E=Sophos;i="5.85,329,1624345200"; d="scan'208";a="476235169" Received: from unknown (HELO localhost.localdomain) ([10.240.183.77]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Sep 2021 03:04:33 -0700 From: Yan Xia To: dts@dpdk.org Cc: Yan Xia Date: Tue, 28 Sep 2021 18:05:32 +0000 Message-Id: <20210928180533.143020-4-yanx.xia@intel.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210928180533.143020-1-yanx.xia@intel.com> References: <20210928180533.143020-1-yanx.xia@intel.com> MIME-Version: 1.0 Subject: [dts] [PATCH V1 4/5] tests/generic_filter: move two cases from generic_filter to generic_flow_api 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" move two cases from generic_filter to generic_flow_api Signed-off-by: Yan Xia Signed-off-by: Yan Xia --- tests/TestSuite_generic_filter.py | 157 ------------------------------ 1 file changed, 157 deletions(-) diff --git a/tests/TestSuite_generic_filter.py b/tests/TestSuite_generic_filter.py index 22f85bd0..173e4f72 100644 --- a/tests/TestSuite_generic_filter.py +++ b/tests/TestSuite_generic_filter.py @@ -416,89 +416,6 @@ class TestGeneric_filter(TestCase): self.verify_result(out, tx_pkts="1", expect_queue="0") - def test_multiple_filters_10GB(self): - if self.nic in ["niantic", "sagepond", "sageville", "fortville_eagle", "fortville_25g", "fortville_spirit", "columbiaville_25g", "columbiaville_100g"]: - self.pmdout.start_testpmd( - "%s" % self.cores, "--disable-rss --rxq=4 --txq=4 --portmask=%s --nb-cores=4 --nb-ports=1" % portMask) - self.port_config() - self.dut.send_expect( - "syn_filter %s add priority high queue 1" % valports[0], "testpmd> ") - self.dut.send_expect( - "ethertype_filter %s add mac_ignr 00:00:00:00:00:00 ethertype 0x0806 fwd queue 2" % valports[0], "testpmd> ") - self.dut.send_expect( - "5tuple_filter %s add dst_ip 2.2.2.5 src_ip 2.2.2.4 dst_port 1 src_port 1 protocol 0x06 mask 0x1f tcp_flags 0x0 priority 3 queue 3 " % (valports[0]), "testpmd> ") - self.dut.send_expect("start", "testpmd> ") - - self.filter_send_packet("syn") - out = self.dut.send_expect("stop", "testpmd> ") - self.dut.send_expect("clear port stats all", "testpmd> ") - self.verify_result(out, tx_pkts="1", expect_queue="1") - - self.ethertype_filter = "on" - self.dut.send_expect("start", "testpmd> ") - self.filter_send_packet("arp") - out = self.dut.send_expect("stop", "testpmd> ") - self.dut.send_expect("clear port stats all", "testpmd> ") - self.verify_result(out, tx_pkts="1", expect_queue="2") - - self.dut.send_expect("start", "testpmd> ") - self.filter_send_packet("arp_prio") - out = self.dut.send_expect("stop", "testpmd> ") - self.dut.send_expect("clear port stats all", "testpmd> ") - self.verify_result(out, tx_pkts="1", expect_queue="2") - - self.dut.send_expect("start", "testpmd> ") - self.filter_send_packet("fivetuple") - out = self.dut.send_expect("stop", "testpmd> ") - self.dut.send_expect("clear port stats all", "testpmd> ") - self.verify_result(out, tx_pkts="1", expect_queue="3") - - self.dut.send_expect( - "5tuple_filter %s del dst_ip 2.2.2.5 src_ip 2.2.2.4 dst_port 1 src_port 1 protocol 0x06 mask 0x1f tcp_flags 0x0 priority 3 queue 3 " % (valports[0]), "testpmd> ") - self.dut.send_expect("start", "testpmd> ") - self.filter_send_packet("syn") - out = self.dut.send_expect("stop", "testpmd> ") - self.dut.send_expect("clear port stats all", "testpmd> ") - self.verify_result(out, tx_pkts="1", expect_queue="1") - - self.dut.send_expect("start", "testpmd> ") - self.filter_send_packet("arp") - out = self.dut.send_expect("stop", "testpmd> ") - self.dut.send_expect("clear port stats all", "testpmd> ") - self.verify_result(out, tx_pkts="1", expect_queue="2") - - self.dut.send_expect("start", "testpmd> ") - self.filter_send_packet("fivetuple") - out = self.dut.send_expect("stop", "testpmd> ") - self.dut.send_expect("clear port stats all", "testpmd> ") - self.verify_result(out, tx_pkts="1", expect_queue="0") - self.dut.send_expect( - "ethertype_filter %s del mac_ignr 00:00:00:00:00:00 ethertype 0x0806 fwd queue 2" % valports[0], "testpmd> ") - - self.dut.send_expect("start", "testpmd> ") - self.filter_send_packet("arp") - out = self.dut.send_expect("stop", "testpmd> ") - self.dut.send_expect("clear port stats all", "testpmd> ") - self.verify_result(out, tx_pkts="1", expect_queue="0") - - self.dut.send_expect("start", "testpmd> ") - self.filter_send_packet("syn") - out = self.dut.send_expect("stop", "testpmd> ") - self.dut.send_expect("clear port stats all", "testpmd> ") - self.verify_result(out, tx_pkts="1", expect_queue="1") - - self.dut.send_expect( - "syn_filter %s del priority high queue 1" % valports[0], "testpmd> ") - - self.dut.send_expect("start", "testpmd> ") - self.filter_send_packet("syn") - out = self.dut.send_expect("stop", "testpmd> ") - self.dut.send_expect("clear port stats all", "testpmd> ") - self.verify_result(out, tx_pkts="1", expect_queue="0") - - else: - self.verify(False, "%s nic not support this test" % self.nic) - def test_twotuple_filter(self): if self.nic in ["powerville", "bartonhills", "cavium_a063", "sagepond", "foxville", "sageville", "fortville_eagle", "fortville_25g", "fortville_spirit", "columbiaville_25g", "columbiaville_100g"]: @@ -631,80 +548,6 @@ class TestGeneric_filter(TestCase): self.verify_result(out, tx_pkts="1", expect_queue="0") else: self.verify(False, "%s nic not support this test" % self.nic) - def test_jumbo_frame_size(self): - - self.verify(self.nic not in ["fortville_spirit_single", "fortpark_TLV","fortpark_BASE-T", "carlsville"], "%s nic not support this test" % self.nic) - if (self.nic in ["cavium_a063", "cavium_a064", "foxville"]): - self.pmdout.start_testpmd( - "%s" % self.cores, "--disable-rss --rxq=4 --txq=4 --portmask=%s --nb-cores=4 --nb-ports=1 --mbcache=200 --mbuf-size=2048 --max-pkt-len=9200" % portMask) - else: - self.pmdout.start_testpmd( - "%s" % self.cores, "--disable-rss --rxq=4 --txq=4 --portmask=%s --nb-cores=4 --nb-ports=1 --mbcache=200 --mbuf-size=2048 --max-pkt-len=9600" % portMask) - port = self.tester.get_local_port(valports[0]) - txItf = self.tester.get_interface(port) - - port = self.tester.get_local_port(valports[1]) - rxItf = self.tester.get_interface(port) - self.tester.send_expect("ifconfig %s mtu %s" % (txItf, 9200), "# ") - self.tester.send_expect("ifconfig %s mtu %s" % (rxItf, 9200), "# ") - - self.dut.send_expect( - "set stat_qmap rx %s 0 0" % valports[0], "testpmd> ") - self.dut.send_expect( - "set stat_qmap rx %s 0 0" % valports[1], "testpmd> ") - self.dut.send_expect( - "set stat_qmap rx %s 1 1" % valports[0], "testpmd> ") - self.dut.send_expect( - "set stat_qmap rx %s 1 1" % valports[1], "testpmd> ") - self.dut.send_expect( - "set stat_qmap rx %s 2 2" % valports[0], "testpmd> ") - self.dut.send_expect( - "set stat_qmap rx %s 2 2" % valports[1], "testpmd> ") - self.dut.send_expect( - "set stat_qmap rx %s 3 3" % valports[0], "testpmd> ") - self.dut.send_expect( - "set stat_qmap rx %s 3 3" % valports[1], "testpmd> ") - self.dut.send_expect( - "vlan set strip off %s" % valports[0], "testpmd> ") - self.dut.send_expect( - "vlan set strip off %s" % valports[1], "testpmd> ") - self.dut.send_expect( - "vlan set filter off %s" % valports[0], "testpmd> ") - self.dut.send_expect( - "vlan set filter off %s" % valports[1], "testpmd> ") - self.dut.send_expect( - "syn_filter %s add priority high queue 2" % valports[0], "testpmd> ") - - self.dut.send_expect("start", "testpmd> ", 120) - - self.filter_send_packet("jumbo") - time.sleep(1) - - out = self.dut.send_expect("stop", "testpmd> ") - self.dut.send_expect("clear port stats all", "testpmd>") - - self.verify_result(out, tx_pkts="1", expect_queue="2") - - self.dut.send_expect("start", "testpmd> ") - - self.filter_send_packet("arp") - time.sleep(1) - out = self.dut.send_expect("stop", "testpmd> ") - self.dut.send_expect("clear port stats all", "testpmd>") - - self.verify_result(out, tx_pkts="1", expect_queue="0") - - self.dut.send_expect( - "syn_filter %s del priority high queue 2" % valports[0], "testpmd> ") - self.dut.send_expect("start", "testpmd> ", 120) - self.filter_send_packet("jumbo") - time.sleep(1) - out = self.dut.send_expect("stop", "testpmd> ") - self.dut.send_expect("clear port stats all", "testpmd>") - - self.verify_result(out, tx_pkts="1", expect_queue="0") - self.tester.send_expect("ifconfig %s mtu %s" % (txItf, 1500), "# ") - self.tester.send_expect("ifconfig %s mtu %s" % (rxItf, 1500), "# ") def test_128_queues(self): # testpmd can't support assign queue to received packet, so can't test From patchwork Tue Sep 28 18:05:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yan Xia X-Patchwork-Id: 99883 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 8A799A0032; Tue, 28 Sep 2021 12:04:39 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7F469410D7; Tue, 28 Sep 2021 12:04:39 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mails.dpdk.org (Postfix) with ESMTP id 9E5A2410ED for ; Tue, 28 Sep 2021 12:04:37 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10120"; a="221459632" X-IronPort-AV: E=Sophos;i="5.85,329,1624345200"; d="scan'208";a="221459632" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Sep 2021 03:04:37 -0700 X-IronPort-AV: E=Sophos;i="5.85,329,1624345200"; d="scan'208";a="476235175" Received: from unknown (HELO localhost.localdomain) ([10.240.183.77]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Sep 2021 03:04:36 -0700 From: Yan Xia To: dts@dpdk.org Cc: Yan Xia Date: Tue, 28 Sep 2021 18:05:33 +0000 Message-Id: <20210928180533.143020-5-yanx.xia@intel.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210928180533.143020-1-yanx.xia@intel.com> References: <20210928180533.143020-1-yanx.xia@intel.com> MIME-Version: 1.0 Subject: [dts] [PATCH V1 5/5] conf/test_case_checklist: add cases not support NIC 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 cases not support NIC Signed-off-by: Yan Xia Tested-by: Yan Xia --- conf/test_case_checklist.json | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/conf/test_case_checklist.json b/conf/test_case_checklist.json index 8cd47dd1..b979d04b 100644 --- a/conf/test_case_checklist.json +++ b/conf/test_case_checklist.json @@ -114,8 +114,16 @@ "ALL" ], "NIC": [ + "fortville_25g", + "fortville_eagle", + "fortville_spirit", "fortville_spirit_single", "springville", + "ironpond", + "springfountain", + "twinpond", + "cavium_a034", + "cavium_a011", "fortpark_TLV", "fortpark_BASE-T", "carlsville" @@ -136,6 +144,9 @@ "kawela_4", "bartonhills", "powerville", + "fortville_25g", + "fortville_eagle", + "fortville_spirit", "fortville_spirit_single", "springville", "ironpond", @@ -146,7 +157,9 @@ "fortpark_TLV", "fortpark_BASE-T", "carlsville", - "foxville" + "columbiaville_25g", + "columbiaville_100g", + "foxville" ], "Target": [ "ALL"