From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id 4E88E559A for ; Mon, 3 Sep 2018 04:00:29 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 Sep 2018 19:00:27 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,322,1531810800"; d="scan'208";a="70083014" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by orsmga008.jf.intel.com with ESMTP; 02 Sep 2018 19:00:20 -0700 Received: from fmsmsx153.amr.corp.intel.com (10.18.125.6) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.319.2; Sun, 2 Sep 2018 19:00:20 -0700 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by FMSMSX153.amr.corp.intel.com (10.18.125.6) with Microsoft SMTP Server (TLS) id 14.3.319.2; Sun, 2 Sep 2018 19:00:19 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.240]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.143]) with mapi id 14.03.0319.002; Mon, 3 Sep 2018 10:00:18 +0800 From: "Liu, Yong" To: "Peng, Yuan" , "dts@dpdk.org" CC: "Peng, Yuan" Thread-Topic: [dts] [PATCH v2] test_plans: Add rss_to_rte_flow_test_plan.rst Thread-Index: AQHUQNY3Wqnb4U0yG0e+g461/zc01aTd0IbA Date: Mon, 3 Sep 2018 02:00:17 +0000 Message-ID: <86228AFD5BCD8E4EBFD2B90117B5E81E631316FE@SHSMSX103.ccr.corp.intel.com> References: <1535684241-4573-1-git-send-email-yuan.peng@intel.com> In-Reply-To: <1535684241-4573-1-git-send-email-yuan.peng@intel.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMmNjZjc2MjgtYWFiMS00NjMxLWIyYWUtZDg5M2JiNGFhODdhIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoia1lKYU1pRTdKZUpZSWxSSEdWVG92Tlc0Ym40UllVcXBKdTVnNHpDWllpc3BaVWhqTUlNV3F4MHJZajZsb0tMeiJ9 x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action 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 v2] test_plans: Add rss_to_rte_flow_test_plan.rst 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: Mon, 03 Sep 2018 02:00:30 -0000 Yuan, Few comments are inline. Thanks, Marvin > -----Original Message----- > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Peng Yuan > Sent: Friday, August 31, 2018 10:57 AM > To: dts@dpdk.org > Cc: Peng, Yuan > Subject: [dts] [PATCH v2] test_plans: Add rss_to_rte_flow_test_plan.rst >=20 > Add rss_to_rte_flow_test_plan.rst to test_plans >=20 > Signed-off-by: Peng Yuan >=20 > diff --git a/test_plans/rss_to_rte_flow_test_plan.rst > b/test_plans/rss_to_rte_flow_test_plan.rst > new file mode 100644 > index 0000000..6b36d19 > --- /dev/null > +++ b/test_plans/rss_to_rte_flow_test_plan.rst > @@ -0,0 +1,338 @@ > +.. Copyright (c) <2018>, Intel Corporation > + All rights reserved. > + > + Redistribution and use in source and binary forms, with or without > + modification, are permitted provided that the following conditions > + are met: > + > + - Redistributions of source code must retain the above copyright > + notice, this list of conditions and the following disclaimer. > + > + - Redistributions in binary form must reproduce the above copyright > + notice, this list of conditions and the following disclaimer in > + the documentation and/or other materials provided with the > + distribution. > + > + - Neither the name of Intel Corporation nor the names of its > + contributors may be used to endorse or promote products derived > + from this software without specific prior written permission. > + > + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS > + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT > + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS > + FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE > + COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, > + INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES > + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR > + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, > + STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) > + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED > + OF THE POSSIBILITY OF SUCH DAMAGE. > + > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > +Move RSS to rte_flow > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > +Description > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > + > + rte_flow has been actually defined to include RSS, but till now, > + RSS is out of rte_flow. It was suggested to move existing RSS to rte_= flow. > + This can be better for users, and may save effort for CPK development= . > + RSS enabling: now, rte_flow API enabling RSS is support on igb/ixgbe/= i40e. > + RSS input set changing: now, rte flow API RSS input set is support on > i40e Please remove spaces in the beginning. > + > +Prerequisites > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > + > +1. Hardware: > + Fortville/82599/I350 > + > +2. Software: > + dpdk: http://dpdk.org/git/dpdk > + scapy: http://www.secdev.org/projects/scapy/ > + > +3. Bind the pf port to dpdk driver:: > + > + ./usertools/dpdk-devbind.py -b igb_uio 05:00.0 05:00.1 > + > +4. Configure eight packets ready sent to port 0:: > + > + pkt1 =3D > Ether(dst=3D"00:00:00:00:01:00")/IP(src=3D"10.0.0.1",dst=3D"192.168.0.2")= /SCTP(dpor > t=3D80, sport=3D80)/("X"*48) > + pkt2 =3D > Ether(dst=3D"00:00:00:00:01:00")/IP(src=3D"10.0.0.1",dst=3D"192.168.0.2")= /UDP(dport > =3D50, sport=3D50)/("X"*48) > + pkt3 =3D > Ether(dst=3D"00:00:00:00:01:00")/IP(src=3D"10.0.0.1",dst=3D"192.168.0.3")= /TCP(dport > =3D50, sport=3D50)/("X"*48) > + pkt4 =3D > Ether(dst=3D"00:00:00:00:01:00")/IP(src=3D"10.0.0.1",dst=3D"192.168.0.2")= /("X"*48) > + pkt5 =3D > Ether(dst=3D"00:00:00:00:01:00")/IPv6(src=3D"2001::1",dst=3D"2001::2")/SC= TP(dport=3D8 > 0, sport=3D80)/("X"*48) > + pkt6 =3D > Ether(dst=3D"00:00:00:00:01:00")/IPv6(src=3D"2001::1",dst=3D"2001::2")/UD= P(dport=3D50, > sport=3D50)/("X"*48) > + pkt7 =3D > Ether(dst=3D"00:00:00:00:01:00")/IPv6(src=3D"2001::1",dst=3D"2001::2")/TC= P(dport=3D50, > sport=3D50)/("X"*48) > + pkt8 =3D > Ether(dst=3D"00:00:00:00:01:00")/IPv6(src=3D"2001::1",dst=3D"2001::2")/("= X"*48) > + > +Test case: enable rss > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > + > +1. Start the testpmd:: > + > + ./testpmd -c 1ffff -n 4 -- -i --nb-cores=3D8 --rxq=3D4 --txq=3D4 --p= ort- > topology=3Dchained Yuan, please reduce the core used in this case if it is possible. Not every= platform has more than 17 cpus. > + testpmd> set fwd rxonly > + testpmd> set verbose 1 > + testpmd> start > + > +2. Enable ipv4-udp, and set all the queues into RSS queue rule:: > + > + testpmd> flow create 0 ingress pattern end actions rss types ipv4-ud= p > end / end > + > +3. Send the ipv4-udp packets with different 5-tuple parameters. > + All the packets are distributed to all the four queues. > + > +Test case: set valid and invalid parameter with all types > +=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=3D=3D > + > +1. Start the testpmd:: > + > + ./testpmd -c 1ffff -n 4 -- -i --nb-cores=3D8 --rxq=3D16 --txq=3D16 -= -port- > topology=3Dchained > + testpmd> set fwd rxonly > + testpmd> set verbose 1 > + testpmd> start > + > +2. Set queue 0, 8 and 15 into RSS queue rule:: > + > + testpmd> flow create 0 ingress pattern end actions rss queues 0 8 15= end > / end > + > +3. Send the eight packets to port 0. > + All the packets are distributed to queue 0/8/15. > + > +4. Set a second RSS queue rule:: > + > + testpmd> flow create 0 ingress pattern end actions rss queues 3 end = / > end > + Caught error type 2 (flow rule (handle)): Failed to create flow. > + > + There can't be more than one RSS queue rule. > + > +5. Reset the RSS queue rule:: > + > + testpmd> flow flush 0 > + testpmd> flow create 0 ingress pattern end actions rss queues 3 end = / > end > + > + The rule is set successfully. > + Send the eight packets to port 0, all of them are distributed to queu= e 3. > + > +6. Set a wrong parameter: queue ID is 16 :: > + > + testpmd> flow create 0 ingress pattern end actions rss queues 16 end= / > end > + Caught error type 11 (specific action): cause: 0x7ffdb2bbe6e8, queue= id > > max number of queues > + > +7. Set all the queues to the rule:: > + > + testpmd> flow create 0 ingress pattern end actions rss queues 0 1 2 = 3 4 > 5 6 7 8 9 10 11 12 13 14 15 end / end > + > + Send the eight packets to port 0, the packets may be distributed to a= ny > + of the queue 0-15. > + > +Notes: The max queue number may be different in different NIC types. > +We can set different queue number in command line with different NIC typ= es. > + > +Test case: Different packet types > +=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 the testpmd:: > + > + ./testpmd -c 1ffff -n 4 -- -i --nb-cores=3D8 --rxq=3D16 --txq=3D16 -= -port- > topology=3Dchained > + testpmd> set fwd rxonly > + testpmd> set verbose 1 > + testpmd> start > + > +2. Set queue 1, 8 and 15 into RSS queue rule:: > + > + testpmd> flow create 0 ingress pattern end actions rss types udp ipv= 4- > tcp ipv6-sctp ipv4-other end queues 1 8 15 end / end > + > +3. Send the eight packets to port 0. > + pkt2/pkt3/pkt4/pkt5/pkt6 are distributed to queue 1/8/15. > + Other packets are distributed to queue 0. > + > +4. Set a different packet type RSS queue rule:: > + > + testpmd> flow create 0 ingress pattern end actions rss types ipv6-ot= her > end queues 3 end / end > + Caught error type 2 (flow rule (handle)): Failed to create flow. > + > + There can't be more than one RSS queue rule. > + > +Test case: disable rss in command-line > +=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 "rss" should be capitalized.=20 > + > +1. Start the testpmd:: > + > + ./testpmd -c 1ffff -n 4 -- -i --nb-cores=3D8 --rxq=3D16 --txq=3D16 -= -disable- > rss --port-topology=3Dchained > + testpmd> set fwd rxonly > + testpmd> set verbose 1 > + testpmd> start > + > +2. Send the eight packets to port 0. > + All the packets are distributed to queue 0. > + > +3. Set the RSS queue rule:: > + > + testpmd> flow create 0 ingress pattern end actions rss types ipv6-tc= p > ipv4-udp sctp ipv6-other end queues 6 7 8 end / end > + > + Send the eight packets to port 0. > + pkt1/pkt2/pkt5/pkt7/pkt8 are distributed to queue 6/7/8. > + Other packets are distributed to queue 0. > + > +4. Clean the rule:: > + > + testpmd> flow flush 0 > + > + Send the eight packets to port 0. > + All the packets are distributed to queue 0. > + > +Test case: Flow director rule and RSS rule combination > +=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 the testpmd:: > + > + ./testpmd -c 1ffff -n 4 -- -i --nb-cores=3D8 --rxq=3D16 --txq=3D16 -= -pkt- > filter-mode=3Dperfect > + testpmd> set fwd rxonly > + testpmd> set verbose 1 > + testpmd> start > + > +2. Set a RSS queue rule:: > + > + testpmd> flow create 0 ingress pattern end actions rss queues 6 7 8 = end > / end > + > + Send pkt2 to port 0, pkt2 is distributed to queue 6. > + > +3. Set a flow director rule:: > + > + testpmd> flow create 0 ingress pattern eth / ipv4 src is 192.168.0.1= dst > is 192.168.0.2 / udp src is 50 dst is 50 / end actions queue index 1 / en= d > + > + Send pkt2 to port 0, pkt2 is distributed to queue 1. > + > +4. Destroy the flow director rule:: > + > + testpmd> flow destroy 0 rule 1 > + > + Send pkt2 to port 0, pkt2 is distributed to queue 6 again. > + So flow director rule is priority to RSS queue rule. > + > +Test case: Set queue region with RSS rule API > +=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 > + > +Notes: Queue region is only supported by fortville, so this case only ca= n > +be implemented with fortville. > + > +1. Start the testpmd:: > + > + ./testpmd -c 1ffff -n 4 -- -i --nb-cores=3D16 --rxq=3D16 --txq=3D16 = --port- > topology=3Dchained > + testpmd> set fwd rxonly > + testpmd> set verbose 1 > + testpmd> start > + > +2. Set a RSS queue rule:: > + > + testpmd> flow create 0 ingress pattern end actions rss queues 7 8 10= 11 > 12 14 15 end / end > + > +3. Send pkt to port 0:: > + > + pkt1 =3D Ether(dst=3D"00:00:00:00:01:00", > src=3D"52:00:00:00:00:00")/Dot1Q(prio=3D1) \ > + /IP(src=3D"10.0.0.1",dst=3D"192.168.0.2")/TCP(dport=3D80, sport=3D80= )/("X"*48) > + pkt2 =3D Ether(dst=3D"00:00:00:00:01:00", > src=3D"52:00:00:00:00:00")/Dot1Q(prio=3D2) \ > + /IP(src=3D"10.0.0.1",dst=3D"192.168.0.2")/TCP(dport=3D80, sport=3D80= )/("X"*48) > + pkt3 =3D Ether(dst=3D"00:00:00:00:01:00", > src=3D"52:00:00:00:00:00")/Dot1Q(prio=3D3) \ > + /IP(src=3D"10.0.0.1",dst=3D"192.168.0.2")/TCP(dport=3D80, sport=3D80= )/("X"*48) > + > + They are all distributed to queue 8. > + > +4. Set three queue regions:: > + > + testpmd> flow create 0 ingress pattern vlan tci is 0x2000 / end acti= ons > rss queues 7 8 end / end > + testpmd> flow create 0 ingress pattern vlan tci is 0x4000 / end acti= ons > rss queues 11 12 end / end > + testpmd> flow create 0 ingress pattern vlan tci is 0x6000 / end acti= ons > rss queues 15 end / end > + > + Send the 3 packets to port 0. They are distributed to queue 7/11/15. > + > +Notes: only rss rule API only support setting UP queue region, > +not support setting pctype queue region. > + > +5. Flush the queue region:: > + > + testpmd> flow list 0 > + ID Group Prio Attr Rule > + 0 0 0 i- =3D> RSS > + 1 0 0 i- VLAN =3D> RSS > + 2 0 0 i- VLAN =3D> RSS > + 3 0 0 i- VLAN =3D> RSS > + > + testpmd> flow destroy 0 rule 2 > + Flow rule #2 destroyed > + testpmd> flow list 0 > + ID Group Prio Attr Rule > + 0 0 0 i- =3D> RSS > + 1 0 0 i- VLAN =3D> RSS > + 3 0 0 i- VLAN =3D> RSS > + > + Send the 3 packets to port 0. They are distributed to queue 0. > + Destroy one queue region rule, all the rules become invalid. > + > +Test case: Set queue region with invalid parameter > +=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 the testpmd:: > + > + ./testpmd -c 1ffff -n 4 -- -i --nb-cores=3D16 --rxq=3D16 --txq=3D16 = --port- > topology=3Dchained > + testpmd> set fwd rxonly > + testpmd> set verbose 1 > + testpmd> start > + > +2. Set a RSS queue rule:: > + > + testpmd> flow create 0 ingress pattern end actions rss queues 8 10 1= 1 12 > 15 end / end > + > +3. Set invalid queue ID "9" to queue region:: > + > + testpmd> flow create 0 ingress pattern vlan tci is 0x2000 / end acti= ons > rss queues 8 9 end / end > + Caught error type 11 (specific action): cause: 0x7ffda008efe8, no va= lid > queues > + > +4. Set discontinuous queue ID to queue region:: > + > + testpmd> flow create 0 ingress pattern vlan tci is 0x2000 / end acti= ons > rss queues 8 10 end / end > + Caught error type 11 (specific action): cause: 0x7ffda008efe8, no va= lid > queues > + > +5. Set invalid queue number to queue region:: > + > + testpmd> flow create 0 ingress pattern vlan tci is 0x4000 / end acti= ons > rss queues 10 11 12 end / end > + i40e_flow_parse_rss_action(): The region sizes should be any of the > following values: 1, 2, 4, 8, 16, 32, 64 as long as the total number of > queues do not exceed the VSI allocation > + Caught error type 2 (flow rule (handle)): Failed to create flow. > + > +Test case: Queue region(old API) and RSS rule combination > +=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=3D=3D > + > +Notes: Queue region is only supported by fortville, so this case only ca= n > +be implemented with fortville. > + > +1. Start the testpmd:: > + > + ./testpmd -c 1ffff -n 4 -- -i --nb-cores=3D8 --rxq=3D16 --txq=3D16 -= -port- > topology=3Dchained > + testpmd> port config all rss all > + testpmd> set fwd rxonly > + testpmd> set verbose 1 > + testpmd> start > + > +2. Set a queue region:: > + > + testpmd> set port 0 queue-region region_id 0 queue_start_index 1 > queue_num 1 > + testpmd> set port 0 queue-region region_id 0 flowtype 31 > + testpmd> set port 0 queue-region flush on > + > + Send pkt2 to port 0. It is distributed to queue 1. > + > +3. Set a RSS queue rule:: > + > + testpmd> flow create 0 ingress pattern end actions rss queues 6 7 en= d / > end > + > + Send pkt2 to port 0. It is still distributed to queue 1. > + > +4. flush the queue region:: > + > + testpmd> set port 0 queue-region flush off > + > + Send pkt2 to port 0. It is distributed to queue 7. > + Queue region is priority to RSS queue rule. > -- > 2.5.0