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 CF07BA0350; Sun, 28 Jun 2020 09:20:06 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 928D31C1B7; Sun, 28 Jun 2020 09:20:06 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 5C7C61C1B6 for ; Sun, 28 Jun 2020 09:20:05 +0200 (CEST) IronPort-SDR: xBILFynffs7ZpHWL/gKsHS2V4/LsVAlQeCbyOi04aaNQ/qEwbXLYmtVPXQgQqFWenS1sYM6X1c PmEYi3be0CPQ== X-IronPort-AV: E=McAfee;i="6000,8403,9665"; a="143994180" X-IronPort-AV: E=Sophos;i="5.75,290,1589266800"; d="scan'208";a="143994180" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Jun 2020 00:20:04 -0700 IronPort-SDR: owFEskcf74zg6xIvMiCw6tm/MEq4ILM/h/uNqhACOUDTIhs+c6zKsrDeH5eDlQbHG1jFRg5B7P hSXNBMaVodJg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,290,1589266800"; d="scan'208";a="264564408" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by fmsmga007.fm.intel.com with ESMTP; 28 Jun 2020 00:20:04 -0700 Received: from fmsmsx111.amr.corp.intel.com (10.18.116.5) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.439.0; Sun, 28 Jun 2020 00:20:04 -0700 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by fmsmsx111.amr.corp.intel.com (10.18.116.5) with Microsoft SMTP Server (TLS) id 14.3.439.0; Sun, 28 Jun 2020 00:20:03 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.85]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.174]) with mapi id 14.03.0439.000; Sun, 28 Jun 2020 15:20:00 +0800 From: "Tu, Lijuan" To: "Xiao, QimaiX" , "dts@dpdk.org" CC: "Xiao, QimaiX" Thread-Topic: [dts] [PATCH V4]tests/TestSuite_cvl_fdir: update cvl pf max supported rules Thread-Index: AQHWSTko7h2NX0N9yUaf1chpfGvKFqjtppZw Date: Sun, 28 Jun 2020 07:20:00 +0000 Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BC65A7A@SHSMSX101.ccr.corp.intel.com> References: <1592900782-288737-1-git-send-email-qimaix.xiao@intel.com> In-Reply-To: <1592900782-288737-1-git-send-email-qimaix.xiao@intel.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="iso-2022-jp" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [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" Applied, thanks -----Original Message----- From: dts On Behalf Of Xiao Qimai Sent: 2020=1B$BG/=1B(B6=1B$B7n=1B(B23=1B$BF|=1B(B 16:26 To: dts@dpdk.org Cc: Xiao, QimaiX Subject: [dts] [PATCH V4]tests/TestSuite_cvl_fdir: update cvl pf max suppor= ted rules *. 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 inde= x 12d9ad8..3456830 100644 --- a/tests/TestSuite_cvl_fdir.py +++ b/tests/TestSuite_cvl_fdir.py @@ -1722,7 +1722,7 @@ class TestCVLFdir(TestCase): =20 def test_void_action(self): rule =3D "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 a= ctions end" - self.create_fdir_rule(rule, check_stats=3DFalse, msg=3D"Invalid in= put action: Invalid argument") + self.create_fdir_rule(rule, check_stats=3DFalse) self.check_fdir_rule(stats=3DFalse) =20 def _test_unsupported_action(self): @@ -2068,6 +2068,11 @@ class TestCVLFdir(TestCase): self.check_fdir_rule(port_id=3D0, stats=3DTrue, rule_list=3Drule_l= i) out2 =3D self.send_pkts_getouput(pkts=3Dpkt, port_id=3D0, count=3D= 1) rfc.check_mark(out2, pkt_num=3D1, check_param=3D{"port_id": 0, "qu= eue": 1, "mark_id": 0}, stats=3DTrue) + rule2 =3D '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 inde= x 2 / mark id 1 / end' + rule_li2 =3D self.create_fdir_rule(rule=3Drule2, check_stats=3DTru= e) + self.check_fdir_rule(rule_list=3Drule_li+rule_li2) + out3 =3D self.send_pkts_getouput(pkts=3D'Ether(dst=3D"00:11:22:33:= 44:55")/IP(src=3D"192.168.0.22",dst=3D"192.168.0.23") / Raw("x" * 80)', por= t_id=3D0, count=3D1) + rfc.check_mark(out3, pkt_num=3D1, check_param=3D{"port_id": 0,=20 + "queue": 2, "mark_id": 1}, stats=3DTrue) =20 def test_add_delete_rules(self): self.pmd_output.execute_cmd("stop") @@ -2157,10 +2162,29 @@ class TestCVLFdir(TestCase): rules =3D list() pkt_pattern =3D 'Ether(dst=3D"00:11:22:33:44:55")/IP(src=3D"192.16= 8.100.20",dst=3D"192.168.%d.%d")/Raw("x" * 80)' pkts2 =3D 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 =3D list(map(str, range(15360))) + pkts =3D ['Ether(dst=3D"00:11:22:33:44:55")/IP(src=3D"192.168.= 100.20",dst=3D"192.168.0.0")/Raw("x" * 80)', + 'Ether(dst=3D"00:11:22:33:44:55")/IP(src=3D"192.168.10= 0.20",dst=3D"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 =3D list(map(str, range(14848))) + pkts =3D ['Ether(dst=3D"00:11:22:33:44:55")/IP(src=3D"192.168.= 100.20",dst=3D"192.168.0.0")/Raw("x" * 80)', + 'Ether(dst=3D"00:11:22:33:44:55")/IP(src=3D"192.168.10= 0.20",dst=3D"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 =3D '/tmp/test_max_rules' cmd_li =3D 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=3D"-w %s,flow-ma= rk-support=3D1 -w %s,flow-mark-support=3D1" % ( self.pci0, self.pci1),= socket=3Dself.ports_socket) - self.verify('Failed to create file' not in out, "create some r= ule failed: %s" % out) + self.verify('Failed to create flow' not in out, "create=20 + some rule failed") self.config_testpmd() self.pmd_output.execute_cmd('start') rule =3D "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=3Drule, check_stats=3DFalse, msg=3D= 'Failed to create flow', validate=3DFalse) - rule_li =3D list(map(str, range(15360))) self.check_fdir_rule(port_id=3D0, stats=3DTrue, rule_list=3Dru= le_li) - pkts =3D ['Ether(dst=3D"00:11:22:33:44:55")/IP(src=3D"192.168.= 100.20",dst=3D"192.168.0.0")/Raw("x" * 80)', - 'Ether(dst=3D"00:11:22:33:44:55")/IP(src=3D"192.168.10= 0.20",dst=3D"192.168.59.255")/Raw("x" * 80)'] out1 =3D self.send_pkts_getouput(pkts=3Dpkts, port_id=3D0, cou= nt=3D1) rfc.check_mark(out1, pkt_num=3D2, check_param=3D{"port_id": 0,= "queue": 1, "mark_id": 0}, stats=3DTrue) self.pmd_output.execute_cmd("flow flush 0") -- 1.8.3.1