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 5509AA04DD; Fri, 20 Nov 2020 03:10:22 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 42436C8A8; Fri, 20 Nov 2020 03:10:21 +0100 (CET) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 4F254C884 for ; Fri, 20 Nov 2020 03:10:18 +0100 (CET) IronPort-SDR: HqIaUUzyjJrFM7wtpRAAwKiwiNB2hKnjihZHMsnwIX+hZRIjI3n2S/3mA0QjGWiMf654qRnTK7 rrLR0En+sLJQ== X-IronPort-AV: E=McAfee;i="6000,8403,9810"; a="170618881" X-IronPort-AV: E=Sophos;i="5.78,354,1599548400"; d="scan'208";a="170618881" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Nov 2020 18:10:18 -0800 IronPort-SDR: 5070Vu+Sl6D6eysW1Q4I1bO6ziO4x/o/SE2WQNvyl2JJuAzNmOfCmhnmn3xu6oQX0yvbPCt4So wyJa6NuqU5bw== X-IronPort-AV: E=Sophos;i="5.78,354,1599548400"; d="scan'208";a="535003873" Received: from unknown (HELO localhost.localdomain) ([10.240.183.105]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Nov 2020 18:10:16 -0800 From: sunqin To: dts@dpdk.org Cc: sunqin Date: Fri, 20 Nov 2020 10:45:51 +0000 Message-Id: <20201120104556.27730-2-qinx.sun@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201120104556.27730-1-qinx.sun@intel.com> References: <20201120104556.27730-1-qinx.sun@intel.com> Subject: [dts] [PATCH V1 1/6] tests/iavf_fdir remove 6 cases 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" Remove 6 cases: test_maxnum_14336rules_1vf test_maxnum_14336rules_2vf test_maxnum_15360rules_1pf_2vf test_maxnum_15360rules_1pf_0_rules_vf test_stress_add_delete_rules_1vf test_stress_add_delete_rules_2vf The 6 cases have been moved to 'cvl_limit_value_test' suite Signed-off-by: sunqin --- tests/TestSuite_iavf_fdir.py | 393 ----------------------------------- 1 file changed, 393 deletions(-) diff --git a/tests/TestSuite_iavf_fdir.py b/tests/TestSuite_iavf_fdir.py index 7ee6f4a2..e53f55e8 100644 --- a/tests/TestSuite_iavf_fdir.py +++ b/tests/TestSuite_iavf_fdir.py @@ -2989,328 +2989,6 @@ class TestIAVFFdir(TestCase): self.dut.close_session(self.session_secondary) self.dut.close_session(self.session_third) - def test_maxnum_14336rules_1vf(self): - """ - vfs share 14336 rules table - """ - self.dut.kill_all() - src_file = 'create_14336_rules' - flows=open(self.src_file_dir + src_file,mode='w') - count=0 - for i in range(56): - for j in range(256): - flows.write('flow create 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 192.168.%d.%d / end actions queue index 5 / mark / end \n'%(i,j)) - count=count+1 - flows.close() - self.verify(count == 14336, "failed to create 14336 fdir rules on vf.") - self.dut.session.copy_file_to(self.src_file_dir + src_file, self.dut_file_dir) - - eal_param = "-c f -n 6 -w %s -w %s" % (self.sriov_vfs_pf0[0].pci,self.sriov_vfs_pf0[1].pci) - command = self.path + eal_param + " -- -i --rxq=%s --txq=%s" % (self.cvlq_num, self.cvlq_num) + " --cmdline-file=%s" % self.dut_file_dir + src_file - self.dut.send_expect(command, "testpmd> ", 300) - self.config_testpmd() - - # can't create more than 14336 rules on vf0 - rule_14336_vf0 = "flow create 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 192.168.56.0 / end actions queue index 5 / mark / end" - self.create_fdir_rule(rule_14336_vf0, check_stats=False) - #check there are 14336 rules created. - out = self.check_rule_number(port_id=0, num=14336) - self.verify("14336" not in out, "more than 14336 rules can be created on 1vf") - - # can't create rule on vf1 - rule_0_vf1 = "flow create 1 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 192.168.56.0 / end actions queue index 5 / mark / end" - self.create_fdir_rule(rule_0_vf1, check_stats=False) - self.check_fdir_rule(port_id=1, stats=False) - - pkt_0 = 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.0")/Raw("x" * 80)' - pkt_14335 = 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.55.255")/Raw("x" * 80)' - pkt_14336 = 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.56.0")/Raw("x" * 80)' - - # check packet match rule 0 and rule 14335 can be redirected to expected queue - out_0 = self.send_pkts_getouput(pkts=pkt_0, pf_id=0) - rfc.check_iavf_fdir_mark(out_0, pkt_num=1, check_param={"port_id": 0, "mark_id": 0, "queue": 5}, stats=True) - out_14335 = self.send_pkts_getouput(pkts=pkt_14335, pf_id=0) - rfc.check_iavf_fdir_mark(out_14335, pkt_num=1, check_param={"port_id": 0, "mark_id": 0, "queue": 5}, stats=True) - # check packet match rule 14336 can't be redirected to expected queue. - out_14336 = self.send_pkts_getouput(pkts=pkt_14336, pf_id=0) - rfc.check_iavf_fdir_mark(out_14336, pkt_num=1, check_param={"port_id": 0, "queue": 5}, stats=False) - - # delete one rule of vf0 - self.dut.send_expect("flow destroy 0 rule 0", "testpmd> ", timeout=200) - self.create_fdir_rule(rule_0_vf1, check_stats=True) - pkt_0_vf1 = 'Ether(dst="00:11:22:33:44:66")/IP(src="192.168.0.20",dst="192.168.56.0")/Raw("x" * 80)' - out_0_vf1 = self.send_pkts_getouput(pkts=pkt_0_vf1, pf_id=0) - rfc.check_iavf_fdir_mark(out_0_vf1, pkt_num=1, check_param={"port_id": 1, "mark_id": 0, "queue": 5}, stats=True) - - # flush all the rules - self.dut.send_expect("flow flush 0", "testpmd> ", timeout=200) - self.check_fdir_rule(port_id=0, stats=False) - out_0 = self.send_pkts_getouput(pkts=pkt_0, pf_id=0) - out_14335 = self.send_pkts_getouput(pkts=pkt_14335, pf_id=0) - rfc.check_iavf_fdir_mark(out_0, pkt_num=1, check_param={"port_id": 0, "mark_id": 0, "queue": 5}, stats=False) - rfc.check_iavf_fdir_mark(out_14335, pkt_num=1, check_param={"port_id": 0, "mark_id": 0, "queue": 5}, stats=False) - - self.create_fdir_rule(rule_14336_vf0, check_stats=True) - out_14336 = self.send_pkts_getouput(pkts=pkt_14336, pf_id=0) - rfc.check_iavf_fdir_mark(out_14336, pkt_num=1, check_param={"port_id": 0, "mark_id": 0, "queue": 5}, stats=True) - - def test_maxnum_14336rules_2vf(self): - """ - vfs share 14336 rules table - """ - self.dut.kill_all() - self.session_secondary = self.dut.new_session() - src_file = 'create_14336_rules_2vf' - flows=open(self.src_file_dir + src_file,mode='w') - flows.write('flow create 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 192.168.0.0 / end actions queue index 5 / mark / end \n') - count=1 - for i in range(55): - for j in range(256): - flows.write('flow create 1 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 192.168.%d.%d / end actions queue index 5 / mark / end \n'%(i,j)) - count=count+1 - for j in range(255): - flows.write('flow create 1 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 192.168.55.%d / end actions queue index 5 / mark / end \n' % j) - count=count+1 - flows.close() - self.verify(count == 14336, "failed to create 14336 fdir rules on 2 vfs.") - self.dut.session.copy_file_to(self.src_file_dir + src_file, self.dut_file_dir) - - eal_param = "-c f -n 6 -w %s -w %s" % (self.sriov_vfs_pf0[0].pci,self.sriov_vfs_pf1[0].pci) - command = self.path + eal_param + " -- -i --rxq=%s --txq=%s" % (self.cvlq_num, self.cvlq_num) + " --cmdline-file=%s" % self.dut_file_dir + src_file - self.dut.send_expect(command, "testpmd> ", 300) - - self.config_testpmd() - self.check_fdir_rule(port_id=0, rule_list=['0']) - - # can't create more than 14336 rules on 2vf - rule_14335_vf1 = "flow create 1 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 192.168.56.0 / end actions queue index 5 / mark / end" - self.create_fdir_rule(rule_14335_vf1, check_stats=False) - #check there are 14336 rules created. - out = self.check_rule_number(port_id=1, num=14335) - self.verify("14335" not in out, "more than 14336 rules are created on 2vf") - - # can't create new rule on vf0 - rule_1_vf0 = "flow create 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 192.168.56.0 / end actions queue index 5 / mark / end" - self.create_fdir_rule(rule_1_vf0, check_stats=False) - self.check_rule_number(port_id=0, num=1) - - pkt_0 = 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.0")/Raw("x" * 80)' - pkt_1 = 'Ether(dst="00:11:22:33:44:77")/IP(src="192.168.0.20",dst="192.168.0.0")/Raw("x" * 80)' - pkt_14335 = 'Ether(dst="00:11:22:33:44:77")/IP(src="192.168.0.20",dst="192.168.55.254")/Raw("x" * 80)' - pkt_14336 = 'Ether(dst="00:11:22:33:44:77")/IP(src="192.168.0.20",dst="192.168.56.0")/Raw("x" * 80)' - - self.session_secondary.send_expect("ifconfig %s up" % self.pf0_intf, "# ", 15) - self.session_secondary.send_expect("ifconfig %s up" % self.pf1_intf, "# ", 15) - time.sleep(1) - - # check packet match rule 0 and rule 14335 can be redirected to expected queue - out_0 = self.send_pkts_getouput(pkts=pkt_0, pf_id=0) - rfc.check_iavf_fdir_mark(out_0, pkt_num=1, check_param={"port_id": 0, "mark_id": 0, "queue": 5}, stats=True) - out_1 = self.send_pkts_getouput(pkts=pkt_1, pf_id=1) - rfc.check_iavf_fdir_mark(out_1, pkt_num=1, check_param={"port_id": 1, "mark_id": 0, "queue": 5}, stats=True) - - out_14335 = self.send_pkts_getouput(pkts=pkt_14335, pf_id=1) - rfc.check_iavf_fdir_mark(out_14335, pkt_num=1, check_param={"port_id": 1, "mark_id": 0, "queue": 5}, stats=True) - # check packet match rule 14336 can't be redirected to expected queue. - out_14336 = self.send_pkts_getouput(pkts=pkt_14336, pf_id=1) - rfc.check_iavf_fdir_mark(out_14336, pkt_num=1, check_param={"port_id": 1, "queue": 5}, stats=False) - - # destroy rule 0 on vf0, then create a new rule on vf1 successfully. - self.dut.send_expect("flow flush 0", "testpmd> ") - self.create_fdir_rule(rule_14335_vf1, check_stats=True) - out_14336 = self.send_pkts_getouput(pkts=pkt_14336, pf_id=1) - rfc.check_iavf_fdir_mark(out_14336, pkt_num=1, check_param={"port_id": 1, "mark_id": 0, "queue": 5}, stats=True) - - self.dut.send_expect("flow flush 1", "testpmd> ", timeout=300) - - self.check_fdir_rule(port_id=0, stats=False) - self.check_fdir_rule(port_id=1, stats=False) - - out_0 = self.send_pkts_getouput(pkts=pkt_0, pf_id=0) - out_1 = self.send_pkts_getouput(pkts=pkt_1, pf_id=1) - out_14335 = self.send_pkts_getouput(pkts=pkt_14335, pf_id=1) - rfc.check_iavf_fdir_mark(out_0, pkt_num=1, check_param={"port_id": 0, "mark_id": 0, "queue": 5}, stats=False) - rfc.check_iavf_fdir_mark(out_1, pkt_num=1, check_param={"port_id": 1, "mark_id": 0, "queue": 5}, stats=False) - rfc.check_iavf_fdir_mark(out_14335, pkt_num=1, check_param={"port_id": 1, "mark_id": 0, "queue": 5}, stats=False) - - self.dut.close_session(self.session_secondary) - - def test_maxnum_15360rules_1pf_2vf(self): - """ - 2*100G NIC, each pf can create 1024 rules at least, vfs share 14336 rules table - 4*25G NIC, each pf can create 512 rules at least, vfs share 14336 rules table - so if 2*25G NIC, max number is 14848 on 1pf and 2vfs. - """ - self.dut.kill_all() - self.session_secondary = self.dut.new_session() - - #create 1025 rules on pf1 - src_file = 'create_1025_kernel_rules' - flows=open(self.src_file_dir + src_file,mode='w') - count=0 - if self.nic in ["columbiaville_100g"]: - for i in range(4): - for j in range(256): - flows.write('ethtool -N %s flow-type tcp4 src-ip 192.168.%d.%d dst-ip 192.168.100.2 src-port 32 dst-port 33 action 8 \n' % (self.pf1_intf,i,j)) - count=count+1 - flows.write('ethtool -N %s flow-type tcp4 src-ip 192.168.100.0 dst-ip 192.168.100.2 src-port 32 dst-port 33 action 8 \n' % self.pf1_intf) - count=count+1 - flows.close() - self.verify(count == 1025, "failed to create 1025 fdir rules on pf.") - elif self.nic in ["columbiaville_25g"]: - for i in range(2): - for j in range(256): - flows.write('ethtool -N %s flow-type tcp4 src-ip 192.168.%d.%d dst-ip 192.168.100.2 src-port 32 dst-port 33 action 8 \n' % (self.pf1_intf,i,j)) - count=count+1 - flows.write('ethtool -N %s flow-type tcp4 src-ip 192.168.100.0 dst-ip 192.168.100.2 src-port 32 dst-port 33 action 8 \n' % self.pf1_intf) - count=count+1 - flows.close() - self.verify(count == 513, "failed to create 1025 fdir rules on pf.") - self.dut.session.copy_file_to(self.src_file_dir + src_file, self.dut_file_dir) - # create 1025 rules on pf1 - fkr = open(self.src_file_dir + src_file, "r+") - kernel_rules = fkr.read() - fkr.close() - self.dut.send_expect(kernel_rules, "# ") - time.sleep(15) - - #create 1 rule on vf00, and 14334 rules on vf01 - src_file_vf = 'create_14335_rules_on_2vfs' - flows = open(self.src_file_dir + src_file_vf, mode='w') - flows.write('flow create 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 192.168.0.0 / end actions queue index 5 / mark / end \n') - count=1 - for i in range(55): - for j in range(256): - flows.write('flow create 1 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 192.168.%d.%d / end actions queue index 5 / mark / end \n'%(i,j)) - count=count+1 - for j in range(254): - flows.write('flow create 1 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 192.168.55.%d / end actions queue index 5 / mark / end \n' % j) - count=count+1 - flows.close() - self.verify(count == 14335, "failed to create 14335 fdir rules on vfs.") - self.dut.session.copy_file_to(self.src_file_dir + src_file_vf, self.dut_file_dir) - - # start testpmd with creating rules in commandline - eal_param = "-c f -n 6 -w %s -w %s" % (self.sriov_vfs_pf0[0].pci,self.sriov_vfs_pf0[1].pci) - command = self.path + eal_param + " -- -i --rxq=%s --txq=%s" % (self.cvlq_num, self.cvlq_num) + " --cmdline-file=%s" % self.dut_file_dir + src_file_vf - fdw = open("15360_rules_vf_result.txt", "w") - fdw.write(self.dut.send_expect(command, "testpmd> ", 360)) - fdw.close() - - self.config_testpmd() - # check there is 1 rule created on vf00 - self.check_fdir_rule(port_id=0, rule_list=['0']) - - # can't create more than 14335 rules on 2vf, the rule index is from 0 - rule_14334_vf1 = "flow create 1 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 192.168.56.0 / end actions queue index 5 / mark / end" - pkt_14334 = 'Ether(dst="00:11:22:33:44:66")/IP(src="192.168.0.20",dst="192.168.56.0")/Raw("x" * 80)' - self.create_fdir_rule(rule_14334_vf1, check_stats=False) - - #check there are 14334 rules created on vf01 - out = self.check_rule_number(port_id=1, num=14334) - self.verify("14334" not in out, "more than 15360 rules are created on 2vf") - - # delete a rule on pf0 - self.session_secondary.send_expect("ethtool -N %s delete 14847" % self.pf1_intf, "# ") - - # then can create one more rule on vf01 - self.create_fdir_rule(rule_14334_vf1, check_stats=True) - out_14334 = self.send_pkts_getouput(pkts=pkt_14334, pf_id=0) - rfc.check_iavf_fdir_mark(out_14334, pkt_num=1, check_param={"port_id": 1, "mark_id": 0, "queue": 5}, stats=True) - - self.dut.send_expect("flow flush 0", "testpmd> ", timeout=200) - self.dut.send_expect("flow flush 1", "testpmd> ", timeout=200) - self.check_fdir_rule(port_id=0, stats=False) - self.check_fdir_rule(port_id=1, stats=False) - out_14334 = self.send_pkts_getouput(pkts=pkt_14334, pf_id=0) - rfc.check_iavf_fdir_mark(out_14334, pkt_num=1, check_param={"port_id": 1, "mark_id": 0, "queue": 5}, stats=False) - - self.dut.send_expect("quit", "# ") - self.dut.close_session(self.session_secondary) - self.re_load_ice_driver() - self.setup_2pf_4vf_env() - - def test_maxnum_15360rules_1pf_0_rules_vf(self): - """ - 2*100G NIC, each pf can create 1024 rules at least, vfs share 14336 rules table - 4*25G NIC, each pf can create 512 rules at least, vfs share 14336 rules table - so if 2*25G NIC, max number is 14848 on 1pf and vfs. - create 15360/14848 rules on pf1, check failed to create rule on vf00 and vf10 - """ - self.dut.kill_all() - self.session_secondary = self.dut.new_session() - - #create 15360 rules on pf1 - src_file = 'create_15360_kernel_rules' - flows=open(self.src_file_dir + src_file,mode='w') - count=0 - if self.nic in ["columbiaville_100g"]: - for i in range(60): - for j in range(256): - flows.write('ethtool -N %s flow-type tcp4 src-ip 192.168.%d.%d dst-ip 192.168.100.2 src-port 32 dst-port 33 action 8 \n' % (self.pf1_intf,i,j)) - count=count+1 - flows.close() - self.verify(count == 15360, "failed to create 15360 fdir rules on pf.") - elif self.nic in ["columbiaville_25g"]: - for i in range(58): - for j in range(256): - flows.write('ethtool -N %s flow-type tcp4 src-ip 192.168.%d.%d dst-ip 192.168.100.2 src-port 32 dst-port 33 action 8 \n' % (self.pf1_intf,i,j)) - count=count+1 - flows.close() - self.verify(count == 14848, "failed to create 14848 fdir rules on pf.") - self.dut.session.copy_file_to(self.src_file_dir + src_file, self.dut_file_dir) - # create 15360 rules on pf1 - fkr = open(self.src_file_dir + src_file, "r+") - kernel_rules = fkr.read() - fkr.close() - self.dut.send_expect(kernel_rules, "# ") - time.sleep(200) - # failed to create 1 more rule on pf1 - self.dut.send_expect("ethtool -N %s flow-type tcp4 src-ip 192.168.100.0 dst-ip 192.168.100.2 src-port 32 dst-port 33 action 8" % self.pf1_intf, "Cannot insert RX class rule: No space left on device") - # start testpmd with creating rules in commandline - eal_param = "-c f -n 6 -w %s -w %s" % (self.sriov_vfs_pf0[0].pci,self.sriov_vfs_pf1[0].pci) - command = self.path + eal_param + " -- -i --rxq=%s --txq=%s" % (self.cvlq_num, self.cvlq_num) - self.dut.send_expect(command, "testpmd> ", 20) - - self.config_testpmd() - rule_0_vf00 = "flow create 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 192.168.56.0 / end actions queue index 5 / mark / end" - pkt_0_vf00 = 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.56.0")/Raw("x" * 80)' - rule_0_vf10 = "flow create 1 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 192.168.56.0 / end actions queue index 5 / mark / end" - pkt_0_vf10 = 'Ether(dst="00:11:22:33:44:77")/IP(src="192.168.0.20",dst="192.168.56.0")/Raw("x" * 80)' - - #failed to create rule on vf00 and vf10 - self.create_fdir_rule(rule_0_vf00, check_stats=False) - self.create_fdir_rule(rule_0_vf10, check_stats=False) - self.check_rule_number(port_id=0, num=0) - self.check_rule_number(port_id=1, num=0) - - # delete a rule on pf1 - self.session_secondary.send_expect("ethtool -N %s delete 14847" % self.pf1_intf, "# ") - - # then can create one rule on vf00 - self.create_fdir_rule(rule_0_vf00, check_stats=True) - self.create_fdir_rule(rule_0_vf10, check_stats=False) - self.check_rule_number(port_id=0, num=1) - self.check_rule_number(port_id=1, num=0) - - # delete a rule on pf1 - self.session_secondary.send_expect("ethtool -N %s delete 14846" % self.pf1_intf, "# ") - - # then can create one rule on vf10 - self.create_fdir_rule(rule_0_vf10, check_stats=True) - self.check_rule_number(port_id=1, num=1) - - out_0_vf00 = self.send_pkts_getouput(pkts=pkt_0_vf00, pf_id=0) - rfc.check_iavf_fdir_mark(out_0_vf00, pkt_num=1, check_param={"port_id": 0, "mark_id": 0, "queue": 5}, stats=True) - - out_0_vf10 = self.send_pkts_getouput(pkts=pkt_0_vf10, pf_id=1) - rfc.check_iavf_fdir_mark(out_0_vf10, pkt_num=1, check_param={"port_id": 1, "mark_id": 0, "queue": 5}, stats=True) - - self.dut.send_expect("quit", "# ") - self.dut.close_session(self.session_secondary) - self.re_load_ice_driver() - self.setup_2pf_4vf_env() - def test_maxnum_128_profiles(self): """ There are 128 profiles in total. @@ -3390,77 +3068,6 @@ class TestIAVFFdir(TestCase): out = self.send_pkts_getouput(pkts=pkt) rfc.check_iavf_fdir_mark(out, pkt_num=1, check_param={"port_id": 0, "mark_id": 0, "queue": 1}, stats=True) - def test_stress_add_delete_rules_1vf(self): - """ - add/delete rules 14336 times on 1 vf - """ - rules = [ - "flow create 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / udp src is 22 dst is 23 / end actions queue index 6 / mark / end", - "flow create 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / tcp src is 22 dst is 23 / end actions rss queues 2 3 end / mark id 1 / end"] - pkts = [ - 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21")/UDP(sport=22,dport=23)/Raw("x" * 80)', - 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21")/TCP(sport=22,dport=23)/Raw("x" * 80)'] - self.dut.kill_all() - src_file = 'add_delete_rules_1vf' - flows=open(self.src_file_dir + src_file,mode='w') - count=0 - for i in range(14336): - flows.write('%s \n' % rules[0]) - flows.write('%s \n' % rules[1]) - flows.write('flow flush 0\n') - count=count+1 - flows.close() - self.verify(count == 14336, "failed to add/delete 14336 times of fdir rules on vf.") - self.dut.session.copy_file_to(self.src_file_dir + src_file, self.dut_file_dir) - - eal_param = "-c f -n 6 -w %s -w %s" % (self.sriov_vfs_pf0[0].pci,self.sriov_vfs_pf0[1].pci) - command = self.path + eal_param + " -- -i --rxq=%s --txq=%s" % (self.cvlq_num, self.cvlq_num) + " --cmdline-file=%s" % self.dut_file_dir + src_file - self.dut.send_expect(command, "testpmd> ", 900) - self.config_testpmd() - self.check_fdir_rule(port_id=0, stats=False) - self.create_fdir_rule(rules, check_stats=True) - out_0 = self.send_pkts_getouput(pkts=pkts[0]) - rfc.check_iavf_fdir_mark(out_0, pkt_num=1, check_param={"port_id": 0, "mark_id": 0, "queue": 6}, stats=True) - out_1 = self.send_pkts_getouput(pkts=pkts[1]) - rfc.check_iavf_fdir_mark(out_1, pkt_num=1, check_param={"port_id": 0, "mark_id": 1, "queue": [2, 3]}, stats=True) - - def test_stress_add_delete_rules_2vf(self): - """ - add/delete rules 14336 times on 2 vfs - """ - rules = [ - "flow create 0 ingress pattern eth / ipv4 src is 192.168.56.0 dst is 192.1.0.0 tos is 4 / tcp src is 22 dst is 23 / end actions queue index 5 / end", - "flow create 1 ingress pattern eth / ipv4 src is 192.168.56.0 dst is 192.1.0.0 tos is 4 / tcp src is 22 dst is 23 / end actions queue index 5 / end"] - pkts = [ - 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.56.0",dst="192.1.0.0", tos=4)/TCP(sport=22,dport=23)/Raw("x" * 80)', - 'Ether(dst="00:11:22:33:44:66")/IP(src="192.168.56.0",dst="192.1.0.0", tos=4)/TCP(sport=22,dport=23)/Raw("x" * 80)'] - self.dut.kill_all() - src_file = 'add_delete_rules_2vfs' - flows=open(self.src_file_dir + src_file,mode='w') - count=0 - for i in range(14336): - flows.write('%s \n' % rules[0]) - flows.write('%s \n' % rules[1]) - flows.write('flow flush 0\n') - flows.write('flow flush 1\n') - count=count+1 - flows.close() - self.verify(count == 14336, "failed to add/delete 14336 times of fdir rules on 2 vfs.") - self.dut.session.copy_file_to(self.src_file_dir + src_file, self.dut_file_dir) - - eal_param = "-c f -n 6 -w %s -w %s" % (self.sriov_vfs_pf0[0].pci,self.sriov_vfs_pf0[1].pci) - command = self.path + eal_param + " -- -i --rxq=%s --txq=%s" % (self.cvlq_num, self.cvlq_num) + " --cmdline-file=%s" % self.dut_file_dir + src_file - self.dut.send_expect(command, "testpmd> ", 900) - self.config_testpmd() - self.check_fdir_rule(port_id=0, stats=False) - self.check_fdir_rule(port_id=1, stats=False) - - self.create_fdir_rule(rules, check_stats=True) - out_0 = self.send_pkts_getouput(pkts=pkts[0], pf_id=0) - rfc.check_iavf_fdir_mark(out_0, pkt_num=1, check_param={"port_id": 0, "queue": 5}, stats=True) - out_1 = self.send_pkts_getouput(pkts=pkts[1], pf_id=0) - rfc.check_iavf_fdir_mark(out_1, pkt_num=1, check_param={"port_id": 1, "queue": 5}, stats=True) - def test_stress_delete_rules(self): """ delete 1st/2nd/last rule won't affect other rules -- 2.17.1