From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 90945FB52 for ; Thu, 19 Jan 2017 07:04:28 +0100 (CET) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga103.jf.intel.com with ESMTP; 18 Jan 2017 22:04:27 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,252,1477983600"; d="scan'208";a="1114831291" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by fmsmga002.fm.intel.com with ESMTP; 18 Jan 2017 22:04:26 -0800 Received: from fmsmsx124.amr.corp.intel.com (10.18.125.39) 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:04:26 -0800 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by fmsmsx124.amr.corp.intel.com (10.18.125.39) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 18 Jan 2017 22:04:26 -0800 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.20]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.132]) with mapi id 14.03.0248.002; Thu, 19 Jan 2017 14:04:24 +0800 From: "Liu, Yong" To: "Xu, HuilongX" , "dts@dpdk.org" CC: "Xu, HuilongX" Thread-Topic: [dts] [patch V1 1/2] add fdir test case Thread-Index: AQHScKBYmA4HXzELokOtLKCvr/hU4aE/TsYA Date: Thu, 19 Jan 2017 06:04:23 +0000 Message-ID: <86228AFD5BCD8E4EBFD2B90117B5E81E62D4D740@SHSMSX103.ccr.corp.intel.com> References: <1484643736-48250-1-git-send-email-huilongx.xu@intel.com> In-Reply-To: <1484643736-48250-1-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 1/2] add fdir test case 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:04:29 -0000 Huilong, Some overall comments. 1. Fdir command is very complicated and has lots of parameters. We need som= e basic description for these commands. It will help user known what will h= appened after input fdir commands. 2. To make the plan more clear, do not combine two or three testpmd command= s in one line. Thanks, Marvin > -----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 1/2] add fdir test case >=20 > Expand Flow Director for fortville to support ipv4 TOS, ipv4 PROTO, ipv4 = TTL and > ipv6 tc, ipv6 next-header, ipv6 hop-limits and ivlan >=20 > Signed-off-by: xu,huilong > --- > test_plans/fdir_test_plan.rst | 364 > ++++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 364 insertions(+) >=20 > diff --git a/test_plans/fdir_test_plan.rst b/test_plans/fdir_test_plan.rs= t index > 95a2926..5913a52 100644 > --- a/test_plans/fdir_test_plan.rst > +++ b/test_plans/fdir_test_plan.rst > @@ -684,3 +684,367 @@ and then to 0x0017. The packets should still match > the filter::: > PKT_RX_PKT_RX_FDIR > PKT_RX_IP_CKSUM > PKT_RX_IPV4_HDR > + > + > +Test Case : test with ipv4 TOS, PROTO, TTL > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > + > +1) start testpmd and initialize flow director flex payload configuration= :: > + > + ./testpmd -c fffff -n 4 -- -i --disable-rss --pkt-filter-mode=3Dperfec= t > + --rxq=3D8 --txq=3D8 --nb-cores=3D8 testpmd> port stop 0 testpmd> Please separate into different lines, it's hard to read when combined sever= al commands to one line. > + flow_director_flex_payload 0 l2 > + (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15) > + testpmd> flow_director_flex_payload 0 l3 > + (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15) > + testpmd> flow_director_flex_payload 0 l4 > + (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15) =09 Please add some basic description for these commands, like what's the meani= ng of internal bytes. As I known, "raw" layer also supported by flow director flex bytes. Should = cover this layer too? > + testpmd> flow_director_flex_mask 0 flow all > + (0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff > + ,0xff,0xff) > + testpmd> port start 0 > + testpmd> set verbose 1 > + testpmd> set fwd rxonly > + testpmd> start > + > +Note:: > + assume FLEXBYTES =3D > "0x11,0x11,0x22,0x22,0x33,0x33,0x44,0x44,0x55,0x55,0x66,0x66,0x77,0x77,0x > 88,0x88" > + assume payload =3D > "\x11\x11\x22\x22\x33\x33\x44\x44\x55\x55\x66\x66\x77\x77\x88\x88" > + > +2) setup the fdir input set of IPv4:: > + > + testpmd> set_fdir_input_set 0 ipv4-other none select testpmd> Please align the output, prefix "testpmd>" should start on second line. > + set_fdir_input_set 0 ipv4-other src-ipv4 add testpmd> > + set_fdir_input_set 0 ipv4-other dst-ipv4 add > + > +3) add ipv4-tos to fdir input set, set tos to 16 and 8:: > + > + testpmd> set_fdir_input_set 0 ipv4-other ipv4-tos add setup flow > + director filter rules, > + > +rule_1:: > + flow_director_filter 0 mode IP add flow ipv4-other src 192.168.1.1 > +dst 192.168.1.2 tos 16 proto 255 ttl 255 vlan 0 \ > + flexbytes (FLEXBYTES) fwd pf queue 1 fd_id 1 > + Please give a basic describe about what will be happened after input this c= ommand.=20 > +rule_2:: > + flow_director_filter 0 mode IP add flow ipv4-other src 192.168.1.1 > +dst 192.168.1.2 tos 8 proto 255 ttl 255 vlan 0 \ > + flexbytes (FLEXBYTES) fwd pf queue 2 fd_id 2 > + > +send packet to DUT, > + > +packet_1:: > + 'sendp([Ether(dst=3D"%s")/IP(src=3D"192.168.0.1", dst=3D"192.168.0.2",= tos=3D16, > proto=3D255, ttl=3D255)/Raw(%s)], iface=3D"%s")'\ > + %(dst_mac, payload, itf) > + > +packet_1 should be received by queue 1. > + > +packet_2:: > + 'sendp([Ether(dst=3D"%s")/IP(src=3D"192.168.0.1", dst=3D"192.168.0.2",= tos=3D8, > proto=3D255, ttl=3D255)/Raw(%s)], iface=3D"%s")'\ > + %(dst_mac, payload, itf) > + > +packet_2 should be received by queue 2. > + > +delete rule_1, send packet_1 again, packet_1 should be received by queue= 0. > +delete rule_2, send packet_2 again, packet_2 should be received by queue= 0. > + > +4) add ipv4-proto to fdir input set, set proto to 253 and 254:: > + > + testpmd> set_fdir_input_set 0 ipv4-other ipv4-proto add > + > +setup flow director filter rules > +rule_3:: > + flow_director_filter 0 mode IP add flow ipv4-other src 192.168.1.1 > +dst 192.168.1.2 tos 16 proto 253 ttl 255 vlan 0 \ > + flexbytes (FLEXBYTES) fwd pf queue 3 fd_id 3 Please give a basic describe about what will be happened after input this c= ommand. > + > +rule_4:: > + flow_director_filter 0 mode IP add flow ipv4-other src 192.168.1.1 > +dst 192.168.1.2 tos 8 proto 254 ttl 255 vlan 0 \ > + flexbytes (FLEXBYTES) fwd pf queue 4 fd_id 4 Please give a basic describe about what will be happened after input this c= ommand. > + > +send packet to DUT, > + > +packet_3:: > + 'sendp([Ether(dst=3D"%s")/IP(src=3D"192.168.0.1", dst=3D"192.168.0.2", > +tos=3D16, proto=3D253, ttl=3D255)/Raw(%s)], iface=3D"%s")'\ > + %(dst_mac, payload, itf) > + > +packet_3 should be received by queue 3. > + > +packet_4:: > + 'sendp([Ether(dst=3D"%s")/IP(src=3D"192.168.0.1", dst=3D"192.168.0.2", > +tos=3D8, proto=3D254, ttl=3D255)/Raw(%s)], iface=3D"%s")'\ > + %(dst_mac, payload, itf) > + > +packet_4 should be received by queue 4. > + > +delete rule_3, send packet_3 again, packet_3 should be received by queue= 0. > +delete rule_4, send packet_4 again, packet_4 should be received by queue= 0. > + > +5) test ipv4-ttl, set ttl to 32 and 64:: > + > + testpmd> set_fdir_input_set 0 ipv4-other ipv4-ttl add > + > +setup flow director filter rules, > +rule_5:: > + flow_director_filter 0 mode IP add flow ipv4-other src 192.168.1.1 > +dst 192.168.1.2 tos 16 proto 253 ttl 32 vlan 0 \ > + flexbytes (FLEXBYTES) fwd pf queue 5 fd_id 5 > + Please give a basic describe about what will be happened after input this c= ommand. > +rule_6:: > + flow_director_filter 0 mode IP add flow ipv4-other src 192.168.1.1 > +dst 192.168.1.2 tos 8 proto 254 ttl 64 vlan 0 \ > + flexbytes (FLEXBYTES) fwd pf queue 6 fd_id 6 > + Please give a basic describe about what will be happened after input this c= ommand. > +send packet to DUT, > + > +packet_5:: > + 'sendp([Ether(dst=3D"%s")/IP(src=3D"192.168.0.1", dst=3D"192.168.0.2", > +tos=3D16, proto=3D253, ttl=3D32)/Raw(%s)], iface=3D"%s")'\ > + %(dst_mac, payload, itf) > + > +packet_5 should be received by queue 5. > + > +packet_6:: > + 'sendp([Ether(dst=3D"%s")/IP(src=3D"192.168.0.1", dst=3D"192.168.0.2", > +tos=3D8, proto=3D254, ttl=3D64)/Raw(%s)], iface=3D"%s")'\ > + %(dst_mac, payload, itf) > + > +packet_6 should be received by queue 6. > + > +delete rule_5, send packet_5 again, packet_5 should be received by queue= 0. > +delete rule_6, send packet_6 again, packet_6 should be received by queue= 0. > + > +6) removed all entry of fdir:: > + > + testpmd>flush_flow_director 0 > + testpmd>show port fdir 0 > + > +example:: > + > + flow_director_filter 0 mode IP add flow ipv4-other src 192.168.1.1 > + dst 192.168.1.2 tos 16 proto 255 ttl 255 vlan 0 flexbytes > + (0x11,0x11,0x22,0x22,0x33,0x33,0x44,0x44,0x55,0x55,0x66,0x66,0x77,0x77 > + ,0x88,0x88) fwd pf queue 1 fd_id 1 > + > + flow_director_filter 0 mode IP add flow ipv4-other src 192.168.1.1 > + dst 192.168.1.2 tos 8 proto 255 ttl 255 vlan 0 flexbytes > + (0x11,0x11,0x22,0x22,0x33,0x33,0x44,0x44,0x55,0x55,0x66,0x66,0x77,0x77 > + ,0x88,0x88) fwd pf queue 2 fd_id 2 > + > + sendp([Ether(src=3D"00:00:00:00:00:01", > + dst=3D"00:00:00:00:01:00")/IP(src=3D"192.168.1.1", dst=3D"192.168.1.2", > + tos=3D16, proto=3D255, > + ttl=3D255)/Raw(load=3D"\x11\x11\x22\x22\x33\x33\x44\x44\x55\x55\x66\x66= \x7 > + 7\x77\x88\x88")], iface=3D"ens260f0") > + > + sendp([Ether(src=3D"00:00:00:00:00:01", > + dst=3D"00:00:00:00:01:00")/IP(src=3D"192.168.1.1", dst=3D"192.168.1.2", > + tos=3D8, proto=3D255, > + ttl=3D255)/Raw(load=3D"\x11\x11\x22\x22\x33\x33\x44\x44\x55\x55\x66\x66= \x7 > + 7\x77\x88\x88")], iface=3D"ens260f0") > + > +Test Case: test with ipv6 tc, next-header, hop-limits > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > +1) start testpmd and initialize flow director flex payload configuration= :: > + > + ./testpmd -c fffff -n 4 -- -i --disable-rss --pkt-filter-mode=3Dperfec= t > + --rxq=3D8 --txq=3D8 --nb-cores=3D8 testpmd> port stop 0 testpmd> > + flow_director_flex_payload 0 l2 > + (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15) > + testpmd> flow_director_flex_payload 0 l3 > + (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15) > + testpmd> flow_director_flex_payload 0 l4 > + (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15) > + testpmd> flow_director_flex_mask 0 flow all > + (0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff > + ,0xff,0xff) > + testpmd> port start 0 > + testpmd> set verbose 1 > + testpmd> set fwd rxonly > + testpmd> start > + > +Note:: > + assume FLEXBYTES =3D > "0x11,0x11,0x22,0x22,0x33,0x33,0x44,0x44,0x55,0x55,0x66,0x66,0x77,0x77,0x > 88,0x88" > + assume payload =3D > "\x11\x11\x22\x22\x33\x33\x44\x44\x55\x55\x66\x66\x77\x77\x88\x88" > + > +2) setup the fdir input set of IPv6:: > + > + testpmd> set_fdir_input_set 0 ipv6-other none select testpmd> > + set_fdir_input_set 0 ipv6-other src-ipv6 add testpmd> > + set_fdir_input_set 0 ipv6-other dst-ipv6 add > + > +3) add ipv6-tc to fdir input set, set tc to 16 and 8:: > + > + testpmd> set_fdir_input_set 0 ipv6-other ipv6-tc add > + > +setup flow director filter rules, > + > +rule_1:: > + flow_director_filter 0 mode IP add flow ipv6-other src 2000::1 dst > +2000::2 tos 16 proto 255 ttl 64 vlan 0 \ > + flexbytes (FLEXBYTES) fwd pf queue 1 fd_id 1 > + > +rule_2:: > + flow_director_filter 0 mode IP add flow ipv6-other src 2000::1 dst > +2000::2 tos 8 proto 255 ttl 64 vlan 0 \ > + flexbytes (FLEXBYTES) fwd pf queue 2 fd_id 2 > + > +send packet to DUT, > + > +packet_1:: > + 'sendp([Ether(dst=3D"%s")/IPv6(src=3D"2000::1", dst=3D"2000::2", tc=3D= 16, > +nh=3D255, hlim=3D64)/Raw(%s)], iface=3D"%s")' \ > + %(dst_mac, payload, itf) > + > +packet_1 should be received by queue 1. > + > +packet_2:: > + 'sendp([Ether(dst=3D"%s")/IPv6(src=3D"2000::1", dst=3D"2000::2", tc=3D= 8, > +nh=3D255, hlim=3D64)/Raw(%s)], iface=3D"%s")' \ > + %(dst_mac, payload, itf) > + > +packet_2 should be received by queue 2. > + > +delete rule_1, send packet_1 again, packet_1 should be received by queue= 0. > +delete rule_2, send packet_2 again, packet_2 should be received by queue= 0. > + > +4) add ipv6-next-header to fdir input set, set nh to 253 and 254:: > + > + testpmd> set_fdir_input_set 0 ipv6-other ipv6-next-header add > + > +setup flow director filter rules, > +rule_3:: > + flow_director_filter 0 mode IP add flow ipv6-other src 2000::1 dst > +2000::2 tos 16 proto 253 ttl 255 vlan 0 \ > + flexbytes (FLEXBYTES) fwd pf queue 3 fd_id 3 > + > +rule_4:: > + flow_director_filter 0 mode IP add flow ipv6-other src 2000::1 dst > +2000::2 tos 8 proto 254 ttl 255 vlan 0 \ > + flexbytes (FLEXBYTES) fwd pf queue 4 fd_id 4 > + > +send packet to DUT, > + > +packet_3:: > + 'sendp([Ether(dst=3D"%s")/IPv6(src=3D"2000::1", dst=3D"2000::2", tc=3D= 16, > +nh=3D253, hlim=3D64)/Raw(%s)], iface=3D"%s")'\ > + %(dst_mac, payload, itf) > + > +packet_3 should be received by queue 3. > + > +packet_4:: > + 'sendp([Ether(dst=3D"%s")/IPv6(src=3D"2000::1", dst=3D"2000::2", tc=3D= 8, > +nh=3D254, hlim=3D64)/Raw(%s)], iface=3D"%s")'\ > + %(dst_mac, payload, itf) > + > +packet_4 should be received by queue 4. > + > +delete rule_3, send packet_3 again, packet_3 should be received by queue= 0. > +delete rule_4, send packet_4 again, packet_4 should be received by queue= 0. > + > +5) add ipv6-hop-limits to fdir input set, set hlim to 32 and 64:: > + > + testpmd> set_fdir_input_set 0 ipv6-other ipv6-hop-limits add > + > +setup flow director filter rules, > +rule_5:: > + flow_director_filter 0 mode IP add flow ipv6-other src 2000::1 dst > +2000::2 tos 16 proto 253 ttl 32 vlan 0 \ > + flexbytes (FLEXBYTES) fwd pf queue 5 fd_id 5 > + > +rule_6:: > + flow_director_filter 0 mode IP add flow ipv6-other src 2000::1 dst > +2000::2 tos 8 proto 254 ttl 64 vlan 0 \ > + flexbytes (FLEXBYTES) fwd pf queue 6 fd_id 6 > + > +send packet to DUT, > + > +packet_5:: > + 'sendp([Ether(dst=3D"%s")/IPv6(src=3D"2000::1", dst=3D"2000::2", tc=3D= 16, > +nh=3D253, hlim=3D32)/Raw(%s)], iface=3D"%s")'\ > + %(dst_mac, payload, itf) > + > +packet_5 should be received by queue 5. > + > +packet_6:: > + 'sendp([Ether(dst=3D"%s")/IPv6(src=3D"2000::1", dst=3D"2000::2", tc=3D= 8, > +nh=3D254, hlim=3D64)/Raw(%s)], iface=3D"%s")'\ > + %(dst_mac, payload, itf) > + > +packet_6 should be received by queue 6. > + > +delete rule_5, send packet_5 again, packet_5 should be received by queue= 0. > +delete rule_6, send packet_6 again, packet_6 should be received by queue= 0. > + > +6) removed all entry of fdir:: > + > + testpmd>flush_flow_director 0 > + testpmd>show port fdir 0 > + > +example:: > + > + flow_director_filter 0 mode IP add flow ipv6-other src 2000::1 dst > + 2000::2 tos 16 proto 255 ttl 64 vlan 0 flexbytes > + (0x11,0x11,0x22,0x22,0x33,0x33,0x44,0x44,0x55,0x55,0x66,0x66,0x77,0x77 > + ,0x88,0x88) fwd pf queue 1 fd_id 1 > + > + flow_director_filter 0 mode IP add flow ipv6-other src 2000::1 dst > + 2000::2 tos 8 proto 255 ttl 64 vlan 0 flexbytes > + (0x11,0x11,0x22,0x22,0x33,0x33,0x44,0x44,0x55,0x55,0x66,0x66,0x77,0x77 > + ,0x88,0x88) fwd pf queue 2 fd_id 2 > + > + flow_director_filter 0 mode IP add flow ipv6-other src 2000::1 dst > + 2000::2 tos 16 proto 253 ttl 64 vlan 0 flexbytes > + (0x11,0x11,0x22,0x22,0x33,0x33,0x44,0x44,0x55,0x55,0x66,0x66,0x77,0x77 > + ,0x88,0x88) fwd pf queue 3 fd_id 3 > + > + flow_director_filter 0 mode IP add flow ipv6-other src 2000::1 dst > + 2000::2 tos 8 proto 254 ttl 64 vlan 0 flexbytes > + (0x11,0x11,0x22,0x22,0x33,0x33,0x44,0x44,0x55,0x55,0x66,0x66,0x77,0x77 > + ,0x88,0x88) fwd pf queue 4 fd_id 4 > + > + flow_director_filter 0 mode IP add flow ipv6-other src 2000::1 dst > + 2000::2 tos 16 proto 253 ttl 32 vlan 0 flexbytes > + (0x11,0x11,0x22,0x22,0x33,0x33,0x44,0x44,0x55,0x55,0x66,0x66,0x77,0x77 > + ,0x88,0x88) fwd pf queue 5 fd_id 5 > + > + flow_director_filter 0 mode IP add flow ipv6-other src 2000::1 dst > + 2000::2 tos 8 proto 254 ttl 48 vlan 0 flexbytes > + (0x11,0x11,0x22,0x22,0x33,0x33,0x44,0x44,0x55,0x55,0x66,0x66,0x77,0x77 > + ,0x88,0x88) fwd pf queue 6 fd_id 6 > + > + sendp([Ether(src=3D"00:00:00:00:00:01", > + dst=3D"00:00:00:00:01:00")/IPv6(src=3D"2000::1", dst=3D"2000::2", tc=3D= 16, > + nh=3D255, > + hlim=3D64)/Raw(load=3D"\x11\x11\x22\x22\x33\x33\x44\x44\x55\x55\x66\x66= \x7 > + 7\x77\x88\x88")], iface=3D"ens260f0") > + > + sendp([Ether(src=3D"00:00:00:00:00:01", > + dst=3D"00:00:00:00:01:00")/IPv6(src=3D"2000::1", dst=3D"2000::2", tc=3D= 8, > + nh=3D255, > + hlim=3D64)/Raw(load=3D"\x11\x11\x22\x22\x33\x33\x44\x44\x55\x55\x66\x66= \x7 > + 7\x77\x88\x88")], iface=3D"ens260f0") > + > + sendp([Ether(src=3D"00:00:00:00:00:01", > + dst=3D"00:00:00:00:01:00")/IPv6(src=3D"2000::1", dst=3D"2000::2", tc=3D= 16, > + nh=3D253, > + hlim=3D64)/Raw(load=3D"\x11\x11\x22\x22\x33\x33\x44\x44\x55\x55\x66\x66= \x7 > + 7\x77\x88\x88")], iface=3D"ens260f0") > + > + sendp([Ether(src=3D"00:00:00:00:00:01", > + dst=3D"00:00:00:00:01:00")/IPv6(src=3D"2000::1", dst=3D"2000::2", tc=3D= 8, > + nh=3D254, > + hlim=3D64)/Raw(load=3D"\x11\x11\x22\x22\x33\x33\x44\x44\x55\x55\x66\x66= \x7 > + 7\x77\x88\x88")], iface=3D"ens260f0") > + > + sendp([Ether(src=3D"00:00:00:00:00:01", > + dst=3D"00:00:00:00:01:00")/IPv6(src=3D"2000::1", dst=3D"2000::2", tc=3D= 16, > + nh=3D253, > + hlim=3D32)/Raw(load=3D"\x11\x11\x22\x22\x33\x33\x44\x44\x55\x55\x66\x66= \x7 > + 7\x77\x88\x88")], iface=3D"ens260f0") > + > + sendp([Ether(src=3D"00:00:00:00:00:01", > + dst=3D"00:00:00:00:01:00")/IPv6(src=3D"2000::1", dst=3D"2000::2", tc=3D= 8, > + nh=3D254, > + hlim=3D48)/Raw(load=3D"\x11\x11\x22\x22\x33\x33\x44\x44\x55\x55\x66\x66= \x7 > + 7\x77\x88\x88")], iface=3D"ens260f0") > + > + > +Test Case: test with ivlan (qinq not work) > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > +1) start testpmd and initialize flow director flex payload configuration= :: > + > + ./testpmd -c fffff -n 4 -- -i --disable-rss --pkt-filter-mode=3Dperfec= t > + --rxq=3D8 --txq=3D8 --nb-cores=3D8 testpmd> port stop 0 testpmd> > + flow_director_flex_payload 0 l2 > + (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15) > + testpmd> flow_director_flex_payload 0 l3 > + (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15) > + testpmd> flow_director_flex_payload 0 l4 > + (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15) > + testpmd> flow_director_flex_mask 0 flow all > + (0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff > + ,0xff,0xff) > + testpmd> port start 0 > + > + testpmd> vlan set qinq on 0 > + > + testpmd> set verbose 1 > + testpmd> set fwd rxonly > + testpmd> start > + > +Note:: > + assume FLEXBYTES =3D > "0x11,0x11,0x22,0x22,0x33,0x33,0x44,0x44,0x55,0x55,0x66,0x66,0x77,0x77,0x > 88,0x88" > + assume payload =3D > "\x11\x11\x22\x22\x33\x33\x44\x44\x55\x55\x66\x66\x77\x77\x88\x88" > + > +2) setup the fdir input set:: > + > + testpmd> set_fdir_input_set 0 ipv4-udp none select testpmd> > + set_fdir_input_set 0 ipv4-udp ivlan add > + > + > +3) setup flow director filter rules, > + > +rule_1:: > + flow_director_filter 0 mode IP add flow ipv4-udp src 192.168.1.1 1021 > +dst 192.168.1.2 1022 tos 16 ttl 255 \ > + vlan 1 flexbytes (FLEXBYTES) fwd pf queue 1 fd_id 1 > + > +rule_2:: > + flow_director_filter 0 mode IP add flow ipv4-udp src 192.168.1.1 1021 > +dst 192.168.1.2 1022 tos 16 ttl 255 \ > + vlan 15 flexbytes (FLEXBYTES) fwd pf queue 2 fd_id 2 > + > +rule_3:: > + flow_director_filter 0 mode IP add flow ipv4-udp src 192.168.1.1 1021 > +dst 192.168.1.2 1022 tos 16 ttl 255 \ > + vlan 255 flexbytes (FLEXBYTES) fwd pf queue 3 fd_id 3 > + > +rule_4:: > + flow_director_filter 0 mode IP add flow ipv4-udp src 192.168.1.1 1021 > +dst 192.168.1.2 1022 tos 16 ttl 255 \ > + vlan 4095 flexbytes (FLEXBYTES) fwd pf queue 4 fd_id 4 > + > +4) send packet to DUT, > + > +packet_1:: > + > + > + 'sendp([Ether(dst=3D"%s")/Dot1Q(id=3D0x8100,vlan=3D16)/Dot1Q(id=3D0x810= 0,vlan=3D > + 1)/IP(src=3D"192.168.0.1",dst=3D"192.168.0.2", \ tos=3D16, > + ttl=3D255)/UDP(sport=3D"1021",dport=3D"1022")/Raw(%s)], iface=3D"%s")' = % > + (dst_mac, payload, itf) > + > +packet_1 should be received by queue 1. > + > +packet_2:: > + > +'sendp([Ether(dst=3D"%s")/Dot1Q(id=3D0x8100,vlan=3D16)/Dot1Q(id=3D0x8100= ,vlan=3D1 > +5)/IP(src=3D"192.168.0.1",dst=3D"192.168.0.2", \ > + tos=3D16, ttl=3D255)/UDP(sport=3D"1021",dport=3D"1022")/Raw(%s)], > +iface=3D"%s")' % (dst_mac, payload, itf) > + > +packet_2 should be received by queue 2. > + > +packet_3:: > + > +'sendp([Ether(dst=3D"%s")/Dot1Q(id=3D0x8100,vlan=3D16)/Dot1Q(id=3D0x8100= ,vlan=3D2 > +55)/IP(src=3D"192.168.0.1",dst=3D"192.168.0.2", \ > + tos=3D16, ttl=3D255)/UDP(sport=3D"1021",dport=3D"1022")/Raw(%s)], > +iface=3D"%s")' % (dst_mac, payload, itf) > + > +packet_3 should be received by queue 3. > + > +packet_4:: > + > +'sendp([Ether(dst=3D"%s")/Dot1Q(id=3D0x8100,vlan=3D16)/Dot1Q(id=3D0x8100= ,vlan=3D4 > +095)/IP(src=3D"192.168.0.1",dst=3D"192.168.0.2", \ > + tos=3D16, ttl=3D255)/UDP(sport=3D"1021",dport=3D"1022")/Raw(%s)], > +iface=3D"%s")' % (dst_mac, payload, itf) > + > +packet_4 should be received by queue 4. > + > +delete rule_1, send packet_1 again, packet_1 should be received by queue= 0. > +delete rule_2, send packet_2 again, packet_2 should be received by queue= 0. > +delete rule_3, send packet_3 again, packet_3 should be received by queue= 0. > +delete rule_4, send packet_4 again, packet_4 should be received by queue= 0. > + > +5) removed all entry of fdir:: > + > + testpmd>flush_flow_director 0 > + testpmd>show port fdir 0 > + > -- > 1.9.3