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 234D9A00C5; Thu, 11 Jun 2020 15:22:41 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id CF92EF72; Thu, 11 Jun 2020 15:22:40 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id B2702A3 for ; Thu, 11 Jun 2020 15:22:38 +0200 (CEST) IronPort-SDR: nS+fE48yMzAObbXP+F5/rx7RUioGYAZEsJwRnT2ZznxyjCuJf4P/uCMKOOJ9bc9KfvQLpewcEN D9WRiC6X6R9g== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Jun 2020 06:22:37 -0700 IronPort-SDR: xYHEC0kCm2lGQiTubA5iIug0aWfqqI+Lf0tumdqDAuHW5HBeqiKJAyFj7qyfbzdF7Mj3HCSoxT NJfypm0Je4Jg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,499,1583222400"; d="scan'208";a="289538649" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by orsmga002.jf.intel.com with ESMTP; 11 Jun 2020 06:22:37 -0700 Received: from FMSMSX110.amr.corp.intel.com (10.18.116.10) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 11 Jun 2020 06:22:37 -0700 Received: from shsmsx154.ccr.corp.intel.com (10.239.6.54) by fmsmsx110.amr.corp.intel.com (10.18.116.10) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 11 Jun 2020 06:22:36 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.85]) by SHSMSX154.ccr.corp.intel.com ([169.254.7.221]) with mapi id 14.03.0439.000; Thu, 11 Jun 2020 21:22:33 +0800 From: "Tu, Lijuan" To: "Peng, Yuan" , "dts@dpdk.org" CC: "Peng, Yuan" Thread-Topic: [dts] [PATCH]test_plans: change rss command due to dpdk code change Thread-Index: AQHWPiLSh6ox1zzdkkCzcGCYT16ZDajTamvA Date: Thu, 11 Jun 2020 13:22:33 +0000 Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BC5BE19@SHSMSX101.ccr.corp.intel.com> References: <1591707829-139461-1-git-send-email-yuan.peng@intel.com> In-Reply-To: <1591707829-139461-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: 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]test_plans: change rss command due to dpdk code change 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 Peng Yuan Sent: 2020=1B$BG/=1B(B6=1B$B7n=1B(B9=1B$BF|=1B(B 21:04 To: dts@dpdk.org Cc: Peng, Yuan Subject: [dts] [PATCH]test_plans: change rss command due to dpdk code chang= e change rss command due to dpdk code change devide the i40e cases and ixgbe/= igb cases Signed-off-by: Peng Yuan diff --git a/test_plans/rss_to_rte_flow_test_plan.rst b/test_plans/rss_to_r= te_flow_test_plan.rst index d91484a..0e33f11 100644 --- a/test_plans/rss_to_rte_flow_test_plan.rst +++ b/test_plans/rss_to_rte_flow_test_plan.rst @@ -50,7 +50,7 @@ Prerequisites =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 1. Hardware: - Fortville/82599/I350 + I40E/IXGBE/IGB driver NIC =20 2. Software: dpdk: http://dpdk.org/git/dpdk @@ -66,13 +66,21 @@ Prerequisites pkt2 =3D Ether(dst=3D"00:00:00:00:01:00")/IP(src=3D"10.0.0.1",dst=3D"1= 92.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"1= 92.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"1= 92.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",nh=3D132)/SCTP(dport=3D80, sport=3D80)/("X"*48) - pkt6 =3D Ether(dst=3D"00:00:00:00:01:00")/IPv6(src=3D"2001::1",dst=3D"= 2001::2")/UDP(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")/TCP(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: disable and enable rss -=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 + pkt5 =3D Ether(dst=3D"00:00:00:00:01:00")/IP(src=3D"10.0.0.1",dst=3D"1= 92.168.0.2", frag=3D1)/Raw("X"*48) + pkt6 =3D Ether(dst=3D"00:00:00:00:01:00")/IPv6(src=3D"2001::1",dst=3D"= 2001::2",nh=3D132)/SCTP(dport=3D80, sport=3D80)/("X"*48) + pkt7 =3D Ether(dst=3D"00:00:00:00:01:00")/IPv6(src=3D"2001::1",dst=3D"= 2001::2")/UDP(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")/TCP(dport=3D50, sport=3D50)/("X"*48) + pkt9 =3D Ether(dst=3D"00:00:00:00:01:00")/IPv6(src=3D"2001::1",dst=3D"= 2001::2")/("X"*48) + pkt10 =3D Ether(dst=3D"00:00:00:00:01:00")/IPv6(dst=3D"CDCD:910A:2222:= 5498:8475:1111:3900:2020", nh=3D44)/("X"*48) + pkt11 =3D Ether(dst=3D"00:00:00:00:01:00",=20 + type=3D0x0807)/Raw(load=3D"\x61\x62\x63\x64") + +5. The rss setting commands are different between i40e driver and ixgbe/ig= b driver. + So design different cases on i40e/ixgbe/igb. + +I40E Cases +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D +Test case: set rss types on two ports (I40E)=20 +=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 =20 1. Start the testpmd:: =20 @@ -87,73 +95,118 @@ Test case: disable and enable rss RSS functions: ipv4-frag ipv4-other ipv6-frag ipv6-other ip =20 - Send the ipv4-other packets with different src/dst ip address. - All the packets are distributed to all the four queues. + testpmd> show port 1 rss-hash + RSS functions: + ipv4-frag ipv4-other ipv6-frag ipv6-other ip =20 -3. disable all RSS fuctions:: + Send the ipv4-other/ipv4-frag/ipv6-other/ipv6-frag packets with differe= nt src/dst ip address to two ports. + All the packets are distributed to all the four queues of two ports. + Send the ipv4-udp packets with different src/dst ip and sport/dport to = two ports. + All the packets are distributed to queue 0 on two ports. =20 - testpmd> flow create 0 ingress pattern end actions rss types none end = / end +3. Enable ipv4-udp RSS function on port 0:: + + testpmd> flow create 0 ingress pattern eth / ipv4 / udp / end=20 + actions rss types ipv4-udp end queues end / end Flow rule #0 created + testpmd> show port 0 rss-hash - RSS disabled + RSS functions: + ipv4-udp udp =20 - Send the ipv4-udp packets with different src/dst ip address. - All the packets are distributed to queue 0. - Notes: only i40e support the command, - others don't support the command created. + testpmd> show port 1 rss-hash + RSS functions: + ipv4-frag ipv4-other ipv6-frag ipv6-other ip =20 -4. enable RSS fuction with all RSS hash type:: =20 - testpmd> flow create 0 ingress pattern end actions rss types all end /= end - Flow rule #1 created - testpmd> show port 0 rss-hash + Send the ipv4-other/ipv4-frag/ipv6-other/ipv6-frag packets with differe= nt src/dst ip address to two ports. + All the packets to port 0 are distributed to queue 0. + All the packets to port 1 are distributed to all the four queues + Send the ipv4-udp packets with different src/dst ip and sport/dport to = two ports. + All the packets to port 0 are distributed to all the four queues. + All the packets to port 1 are distributed to queue 0 + +4. enable RSS fuction with all RSS hash type on port 1:: + + testpmd> flow create 1 ingress pattern eth / end actions rss types l2-= payload end queues end / end + testpmd> flow create 1 ingress pattern eth / ipv4 / end actions rss ty= pes ipv4-other end queues end / end + testpmd> flow create 1 ingress pattern eth / ipv4 / end actions rss ty= pes ipv4-frag end queues end / end + testpmd> flow create 1 ingress pattern eth / ipv4 / udp / end actions = rss types ipv4-udp end queues end / end + testpmd> flow create 1 ingress pattern eth / ipv4 / tcp / end actions = rss types ipv4-tcp end queues end / end + testpmd> flow create 1 ingress pattern eth / ipv4 / sctp / end actions= rss types ipv4-sctp end queues end / end + testpmd> flow create 1 ingress pattern eth / ipv6 / end actions rss ty= pes ipv6-other end queues end / end + testpmd> flow create 1 ingress pattern eth / ipv6 / end actions rss ty= pes ipv6-frag end queues end / end + testpmd> flow create 1 ingress pattern eth / ipv6 / udp / end actions = rss types ipv6-udp end queues end / end + testpmd> flow create 1 ingress pattern eth / ipv6 / tcp / end actions = rss types ipv6-tcp end queues end / end + testpmd> flow create 1 ingress pattern eth / ipv6 / sctp / end=20 + actions rss types ipv6-sctp end queues end / end + + all the rules can be created successfully. + then check the rule list:: + + testpmd> flow list 1 + + there are 11 rules listed correctly. + then show the port RSS function:: + + testpmd> show port 1 rss-hash RSS functions: all ipv4-frag ipv4-tcp ipv4-udp ipv4-sctp ipv4-other ipv6-frag ipv6-t= cp ipv6-udp ipv6-sctp ipv6-other l2-payload ip udp tcp sctp =20 - Send the ipv4-udp packets with different src/dst ip address. - All the packets are distributed to all the four queues. + Send the ipv4-other/ipv4-frag/ipv4-udp/ipv4-tcp/ipv4-sctp/ipv6-other/ip= v6-frag/ipv6-udp/ipv6-tcp/ipv6-sctp packets with different src/dst ip addre= ss or different sport/dport to port 1. + All the packets are distributed to all the four queues of port 1. + Send same packets to port 0. + ipv4-udp packets are distributed to all the queues of port 0. + other packets are distributed to queue 0. =20 -Notes: the default RSS functions are different among several NICs. -Here shows the printing of NIC with i40e driver. +5. enable RSS fuction with all RSS hash type on port 0, all the rules can = be created successfully. + Send same packets to port 0. + All the packets are distributed to all the four queues of port 0. + Send same packets to port 1. + All the packets are distributed to all the four queues of port 1. =20 -Test case: enable ipv4-udp rss -=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 +6. delete rule 0/2/10 of port 1:: =20 -1. Start the testpmd:: + testpmd> flow destroy 1 rule 0 + testpmd> flow destroy 1 rule 2 + testpmd> flow destroy 1 rule 10 =20 - ./testpmd -c 1ffff -n 4 -- -i --nb-cores=3D8 --rxq=3D4 --txq=3D4 --por= t-topology=3Dchained - testpmd> set fwd rxonly - testpmd> set verbose 1 - testpmd> start + list the rules on port 1, other rules can be listed. + Send same packets to port 0. + All the packets are distributed to all the four queues of port 0. + Send same packets to port 1. + L2-payload/ipv4-frag/ipv6-sctp are distributed to queue 0 of port 1. + Other packets are distributed to all the four queues of port 1. =20 -2. Show port default RSS fuctions:: +7. disable RSS fuction with all RSS hash type on port 0:: =20 + testpmd> flow flush 0 testpmd> show port 0 rss-hash - RSS functions: - ipv4-frag ipv4-other ipv6-frag ipv6-other ip + RSS disabled =20 - Send the ipv4-other packets with different src/dst ip address. - All the packets are distributed to all the four queues. - Send the ipv4-udp packets with different src/dst ip and sport/dport. + Send same packets to port 0. All the packets are distributed to queue 0. - Notes: different NICs has different default RSS type function. - the result is for i40e. + Send same packets to port 1. + L2-payload/ipv4-frag/ipv6-sctp are distributed to queue 0 of port 1. + Other packets are distributed to all the four queues of port 1. =20 -3. Enable ipv4-udp, and set all the queues into RSS queue rule:: +8. disable RSS fuction with all RSS hash type on port 1:: =20 - testpmd> flow create 0 ingress pattern end actions rss types ipv4-udp = end / end - Flow rule #0 created - testpmd> show port 0 rss-hash - RSS functions: - ipv4-udp udp + testpmd> flow flush 1 + testpmd> show port 1 rss-hash + RSS disabled =20 - Send the ipv4-other packets with different src/dst ip address. + Send same packets to port 0. + All the packets are distributed to queue 0. + Send same packets to port 1. All the packets are distributed to queue 0. - Send the ipv4-udp packets with different src/dst ip and sport/dport. - All the packets are distributed to all the four queues. =20 -Test case: set valid and invalid queue -=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: only i40e support the command, + others don't support the command created. + +Notes: the default RSS functions are different among several NICs. +Here shows the printing of NIC with i40e driver. + +Test case: set rss queues on two ports (I40E)=20 +=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 =20 1. Start the testpmd:: =20 @@ -162,77 +215,187 @@ Test case: set valid and invalid queue testpmd> set verbose 1 testpmd> start =20 -2. Set queue 0, 8 and 15 into RSS queue rule:: +2. Set queue 0, 8 and 15 into RSS queue rule on port 0:: =20 - testpmd> flow create 0 ingress pattern end actions rss queues 0 8 15 e= nd / end + testpmd> flow create 0 ingress pattern end actions rss types end=20 + queues 0 8 15 end / end =20 - Send the ipv4-other packets with different src/dst ip address. - All the packets are distributed to queue 0/8/15. - Send the ipv4-udp packets with different src/dst ip and sport/dport. - All the packets are distributed to queue 0. + Send the ipv4-other packets with different src/dst ip address to port 0= . + All the packets are distributed to queue 0/8/15 of port 0. + Send the ipv4-other packets with different src/dst ip address to port 1= . + All the packets are distributed to all queues of port 1. =20 -3. Set a second RSS queue rule:: + Send the ipv4-udp packets with different src/dst ip and sport/dport to = port 0 and port 1. + All the packets are distributed to queue 0 of both ports. =20 - testpmd> flow create 0 ingress pattern end actions rss queues 3 end / = end - testpmd> flow create 0 ingress pattern end actions rss types ipv4-udp = end queues 3 end / end +3. Set a RSS queue rule on port 1:: =20 - The two rules failed to be created. - There can't be more than one RSS queue rule. + testpmd> flow create 1 ingress pattern end actions rss types end=20 + queues 3 end / end =20 -4. Reset the RSS queue rule:: + Send the ipv4-other packets with different src/dst ip address to port 0= . + All the packets are distributed to queue 0/8/15 of port 0. + Send the ipv4-other packets with different src/dst ip address to port 1= . + All the packets are distributed to queue 3 of port 1. + + Send the ipv4-udp packets with different src/dst ip and sport/dport to = port 0 and port 1. + All the packets are distributed to queue 0 of both ports. + +4. Set a second RSS queue rule on port 1:: + + testpmd> flow create 1 ingress pattern end actions rss types end=20 + queues 0 8 15 end / end + + The rule is set successfully. list the rules:: + + testpmd> flow list 1 + ID Group Prio Attr Rule + 0 0 0 i-- =3D> RSS + 1 0 0 i-- =3D> RSS + + Send the ipv4-other packets with different src/dst ip address to port 0= . + All the packets are distributed to queue 0/8/15 of port 0. + Send the ipv4-other packets with different src/dst ip address to port 1= . + All the packets are distributed to queue 0/8/15 of port 1. + +Notes: rule 1 conflicts with rule 0, rule 1 will overlap the rule 0. + +5. delete rule 0 of port 0:: =20 testpmd> flow flush 0 - testpmd> flow create 0 ingress pattern end actions rss types ipv4-udp = end queues 3 end / end =20 - The rule is set successfully. - Send the ipv4-other packets with different src/dst ip address. - All the packets are distributed to queue 0. - Send the ipv4-udp packets with different src/dst ip and sport/dport. - All the packets are distributed to queue 0/8/15. + there is no rule listed on port 0. + Send the ipv4-other packets with different src/dst ip address to port 0= . + All the packets are distributed to all queues of port 0. + Send the ipv4-other packets with different src/dst ip address to port 1= . + All the packets are distributed to queue 0/8/15 of port 1. =20 -5. Set a wrong parameter: queue ID is 16 :: +6. Set a RSS queue rule on port 0 again:: =20 - testpmd> flow create 0 ingress pattern end actions rss queues 16 end /= end + testpmd> flow create 0 ingress pattern end actions rss types end=20 + queues 0 8 15 end / end =20 - The rule failed to be created. + delete rule 1 of port 1:: =20 -6. Set all the queues to the rule:: + testpmd> flow destroy 1 rule 1 + testpmd> flow list 1 + ID Group Prio Attr Rule + 0 0 0 i-- =3D> RSS =20 - 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 ipv4-other packets with different src/dst ip address to port 0= . + All the packets are distributed to queue 0/8/15 of port 0. + Send the ipv4-other packets with different src/dst ip address to port 1= . + All the packets are distributed to all queues of port 1. + +7. Set a RSS queue rule on port 1 again:: + + testpmd> flow create 1 ingress pattern end actions rss types end=20 + queues 3 end / end + + deleate rule 0 of port 1:: + + testpmd> flow destroy 1 rule 0 + testpmd> flow list 1 + ID Group Prio Attr Rule + 1 0 0 i-- =3D> RSS + + Send the ipv4-other packets with different src/dst ip address to port 0= . + All the packets are distributed to queue 0/8/15 of port 0. + Send the ipv4-other packets with different src/dst ip address to port 1= . + All the packets are distributed to queue 3 of port 1. + +8. Flush rules on port 1:: + + testpmd> flow flush 1 + + there is no rule listed on port 1. + Send the ipv4-other packets with different src/dst ip address to port 0= . + All the packets are distributed to queue 0/8/15 of port 0. + Send the ipv4-other packets with different src/dst ip address to port 1= . + All the packets are distributed to all queues of port 1. + +9. Set a wrong parameter: queue ID is 16 :: + + testpmd> flow create 0 ingress pattern end actions rss types end=20 + queues 16 end / end + + Fail to create the rule, report message:: + + queue id > max number of queues: Invalid argument + +10. Set all the queues to the rule:: + + testpmd> flow create 0 ingress pattern end actions rss types end=20 + queues 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 end / end =20 Send the ipv4-other packets with different src/dst ip address. - The packets may be distributed to any of the queue 0-15. + All the packets are distributed to all queues. =20 Notes: The max queue number may be different in different NIC types. We can set different queue number in command line with different NIC types= . =20 -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 +Test case: set rss types and rss queues on two ports (I40E)=20 +=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=3D=3D =20 1. Start the testpmd:: =20 - ./testpmd -c 1ffff -n 4 -- -i --nb-cores=3D8 --rxq=3D16 --txq=3D16 --p= ort-topology=3Dchained + ./testpmd -c 1ffff -n 4 -- -i --nb-cores=3D8 --rxq=3D8 --txq=3D8=20 + --port-topology=3Dchained testpmd> set fwd rxonly testpmd> set verbose 1 testpmd> start =20 -2. Set queue 1, 8 and 15 into RSS queue rule:: +2. Show port default RSS fuctions on port 0:: =20 - testpmd> flow create 0 ingress pattern end actions rss types udp ipv4-= tcp ipv6-sctp ipv4-other end queues 1 8 15 end / end + testpmd> show port 0 rss-hash + RSS functions: + ipv4-frag ipv4-other ipv6-frag ipv6-other ip =20 -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. + Send the ipv4-other packets with different src/dst ip address to port 0= . + All the packets are distributed to all the four queues. + Send the ipv4-udp packets with different src/dst ip and sport/dport por= t 0. + All the packets are distributed to queue 0. =20 -4. Set a different packet type RSS queue rule:: +Notes: different NICs has different default RSS type function. +the result is for i40e. =20 - testpmd> flow create 0 ingress pattern end actions rss types ipv6-othe= r end queues 3 end / end +3. Enable ipv4-udp, and set queue 0 2 7 into RSS queue rule:: =20 - The rule failed to be created. - There can't be more than one RSS queue rule. + testpmd> flow create 0 ingress pattern eth / ipv4 / udp / end actions = rss types ipv4-udp end queues end / end + Flow rule #0 created + testpmd> flow create 0 ingress pattern end actions rss types end queue= s 0 2 7 end / end + Flow rule #1 created =20 -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 + testpmd> show port 0 rss-hash + RSS functions: + ipv4-udp udp + + Send the ipv4-other packets with different src/dst ip address to two po= rts. + All the packets to queue 0 are distributed to queue 0. + All the packets to queue 1 are distributed to all queue. + Send the ipv4-udp packets with different src/dst ip and sport/dport to = two ports. + All the packets to queue 0 are distributed to queue 0/2/7. + All the packets to queue 1 are distributed to queue 0. + +4. Enable ipv4-udp/ipv4-tcp/ipv6-other/ipv6-sctp/ipv6-udp RSS type, and se= t a RSS queue rule on port 1:: + + testpmd> flow create 1 ingress pattern end actions rss types end queu= es 1 4 7 end / end + testpmd> flow create 1 ingress pattern eth / ipv4 / udp / end actions= rss types ipv4-udp end queues end / end + testpmd> flow create 1 ingress pattern eth / ipv4 / tcp / end actions= rss types ipv4-tcp end queues end / end + testpmd> flow create 1 ingress pattern eth / ipv6 / end actions rss t= ypes ipv6-other end queues end / end + testpmd> flow create 1 ingress pattern eth / ipv6 / sctp / end action= s rss types ipv6-sctp end queues end / end + testpmd> flow create 1 ingress pattern eth / ipv6 / udp / end=20 + actions rss types ipv6-udp end queues end / end + +5. Send the eight packets to two ports. + ipv4-udp packet to port 0 is distributed to queue 0/2/7. + Other packets to port 0 are distributed to queue 0. + ipv4-udp/ipv4-tcp/ipv6-other/ipv6-sctp/ipv6-udp to port 1 are distribut= ed to queue 1/4/7. + Other packets to port 1 are distributed to queue 0. + +6. Set a different RSS queue rule on port 1:: + + testpmd> flow create 0 ingress pattern end actions rss types end=20 + queues 3 end / end + + Send the eight packets to port 0. + get same result with step 5. + Send the eight packets to port 1. + ipv4-udp/ipv4-tcp/ipv6-other/ipv6-sctp/ipv6-udp to port 1 are distribut= ed to queue 3. + Other packets are distributed to queue 0. + +Test case: disable rss in command-line (I40E)=20 +=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 =20 1. Start the testpmd:: =20 @@ -240,34 +403,66 @@ Test case: disable rss in command-line testpmd> set fwd rxonly testpmd> set verbose 1 testpmd> start + testpmd> show port 0 rss-hash + RSS disabled =20 -2. Send the eight packets to port 0. +2. Send the eight packets to port 0 and port 1 All the packets are distributed to queue 0. =20 -3. enable all RSS function type:: +3. enable ipv4-udp and ipv6-tcp RSS function type on port 0:: =20 - testpmd> flow create 0 ingress pattern end actions rss types all end /= end + testpmd> flow create 0 ingress pattern eth / ipv4 / udp / end actions = rss types ipv4-udp end queues end / end + testpmd> flow create 0 ingress pattern eth / ipv6 / tcp / end=20 + actions rss types ipv6-tcp end queues end / end =20 Send the eight packets to port 0. - All the packets are distributed to any of queue 0-7 + ipv4-udp/ipv6-tcp packets are distributed to all queues. + Other packets are distributed to queue 0. + Send the eight packets to port 1. + All packets are distributed to queue 0. =20 - or set the RSS queue rule:: +4. set queue 1, 4, 7 into RSS queue rule on port 0:: =20 - testpmd> flow create 0 ingress pattern end actions rss types ipv6-tcp = ipv4-udp sctp ipv6-other end queues 5 6 7 end / end + testpmd> flow create 0 ingress pattern end actions rss types end=20 + queues 1 4 7 end / end =20 Send the eight packets to port 0. - pkt1/pkt2/pkt5/pkt7/pkt8 are distributed to queue 5/6/7. + ipv4-udp/ipv6-tcp packets are distributed to queue 1/4/7. Other packets are distributed to queue 0. + Send the eight packets to port 1. + All packets are distributed to queue 0. =20 -4. Clean the rule:: +5. enable ipv4-udp and ipv6-other RSS function type on port 1:: + + testpmd> flow create 1 ingress pattern eth / ipv4 / udp / end actions = rss types ipv4-udp end queues end / end + testpmd> flow create 1 ingress pattern eth / ipv6 / end actions rss=20 + types ipv6-other end queues end / end + + Send the eight packets to port 0. + ipv4-udp/ipv6-tcp packets are distributed to queue 1/4/7. + Other packets are distributed to queue 0. + Send the eight packets to port 1. + ipv4-udp/ipv6-other packets are distributed to queue 0-7. + Other packets are distributed to queue 0. + +6. Clean the rules of port 0:: =20 testpmd> flow flush 0 =20 Send the eight packets to port 0. All the packets are distributed to queue 0. + Send the eight packets to port 1. + ipv4-udp/ipv6-other packets are distributed to queue 0-7. + Other packets are distributed to queue 0. =20 -Test case: set key and key_len -=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 + Clean the rules of port 1:: + + testpmd> flow flush 1 + + Send the eight packets to port 0. + All the packets are distributed to queue 0. + Send the eight packets to port 1. + All the packets are distributed to queue 0. + +Test case: set key and key_len (I40E) +=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 =20 Only i40e support key and key_len setting. =20 @@ -280,14 +475,20 @@ Only i40e support key and key_len setting. =20 2. Set ipv4-udp RSS and show the default RSS key:: =20 - testpmd> flow create 0 ingress pattern end actions rss types ipv4-udp = end / end + testpmd> flow create 0 ingress pattern eth / ipv4 / udp / end actions = rss types ipv4-udp end queues end / end + testpmd> flow create 1 ingress pattern eth / ipv4 / udp / end=20 + actions rss types ipv4-udp end queues end / end testpmd> show port 0 rss-hash key RSS functions: ipv4-udp udp RSS key: 74657374706D6427732064656661756C74205253532068617368206B65792C206F7665= 727269646520697420666F722062657474 + testpmd> show port 1 rss-hash key + RSS functions: + ipv4-udp udp + RSS key: + =20 + 74657374706D6427732064656661756C74205253532068617368206B65792C206F7665 + 727269646520697420666F722062657474 =20 - Send the five packets to port 0:: + Send the five packets to port 0 and port 1:: =20 pkt1 =3D Ether(dst=3D'00:00:00:00:01:00')/IP(src=3D'0.0.0.0',dst=3D'4.= 0.0.0')/UDP(sport=3D100,dport=3D200)/('X'*48) pkt2 =3D Ether(dst=3D'00:00:00:00:01:00')/IP(src=3D'0.0.0.0',dst=3D'4.= 0.0.0')/UDP(sport=3D100,dport=3D201)/('X'*48) @@ -301,10 +502,9 @@ Only i40e support key and key_len setting. pkt4 is distributed to queue 1. pkt5 is distributed to queue 2. =20 -3. Set ipv4-udp key:: +3. Set ipv4-udp key on port 0:: =20 - testpmd> flow flush 0 - testpmd> flow create 0 ingress pattern end actions rss types ipv4-udp = end key \ + testpmd> flow create 0 ingress pattern eth / ipv4 / udp / end=20 + actions rss types ipv4-udp end queues end key \ 1234567890123456789012345678901234567890FFFFFFFFFFFF123456789012345678= 9012345678901234567890FFFFFFFFFFFF / end testpmd> show port 0 rss-hash key RSS functions: @@ -318,11 +518,11 @@ Only i40e support key and key_len setting. pkt3 is distributed to queue 2. pkt4 is distributed to queue 0. pkt5 is distributed to queue 3. + Send the same five packets to port 1, they are distributed to same queu= es with step 2. =20 4. Set ipv4-udp with truncating key_len:: =20 - testpmd> flow flush 0 - testpmd> flow create 0 ingress pattern end actions rss types ipv4-udp = end key \ + testpmd> flow create 0 ingress pattern eth / ipv4 / udp / end=20 + actions rss types ipv4-udp end queues end key \ 1234567890123456789012345678901234567890FFFFFFFFFFFF123456789012345678= 9012345678901234567890FFFFFFFFFFFF key_len 50 / end testpmd> show port 0 rss-hash key RSS functions: @@ -336,6 +536,7 @@ Only i40e support key and key_len setting. pkt3 is distributed to queue 0. pkt4 is distributed to queue 1. pkt5 is distributed to queue 0. + Send the same five packets to port 1, they are distributed to same queu= es with step 2. =20 The key length is 52 bytes, if setting it shorter than 52, the key valu= e doesn't take effect. The showed key value is an invalid value, not the default value. @@ -343,8 +544,7 @@ Only i40e support key and key_len setting. =20 5. Set ipv4-udp with padding key_len:: =20 - testpmd> flow flush 0 - testpmd> flow create 0 ingress pattern end actions rss types ipv4-udp = end key \ + testpmd> flow create 0 ingress pattern eth / ipv4 / udp / end=20 + actions rss types ipv4-udp end queues end key \ 1234567890123456789012345678901234567890FFFFFFFFFFFF123456789012345678= 9012345678901234567890FFFFFF key_len 52 / end testpmd> show port 0 rss-hash key RSS functions: @@ -358,12 +558,31 @@ Only i40e support key and key_len setting. pkt3 is distributed to queue 2. pkt4 is distributed to queue 0. pkt5 is distributed to queue 3. + Send the same five packets to port 1, they are distributed to same queu= es with step 2. =20 The lengh of key is 49 bytes, but the key_len is 52, so the last three bytes of key is padded by default value. =20 -Test case: Flow directory 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=3D +6. Set ipv4-udp key on port 1:: + + testpmd> flow create 1 ingress pattern eth / ipv4 / udp / end actions = rss types ipv4-udp end queues end key \ + 1234567890123456789012345678901234567890FFFFFFFFFFFF123456789012345678= 9012345678909876543210EEEEEEEEEEEE / end + testpmd> show port 1 rss-hash key + RSS functions: + ipv4-udp udp + RSS key: + =20 + 1234567890123456789012345678901234567890FFFFFFFFFFFF123456789012345678 + 9012345678909876543210EEEEEEEEEEEE + + Send the same five packets to port 0, they are distributed to same queu= es with step 5. + Send the same five packets to port 1, + pkt1 is distributed to queue 3. + pkt2 is distributed to queue 2. + pkt3 is distributed to queue 2. + pkt4 is distributed to queue 0. + pkt5 is distributed to queue 3. + +Test case: Flow directory rule and RSS rule combination (I40E)=20 +=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=3D=3D=3D=3D=3D =20 1. Start the testpmd:: =20 @@ -374,9 +593,10 @@ Test case: Flow directory rule and RSS rule combinatio= n =20 2. Set a RSS queue rule:: =20 - testpmd> flow create 0 ingress pattern end actions rss types ipv4-udp = end queues 6 7 8 end / end + testpmd> flow create 0 ingress pattern eth / ipv4 / udp / end actions = rss types ipv4-udp end queues end / end + testpmd> flow create 0 ingress pattern end actions rss types end=20 + queues 6 7 8 end / end =20 - Send pkt2 to port 0, pkt2 is distributed to queue 8. + Send ipv4-udp packet to port 0, distributed to queue 8. =20 3. Set a flow directory rule:: =20 @@ -386,13 +606,13 @@ Test case: Flow directory rule and RSS rule combinati= on =20 4. Destroy the flow directory rule:: =20 - testpmd> flow destroy 0 rule 1 + testpmd> flow destroy 0 rule 2 =20 Send pkt2 to port 0, pkt2 is distributed to queue 8 again. So flow directory filter is priority to RSS hash filter. =20 -Test case: Set queue-region generic flow 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=3D +Test case: Set queue-region with rte_flow api (I40E)=20 +=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 =20 1. Start the testpmd:: =20 @@ -403,7 +623,8 @@ Test case: Set queue-region generic flow api =20 2. Set a RSS queue rule:: =20 - testpmd> flow create 0 ingress pattern end actions rss types ipv4-tcp = end queues 7 8 10 11 12 14 15 end / end + testpmd> flow create 0 ingress pattern end actions rss types end queue= s 7 8 10 11 12 14 15 end / end + testpmd> flow create 0 ingress pattern eth / ipv4 / tcp / end=20 + actions rss types ipv4-tcp end queues end / end =20 3. Send pkt to port 0:: =20 @@ -430,23 +651,25 @@ Test case: Set queue-region generic flow api testpmd> flow list 0 ID Group Prio Attr Rule 0 0 0 i- =3D> RSS - 1 0 0 i- VLAN =3D> RSS + 1 0 0 i- ETH IPV4 TCP =3D> RSS 2 0 0 i- VLAN =3D> RSS 3 0 0 i- VLAN =3D> RSS + 4 0 0 i- VLAN =3D> RSS =20 - testpmd> flow destroy 0 rule 2 - Flow rule #2 destroyed + testpmd> flow destroy 0 rule 3 + Flow rule #3 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 + 1 0 0 i- ETH IPV4 TCP =3D> RSS + 2 0 0 i- VLAN =3D> RSS + 4 0 0 i- VLAN =3D> RSS =20 - Send the 3 packets to port 0. They are all distributed to queue 0. + Send the 3 packets to port 0. They are all distributed to queue 8. Queue region only can be deleted all or none. =20 -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 +Test case: Set queue region in rte_flow with invalid parameter (I40E)=20 +=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=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 1. Start the testpmd:: =20 @@ -455,30 +678,40 @@ Test case: Set queue region with invalid parameter testpmd> set verbose 1 testpmd> start =20 -2. Set a RSS queue rule:: +2. Set a queue region:: + + testpmd> flow create 0 ingress pattern vlan tci is 0x2000 / end action= s rss queues 10 11 end / end + port_flow_complain(): Caught PMD error type 16 (specific action):=20 + cause: 0x7ffeb4a60fd8, no valid queues: Invalid argument + +3. Set a RSS queue rule first:: =20 - testpmd> flow create 0 ingress pattern end actions rss queues 8 10 11 = 12 15 end / end + testpmd> flow create 0 ingress pattern end actions rss types end=20 + queues 8 10 11 12 15 end / end =20 -3. Set invalid queue ID "9" to queue region:: +4. Set invalid queue ID "9" to queue region:: =20 testpmd> flow create 0 ingress pattern vlan tci is 0x2000 / end action= s rss queues 8 9 end / end Caught error type 11 (specific action): cause: 0x7ffda008efe8, no vali= d queues =20 Queue of queue region must be included in rss function appointed queue. =20 -4. Set discontinuous queue ID to queue region:: +5. Set discontinuous queue ID to queue region:: =20 testpmd> flow create 0 ingress pattern vlan tci is 0x2000 / end action= s rss queues 8 10 end / end Caught error type 11 (specific action): cause: 0x7ffda008efe8, no vali= d queues =20 -5. Set invalid queue number to queue region:: +6. Set invalid queue number to queue region:: =20 testpmd> flow create 0 ingress pattern vlan tci is 0x4000 / end action= s rss queues 10 11 12 end / end i40e_flow_parse_rss_action(): The region sizes should be any of the fo= llowing values: 1, 2, 4, 8, 16, 32, 64 as long as the total number of queue= s do not exceed the VSI allocation Caught error type 2 (flow rule (handle)): Failed to create flow. =20 -Test case: Queue region 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 +7. Set a queue region:: + + testpmd> flow create 0 ingress pattern vlan tci is 0x2000 / end action= s rss queues 10 11 end / end + Flow rule #1 created + +Test case: Queue region and RSS rule combination (I40E)=20 +=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 =20 Notes: Queue region is only supported by fortville, so this case only can = be implemented with fortville. @@ -486,7 +719,7 @@ be implemented with fortville. 1. Start the testpmd:: =20 ./testpmd -c 1ffff -n 4 -- -i --nb-cores=3D8 --rxq=3D16 --txq=3D16 --p= ort-topology=3Dchained - testpmd> port config all rss all + testpmd> flow create 0 ingress pattern eth / ipv4 / udp / end=20 + actions rss types ipv4-udp end queues end / end testpmd> set fwd rxonly testpmd> set verbose 1 testpmd> start @@ -497,17 +730,246 @@ be implemented with fortville. testpmd> set port 0 queue-region region_id 0 flowtype 31 testpmd> set port 0 queue-region flush on =20 - Send pkt2 to port 0. It is distributed to queue 1. + Send ipv4-udp packet to port 0. It is distributed to queue 1. =20 3. Set a RSS queue rule:: =20 - testpmd> flow create 0 ingress pattern end actions rss types ipv4-udp = end queues 6 7 end / end + testpmd> flow create 0 ingress pattern end actions rss types end=20 + queues 6 7 end / end =20 - Send pkt2 to port 0. It is still distributed to queue 1. + Send ipv4-udp packet to port 0. It is still distributed to queue 1. =20 4. flush the queue region:: =20 testpmd> set port 0 queue-region flush off=20 =20 - Send pkt2 to port 0. It is distributed to queue 7. + Send ipv4-udp packet to port 0. It is distributed to queue 7. Queue region is priority to RSS queue rule. + + +IXGBE/IGB cases +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D +IXGBE/IGB doesn't support L2-payload ptype. + +Test case: disable and enable rss +=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=3D4 --txq=3D4 --por= t-topology=3Dchained + testpmd> set fwd rxonly + testpmd> set verbose 1 + testpmd> start + +2. Show port default RSS fuctions:: + + testpmd> show port 0 rss-hash + RSS functions: + all ipv4 ipv6 ipv6-ex ip + + Send the ipv4-other/ipv4-udp/ipv4-tcp/ipv4-sctp/ipv4-frag/ipv6-other/ip= v6-frag/ipv6-udp/ipv6-tcp/ipv6-sctp packets with different src/dst ip addre= ss. + All the packets are distributed to all the four queues. + +3. disable all RSS fuctions:: + + testpmd> flow create 0 ingress pattern end actions rss types none end = / end + Flow rule #0 created + testpmd> show port 0 rss-hash + RSS disabled + + Send the ipv4-other/ipv4-udp/ipv4-tcp/ipv4-sctp/ipv4-frag/ipv6-other/ip= v6-frag/ipv6-udp/ipv6-tcp/ipv6-sctp packets with different src/dst ip addre= ss. + All the packets are distributed to queue 0. + +4. enable RSS fuction with all RSS hash type:: + + testpmd> flow create 0 ingress pattern end actions rss types all end /= end + Flow rule #1 created + testpmd> show port 0 rss-hash + RSS functions: + all ipv4 ipv4-tcp ipv4-udp ipv6 ipv6-tcp ipv6-udp ipv6-ex=20 + ipv6-tcp-ex ipv6-udp-ex ip udp tcp + + Send the ipv4-other/ipv4-udp/ipv4-tcp/ipv4-sctp/ipv4-frag/ipv6-other/ip= v6-frag/ipv6-udp/ipv6-tcp/ipv6-sctp packets with different src/dst ip addre= ss. + All the packets are distributed to all the four queues. + +Notes: the default RSS functions may be different among several NICs. + +Test case: enable ipv4-udp rss +=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=3D4 --txq=3D4 --por= t-topology=3Dchained + testpmd> set fwd rxonly + testpmd> set verbose 1 + testpmd> start + +2. Show port default RSS fuctions:: + + testpmd> show port 0 rss-hash + RSS functions: + all ipv4 ipv6 ipv6-ex ip + +3. Enable ipv4-udp, and set all the queues into RSS queue rule:: + + testpmd> flow create 0 ingress pattern end actions rss types ipv4-udp = end / end + Flow rule #0 created + testpmd> show port 0 rss-hash + RSS functions: + all ipv4-udp udp + + Send the ipv4-other/ipv4-tcp/ipv4-sctp/ipv4-frag/ipv6-other/ipv6-frag/i= pv6-udp/ipv6-tcp/ipv6-sctp packets with different src/dst ip address. + All the packets are distributed to queue 0. + Send the ipv4-udp packets with different src/dst ip and sport/dport. + All the packets are distributed to all the four queues. + +Test case: set rss valid/invalid queue rule=20 +=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 --p= ort-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=20 + 15 end / end + + Send the ipv4-other/ipv4-udp/ipv4-tcp/ipv4-sctp/ipv4-frag/ipv6-other/ip= v6-frag/ipv6-udp/ipv6-tcp/ipv6-sctp packets with different src/dst ip addre= ss. + All the packets are distributed to queue 0/8/15. + +3. Set a second RSS queue rule:: + + testpmd> flow create 0 ingress pattern end actions rss queues 3 end / = end + testpmd> flow create 0 ingress pattern end actions rss types=20 + ipv4-udp end queues 3 end / end + + The two rules failed to be created. + There can't be more than one RSS queue rule. + +4. Reset the RSS queue rule:: + + testpmd> flow flush 0 + testpmd> flow create 0 ingress pattern end actions rss types=20 + ipv4-udp end queues 3 end / end + + The rule is set successfully. + Send the ipv4-other/ipv4-tcp/ipv4-sctp/ipv4-frag/ipv6-other/ipv6-frag/i= pv6-udp/ipv6-tcp/ipv6-sctp packets with different src/dst ip address. + All the packets are distributed to queue 0. + Send the ipv4-udp packets with different src/dst ip and sport/dport. + All the packets are distributed to queue 3. + +5. Set a wrong parameter: queue ID is 16 :: + + testpmd> flow flush 0 + testpmd> flow create 0 ingress pattern end actions rss queues 16=20 + end / end + + The rule failed to be created. + +6. Set all the queues to the rule:: + + testpmd> flow create 0 ingress pattern end actions rss queues 0 1 2=20 + 3 4 5 6 7 8 9 10 11 12 13 14 15 end / end + + Send the ipv4-other/ipv4-udp/ipv4-tcp/ipv4-sctp/ipv4-frag/ipv6-other/ip= v6-frag/ipv6-udp/ipv6-tcp/ipv6-sctp packets with different src/dst ip addre= ss. + The packets may be distributed to any 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 types= . + +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 --p= ort-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 ipv4-= tcp ipv6-sctp ipv4-other end queues 1 8 15 end / end + testpmd> show port 0 rss-hash + RSS functions: + all ipv4-tcp ipv4-udp ipv6-udp ipv6-udp-ex udp tcp + +3. Send ipv4-other/ipv4-udp/ipv4-tcp/ipv4-sctp/ipv4-frag/ipv6-other/ipv6-f= rag/ipv6-udp/ipv6-tcp/ipv6-sctp packets with different src/dst ip address. + ipv4-udp/ipv4-tcp/ipv6-udp 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 flush 0 + testpmd> flow create 0 ingress pattern end actions rss types ipv6 ipv4= end queues 3 8 end / end + testpmd> show port 0 rss-hash + RSS functions: + all ipv4 ipv6 ip + +5. Send ipv4-other/ipv4-udp/ipv4-tcp/ipv4-sctp/ipv4-frag/ipv6-other/ipv6-f= rag/ipv6-udp/ipv6-tcp/ipv6-sctp packets with different src/dst ip address. + all the packets are distributed to queue 1/8/15. + +Notes: IXGBE only support udp/tcp ptype enabling alone, not support=20 +ipv4-other/ipv4-sctp/ipv4-frag/ipv6-other/ipv6-frag/ipv6-sctp enabling alo= ne. + +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 + +1. Start the testpmd:: + + ./testpmd -c 0x3 -n 4 -- -i --rxq=3D8 --txq=3D8 --disable-rss --port-t= opology=3Dchained + testpmd> set fwd rxonly + testpmd> set verbose 1 + testpmd> start + +2. Send ipv4-other/ipv4-udp/ipv4-tcp/ipv4-sctp/ipv4-frag/ipv6-other/ipv6-f= rag/ipv6-udp/ipv6-tcp/ipv6-sctp packets with different src/dst ip address. + All the packets are distributed to queue 0. + +3. enable all RSS function type:: + + testpmd> flow create 0 ingress pattern end actions rss types all=20 + end / end + + Send ipv4-other/ipv4-udp/ipv4-tcp/ipv4-sctp/ipv4-frag/ipv6-other/ipv6-f= rag/ipv6-udp/ipv6-tcp/ipv6-sctp packets with different src/dst ip address. + All the packets are distributed to any of queue 0-7 + +4. Clean the rule:: + + testpmd> flow flush 0 + + Send the all type packets to port 0. + All the packets are distributed to queue 0. + +5. Set the RSS queue rule:: + + testpmd> flow create 0 ingress pattern end actions rss types=20 + ipv6-tcp ipv4-udp end queues 5 6 7 end / end + + Send ipv4-udp/ipv6-tcp packets with different src/dst ip address. + All the packets are distributed to queue 5/6/7. + Send ipv4-other/ipv4-tcp/ipv4-sctp/ipv4-frag/ipv6-other/ipv6-frag/ipv6-= udp/ipv6-sctp packets with different src/dst ip address. + All the packets are distributed to queue 0. + +Test case: Flow directory rule and RSS rule combination=20 +=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 --p= kt-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 types=20 + ipv4-udp end queues 6 7 8 end / end + + Send pkt2 to port 0, pkt2 is distributed to queue 8. + +3. Set a flow directory rule:: + + testpmd> flow create 0 ingress pattern eth / ipv4 src is 10.0.0.1=20 + dst is 192.168.0.2 / udp src is 50 dst is 50 / end actions queue index=20 + 1 / end + + Send pkt2 to port 0, pkt2 is distributed to queue 1. + +4. Destroy the flow directory rule:: + + testpmd> flow destroy 0 rule 1 + + Send pkt2 to port 0, pkt2 is distributed to queue 8 again. + So flow directory filter is priority to RSS hash filter. -- 2.7.4