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 B30AEA0350; Tue, 23 Jun 2020 10:34:30 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 783BB1D584; Tue, 23 Jun 2020 10:34:30 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 3E3DA1D580 for ; Tue, 23 Jun 2020 10:34:28 +0200 (CEST) IronPort-SDR: BUmMPE5J6EbMe2HZ6HvHnQQG4h1gakoYkPcrz9KGrhRom/0McdF34cGJ5aiVG7mf1XG1pEw/z6 mm9jSWqSQO2w== X-IronPort-AV: E=McAfee;i="6000,8403,9660"; a="228673488" X-IronPort-AV: E=Sophos;i="5.75,270,1589266800"; d="scan'208";a="228673488" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Jun 2020 01:34:27 -0700 IronPort-SDR: LcJp8lcWWk0BI7EXeJEB7apxYentDTRx9FdGNtIIlbAhj8PhWAnchBDFShHT2Ly8trB2vZikAJ MViKd0PjsLzQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,270,1589266800"; d="scan'208";a="293131769" Received: from unknown (HELO xqm-virtio_tester.localdomain) ([10.240.183.52]) by orsmga002.jf.intel.com with ESMTP; 23 Jun 2020 01:34:25 -0700 From: Xiao Qimai To: dts@dpdk.org Cc: Xiao Qimai Date: Tue, 23 Jun 2020 16:26:22 +0800 Message-Id: <1592900782-288737-1-git-send-email-qimaix.xiao@intel.com> X-Mailer: git-send-email 1.8.3.1 Subject: [dts] [PATCH V4]tests/TestSuite_cvl_fdir: update cvl pf max supported rules 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" *. v4 update description of max supported fdir rules Signed-off-by: Xiao Qimai --- tests/TestSuite_cvl_fdir.py | 39 ++++++++++++++++++++++++++++++--------- 1 file changed, 30 insertions(+), 9 deletions(-) diff --git a/tests/TestSuite_cvl_fdir.py b/tests/TestSuite_cvl_fdir.py index 12d9ad8..3456830 100644 --- a/tests/TestSuite_cvl_fdir.py +++ b/tests/TestSuite_cvl_fdir.py @@ -1722,7 +1722,7 @@ class TestCVLFdir(TestCase): def test_void_action(self): rule = "flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / end actions end" - self.create_fdir_rule(rule, check_stats=False, msg="Invalid input action: Invalid argument") + self.create_fdir_rule(rule, check_stats=False) self.check_fdir_rule(stats=False) def _test_unsupported_action(self): @@ -2068,6 +2068,11 @@ class TestCVLFdir(TestCase): self.check_fdir_rule(port_id=0, stats=True, rule_list=rule_li) out2 = self.send_pkts_getouput(pkts=pkt, port_id=0, count=1) rfc.check_mark(out2, pkt_num=1, check_param={"port_id": 0, "queue": 1, "mark_id": 0}, stats=True) + rule2 = 'flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is 192.168.0.22 dst is 192.168.0.23 / end actions queue index 2 / mark id 1 / end' + rule_li2 = self.create_fdir_rule(rule=rule2, check_stats=True) + self.check_fdir_rule(rule_list=rule_li+rule_li2) + out3 = self.send_pkts_getouput(pkts='Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.22",dst="192.168.0.23") / Raw("x" * 80)', port_id=0, count=1) + rfc.check_mark(out3, pkt_num=1, check_param={"port_id": 0, "queue": 2, "mark_id": 1}, stats=True) def test_add_delete_rules(self): self.pmd_output.execute_cmd("stop") @@ -2157,10 +2162,29 @@ class TestCVLFdir(TestCase): rules = list() pkt_pattern = 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.100.20",dst="192.168.%d.%d")/Raw("x" * 80)' pkts2 = list() - for i in range(60): - for j in range(256): - rules.append(rule_pattern % (i, j)) - pkts2.append(pkt_pattern % (i, j)) + # each pf can create 1024 rules at least in 2 ports card + # each pf can create 512 rules at least in 4 ports card + # and there are 14k rules shared by pfs and vfs + # so 1 pf and 2 vfs can create 15360 rules at most on 2 ports card + # 1 pf and 2 vfs can create 14848 rules at most on 4 ports card + if self.nic in ['columbiaville_100g']: + rule_li = list(map(str, range(15360))) + pkts = ['Ether(dst="00:11:22:33:44:55")/IP(src="192.168.100.20",dst="192.168.0.0")/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.100.20",dst="192.168.59.255")/Raw("x" * 80)'] + for i in range(60): + for j in range(256): + rules.append(rule_pattern % (i, j)) + pkts2.append(pkt_pattern % (i, j)) + elif self.nic in ['columbiaville_25g']: + rule_li = list(map(str, range(14848))) + pkts = ['Ether(dst="00:11:22:33:44:55")/IP(src="192.168.100.20",dst="192.168.0.0")/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.100.20",dst="192.168.57.255")/Raw("x" * 80)'] + for i in range(58): + for j in range(256): + rules.append(rule_pattern % (i, j)) + pkts2.append(pkt_pattern % (i, j)) + else: + raise Exception('%s not supported by this case' % self.nic) cmd_path = '/tmp/test_max_rules' cmd_li = map(lambda x: x + os.linesep, rules) with open(cmd_path, 'w') as f: @@ -2174,15 +2198,12 @@ class TestCVLFdir(TestCase): self.portMask, 64, 64, cmd_path), eal_param="-w %s,flow-mark-support=1 -w %s,flow-mark-support=1" % ( self.pci0, self.pci1), socket=self.ports_socket) - self.verify('Failed to create file' not in out, "create some rule failed: %s" % out) + self.verify('Failed to create flow' not in out, "create some rule failed") self.config_testpmd() self.pmd_output.execute_cmd('start') rule = "flow create 0 ingress pattern eth / ipv4 src is 192.168.100.20 dst is 192.168.60.0 / end actions queue index 1 / mark / end" self.create_fdir_rule(rule=rule, check_stats=False, msg='Failed to create flow', validate=False) - rule_li = list(map(str, range(15360))) self.check_fdir_rule(port_id=0, stats=True, rule_list=rule_li) - pkts = ['Ether(dst="00:11:22:33:44:55")/IP(src="192.168.100.20",dst="192.168.0.0")/Raw("x" * 80)', - 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.100.20",dst="192.168.59.255")/Raw("x" * 80)'] out1 = self.send_pkts_getouput(pkts=pkts, port_id=0, count=1) rfc.check_mark(out1, pkt_num=2, check_param={"port_id": 0, "queue": 1, "mark_id": 0}, stats=True) self.pmd_output.execute_cmd("flow flush 0") -- 1.8.3.1