From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 184EBFB52 for ; Thu, 19 Jan 2017 07:08:57 +0100 (CET) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga105.fm.intel.com with ESMTP; 18 Jan 2017 22:08:56 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,252,1477983600"; d="scan'208";a="924234774" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga003.jf.intel.com with ESMTP; 18 Jan 2017 22:08:56 -0800 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.248.2; Wed, 18 Jan 2017 22:08:56 -0800 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by fmsmsx111.amr.corp.intel.com (10.18.116.5) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 18 Jan 2017 22:08:55 -0800 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.20]) by SHSMSX104.ccr.corp.intel.com ([10.239.4.70]) with mapi id 14.03.0248.002; Thu, 19 Jan 2017 14:08:54 +0800 From: "Liu, Yong" To: "Xu, HuilongX" , "dts@dpdk.org" CC: "Xu, HuilongX" Thread-Topic: [dts] [patch V1 2/2] add fdir test case code Thread-Index: AQHScKBU1w4RHDv8XkK9QJTbbqGowqE/U36w Date: Thu, 19 Jan 2017 06:08:54 +0000 Message-ID: <86228AFD5BCD8E4EBFD2B90117B5E81E62D4D75D@SHSMSX103.ccr.corp.intel.com> References: <1484643736-48250-1-git-send-email-huilongx.xu@intel.com> <1484643736-48250-2-git-send-email-huilongx.xu@intel.com> In-Reply-To: <1484643736-48250-2-git-send-email-huilongx.xu@intel.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dts] [patch V1 2/2] add fdir test case code 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: , X-List-Received-Date: Thu, 19 Jan 2017 06:08:59 -0000 Huilong, One comment, some code look like unaligned here. Please check it. > -----Original Message----- > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of xu,huilong > Sent: Tuesday, January 17, 2017 5:02 PM > To: dts@dpdk.org > Cc: Xu, HuilongX > Subject: [dts] [patch V1 2/2] add fdir test case code >=20 > update list: > 1. update send_and_verify function for support check designated queue 2.= add > fdir_tos_proto_ttl, fdir_ipv6_tc, fdir_ivlan test case >=20 > Signed-off-by: xu,huilong > --- > tests/TestSuite_fdir.py | 347 > +++++++++++++++++++++++++++++++++++++++++++++++- > 1 file changed, 346 insertions(+), 1 deletion(-) >=20 > diff --git a/tests/TestSuite_fdir.py b/tests/TestSuite_fdir.py index > aa0ec52..946a060 100644 > --- a/tests/TestSuite_fdir.py > +++ b/tests/TestSuite_fdir.py > @@ -64,7 +64,7 @@ class TestFdir(TestCase, IxiaPacketGenerator): > # >=20 > ################################################################# > ########## >=20 > - def send_and_verify(self, condition, packet): > + def send_and_verify(self, condition, packet, queueid =3D -2): > """ > Send packages and verify behavior. > """ > @@ -89,6 +89,8 @@ class TestFdir(TestCase, IxiaPacketGenerator): > self.queue =3D 0 > else: > self.queue =3D -1 > + else: > + self.queue =3D queueid >=20 > result_scanner =3D r"port ([0-9]+)/queue ([0-9]+): received = ([0-9]+) > packets\s*src=3D[A-F\d]{2}:[A-F\d]{2}:[A-F\d]{2}:[A-F\d]{2}:[A-F\d]{2}:[A= -F\d]{2} - > dst=3D[A-F\d]{2}:[A-F\d]{2}:[A-F\d]{2}:[A-F\d]{2}:[A-F\d]{2}:[A-F\d]{2}" > scanner =3D re.compile(result_scanner, re.DOTALL) @@ -763,6 = +765,349 > @@ class TestFdir(TestCase, IxiaPacketGenerator): > self.send_and_verify(True, 'sendp([Ether(src=3Dget_if_hwaddr= ("%s"), > dst=3D"00:1B:21:8E:B2:30")/IPv6(src=3D"FE80:0:0:0:200:1FF:FE00:200", > dst=3D"3555:5555:6666:6666:7777:7777:8888:8888", > nh=3D44)/IPv6ExtHdrFragment()/Raw(load=3D"%s")], iface=3D"%s")' % > (self.dut_rx_interface, self.payload, self.dut_rx_interface)) >=20 > self.dut.send_expect("quit", "# ", 30) > + def test_ipv4_tos_proto_ttl(self): > + """ > + Expand Flow Director for fortville to support ipv4 TOS, ipv4 PRO= TO, ipv4 > TTL > + """ > + if not self.nic in ["fortville_eagle", "fortville_spirit", > "fortville_spirit_single"]: > + self.verify(False, "This case only support fortville nic") > + self.dut.kill_all() > + self.dut.send_expect("./%s/app/testpmd -c %s -n 4 -- -i --portma= sk=3D%s -- > disable-rss --rxq=3D4 --txq=3D4 --nb-cores=3D4 --nb-ports=3D1 --pkt-filte= r-mode=3Dperfect" % > (self.target, self.coreMask, utils.create_mask([self.dut_ports[0]])), "te= stpmd>", > 120) > + self.dut.send_expect("set verbose 1", "testpmd>") > + self.dut.send_expect("set fwd rxonly", "testpmd>") > + > + self.fdir_set_rule() > + self.fdir_get_flexbytes() > + # fwd comand testing > + self.fdir_type =3D " " > + self.dut.send_expect("set_fdir_input_set %d ipv4-other none sele= ct" % > self.dut_ports[0], "testpmd>") > + self.dut.send_expect("set_fdir_input_set %d ipv4-other src-ipv4 = add" % > self.dut_ports[0], "testpmd>") > + self.dut.send_expect("set_fdir_input_set %d ipv4-other dst-ipv4 > + add" % self.dut_ports[0], "testpmd>") > + > + # test add and remove tso rule > + self.dut.send_expect("set_fdir_input_set %d ipv4-other ipv4-tos = add" % > self.dut_ports[0], "testpmd>") > + self.dut.send_expect("flow_director_filter %d mode IP add flow i= pv4-other > src 192.168.1.1 dst 192.168.1.2 \ > + tos 16 proto 255 ttl 255 vlan 0 flexbytes = (%s) fwd pf queue 1 > fd_id 1" > + % (self.dut_ports[0], self.flexbytes), "te= stpmd>") > + self.dut.send_expect("flow_director_filter %d mode IP add flow i= pv4-other > src 192.168.1.1 dst 192.168.1.2 \ > + tos 8 proto 255 ttl 255 vlan 0 flexbytes (= %s) fwd pf queue 2 > fd_id 2" > + % (self.dut_ports[0], self.flexbytes), > + "testpmd>") > + > + self.send_and_verify(True, 'sendp([Ether(src=3Dget_if_hwaddr("%s= "), > dst=3D"00:1B:21:8E:B2:30") \ > + /IP(src=3D"192.168.1.1", dst=3D"192.168.1.2= ", tos=3D16, proto=3D255, > ttl=3D255) \ > + /Raw(load=3D"%s")], iface=3D"%s")' \ > + % (self.dut_rx_interface, self.payload, sel= f.dut_rx_interface), > queueid =3D 1) > + self.send_and_verify(True, 'sendp([Ether(src=3Dget_if_hwaddr("%s= "), > dst=3D"00:1B:21:8E:B2:30") \ > + /IP(src=3D"192.168.1.1", dst=3D"192.168.1.2= ", tos=3D8, proto=3D255, > ttl=3D255) \ > + /Raw(load=3D"%s")], iface=3D"%s")' \ > + % (self.dut_rx_interface, self.payload, > + self.dut_rx_interface), queueid =3D 2) This code look like unaligned here, please check. > + > + self.dut.send_expect("flow_director_filter %d mode IP del flow i= pv4-other > src 192.168.1.1 dst 192.168.1.2 \ > + tos 16 proto 255 ttl 255 vlan 0 flexbytes = (%s) fwd pf queue 1 > fd_id 1" > + % (self.dut_ports[0], self.flexbytes), "te= stpmd>") > + self.dut.send_expect("flow_director_filter %d mode IP del flow i= pv4-other > src 192.168.1.1 dst 192.168.1.2 \ > + tos 8 proto 255 ttl 255 vlan 0 flexbytes (= %s) fwd pf queue 2 > fd_id 2" > + % (self.dut_ports[0], self.flexbytes), > + "testpmd>") > + > + self.send_and_verify(True, 'sendp([Ether(src=3Dget_if_hwaddr("%s= "), > dst=3D"00:1B:21:8E:B2:30") \ > + /IP(src=3D"192.168.1.1", dst=3D"192.168.1.2= ", tos=3D16, proto=3D255, > ttl=3D255) \ > + /Raw(load=3D"%s")], iface=3D"%s")' \ > + % (self.dut_rx_interface, self.payload, sel= f.dut_rx_interface), > queueid =3D 0) > + self.send_and_verify(True, 'sendp([Ether(src=3Dget_if_hwaddr("%s= "), > dst=3D"00:1B:21:8E:B2:30") \ > + /IP(src=3D"192.168.1.1", dst=3D"192.168.1.2= ", tos=3D8, proto=3D255, > ttl=3D255) \ > + /Raw(load=3D"%s")], iface=3D"%s")' \ > + % (self.dut_rx_interface, self.payload, > + self.dut_rx_interface), queueid =3D 0) > + > + # test add and remove proto reul > + self.dut.send_expect("set_fdir_input_set %d ipv4-other ipv4-prot= o add" % > self.dut_ports[0], "testpmd>") > + self.dut.send_expect("flow_director_filter %d mode IP add flow i= pv4-other > src 192.168.1.1 dst 192.168.1.2 \ > + tos 16 proto 253 ttl 255 vlan 0 flexbytes = (%s) fwd pf queue 1 > fd_id 1" > + % (self.dut_ports[0], self.flexbytes), "te= stpmd>") > + self.dut.send_expect("flow_director_filter %d mode IP add flow i= pv4-other > src 192.168.1.1 dst 192.168.1.2 \ > + tos 16 proto 254 ttl 255 vlan 0 flexbytes = (%s) fwd pf queue 2 > fd_id 2" > + % (self.dut_ports[0], self.flexbytes), > + "testpmd>") > + > + self.send_and_verify(True, 'sendp([Ether(src=3Dget_if_hwaddr("%s= "), > dst=3D"00:1B:21:8E:B2:30") \ > + /IP(src=3D"192.168.1.1", dst=3D"192.168.1.2= ", tos=3D16, proto=3D253, > ttl=3D255) \ > + /Raw(load=3D"%s")], iface=3D"%s")' \ > + % (self.dut_rx_interface, self.payload, sel= f.dut_rx_interface), > queueid =3D 1) > + self.send_and_verify(True, 'sendp([Ether(src=3Dget_if_hwaddr("%s= "), > dst=3D"00:1B:21:8E:B2:30") \ > + /IP(src=3D"192.168.1.1", dst=3D"192.168.1.2= ", tos=3D16, proto=3D254, > ttl=3D255) \ > + /Raw(load=3D"%s")], iface=3D"%s")' \ > + % (self.dut_rx_interface, self.payload, > + self.dut_rx_interface), queueid =3D 2) > + > + self.dut.send_expect("flow_director_filter %d mode IP del flow i= pv4-other > src 192.168.1.1 dst 192.168.1.2 \ > + tos 16 proto 253 ttl 255 vlan 0 flexbytes = (%s) fwd pf queue 1 > fd_id 1" > + % (self.dut_ports[0], self.flexbytes), "te= stpmd>") > + self.dut.send_expect("flow_director_filter %d mode IP del flow i= pv4-other > src 192.168.1.1 dst 192.168.1.2 \ > + tos 16 proto 254 ttl 255 vlan 0 flexbytes = (%s) fwd pf queue 2 > fd_id 2" > + % (self.dut_ports[0], self.flexbytes), > + "testpmd>") > + > + self.send_and_verify(True, 'sendp([Ether(src=3Dget_if_hwaddr("%s= "), > dst=3D"00:1B:21:8E:B2:30") \ > + /IP(src=3D"192.168.1.1", dst=3D"192.168.1.2= ", tos=3D16, proto=3D253, > ttl=3D255) \ > + /Raw(load=3D"%s")], iface=3D"%s")' \ > + % (self.dut_rx_interface, self.payload, sel= f.dut_rx_interface), > queueid =3D 0) > + self.send_and_verify(True, 'sendp([Ether(src=3Dget_if_hwaddr("%s= "), > dst=3D"00:1B:21:8E:B2:30") \ > + /IP(src=3D"192.168.1.1", dst=3D"192.168.1.2= ", tos=3D16, proto=3D254, > ttl=3D255) \ > + /Raw(load=3D"%s")], iface=3D"%s")' \ > + % (self.dut_rx_interface, self.payload, > + self.dut_rx_interface), queueid =3D 0) > + > + # test add and remove ttl rule > + self.dut.send_expect("set_fdir_input_set %d ipv4-other ipv4-ttl = add" % > self.dut_ports[0], "testpmd>") > + self.dut.send_expect("flow_director_filter %d mode IP add flow i= pv4-other > src 192.168.1.1 dst 192.168.1.2 \ > + tos 16 proto 255 ttl 32 vlan 0 flexbytes (= %s) fwd pf queue 1 > fd_id 1" > + % (self.dut_ports[0], self.flexbytes), "te= stpmd>") > + self.dut.send_expect("flow_director_filter %d mode IP add flow i= pv4-other > src 192.168.1.1 dst 192.168.1.2 \ > + tos 16 proto 255 ttl 64 vlan 0 flexbytes (= %s) fwd pf queue 2 > fd_id 2" > + % (self.dut_ports[0], self.flexbytes), > + "testpmd>") > + > + self.send_and_verify(True, 'sendp([Ether(src=3Dget_if_hwaddr("%s= "), > dst=3D"00:1B:21:8E:B2:30") \ > + /IP(src=3D"192.168.1.1", dst=3D"192.168.1.2= ", tos=3D16, proto=3D255, > ttl=3D32) \ > + /Raw(load=3D"%s")], iface=3D"%s")' \ > + % (self.dut_rx_interface, self.payload, sel= f.dut_rx_interface), > queueid =3D 1) > + self.send_and_verify(True, 'sendp([Ether(src=3Dget_if_hwaddr("%s= "), > dst=3D"00:1B:21:8E:B2:30") \ > + /IP(src=3D"192.168.1.1", dst=3D"192.168.1.2= ", tos=3D16, proto=3D255, > ttl=3D64) \ > + /Raw(load=3D"%s")], iface=3D"%s")' \ > + % (self.dut_rx_interface, self.payload, > + self.dut_rx_interface), queueid =3D 2) > + > + self.dut.send_expect("flow_director_filter %d mode IP del flow i= pv4-other > src 192.168.1.1 dst 192.168.1.2 \ > + tos 16 proto 255 ttl 32 vlan 0 flexbytes (= %s) fwd pf queue 1 > fd_id 1" > + % (self.dut_ports[0], self.flexbytes), "te= stpmd>") > + self.dut.send_expect("flow_director_filter %d mode IP del flow i= pv4-other > src 192.168.1.1 dst 192.168.1.2 \ > + tos 16 proto 255 ttl 64 vlan 0 flexbytes (= %s) fwd pf queue 2 > fd_id 2" > + % (self.dut_ports[0], self.flexbytes), > + "testpmd>") > + > + self.send_and_verify(True, 'sendp([Ether(src=3Dget_if_hwaddr("%s= "), > dst=3D"00:1B:21:8E:B2:30") \ > + /IP(src=3D"192.168.1.1", dst=3D"192.168.1.2= ", tos=3D16, proto=3D255, > ttl=3D32) \ > + /Raw(load=3D"%s")], iface=3D"%s")' \ > + % (self.dut_rx_interface, self.payload, sel= f.dut_rx_interface), > queueid =3D 0) > + self.send_and_verify(True, 'sendp([Ether(src=3Dget_if_hwaddr("%s= "), > dst=3D"00:1B:21:8E:B2:30") \ > + /IP(src=3D"192.168.1.1", dst=3D"192.168.1.2= ", tos=3D16, proto=3D255, > ttl=3D64) \ > + /Raw(load=3D"%s")], iface=3D"%s")' \ > + % (self.dut_rx_interface, self.payload, > + self.dut_rx_interface), queueid =3D 0) > + > + def test_fdir_ipv6_tc(self): > + """ > + Expand Flow Director for fortville to support ipv6 TC, next-head= er, hop- > limits > + """ > + if not self.nic in ["fortville_eagle", "fortville_spirit", > "fortville_spirit_single"]: > + self.verify(False, "This case only support fortville nic") > + self.dut.kill_all() > + self.dut.send_expect("./%s/app/testpmd -c %s -n 4 -- -i --portma= sk=3D%s -- > disable-rss --rxq=3D4 --txq=3D4 --nb-cores=3D4 --nb-ports=3D1 --pkt-filte= r-mode=3Dperfect" % > (self.target, self.coreMask, utils.create_mask([self.dut_ports[0]])), "te= stpmd>", > 120) > + self.dut.send_expect("set verbose 1", "testpmd>") > + self.dut.send_expect("set fwd rxonly", "testpmd>") > + > + self.fdir_set_rule() > + self.fdir_get_flexbytes() > + # fwd comand testing > + self.fdir_type =3D " " > + self.dut.send_expect("set_fdir_input_set %d ipv6-other none sele= ct" % > self.dut_ports[0], "testpmd>") > + self.dut.send_expect("set_fdir_input_set %d ipv6-other src-ipv6 = add" % > self.dut_ports[0], "testpmd>") > + self.dut.send_expect("set_fdir_input_set %d ipv6-other dst-ipv6 > + add" % self.dut_ports[0], "testpmd>") > + > + # test add and remove ipv6 tc reul > + self.dut.send_expect("set_fdir_input_set %d ipv6-other ipv6-tc a= dd" % > self.dut_ports[0], "testpmd>") > + self.dut.send_expect("flow_director_filter %d mode IP add flow i= pv6-other > src 2000::1 dst 2000::2 \ > + tos 16 proto 255 ttl 255 vlan 0 flexbytes = (%s) fwd pf queue 1 > fd_id 1" > + % (self.dut_ports[0], self.flexbytes), "te= stpmd>") > + self.dut.send_expect("flow_director_filter %d mode IP add flow i= pv6-other > src 2000::1 dst 2000::2 \ > + tos 8 proto 255 ttl 255 vlan 0 flexbytes (= %s) fwd pf queue 2 > fd_id 2" > + % (self.dut_ports[0], self.flexbytes), > + "testpmd>") > + > + self.send_and_verify(True, 'sendp([Ether(src=3Dget_if_hwaddr("%s= "), > dst=3D"00:1B:21:8E:B2:30") \ > + /IPv6(src=3D"2000::1", dst=3D"2000::2", tc= =3D16, nh=3D255, hlim=3D64) \ > + /Raw(load=3D"%s")], iface=3D"%s")' \ > + % (self.dut_rx_interface, self.payload, sel= f.dut_rx_interface), > queueid =3D 1) > + self.send_and_verify(True, 'sendp([Ether(src=3Dget_if_hwaddr("%s= "), > dst=3D"00:1B:21:8E:B2:30") \ > + /IPv6(src=3D"2000::1", dst=3D"2000::2", tc= =3D8, nh=3D255, hlim=3D64) \ > + /Raw(load=3D"%s")], iface=3D"%s")' \ > + % (self.dut_rx_interface, self.payload, > + self.dut_rx_interface), queueid =3D 2) > + > + self.dut.send_expect("flow_director_filter %d mode IP del flow i= pv6-other > src 2000::1 dst 2000::2 \ > + tos 16 proto 255 ttl 255 vlan 0 flexbytes = (%s) fwd pf queue 1 > fd_id 1" > + % (self.dut_ports[0], self.flexbytes), "te= stpmd>") > + self.dut.send_expect("flow_director_filter %d mode IP del flow i= pv6-other > src 2000::1 dst 2000::2 \ > + tos 8 proto 255 ttl 255 vlan 0 flexbytes (= %s) fwd pf queue 2 > fd_id 2" > + % (self.dut_ports[0], self.flexbytes), > + "testpmd>") > + > + self.send_and_verify(True, 'sendp([Ether(src=3Dget_if_hwaddr("%s= "), > dst=3D"00:1B:21:8E:B2:30") \ > + /IPv6(src=3D"2000::1", dst=3D"2000::2", tc= =3D16, nh=3D255, hlim=3D64) \ > + /Raw(load=3D"%s")], iface=3D"%s")' \ > + % (self.dut_rx_interface, self.payload, sel= f.dut_rx_interface), > queueid =3D 0) > + self.send_and_verify(True, 'sendp([Ether(src=3Dget_if_hwaddr("%s= "), > dst=3D"00:1B:21:8E:B2:30") \ > + /IPv6(src=3D"2000::1", dst=3D"2000::2", tc= =3D8, nh=3D255, hlim=3D255) \ > + /Raw(load=3D"%s")], iface=3D"%s")' \ > + % (self.dut_rx_interface, self.payload, > + self.dut_rx_interface), queueid =3D 0) > + > + # test add and remove pv6-next-header reul > + self.dut.send_expect("set_fdir_input_set %d ipv6-other ipv6-next= -header > add" % self.dut_ports[0], "testpmd>") > + self.dut.send_expect("flow_director_filter %d mode IP add flow i= pv6-other > src 2000::1 dst 2000::2 \ > + tos 16 proto 253 ttl 255 vlan 0 flexbytes = (%s) fwd pf queue 1 > fd_id 1" > + % (self.dut_ports[0], self.flexbytes), "te= stpmd>") > + self.dut.send_expect("flow_director_filter %d mode IP add flow i= pv6-other > src 2000::1 dst 2000::2 \ > + tos 16 proto 254 ttl 255 vlan 0 flexbytes = (%s) fwd pf queue 2 > fd_id 2" > + % (self.dut_ports[0], self.flexbytes), > + "testpmd>") > + > + self.send_and_verify(True, 'sendp([Ether(src=3Dget_if_hwaddr("%s= "), > dst=3D"00:1B:21:8E:B2:30") \ > + /IPv6(src=3D"2000::1", dst=3D"2000::2", tc= =3D16, nh=3D253, hlim=3D64) \ > + /Raw(load=3D"%s")], iface=3D"%s")' \ > + % (self.dut_rx_interface, self.payload, sel= f.dut_rx_interface), > queueid =3D 1) > + self.send_and_verify(True, 'sendp([Ether(src=3Dget_if_hwaddr("%s= "), > dst=3D"00:1B:21:8E:B2:30") \ > + /IPv6(src=3D"2000::1", dst=3D"2000::2", tc= =3D16, nh=3D254, hlim=3D64) \ > + /Raw(load=3D"%s")], iface=3D"%s")' \ > + % (self.dut_rx_interface, self.payload, > + self.dut_rx_interface), queueid =3D 2) > + > + self.dut.send_expect("flow_director_filter %d mode IP del flow i= pv6-other > src 2000::1 dst 2000::2 \ > + tos 16 proto 253 ttl 255 vlan 0 flexbytes = (%s) fwd pf queue 1 > fd_id 1" > + % (self.dut_ports[0], self.flexbytes), "te= stpmd>") > + self.dut.send_expect("flow_director_filter %d mode IP del flow i= pv6-other > src 2000::1 dst 2000::2 \ > + tos 16 proto 254 ttl 255 vlan 0 flexbytes = (%s) fwd pf queue 2 > fd_id 2" > + % (self.dut_ports[0], self.flexbytes), > + "testpmd>") > + > + self.send_and_verify(True, 'sendp([Ether(src=3Dget_if_hwaddr("%s= "), > dst=3D"00:1B:21:8E:B2:30") \ > + /IPv6(src=3D"2000::1", dst=3D"2000::2", tc= =3D16, nh=3D253, hlim=3D64) \ > + /Raw(load=3D"%s")], iface=3D"%s")' \ > + % (self.dut_rx_interface, self.payload, sel= f.dut_rx_interface), > queueid =3D 0) > + self.send_and_verify(True, 'sendp([Ether(src=3Dget_if_hwaddr("%s= "), > dst=3D"00:1B:21:8E:B2:30") \ > + /IPv6(src=3D"2000::1", dst=3D"2000::2", tc= =3D16, nh=3D254, hlim=3D255) \ > + /Raw(load=3D"%s")], iface=3D"%s")' \ > + % (self.dut_rx_interface, self.payload, > + self.dut_rx_interface), queueid =3D 0) > + > + # test add and remove ipv6-hop-limits rule > + self.dut.send_expect("set_fdir_input_set %d ipv6-other ipv6-hop-= limits > add" % self.dut_ports[0], "testpmd>") > + self.dut.send_expect("flow_director_filter %d mode IP add flow i= pv6-other > src 2000::1 dst 2000::2 \ > + tos 16 proto 255 ttl 32 vlan 0 flexbytes (= %s) fwd pf queue 1 > fd_id 1" > + % (self.dut_ports[0], self.flexbytes), "te= stpmd>") > + self.dut.send_expect("flow_director_filter %d mode IP add flow i= pv6-other > src 2000::1 dst 2000::2 \ > + tos 16 proto 255 ttl 64 vlan 0 flexbytes (= %s) fwd pf queue 2 > fd_id 2" > + % (self.dut_ports[0], self.flexbytes), > + "testpmd>") > + > + self.send_and_verify(True, 'sendp([Ether(src=3Dget_if_hwaddr("%s= "), > dst=3D"00:1B:21:8E:B2:30") \ > + /IPv6(src=3D"2000::1", dst=3D"2000::2", tc= =3D16, nh=3D255, hlim=3D32) \ > + /Raw(load=3D"%s")], iface=3D"%s")' \ > + % (self.dut_rx_interface, self.payload, sel= f.dut_rx_interface), > queueid =3D 1) > + self.send_and_verify(True, 'sendp([Ether(src=3Dget_if_hwaddr("%s= "), > dst=3D"00:1B:21:8E:B2:30") \ > + /IPv6(src=3D"2000::1", dst=3D"2000::2", tc= =3D16, nh=3D255, hlim=3D64) \ > + /Raw(load=3D"%s")], iface=3D"%s")' \ > + % (self.dut_rx_interface, self.payload, > + self.dut_rx_interface), queueid =3D 2) > + > + self.dut.send_expect("flow_director_filter %d mode IP del flow i= pv6-other > src 2000::1 dst 2000::2 \ > + tos 16 proto 255 ttl 32 vlan 0 flexbytes (= %s) fwd pf queue 1 > fd_id 1" > + % (self.dut_ports[0], self.flexbytes), "te= stpmd>") > + self.dut.send_expect("flow_director_filter %d mode IP del flow i= pv6-other > src 2000::1 dst 2000::2 \ > + tos 16 proto 255 ttl 64 vlan 0 flexbytes (= %s) fwd pf queue 2 > fd_id 2" > + % (self.dut_ports[0], self.flexbytes), > + "testpmd>") > + > + self.send_and_verify(True, 'sendp([Ether(src=3Dget_if_hwaddr("%s= "), > dst=3D"00:1B:21:8E:B2:30") \ > + /IPv6(src=3D"2000::1", dst=3D"2000::2", tc= =3D16, nh=3D255, hlim=3D32) \ > + /Raw(load=3D"%s")], iface=3D"%s")' \ > + % (self.dut_rx_interface, self.payload, sel= f.dut_rx_interface), > queueid =3D 0) > + self.send_and_verify(True, 'sendp([Ether(src=3Dget_if_hwaddr("%s= "), > dst=3D"00:1B:21:8E:B2:30") \ > + /IPv6(src=3D"2000::1", dst=3D"2000::2", tc= =3D16, nh=3D255, hlim=3D64) \ > + /Raw(load=3D"%s")], iface=3D"%s")' \ > + % (self.dut_rx_interface, self.payload, sel= f.dut_rx_interface), > queueid =3D 0) > + def test_fdir_ivlan(self): > + """ > + Expand Flow Director for fortville to support ipv4 TOS, ipv4 PRO= TO, ipv4 > TTL > + """ > + if not self.nic in ["fortville_eagle", "fortville_spirit", > "fortville_spirit_single"]: > + self.verify(False, "This case only support fortville nic") > + self.dut.kill_all() > + self.dut.send_expect("./%s/app/testpmd -c %s -n 4 -- -i --portma= sk=3D%s -- > disable-rss --rxq=3D4 --txq=3D4 --nb-cores=3D4 --nb-ports=3D1 --pkt-filte= r-mode=3Dperfect" % > (self.target, self.coreMask, utils.create_mask([self.dut_ports[0]])), "te= stpmd>", > 120) > + self.dut.send_expect("set verbose 1", "testpmd>") > + self.dut.send_expect("set fwd rxonly", "testpmd>") > + > + self.fdir_set_rule() > + self.fdir_get_flexbytes() > + # fwd comand testing > + self.fdir_type =3D " " > + self.dut.send_expect("set_fdir_input_set %d ipv4-other none sele= ct" % > self.dut_ports[0], "testpmd>") > + self.dut.send_expect("set_fdir_input_set %d ipv4-other src-ipv4 = add" % > self.dut_ports[0], "testpmd>") > + self.dut.send_expect("set_fdir_input_set %d ipv4-other dst-ipv4 = add" % > self.dut_ports[0], "testpmd>") > + self.dut.send_expect("vlan set qinq on %d" % self.dut_ports[0], = "testpmd>") > + self.dut.send_expect("set_fdir_input_set %d ipv4-udp none select= " % > self.dut_ports[0], "testpmd>") > + self.dut.send_expect("set_fdir_input_set %d ipv4-udp ivlan add" > + % self.dut_ports[0], "testpmd>") > + > + > + self.dut.send_expect("flow_director_filter %d mode IP add flow i= pv4-udp > src 192.168.1.1 1021 dst 192.168.1.2 1022 \ > + tos 16 proto 255 ttl 32 vlan 1 flexbytes (= %s) fwd pf queue 1 > fd_id 1" > + % (self.dut_ports[0], self.flexbytes), "te= stpmd>") > + self.dut.send_expect("flow_director_filter %d mode IP add flow i= pv4-udp > src 192.168.1.1 1021 dst 192.168.1.2 1022 \ > + tos 16 proto 255 ttl 32 vlan 15 flexbytes = (%s) fwd pf queue 2 > fd_id 2" > + % (self.dut_ports[0], self.flexbytes), "te= stpmd>") > + self.dut.send_expect("flow_director_filter %d mode IP add flow i= pv4-udp > src 192.168.1.1 1021 dst 192.168.1.2 1022 \ > + tos 16 proto 255 ttl 32 vlan 255 flexbytes= (%s) fwd pf queue 3 > fd_id 3" > + % (self.dut_ports[0], self.flexbytes), "te= stpmd>") > + self.dut.send_expect("flow_director_filter %d mode IP add flow i= pv4-udp > src 192.168.1.1 1021 dst 192.168.1.2 1022 \ > + tos 16 proto 255 ttl 32 vlan 4095 flexbyte= s (%s) fwd pf queue 4 > fd_id 4" > + % (self.dut_ports[0], self.flexbytes), > + "testpmd>") > + > + self.send_and_verify(True, 'sendp([Ether(src=3Dget_if_hwaddr("%s= "), > dst=3D"00:1B:21:8E:B2:30") \ > + /Dot1Q(id=3D0x8100,vlan=3D16)/Dot1Q(id=3D0x= 8100,vlan=3D1) \ > + /IP(src=3D"192.168.1.1", dst=3D"192.168.1.2= ", tos=3D16, proto=3D255, > ttl=3D255) \ > + /UDP(sport=3D"1021",dport=3D"1022") \ > + /Raw(load=3D"%s")], iface=3D"%s")' \ > + % (self.dut_rx_interface, self.payload, > + self.dut_rx_interface), queueid =3D 1) > + > + self.send_and_verify(True, 'sendp([Ether(src=3Dget_if_hwaddr("%s= "), > dst=3D"00:1B:21:8E:B2:30") \ > + /Dot1Q(id=3D0x8100,vlan=3D16)/Dot1Q(id=3D0x= 8100,vlan=3D15) \ > + /IP(src=3D"192.168.1.1", dst=3D"192.168.1.2= ", tos=3D16, proto=3D255, > ttl=3D255) \ > + /UDP(sport=3D"1021",dport=3D"1022") \ > + /Raw(load=3D"%s")], iface=3D"%s")' \ > + % (self.dut_rx_interface, self.payload, sel= f.dut_rx_interface), > queueid =3D 2) > + self.send_and_verify(True, 'sendp([Ether(src=3Dget_if_hwaddr("%s= "), > dst=3D"00:1B:21:8E:B2:30") \ > + /Dot1Q(id=3D0x8100,vlan=3D16)/Dot1Q(id=3D0x= 8100,vlan=3D255) \ > + /IP(src=3D"192.168.1.1", dst=3D"192.168.1.2= ", tos=3D16, proto=3D255, > ttl=3D255) \ > + /UDP(sport=3D"1021",dport=3D"1022") \ > + /Raw(load=3D"%s")], iface=3D"%s")' \ > + % (self.dut_rx_interface, self.payload, sel= f.dut_rx_interface), > queueid =3D 3) > + self.send_and_verify(True, 'sendp([Ether(src=3Dget_if_hwaddr("%s= "), > dst=3D"00:1B:21:8E:B2:30") \ > + /Dot1Q(id=3D0x8100,vlan=3D16)/Dot1Q(id=3D0x= 8100,vlan=3D4095) \ > + /IP(src=3D"192.168.1.1", dst=3D"192.168.1.2= ", tos=3D16, proto=3D255, > ttl=3D255) \ > + /UDP(sport=3D"1021",dport=3D"1022") \ > + /Raw(load=3D"%s")], iface=3D"%s")' \ > + % (self.dut_rx_interface, self.payload, > + self.dut_rx_interface), queueid =3D 4) > + > + self.dut.send_expect("flow_director_filter %d mode IP del flow i= pv4-udp > src 192.168.1.1 1021 dst 192.168.1.2 1022 \ > + tos 16 proto 255 ttl 32 vlan 1 flexbytes (= %s) fwd pf queue 1 > fd_id 1" > + % (self.dut_ports[0], self.flexbytes), "te= stpmd>") > + self.dut.send_expect("flow_director_filter %d mode IP del flow i= pv4-udp > src 192.168.1.1 1021 dst 192.168.1.2 1022 \ > + tos 16 proto 255 ttl 32 vlan 15 flexbytes = (%s) fwd pf queue 2 > fd_id 2" > + % (self.dut_ports[0], self.flexbytes), "te= stpmd>") > + self.dut.send_expect("flow_director_filter %d mode IP del flow i= pv4-udp > src 192.168.1.1 1021 dst 192.168.1.2 1022 \ > + tos 16 proto 255 ttl 32 vlan 255 flexbytes= (%s) fwd pf queue 3 > fd_id 3" > + % (self.dut_ports[0], self.flexbytes), "te= stpmd>") > + self.dut.send_expect("flow_director_filter %d mode IP del flow i= pv4-udp > src 192.168.1.1 1021 dst 192.168.1.2 1022 \ > + tos 16 proto 255 ttl 32 vlan 4095 flexbyte= s (%s) fwd pf queue 4 > fd_id 4" > + % (self.dut_ports[0], self.flexbytes), > + "testpmd>") > + > + self.send_and_verify(True, 'sendp([Ether(src=3Dget_if_hwaddr("%s= "), > dst=3D"00:1B:21:8E:B2:30") \ > + /Dot1Q(id=3D0x8100,vlan=3D16)/Dot1Q(id=3D0x= 8100,vlan=3D1) \ > + /IP(src=3D"192.168.1.1", dst=3D"192.168.1.2= ", tos=3D16, proto=3D255, > ttl=3D255) \ > + /UDP(sport=3D"1021",dport=3D"1022") \ > + /Raw(load=3D"%s")], iface=3D"%s")' \ > + % (self.dut_rx_interface, self.payload, > + self.dut_rx_interface), queueid =3D 0) > + > + self.send_and_verify(True, 'sendp([Ether(src=3Dget_if_hwaddr("%s= "), > dst=3D"00:1B:21:8E:B2:30") \ > + /Dot1Q(id=3D0x8100,vlan=3D16)/Dot1Q(id=3D0x= 8100,vlan=3D15) \ > + /IP(src=3D"192.168.1.1", dst=3D"192.168.1.2= ", tos=3D16, proto=3D255, > ttl=3D255) \ > + /UDP(sport=3D"1021",dport=3D"1022") \ > + /Raw(load=3D"%s")], iface=3D"%s")' \ > + % (self.dut_rx_interface, self.payload, sel= f.dut_rx_interface), > queueid =3D 0) > + self.send_and_verify(True, 'sendp([Ether(src=3Dget_if_hwaddr("%s= "), > dst=3D"00:1B:21:8E:B2:30") \ > + /Dot1Q(id=3D0x8100,vlan=3D16)/Dot1Q(id=3D0x= 8100,vlan=3D255) \ > + /IP(src=3D"192.168.1.1", dst=3D"192.168.1.2= ", tos=3D16, proto=3D255, > ttl=3D255) \ > + /UDP(sport=3D"1021",dport=3D"1022") \ > + /Raw(load=3D"%s")], iface=3D"%s")' \ > + % (self.dut_rx_interface, self.payload, sel= f.dut_rx_interface), > queueid =3D 0) > + self.send_and_verify(True, 'sendp([Ether(src=3Dget_if_hwaddr("%s= "), > dst=3D"00:1B:21:8E:B2:30") \ > + /Dot1Q(id=3D0x8100,vlan=3D16)/Dot1Q(id=3D0x= 8100,vlan=3D4095) \ > + /IP(src=3D"192.168.1.1", dst=3D"192.168.1.2= ", tos=3D16, proto=3D255, > ttl=3D255) \ > + /UDP(sport=3D"1021",dport=3D"1022") \ > + /Raw(load=3D"%s")], iface=3D"%s")' \ > + % (self.dut_rx_interface, self.payload, > + self.dut_rx_interface), queueid =3D 0) > + > + >=20 > def failed_test_fdir_flush(self): > """ > -- > 1.9.3