test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH v6 0/2] add fortville rss input test
@ 2020-04-17  3:33 Chenxu Di
  2020-04-17  3:33 ` [dts] [PATCH v6 1/2] test_plans/fortville_rss_input: add fortville rss input test plan Chenxu Di
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Chenxu Di @ 2020-04-17  3:33 UTC (permalink / raw)
  To: dts; +Cc: yuan.peng, Chenxu Di

add fortville rss input test plan
add fortville rss input test suite

--
v6:
-Fixed mistake about validate rule
v5:
-Fixed bug about ipv4-udp and ipv4-sctp packet
v4:
-Updated the test plan and test suite about hash function
v3:
-Update the test plan about all input set
v2:
-Updated the test plan and test suite about all inputset
-Added test suite about hash global configuration

Chenxu Di (2):
  test_plans/fortville_rss_input: add fortville rss input test plan
  tests/fortville_rss_input: add fortville rss input

 test_plans/fortville_rss_input_test_plan.rst |  600 +++
 tests/TestSuite_fortville_rss_input.py       | 3987 ++++++++++++++++++
 2 files changed, 4587 insertions(+)
 create mode 100644 test_plans/fortville_rss_input_test_plan.rst
 create mode 100644 tests/TestSuite_fortville_rss_input.py

-- 
2.17.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [dts] [PATCH v6 1/2] test_plans/fortville_rss_input: add fortville rss input test plan
  2020-04-17  3:33 [dts] [PATCH v6 0/2] add fortville rss input test Chenxu Di
@ 2020-04-17  3:33 ` Chenxu Di
  2020-04-17  3:33 ` [dts] [PATCH v6 2/2] tests/fortville_rss_input: add fortville rss input Chenxu Di
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Chenxu Di @ 2020-04-17  3:33 UTC (permalink / raw)
  To: dts; +Cc: yuan.peng, Chenxu Di

Fortville enable setting hash input set in rte flow.
Add test plan for it.

Signed-off-by: Chenxu Di <chenxux.di@intel.com>
---
 test_plans/fortville_rss_input_test_plan.rst | 600 +++++++++++++++++++
 1 file changed, 600 insertions(+)
 create mode 100644 test_plans/fortville_rss_input_test_plan.rst

diff --git a/test_plans/fortville_rss_input_test_plan.rst b/test_plans/fortville_rss_input_test_plan.rst
new file mode 100644
index 0000000..7a68deb
--- /dev/null
+++ b/test_plans/fortville_rss_input_test_plan.rst
@@ -0,0 +1,600 @@
+.. Copyright (c) <2019>, 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.
+
+
+====================================================
+Fortville Configuration of RSS in RTE Flow Tests
+====================================================
+
+Description
+===========
+
+The feature remove legacy filter API and switch to rte_flow in driver fm10k,
+i40e, ixgbe, ice. What is need is that remove the function in filter_ctrl 
+ops in drivers and implement functions in rte_flow. Many functions have been
+implemented in rte_flow in the early patches. this feature implement that
+set global configurations of hash filters, set symmetric hash configuration
+enable and Set GRE key length for input set in driver i40e. 
+
+Prerequisites
+=============
+
+1.Bind PF ports to igb_uio driver::
+
+    usertools/dpdk-devbind.py --bind=igb_uio 0000:81:00.0
+
+2.Start testpmd on host::
+
+    ./x86_64-native-linuxapp-gcc/app/testpmd -c 0xf -n 4  -w 81:00.0 -- -i --txq=8 --rxq=8
+    testpmd>set verbose 1
+    testpmd>start
+
+Test Case: test global configurations of hash filter
+====================================================
+
+create a rule that set global configurations of hash filters is toeplitz::
+
+    testpmd> flow create 0 ingress pattern end actions rss types end queues end func simple_xor / end
+    testpmd> flow list 0
+
+verify the Rule is RSS.
+
+get the status of hash configuration::
+
+    testpmd> get_hash_global_config 0
+
+verify Hash function is simple_xor.
+
+delete the rule::
+
+    testpmd> flow flush 0
+    testpmd> flow list 0
+
+verify the rules have been destroyed.
+
+get the status of hash configuration::
+
+    testpmd> get_hash_global_config 0
+
+verify Hash function is toeplitz.
+
+Test Case: test symmetric hash configuration
+============================================
+
+create a rule that set symmetric hash configuration enable::
+
+    testpmd> flow create 0 ingress pattern eth / ipv4 / tcp / end actions rss types ipv4-tcp end queues end func symmetric_toeplitz queues end / end
+    testpmd> flow list 0
+
+verify the Rule is RSS.
+
+send 2 packets::
+
+    sendp([Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.1",dst="192.168.0.2")/TCP(sport=1024, dport=1025)/Raw(load='X'*1000)],iface='ens802f3')
+    sendp([Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.2",dst="192.168.0.1")/TCP(sport=1025, dport=1024)/Raw(load='X'*1000)],iface='ens802f3')
+
+vefify two packets have the same RSS hash value.
+
+destroy the rule::
+
+    testpmd> flow destroy 0 rule 0
+    testpmd> flow list 0
+
+verify the rule has been destroyed.
+
+create a rule that set symmetric hash configuration disable::
+
+    testpmd> flow create 0 ingress pattern eth / ipv4 / tcp / end actions rss types ipv4-tcp end queues end queues end / end
+    testpmd> flow list 0
+
+verify the Rule is RSS.
+
+send 2 packets::
+
+    sendp([Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.1",dst="192.168.0.2")/TCP(sport=1024, dport=1025)/Raw(load='X'*1000)],iface='ens802f3')
+    sendp([Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.2",dst="192.168.0.1")/TCP(sport=1025, dport=1024)/Raw(load='X'*1000)],iface='ens802f3')
+
+vefify two packets have different RSS hash values
+
+Test Case: test set hash input set for ipv4-tcp
+==============================================
+
+test all different hash input set for ipv4-tcp
+1. Set hash input set for ipv4-tcp l3-src-only::
+
+        testpmd> flow create 0 ingress pattern eth / ipv4 / tcp / end actions rss types ipv4-tcp l3-src-only end queues end / end
+
+   verify the Rule create successfully.
+
+   send 10 packets::
+
+        sendp([Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.1", dst=RandIP())/TCP(sport=RandShort(),dport=RandShort())],iface='ens802f3',count=10)
+
+   verify 10 packets have the same RSS hash value.
+
+   destroy the rule and create a new rule with default inputset::
+
+        testpmd> flow destroy 0 rule 0
+        testpmd> flow create 0 ingress pattern eth / ipv4 / tcp / end actions rss types ipv4-tcp end queues end / end
+
+   send 1 packet same as above::
+
+        sendp([Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.1", dst=RandIP())/TCP(sport=RandShort(),dport=RandShort())],iface='ens802f3')
+
+   verify the packet have different RSS hash value with above.
+
+2. Set hash input set for ipv4-tcp l3-dst-only::
+
+        testpmd> flow create 0 ingress pattern eth / ipv4 / tcp / end actions rss types ipv4-tcp l3-dst-only end queues end / end
+
+   verify the Rule create successfully.
+
+   send 10 packets::
+
+        sendp([Ether(dst="00:11:22:33:44:55")/IP(src=RandIP(), dst="192.168.0.2")/TCP(sport=RandShort(),dport=RandShort())],iface='ens802f3',count=10)
+
+   verify 10 packets have the same RSS hash value.
+
+   destroy the rule and create a new rule with default inputset::
+
+        testpmd> flow destroy 0 rule 0
+        testpmd> flow create 0 ingress pattern eth / ipv4 / tcp / end actions rss types ipv4-tcp end queues end / end
+
+   send 1 packet same as above::
+
+        sendp([Ether(dst="00:11:22:33:44:55")/IP(src=RandIP(), dst="192.168.0.2")/TCP(sport=RandShort(),dport=RandShort())],iface='ens802f3')
+
+   verify the packet have different RSS hash value with above.
+
+3. Set hash input set for ipv4-tcp l4-src-only::
+
+        testpmd> flow create 0 ingress pattern eth / ipv4 / tcp / end actions rss types ipv4-tcp l4-src-only end queues end / end
+
+   verify the Rule create successfully.
+
+   send 10 packets::
+
+        sendp([Ether(dst="00:11:22:33:44:55")/IP(src=RandIP(), dst=RandIP())/TCP(sport=1024,dport=RandShort())],iface='ens802f3',count=10)
+
+   verify 10 packets have the same RSS hash value.
+
+   destroy the rule and create a new rule with default inputset::
+
+        testpmd> flow destroy 0 rule 0
+        testpmd> flow create 0 ingress pattern eth / ipv4 / tcp / end actions rss types ipv4-tcp end queues end / end
+
+   send 1 packet same as above::
+
+        sendp([Ether(dst="00:11:22:33:44:55")/IP(src=RandIP(), dst=RandIP())/TCP(sport=1024,dport=RandShort())],iface='ens802f3')
+
+   verify the packet have different RSS hash value with above.
+
+4. Set hash input set for ipv4-tcp l4-dst-only::
+
+        testpmd> flow create 0 ingress pattern eth / ipv4 / tcp / end actions rss types ipv4-tcp l4-dst-only end queues end / end
+
+   verify the Rule create successfully.
+
+   send 10 packets::
+
+        sendp([Ether(dst="00:11:22:33:44:55")/IP(src=RandIP(), dst=RandIP())/TCP(sport=RandShort(),dport=1025)],iface='ens802f3',count=10)
+
+   verify 10 packets have the same RSS hash value.
+
+   destroy the rule and create a new rule with default inputset::
+
+        testpmd> flow destroy 0 rule 0
+        testpmd> flow create 0 ingress pattern eth / ipv4 / tcp / end actions rss types ipv4-tcp end queues end / end
+
+   send 1 packet same as above::
+
+        sendp([Ether(dst="00:11:22:33:44:55")/IP(src=RandIP(), dst=RandIP())/TCP(sport=RandShort(),dport=1025)],iface='ens802f3')
+
+   verify the packet have different RSS hash value with above.
+
+5. Set hash input set for ipv4-tcp l3-src-only and l3-dst-only::
+
+        testpmd> flow create 0 ingress pattern eth / ipv4 / tcp / end actions rss types ipv4-tcp l3-src-only l3-dst-only end queues end / end
+
+   verify the Rule create successfully.
+
+   send 10 packets::
+
+        sendp([Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.1", dst="192.168.0.2")/TCP(sport=RandShort(),dport=RandShort())],iface='ens802f3',count=10)
+
+   verify 10 packets have the same RSS hash value.
+
+   destroy the rule and create a new rule with default inputset::
+
+        testpmd> flow destroy 0 rule 0
+        testpmd> flow create 0 ingress pattern eth / ipv4 / tcp / end actions rss types ipv4-tcp end queues end / end
+
+   send 1 packet same as above::
+
+        sendp([Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.1", dst="192.168.0.2")/TCP(sport=RandShort(),dport=RandShort())],iface='ens802f3')
+
+   verify the packet have different RSS hash value with above.
+
+6. Set hash input set for ipv4-tcp l4-src-only and l4-dst-only::
+
+        testpmd> flow create 0 ingress pattern eth / ipv4 / tcp / end actions rss types ipv4-tcp l4-src-only l4-dst-only end queues end / end
+
+   verify the Rule create successfully.
+
+   send 10 packets::
+
+        sendp([Ether(dst="00:11:22:33:44:55")/IP(src=RandIP(), dst=RandIP())/TCP(sport=1024,dport=1025)],iface='ens802f3',count=10)
+
+   verify 10 packets have the same RSS hash value.
+   
+   destroy the rule and create a new rule with default inputset::
+
+        testpmd> flow destroy 0 rule 0
+        testpmd> flow create 0 ingress pattern eth / ipv4 / tcp / end actions rss types ipv4-tcp end queues end / end
+
+   send 1 packet same as above::
+
+        sendp([Ether(dst="00:11:22:33:44:55")/IP(src=RandIP(), dst=RandIP())/TCP(sport=1024,dport=1025)],iface='ens802f3')
+
+   verify the packet have different RSS hash value with above.
+
+7.Set hash input set for ipv4-tcp l4-src-only and l3-src-only::
+
+        testpmd> flow create 0 ingress pattern eth / ipv4 / tcp / end actions rss types ipv4-tcp l4-src-only l3-src-only end queues end / end
+
+   verify the Rule create successfully.
+
+   send 10 packets::
+
+        sendp([Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.1", dst=RandIP())/TCP(sport=1024,dport=RandShort())],iface='ens802f3',count=10)
+
+   verify 10 packets have the same RSS hash value.
+
+   destroy the rule and create a new rule with default inputset::
+
+        testpmd> flow destroy 0 rule 0
+        testpmd> flow create 0 ingress pattern eth / ipv4 / tcp / end actions rss types ipv4-tcp end queues end / end
+
+   send 1 packet same as above::
+
+        sendp([Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.1", dst=RandIP())/TCP(sport=1024,dport=RandShort())],iface='ens802f3')
+
+   verify the packet have different RSS hash value with above.
+
+8. Set hash input set for ipv4-tcp l4-dst-only and l3-dst-only::
+
+        testpmd> flow create 0 ingress pattern eth / ipv4 / tcp / end actions rss types ipv4-tcp l4-dst-only l3-dst-only end queues end / end
+
+   verify the Rule create successfully.
+
+   send 10 packets::
+
+        sendp([Ether(dst="00:11:22:33:44:55")/IP(src=RandIP(), dst="192.168.0.2")/TCP(sport=RandShort(),dport=1025)],iface='ens802f3',count=10)
+
+   verify 10 packets have the same RSS hash value.
+
+   destroy the rule and create a new rule with default inputset::
+
+        testpmd> flow destroy 0 rule 0
+        testpmd> flow create 0 ingress pattern eth / ipv4 / tcp / end actions rss types ipv4-tcp end queues end / end
+
+   send 1 packet same as above::
+
+        sendp([Ether(dst="00:11:22:33:44:55")/IP(src=RandIP(), dst="192.168.0.2")/TCP(sport=RandShort(),dport=1025)],iface='ens802f3')
+
+   verify the packet have different RSS hash value with above.
+
+9. Set hash input set for ipv4-tcp l4-src-only and l3-dst-only::
+
+        testpmd> flow create 0 ingress pattern eth / ipv4 / tcp / end actions rss types ipv4-tcp l4-src-only l3-dst-only end queues end / end
+
+   verify the Rule create successfully.
+
+   send 10 packets::
+
+        sendp([Ether(dst="00:11:22:33:44:55")/IP(src=RandIP(), dst="192.168.0.2")/TCP(sport=1024,dport=RandShort())],iface='ens802f3',count=10)
+
+   verify 10 packets have the same RSS hash value.
+
+   destroy the rule and create a new rule with default inputset::
+
+        testpmd> flow destroy 0 rule 0
+        testpmd> flow create 0 ingress pattern eth / ipv4 / tcp / end actions rss types ipv4-tcp end queues end / end
+
+   send 1 packet same as above::
+
+        sendp([Ether(dst="00:11:22:33:44:55")/IP(src=RandIP(), dst="192.168.0.2")/TCP(sport=1024,dport=RandShort())],iface='ens802f3')
+
+   verify the packet have different RSS hash value with above.
+
+10. Set hash input set for ipv4-tcp l4-dst-only and l3-src-only::
+
+        testpmd> flow create 0 ingress pattern eth / ipv4 / tcp / end actions rss types ipv4-tcp l4-dst-only l3-src-only end queues end / end
+
+   verify the Rule create successfully.
+
+   send 10 packets::
+
+        sendp([Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.1", dst=RandIP())/TCP(sport=RandShort(),dport=1025)],iface='ens802f3',count=10)
+
+   verify 10 packets have the same RSS hash value.
+
+   destroy the rule and create a new rule with default inputset::
+
+        testpmd> flow destroy 0 rule 0
+        testpmd> flow create 0 ingress pattern eth / ipv4 / tcp / end actions rss types ipv4-tcp end queues end / end
+
+   send 1 packet same as above::
+
+        sendp([Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.1", dst=RandIP())/TCP(sport=RandShort(),dport=1025)],iface='ens802f3')
+
+   verify the packet have different RSS hash value with above.
+
+11. Set hash input set for ipv4-tcp l4-src-only, l4-dst-only and l3-dst-only::
+
+        testpmd> flow create 0 ingress pattern eth / ipv4 / tcp / end actions rss types ipv4-tcp l4-src-only l4-dst-only l3-dst-only end queues end / end
+
+   verify the Rule create successfully.
+
+   send 10 packets::
+
+        sendp([Ether(dst="00:11:22:33:44:55")/IP(src=RandIP(), dst="192.168.0.2")/TCP(sport=1024,dport=1025)],iface='ens802f3',count=10)
+
+   verify 10 packets have the same RSS hash value.
+
+   destroy the rule and create a new rule with default inputset::
+
+        testpmd> flow destroy 0 rule 0
+        testpmd> flow create 0 ingress pattern eth / ipv4 / tcp / end actions rss types ipv4-tcp end queues end / end
+
+   send 1 packet same as above::
+
+        sendp([Ether(dst="00:11:22:33:44:55")/IP(src=RandIP(), dst="192.168.0.2")/TCP(sport=1024,dport=1025)],iface='ens802f3')
+
+   verify the packet have different RSS hash value with above.
+
+12. Set hash input set for ipv4-tcp l4-src-only, l4-dst-only and l3-src-only::
+
+        testpmd> flow create 0 ingress pattern eth / ipv4 / tcp / end actions rss types ipv4-tcp l4-src-only l4-dst-only l3-src-only end queues end / end
+
+   verify the Rule create successfully.
+
+   send 10 packets::
+
+        sendp([Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.1", dst=RandIP())/TCP(sport=1024,dport=1025)],iface='ens802f3',count=10)
+
+   verify 10 packets have the same RSS hash value.
+
+   destroy the rule and create a new rule with default inputset::
+
+        testpmd> flow destroy 0 rule 0
+        testpmd> flow create 0 ingress pattern eth / ipv4 / tcp / end actions rss types ipv4-tcp end queues end / end
+
+   send 1 packet same as above::
+
+        sendp([Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.1", dst=RandIP())/TCP(sport=1024,dport=1025)],iface='ens802f3')
+
+   verify the packet have different RSS hash value with above.
+
+13. Set hash input set for ipv4-tcp l4-dst-only, l3-dst-only and l3-src-only::
+
+        testpmd> flow create 0 ingress pattern eth / ipv4 / tcp / end actions rss types ipv4-tcp l4-dst-only l3-dst-only l3-src-only end queues end / end
+
+   verify the Rule create successfully.
+
+   send 10 packets::
+
+        sendp([Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.1", dst="192.168.0.2")/TCP(sport=RandShort(),dport=1025)],iface='ens802f3',count=10)
+
+   verify 10 packets have the same RSS hash value.
+
+   destroy the rule and create a new rule with default inputset::
+
+        testpmd> flow destroy 0 rule 0
+        testpmd> flow create 0 ingress pattern eth / ipv4 / tcp / end actions rss types ipv4-tcp end queues end / end
+
+   send 1 packet same as above::
+
+        sendp([Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.1", dst="192.168.0.2")/TCP(sport=RandShort(),dport=1025)],iface='ens802f3')
+
+   verify the packet have different RSS hash value with above.
+
+14. Set hash input set for ipv4-tcp l4-src-only,  l3-src-only and l3-dst-only::
+
+        testpmd> flow create 0 ingress pattern eth / ipv4 / tcp / end actions rss types ipv4-tcp l4-src-only l3-dst-only l3-src-only end queues end / end
+
+   verify the Rule create successfully.
+
+   send 10 packets::
+
+        sendp([Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.1", dst="192.168.0.2")/TCP(sport=1024,RandShort())],iface='ens802f3',count=10)
+
+   verify 10 packets have the same RSS hash value.
+
+   destroy the rule and create a new rule with default inputset::
+
+        testpmd> flow destroy 0 rule 0
+        testpmd> flow create 0 ingress pattern eth / ipv4 / tcp / end actions rss types ipv4-tcp end queues end / end
+
+   send 1 packet same as above::
+
+        sendp([Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.1", dst="192.168.0.2")/TCP(sport=1024,RandShort())],iface='ens802f3')
+
+   verify the packet have different RSS hash value with above.
+
+15. Set hash input set for ipv4-tcp l4-src-only, l4-dst-only, l3-src-only and l3-dst-only::
+
+        testpmd> flow create 0 ingress pattern eth / ipv4 / tcp / end actions rss types ipv4-tcp l4-src-only l4-dst-only l3-src-only l3-dst-only end queues end / end
+
+   verify the Rule create successfully.
+
+   send 1 packets::
+
+        sendp([Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.1", dst="192.168.0.2")/TCP(sport=1024,dport=1025)],iface='ens802f3')
+
+   verify the RSS hash value valid.
+
+   destroy the rule and create a new rule with default inputset::
+
+        testpmd> flow destroy 0 rule 0
+        testpmd> flow create 0 ingress pattern eth / ipv4 / tcp / end actions rss types ipv4-tcp end queues end / end
+
+   send 1 packet same as above::
+
+        sendp([Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.1", dst="192.168.0.2")/TCP(sport=1024,dport=1025)],iface='ens802f3')
+
+   verify the packet have same RSS hash value as above.
+
+Test Case: test set hash input set for ipv4-udp
+================================================
+
+test all different hash input set for ipv4-udp
+the same steps as step 1-15 for ipv4-tcp, just replace tcp with udp.
+
+Test Case: test set hash input set for ipv4-sctp
+================================================
+
+test all different hash input set for ipv4-sctp
+the same steps as step 1-15 for ipv4-tcp, just replace tcp with sctp.
+
+Test Case: test set hash input set for ipv6-tcp
+================================================
+
+test all different hash input set for ipv6-tcp
+the same steps as step 1-15 for ipv4-tcp, just replace ipv4 with ipv6.
+
+Test Case: test set hash input set for ipv6-udp
+================================================
+
+test all different hash input set for ipv6-udp
+the same steps as step 1-15 for ipv4-tcp, just replace ipv4-tcp with ipv6-udp.
+
+Test Case: test set hash input set for ipv6-sctp
+================================================
+
+test all different hash input set for ipv6-sctp
+the same steps as step 1-15 for ipv4-tcp, just replace ipv4-tcp with ipv6-sctp.
+
+Test Case: test set hash input set for ipv4-other
+================================================
+
+test all different hash input set for ipv4-other
+1. Set hash input set for ipv4-other l3-src-only::
+
+        testpmd> flow create 0 ingress pattern eth / ipv4 / end actions rss types ipv4-other l3-src-only end queues end / end
+
+   verify the Rule create successfully.
+
+   send 10 packets::
+
+        sendp([Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.1", dst=RandIP())/GRE(key_present=1,proto=2048,key=67108863)/IP()],iface='ens802f3',count=10)
+
+   verify 10 packets have the same RSS hash value.
+
+   destroy the rule and create a new rule with default inputset::
+
+        testpmd> flow destroy 0 rule 0
+        testpmd> flow create 0 ingress pattern eth / ipv4 / end actions rss types ipv4-other end queues end / end
+
+   send 1 packet same as above::
+
+        sendp([Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.1", dst=RandIP())/GRE(key_present=1,proto=2048,key=67108863)/IP()],iface='ens802f3')
+
+   verify the packet have different RSS hash value with above.
+
+2. Set hash input set for ipv4-other l3-dst-only::
+
+        testpmd> flow create 0 ingress pattern eth / ipv4 / end actions rss types ipv4-other l3-dst-only end queues end / end
+
+   verify the Rule create successfully.
+
+   send 10 packets::
+
+        sendp([Ether(dst="00:11:22:33:44:55")/IP(src=RandIP(), dst="192.168.0.2")/GRE(key_present=1,proto=2048,key=67108863)/IP()],iface='ens802f3',count=10)
+
+   verify 10 packets have the same RSS hash value.
+
+   destroy the rule and create a new rule with default inputset::
+
+        testpmd> flow destroy 0 rule 0
+        testpmd> flow create 0 ingress pattern eth / ipv4 / end actions rss types ipv4-other end queues end / end
+
+   send 1 packet same as above::
+
+        sendp([Ether(dst="00:11:22:33:44:55")/IP(src=RandIP(), dst="192.168.0.2")/GRE(key_present=1,proto=2048,key=67108863)/IP()],iface='ens802f3')
+
+   verify the packet have different RSS hash value with above.
+
+3. Set hash input set for ipv4-other l3-src-only and l3-dst-only::
+
+        testpmd> flow create 0 ingress pattern eth / ipv4 / end actions rss types ipv4-other l3-src-only l3-dst-only end queues end / end
+
+   verify the Rule create successfully.
+
+   send 1 packets::
+
+        sendp([Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.1", dst="192.168.0.2")/GRE(key_present=1,proto=2048,key=67108863)/IP()],iface='ens802f3')
+
+   verify the RSS hash value valid.
+
+   destroy the rule and create a new rule with default inputset::
+
+        testpmd> flow destroy 0 rule 0
+        testpmd> flow create 0 ingress pattern eth / ipv4 / end actions rss types ipv4-other end queues end / end
+
+   send 1 packet same as above::
+
+        sendp([Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.1", dst="192.168.0.2")/GRE(key_present=1,proto=2048,key=67108863)/IP()],iface='ens802f3')
+
+   verify the packet have same RSS hash value as above.
+
+Test Case: test set hash input set for ipv6-other
+================================================
+
+test all different hash input set for ipv6-other
+the same steps as step 1-3 for ipv4-other, just replace ipv4 with ipv6.
+
+Test Case: test flow validate
+=============================
+
+1. validate the rule::
+
+        testpmd> flow validate 0 ingress pattern eth / ipv4 / tcp / end actions rss types ipv4-tcp l3-dst-only end queues end / end
+        testpmd> flow validate 0 ingress pattern end actions rss types end queues 0 1 end / end
+
+   verify the rule validate successfully.
+
+2. validate the rule::
+
+         flow validate 0 ingress pattern eth / ipv4 / tcp / end actions rss types ipv4-tcp l3-dst-only end queues 0 1 end / end
+
+   verify the rule validate failed.
-- 
2.17.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [dts] [PATCH v6 2/2] tests/fortville_rss_input: add fortville rss input
  2020-04-17  3:33 [dts] [PATCH v6 0/2] add fortville rss input test Chenxu Di
  2020-04-17  3:33 ` [dts] [PATCH v6 1/2] test_plans/fortville_rss_input: add fortville rss input test plan Chenxu Di
@ 2020-04-17  3:33 ` Chenxu Di
  2020-04-17  7:21 ` [dts] [PATCH v6 0/2] add fortville rss input test Peng, Yuan
  2020-04-20  5:23 ` Tu, Lijuan
  3 siblings, 0 replies; 5+ messages in thread
From: Chenxu Di @ 2020-04-17  3:33 UTC (permalink / raw)
  To: dts; +Cc: yuan.peng, Chenxu Di

Fortville enable setting hash input set in rte flow.
Add test suite for it.

Signed-off-by: Chenxu Di <chenxux.di@intel.com>
---
 tests/TestSuite_fortville_rss_input.py | 3987 ++++++++++++++++++++++++
 1 file changed, 3987 insertions(+)
 create mode 100644 tests/TestSuite_fortville_rss_input.py

diff --git a/tests/TestSuite_fortville_rss_input.py b/tests/TestSuite_fortville_rss_input.py
new file mode 100644
index 0000000..d1ff39c
--- /dev/null
+++ b/tests/TestSuite_fortville_rss_input.py
@@ -0,0 +1,3987 @@
+# BSD LICENSE
+#
+# Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
+# 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.
+
+"""
+DPDK Test suite.
+
+Test DPDK2.3 feature:
+1.Fortville support granularity configuration of RSS.
+By default Fortville uses hash input set preloaded from NVM image which includes all fields
+- IPv4/v6+TCP/UDP port. Potential problem for this is global configuration per device and can
+affect all ports. It is required that hash input set can be configurable,  such as using IPv4
+only or IPv6 only or IPv4/v6+TCP/UDP.
+
+2.Fortville support 32-bit GRE keys.
+By default Fortville extracts only 24 bits of GRE key to FieldVector (NVGRE use case) but
+for Telco use cases full 32-bit GRE key is needed. It is required that both 24-bit and 32-bit
+keys for GRE should be supported. the test plan is to test the API to switch between 24-bit and
+32-bit keys
+
+Support 4*10G, 1*40G and 2*40G NICs.
+"""
+import time
+import random
+import re
+import utils
+import dut
+from pmd_output import PmdOutput
+
+testQueues = [16]
+reta_entries = []
+reta_lines = []
+
+# Use scapy to send packets with different source and dest ip.
+# and collect the hash result of five tuple and the queue id.
+from test_case import TestCase
+#
+#
+# Test class.
+#
+
+
+class TestFortvilleRssGranularityConfig(TestCase):
+    #
+    #
+    # Utility methods and other non-test code.
+    #
+
+    def set_up_all(self):
+        """
+        Run at the start of each test suite.
+        """
+
+        self.verify(self.nic in ["fortville_eagle", "fortville_spirit",
+                    "fortville_spirit_single", "fortville_25g", "carlsville"],
+                    "NIC Unsupported: " + str(self.nic))
+        ports = self.dut.get_ports(self.nic)
+        self.verify(len(ports) >= 1, "Not enough ports available")
+        dutPorts = self.dut.get_ports(self.nic)
+        localPort = self.tester.get_local_port(dutPorts[0])
+        self.itf = self.tester.get_interface(localPort)
+        self.pmdout = PmdOutput(self.dut)
+
+    def set_up(self):
+        """
+        Run before each test case.
+        """
+        global reta_lines
+        reta_lines = []
+
+    def send_packet(self, itf, tran_type, inputsets=[]):
+        """
+        Sends packets.
+        """
+        global reta_lines
+        self.tester.scapy_foreground()
+        self.dut.send_expect("start", "testpmd>")
+        mac = self.dut.get_mac_address(0)
+
+        if ('ipv4-dst-only' in inputsets):
+            dstip4 = '"192.168.0.2"'
+        else:
+            dstip4 = 'RandIP()'
+        if ('ipv4-src-only' in inputsets):
+            srcip4 = '"192.168.0.1"'
+        else:
+            srcip4 = 'RandIP()'
+        if ('ipv6-dst-only' in inputsets):
+            dstip6 = '"3ffe:2501:200:3::2"'
+        else:
+            dstip6 = 'RandIP6()'
+        if ('ipv6-src-only' in inputsets):
+            srcip6 = '"3ffe:2501:200:1fff::1"'
+        else:
+            srcip6 = 'RandIP6()'
+        if ('l4-dst-only' in inputsets):
+            dstport = '1025'
+        else:
+            dstport = 'RandShort()'
+        if ('l4-src-only' in inputsets):
+            srcport = '1024'
+        else:
+            srcport = 'RandShort()'
+
+        # send packet with different source and dest ip
+        if tran_type == "ipv4-other":
+            packet = r'sendp([Ether(dst="%s", src=get_if_hwaddr("%s"))/IP(src=' % (mac, itf)
+            packet += srcip4
+            packet += r', dst='
+            packet += dstip4
+            packet += r', proto=47)/GRE(key_present=1,proto=2048,key=67108863)/IP()], iface="%s")' % (itf)
+            self.tester.scapy_append(packet)
+            self.tester.scapy_execute()
+            time.sleep(.5)
+        elif tran_type == "ipv4-tcp":
+            packet = r'sendp([Ether(dst="%s", src=get_if_hwaddr("%s"))/IP(src=' % (mac, itf)
+            packet += srcip4
+            packet += r', dst='
+            packet += dstip4
+            packet += r')/TCP(sport='
+            packet += srcport
+            packet += r',dport='
+            packet += dstport
+            packet += r')], iface="%s")' % (itf)
+            self.tester.scapy_append(packet)
+            self.tester.scapy_execute()
+            time.sleep(.5)
+        elif tran_type == "ipv4-tcp-sym":
+            packet = r'sendp([Ether(dst="%s", src=get_if_hwaddr("%s"))/IP(src=' % (mac, itf)
+            packet += dstip4
+            packet += r', dst='
+            packet += srcip4
+            packet += r')/TCP(sport='
+            packet += dstport
+            packet += r',dport='
+            packet += srcport
+            packet += r')], iface="%s")' % (itf)
+            self.tester.scapy_append(packet)
+            self.tester.scapy_execute()
+            time.sleep(.5)
+        elif tran_type == "ipv4-udp":
+            packet = r'sendp([Ether(dst="%s", src=get_if_hwaddr("%s"))/IP(src=' % (mac, itf)
+            packet += srcip4
+            packet += r', dst='
+            packet += dstip4
+            packet += r')/UDP(sport='
+            packet += srcport
+            packet += r',dport='
+            packet += dstport
+            packet += r')], iface="%s")' % (itf)
+            self.tester.scapy_append(packet)
+            self.tester.scapy_execute()
+            time.sleep(.5)
+        elif tran_type == "ipv4-sctp":
+            packet = r'sendp([Ether(dst="%s", src=get_if_hwaddr("%s"))/IP(src=' % (mac, itf)
+            packet += srcip4
+            packet += r', dst='
+            packet += dstip4
+            packet += r')/SCTP(sport='
+            packet += srcport
+            packet += r',dport='
+            packet += dstport
+            packet += r')], iface="%s")' % (itf)
+            self.tester.scapy_append(packet)
+            self.tester.scapy_execute()
+            time.sleep(.5)
+        elif tran_type == "ipv6-other":
+            packet = r'sendp([Ether(dst="%s", src=get_if_hwaddr("%s"))/IPv6(src=' % (mac, itf)
+            packet += srcip6
+            packet += r', dst='
+            packet += dstip6
+            packet += r')], iface="%s")' % (itf)
+            self.tester.scapy_append(packet)
+            self.tester.scapy_execute()
+            time.sleep(.5)
+        elif tran_type == "ipv6-tcp":
+            packet = r'sendp([Ether(dst="%s", src=get_if_hwaddr("%s"))/IPv6(src=' % (mac, itf)
+            packet += srcip6
+            packet += r', dst='
+            packet += dstip6
+            packet += r')/TCP(sport='
+            packet += srcport
+            packet += r',dport='
+            packet += dstport
+            packet += r')], iface="%s")' % (itf)
+            self.tester.scapy_append(packet)
+            self.tester.scapy_execute()
+            time.sleep(.5)
+        elif tran_type == "ipv6-udp":
+            packet = r'sendp([Ether(dst="%s", src=get_if_hwaddr("%s"))/IPv6(src=' % (mac, itf)
+            packet += srcip6
+            packet += r', dst='
+            packet += dstip6
+            packet += r')/UDP(sport='
+            packet += srcport
+            packet += r',dport='
+            packet += dstport
+            packet += r')], iface="%s")' % (itf)
+            self.tester.scapy_append(packet)
+            self.tester.scapy_execute()
+            time.sleep(.5)
+        elif tran_type == "ipv6-sctp":
+            packet = r'sendp([Ether(dst="%s", src=get_if_hwaddr("%s"))/IPv6(src=' % (mac, itf)
+            packet += srcip6
+            packet += r', dst='
+            packet += dstip6
+            packet += r')/SCTP(sport='
+            packet += srcport
+            packet += r',dport='
+            packet += dstport
+            packet += r')], iface="%s")' % (itf)
+            self.tester.scapy_append(packet)
+            self.tester.scapy_execute()
+            time.sleep(.5)
+        else:
+            print("\ntran_type error!\n")
+
+        out = self.dut.get_session_output(timeout=1)
+        self.dut.send_expect("stop", "testpmd>")
+        lines = out.split("\r\n")
+        reta_line = {}
+        # collect the hash result and the queue id
+        for line in lines:
+            line = line.strip()
+            if len(line) != 0 and line.strip().startswith("port "):
+                reta_line = {}
+                rexp = r"port (\d)/queue (\d{1,2}): received (\d) packets"
+                m = re.match(rexp, line.strip())
+                if m:
+                    reta_line["port"] = m.group(1)
+                    reta_line["queue"] = m.group(2)
+
+            elif len(line) != 0 and line.startswith(("src=",)):
+                for item in line.split("-"):
+                    item = item.strip()
+                    if(item.startswith("RSS hash")):
+                        name, value = item.split("=", 1)
+
+                reta_line[name.strip()] = value.strip()
+                reta_lines.append(reta_line)
+
+        self.append_result_table()
+
+    def append_result_table(self):
+        """
+        Append the hash value and queue id into table.
+        """
+
+        global reta_lines
+
+        # append the the hash value and queue id into table
+        self.result_table_create(
+            ['packet index', 'hash value', 'hash index', 'queue id'])
+        i = 0
+
+        for tmp_reta_line in reta_lines:
+
+            # compute the hash result of five tuple into the 7 LSBs value.
+            hash_index = int(tmp_reta_line["RSS hash"], 16)
+            self.result_table_add(
+                [i, tmp_reta_line["RSS hash"], hash_index, tmp_reta_line["queue"]])
+            i = i + 1
+
+    def start_testpmd(self):
+        """
+        Create testpmd command
+        """
+        self.dut.send_expect(
+            "./%s/app/testpmd  -c fffff -n %d -- -i --coremask=0xffffe --portmask=0x1 --rxq=4 --txq=4" %
+            (self.target, self.dut.get_memory_channels()), "testpmd> ", 120)
+
+        self.dut.send_expect("set verbose 8", "testpmd> ")
+        self.dut.send_expect("set fwd rxonly", "testpmd> ")
+        self.dut.send_expect("start", "testpmd> ", 120)
+        time.sleep(2)
+
+        res = self.pmdout.wait_link_status_up("all")
+        self.verify(res is True, "link is down")
+
+    def test_global_hash_configuration(self):
+        """
+        Test with flow type ipv4-tcp.
+        """
+        flag = 1
+
+        self.start_testpmd()
+
+        # set hash input set by testpmd on dut, enable default input set
+        self.dut.send_expect(
+            "flow create 0 ingress pattern end actions rss types end queues end func simple_xor / end", "testpmd> ")
+            
+        out = self.dut.send_expect("get_hash_global_config 0", "testpmd>")
+        result_scanner = r"Hash function is Simple XOR"
+        scanner = re.compile(result_scanner, re.DOTALL)
+        m = scanner.search(out)
+        if m:
+            self.verify(1, "Pass")
+        else:
+            self.verify(0, "Fail")
+
+        self.dut.send_expect(
+            "flow destroy 0 rule 0", "testpmd>")
+        out = self.dut.send_expect("get_hash_global_config 0", "testpmd>")
+        rexp = r"Hash function is Toeplitz"
+        scanner = re.compile(rexp, re.DOTALL)
+        m = scanner.search(out)
+        if m:
+            self.verify(1, "Pass")
+        else:
+            self.verify(0, "Fail")
+
+    def test_symmetric_hash_configuration(self):
+        """
+        Test with flow type ipv4-tcp.
+        """
+        flag = 1
+
+        self.start_testpmd()
+
+        # set hash input set by testpmd on dut, enable default input set
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv4 / tcp / end actions rss types ipv4-tcp end queues end func symmetric_toeplitz queues end / end", "testpmd> ")
+        inputsets = ['ipv4-src-only', 'ipv4-dst-only', 'l4-dst-only', 'l4-src-only']
+        self.send_packet(self.itf, "ipv4-tcp", inputsets)
+        self.send_packet(self.itf, "ipv4-tcp-sym", inputsets)
+
+        self.dut.send_expect("quit", "# ", 30)
+
+        self.result_table_print()
+        result_rows = self.result_table_getrows()
+        self.verify(len(result_rows) > 1, "There is no data in the table, testcase failed!")
+
+        if ((result_rows[1][1] != result_rows[2][1]) or (result_rows[1][3] != result_rows[2][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+
+    def test_ipv4_tcp_src_ipv4(self):
+        """
+        Test with flow type ipv4-tcp and input set src-ipv4.
+        """
+        flag = 1
+
+        self.start_testpmd()
+
+        # set hash input set by testpmd on dut, enable src-ipv4
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv4 / tcp / end actions rss types ipv4-tcp l3-src-only end queues end / end", "testpmd> ")
+        inputsets = ['ipv4-src-only']
+        self.send_packet(self.itf, "ipv4-tcp", inputsets)
+        self.send_packet(self.itf, "ipv4-tcp", inputsets)
+        self.send_packet(self.itf, "ipv4-tcp", inputsets)
+
+        self.dut.send_expect(
+            "flow destroy 0 rule 0", "testpmd> ")
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv4 / tcp / end actions rss types ipv4-tcp end queues end / end", "testpmd> ")
+        self.send_packet(self.itf, "ipv4-tcp", inputsets)
+
+        self.dut.send_expect("quit", "# ", 30)
+
+        self.result_table_print()
+        result_rows = self.result_table_getrows()
+        self.verify(len(result_rows) > 1, "There is no data in the table, testcase failed!")
+
+        if ((result_rows[1][1] != result_rows[2][1]) or (result_rows[1][3] != result_rows[2][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] != result_rows[3][1]) or (result_rows[1][3] != result_rows[3][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] == result_rows[4][1]) and (result_rows[1][3] == result_rows[4][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are same, rss_granularity_config failed!")
+
+    def test_ipv4_tcp_dst_ipv4(self):
+        """
+        Test with flow type ipv4-tcp and input set dst-ipv4.
+        """
+        flag = 1
+
+        self.start_testpmd()
+
+        # set hash input set by testpmd on dut, enable dst-ipv4
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv4 / tcp / end actions rss types ipv4-tcp l3-dst-only end queues end / end", "testpmd> ")
+        inputsets = ['ipv4-dst-only']
+        self.send_packet(self.itf, "ipv4-tcp", inputsets)
+        self.send_packet(self.itf, "ipv4-tcp", inputsets)
+        self.send_packet(self.itf, "ipv4-tcp", inputsets)
+
+        self.dut.send_expect(
+            "flow destroy 0 rule 0", "testpmd> ")
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv4 / tcp / end actions rss types ipv4-tcp end queues end / end", "testpmd> ")
+        self.send_packet(self.itf, "ipv4-tcp", inputsets)
+
+        self.dut.send_expect("quit", "# ", 30)
+
+        self.result_table_print()
+        result_rows = self.result_table_getrows()
+        self.verify(len(result_rows) > 1, "There is no data in the table, testcase failed!")
+
+        if ((result_rows[1][1] != result_rows[2][1]) or (result_rows[1][3] != result_rows[2][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] != result_rows[3][1]) or (result_rows[1][3] != result_rows[3][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] == result_rows[4][1]) and (result_rows[1][3] == result_rows[4][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are same, rss_granularity_config failed!")
+
+    def test_ipv4_tcp_src_port(self):
+        """
+        Test with flow type ipv4-tcp and input set src-port.
+        """
+        flag = 1
+
+        self.start_testpmd()
+
+        # set hash input set by testpmd on dut, enable src-port
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv4 / tcp / end actions rss types ipv4-tcp l4-src-only end queues end / end", "testpmd> ")
+        inputsets = ['l4-src-only']
+        self.send_packet(self.itf, "ipv4-tcp", inputsets)
+        self.send_packet(self.itf, "ipv4-tcp", inputsets)
+        self.send_packet(self.itf, "ipv4-tcp", inputsets)
+
+        self.dut.send_expect(
+            "flow destroy 0 rule 0", "testpmd> ")
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv4 / tcp / end actions rss types ipv4-tcp end queues end / end", "testpmd> ")
+        self.send_packet(self.itf, "ipv4-tcp", inputsets)
+
+        self.dut.send_expect("quit", "# ", 30)
+
+        self.result_table_print()
+        result_rows = self.result_table_getrows()
+        self.verify(len(result_rows) > 1, "There is no data in the table, testcase failed!")
+
+        if ((result_rows[1][1] != result_rows[2][1]) or (result_rows[1][3] != result_rows[2][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] != result_rows[3][1]) or (result_rows[1][3] != result_rows[3][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] == result_rows[4][1]) and (result_rows[1][3] == result_rows[4][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are same, rss_granularity_config failed!")
+
+    def test_ipv4_tcp_dst_port(self):
+        """
+        Test with flow type ipv4-tcp and input set dst-port.
+        """
+        flag = 1
+
+        self.start_testpmd()
+
+        # set hash input set by testpmd on dut, enable dst-ipv4
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv4 / tcp / end actions rss types ipv4-tcp l4-dst-only end queues end / end", "testpmd> ")
+        inputsets = ['l4-dst-only']
+        self.send_packet(self.itf, "ipv4-tcp", inputsets)
+        self.send_packet(self.itf, "ipv4-tcp", inputsets)
+        self.send_packet(self.itf, "ipv4-tcp", inputsets)
+
+        self.dut.send_expect(
+            "flow destroy 0 rule 0", "testpmd> ")
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv4 / tcp / end actions rss types ipv4-tcp end queues end / end", "testpmd> ")
+        self.send_packet(self.itf, "ipv4-tcp", inputsets)
+
+        self.dut.send_expect("quit", "# ", 30)
+
+        self.result_table_print()
+        result_rows = self.result_table_getrows()
+        self.verify(len(result_rows) > 1, "There is no data in the table, testcase failed!")
+
+        if ((result_rows[1][1] != result_rows[2][1]) or (result_rows[1][3] != result_rows[2][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] != result_rows[3][1]) or (result_rows[1][3] != result_rows[3][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] == result_rows[4][1]) and (result_rows[1][3] == result_rows[4][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are same, rss_granularity_config failed!")
+
+    def test_ipv4_tcp_dst_src_ipv4(self):
+        """
+        Test with flow type ipv4-tcp and input set src-ipv4, dst-ipv4.
+        """
+        flag = 1
+
+        self.start_testpmd()
+
+        # set hash input set by testpmd on dut, enable src-ipv4, dst-ipv4
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv4 / tcp / end actions rss types ipv4-tcp l3-src-only l3-dst-only end queues end / end", "testpmd> ")
+        inputsets = ['ipv4-src-only', 'ipv4-dst-only']
+        self.send_packet(self.itf, "ipv4-tcp", inputsets)
+        self.send_packet(self.itf, "ipv4-tcp", inputsets)
+        self.send_packet(self.itf, "ipv4-tcp", inputsets)
+
+        self.dut.send_expect(
+            "flow destroy 0 rule 0", "testpmd> ")
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv4 / tcp / end actions rss types ipv4-tcp end queues end / end", "testpmd> ")
+        self.send_packet(self.itf, "ipv4-tcp", inputsets)
+
+        self.dut.send_expect("quit", "# ", 30)
+
+        self.result_table_print()
+        result_rows = self.result_table_getrows()
+        self.verify(len(result_rows) > 1, "There is no data in the table, testcase failed!")
+
+        if ((result_rows[1][1] != result_rows[2][1]) or (result_rows[1][3] != result_rows[2][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] != result_rows[3][1]) or (result_rows[1][3] != result_rows[3][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] == result_rows[4][1]) and (result_rows[1][3] == result_rows[4][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are same, rss_granularity_config failed!")
+
+    def test_ipv4_tcp_src_ipv4_src_port(self):
+        """
+        Test with flow type ipv4-tcp and input set src-ipv4, src-port.
+        """
+        flag = 1
+
+        self.start_testpmd()
+
+        # set hash input set by testpmd on dut, enable src-ipv4, src-port
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv4 / tcp / end actions rss types ipv4-tcp l3-src-only l4-src-only end queues end / end", "testpmd> ")
+        inputsets = ['ipv4-src-only', 'l4-src-only']
+        self.send_packet(self.itf, "ipv4-tcp", inputsets)
+        self.send_packet(self.itf, "ipv4-tcp", inputsets)
+        self.send_packet(self.itf, "ipv4-tcp", inputsets)
+
+        self.dut.send_expect(
+            "flow destroy 0 rule 0", "testpmd> ")
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv4 / tcp / end actions rss types ipv4-tcp end queues end / end", "testpmd> ")
+        self.send_packet(self.itf, "ipv4-tcp", inputsets)
+
+        self.dut.send_expect("quit", "# ", 30)
+
+        self.result_table_print()
+        result_rows = self.result_table_getrows()
+        self.verify(len(result_rows) > 1, "There is no data in the table, testcase failed!")
+
+        if ((result_rows[1][1] != result_rows[2][1]) or (result_rows[1][3] != result_rows[2][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] != result_rows[3][1]) or (result_rows[1][3] != result_rows[3][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] == result_rows[4][1]) and (result_rows[1][3] == result_rows[4][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are same, rss_granularity_config failed!")
+
+    def test_ipv4_tcp_src_ipv4_dst_port(self):
+        """
+        Test with flow type ipv4-tcp and input set src-ipv4, dst-port.
+        """
+        flag = 1
+
+        self.start_testpmd()
+
+        # set hash input set by testpmd on dut, enable src-ipv4, dst-port
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv4 / tcp / end actions rss types ipv4-tcp l3-src-only l4-dst-only end queues end / end", "testpmd> ")
+        inputsets = ['ipv4-src-only', 'l4-dst-only']
+        self.send_packet(self.itf, "ipv4-tcp", inputsets)
+        self.send_packet(self.itf, "ipv4-tcp", inputsets)
+        self.send_packet(self.itf, "ipv4-tcp", inputsets)
+
+        self.dut.send_expect(
+            "flow destroy 0 rule 0", "testpmd> ")
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv4 / tcp / end actions rss types ipv4-tcp end queues end / end", "testpmd> ")
+        self.send_packet(self.itf, "ipv4-tcp", inputsets)
+
+        self.dut.send_expect("quit", "# ", 30)
+
+        self.result_table_print()
+        result_rows = self.result_table_getrows()
+        self.verify(len(result_rows) > 1, "There is no data in the table, testcase failed!")
+
+        if ((result_rows[1][1] != result_rows[2][1]) or (result_rows[1][3] != result_rows[2][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] != result_rows[3][1]) or (result_rows[1][3] != result_rows[3][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] == result_rows[4][1]) and (result_rows[1][3] == result_rows[4][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are same, rss_granularity_config failed!")
+
+    def test_ipv4_tcp_dst_ipv4_src_port(self):
+        """
+        Test with flow type ipv4-tcp and input set dst-ipv4, src-port.
+        """
+        flag = 1
+
+        self.start_testpmd()
+
+        # set hash input set by testpmd on dut, enable dst-ipv4, src-port
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv4 / tcp / end actions rss types ipv4-tcp l3-dst-only l4-src-only end queues end / end", "testpmd> ")
+        inputsets = ['ipv4-dst-only', 'l4-src-only']
+        self.send_packet(self.itf, "ipv4-tcp", inputsets)
+        self.send_packet(self.itf, "ipv4-tcp", inputsets)
+        self.send_packet(self.itf, "ipv4-tcp", inputsets)
+
+        self.dut.send_expect(
+            "flow destroy 0 rule 0", "testpmd> ")
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv4 / tcp / end actions rss types ipv4-tcp end queues end / end", "testpmd> ")
+        self.send_packet(self.itf, "ipv4-tcp", inputsets)
+
+        self.dut.send_expect("quit", "# ", 30)
+
+        self.result_table_print()
+        result_rows = self.result_table_getrows()
+        self.verify(len(result_rows) > 1, "There is no data in the table, testcase failed!")
+
+        if ((result_rows[1][1] != result_rows[2][1]) or (result_rows[1][3] != result_rows[2][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] != result_rows[3][1]) or (result_rows[1][3] != result_rows[3][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] == result_rows[4][1]) and (result_rows[1][3] == result_rows[4][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are same, rss_granularity_config failed!")
+
+    def test_ipv4_tcp_dst_ipv4_dst_port(self):
+        """
+        Test with flow type ipv4-tcp and input set dst-ipv4, dst-port.
+        """
+        flag = 1
+
+        self.start_testpmd()
+
+        # set hash input set by testpmd on dut, enable dst-ipv4, dst-port
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv4 / tcp / end actions rss types ipv4-tcp l3-dst-only l4-dst-only end queues end / end", "testpmd> ")
+        inputsets = ['ipv4-dst-only', 'l4-dst-only']
+        self.send_packet(self.itf, "ipv4-tcp", inputsets)
+        self.send_packet(self.itf, "ipv4-tcp", inputsets)
+        self.send_packet(self.itf, "ipv4-tcp", inputsets)
+
+        self.dut.send_expect(
+            "flow destroy 0 rule 0", "testpmd> ")
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv4 / tcp / end actions rss types ipv4-tcp end queues end / end", "testpmd> ")
+        self.send_packet(self.itf, "ipv4-tcp", inputsets)
+
+        self.dut.send_expect("quit", "# ", 30)
+
+        self.result_table_print()
+        result_rows = self.result_table_getrows()
+        self.verify(len(result_rows) > 1, "There is no data in the table, testcase failed!")
+
+        if ((result_rows[1][1] != result_rows[2][1]) or (result_rows[1][3] != result_rows[2][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] != result_rows[3][1]) or (result_rows[1][3] != result_rows[3][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] == result_rows[4][1]) and (result_rows[1][3] == result_rows[4][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are same, rss_granularity_config failed!")
+
+    def test_ipv4_tcp_dst_src_port(self):
+        """
+        Test with flow type ipv4-tcp and input set src-port, dst-port.
+        """
+        flag = 1
+
+        self.start_testpmd()
+
+        # set hash input set by testpmd on dut, enable src-port, dst-port
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv4 / tcp / end actions rss types ipv4-tcp l4-src-only l4-dst-only end queues end / end", "testpmd> ")
+        inputsets = ['l4-src-only', 'l4-dst-only']
+        self.send_packet(self.itf, "ipv4-tcp", inputsets)
+        self.send_packet(self.itf, "ipv4-tcp", inputsets)
+        self.send_packet(self.itf, "ipv4-tcp", inputsets)
+
+        self.dut.send_expect(
+            "flow destroy 0 rule 0", "testpmd> ")
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv4 / tcp / end actions rss types ipv4-tcp end queues end / end", "testpmd> ")
+        self.send_packet(self.itf, "ipv4-tcp", inputsets)
+
+        self.dut.send_expect("quit", "# ", 30)
+
+        self.result_table_print()
+        result_rows = self.result_table_getrows()
+        self.verify(len(result_rows) > 1, "There is no data in the table, testcase failed!")
+
+        if ((result_rows[1][1] != result_rows[2][1]) or (result_rows[1][3] != result_rows[2][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] != result_rows[3][1]) or (result_rows[1][3] != result_rows[3][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] == result_rows[4][1]) and (result_rows[1][3] == result_rows[4][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are same, rss_granularity_config failed!")
+
+    def test_ipv4_tcp_src_dst_ipv4_src_port(self):
+        """
+        Test with flow type ipv4-tcp and input set src-ipv4, dst-ipv4, src-port.
+        """
+        flag = 1
+
+        self.start_testpmd()
+
+        # set hash input set by testpmd on dut, enable src-ipv4, dst-ipv4, src-port
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv4 / tcp / end actions rss types ipv4-tcp l3-src-only l3-dst-only l4-src-only end queues end / end", "testpmd> ")
+        inputsets = ['ipv4-src-only', 'ipv4-dst-only', 'l4-src-only']
+        self.send_packet(self.itf, "ipv4-tcp", inputsets)
+        self.send_packet(self.itf, "ipv4-tcp", inputsets)
+        self.send_packet(self.itf, "ipv4-tcp", inputsets)
+
+        self.dut.send_expect(
+            "flow destroy 0 rule 0", "testpmd> ")
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv4 / tcp / end actions rss types ipv4-tcp end queues end / end", "testpmd> ")
+        self.send_packet(self.itf, "ipv4-tcp", inputsets)
+
+        self.dut.send_expect("quit", "# ", 30)
+
+        self.result_table_print()
+        result_rows = self.result_table_getrows()
+        self.verify(len(result_rows) > 1, "There is no data in the table, testcase failed!")
+
+        if ((result_rows[1][1] != result_rows[2][1]) or (result_rows[1][3] != result_rows[2][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] != result_rows[3][1]) or (result_rows[1][3] != result_rows[3][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] == result_rows[4][1]) and (result_rows[1][3] == result_rows[4][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are same, rss_granularity_config failed!")
+
+    def test_ipv4_tcp_src_dst_ipv4_dst_port(self):
+        """
+        Test with flow type ipv4-tcp and input set src-ipv4, dst-ipv4, dst-port.
+        """
+        flag = 1
+
+        self.start_testpmd()
+
+        # set hash input set by testpmd on dut, enable src-ipv4, dst-ipv4, dst-port
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv4 / tcp / end actions rss types ipv4-tcp l3-src-only l3-dst-only l4-dst-only end queues end / end", "testpmd> ")
+        inputsets = ['ipv4-src-only', 'ipv4-dst-only', 'l4-dst-only']
+        self.send_packet(self.itf, "ipv4-tcp", inputsets)
+        self.send_packet(self.itf, "ipv4-tcp", inputsets)
+        self.send_packet(self.itf, "ipv4-tcp", inputsets)
+
+        self.dut.send_expect(
+            "flow destroy 0 rule 0", "testpmd> ")
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv4 / tcp / end actions rss types ipv4-tcp end queues end / end", "testpmd> ")
+        self.send_packet(self.itf, "ipv4-tcp", inputsets)
+
+        self.dut.send_expect("quit", "# ", 30)
+
+        self.result_table_print()
+        result_rows = self.result_table_getrows()
+        self.verify(len(result_rows) > 1, "There is no data in the table, testcase failed!")
+
+        if ((result_rows[1][1] != result_rows[2][1]) or (result_rows[1][3] != result_rows[2][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] != result_rows[3][1]) or (result_rows[1][3] != result_rows[3][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] == result_rows[4][1]) and (result_rows[1][3] == result_rows[4][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are same, rss_granularity_config failed!")
+
+    def test_ipv4_tcp_src_ipv4_src_dst_port(self):
+        """
+        Test with flow type ipv4-tcp and input set src-ipv4, dst-port, src-port.
+        """
+        flag = 1
+
+        self.start_testpmd()
+
+        # set hash input set by testpmd on dut, enable src-ipv4, dst-port, src-port
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv4 / tcp / end actions rss types ipv4-tcp l3-src-only l4-dst-only l4-src-only end queues end / end", "testpmd> ")
+        inputsets = ['ipv4-src-only', 'l4-dst-only', 'l4-src-only']
+        self.send_packet(self.itf, "ipv4-tcp", inputsets)
+        self.send_packet(self.itf, "ipv4-tcp", inputsets)
+        self.send_packet(self.itf, "ipv4-tcp", inputsets)
+
+        self.dut.send_expect(
+            "flow destroy 0 rule 0", "testpmd> ")
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv4 / tcp / end actions rss types ipv4-tcp end queues end / end", "testpmd> ")
+        self.send_packet(self.itf, "ipv4-tcp", inputsets)
+
+        self.dut.send_expect("quit", "# ", 30)
+
+        self.result_table_print()
+        result_rows = self.result_table_getrows()
+        self.verify(len(result_rows) > 1, "There is no data in the table, testcase failed!")
+
+        if ((result_rows[1][1] != result_rows[2][1]) or (result_rows[1][3] != result_rows[2][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] != result_rows[3][1]) or (result_rows[1][3] != result_rows[3][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] == result_rows[4][1]) and (result_rows[1][3] == result_rows[4][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are same, rss_granularity_config failed!")
+
+    def test_ipv4_tcp_dst_ipv4_src_dst_port(self):
+        """
+        Test with flow type ipv4-tcp and input set dst-ipv4, dst-port, src-port.
+        """
+        flag = 1
+
+        self.start_testpmd()
+
+        # set hash input set by testpmd on dut, enable dst-ipv4, dst-port, src-port
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv4 / tcp / end actions rss types ipv4-tcp l3-dst-only l4-dst-only l4-src-only end queues end / end", "testpmd> ")
+        inputsets = ['ipv4-dst-only', 'l4-dst-only', 'l4-src-only']
+        self.send_packet(self.itf, "ipv4-tcp", inputsets)
+        self.send_packet(self.itf, "ipv4-tcp", inputsets)
+        self.send_packet(self.itf, "ipv4-tcp", inputsets)
+
+        self.dut.send_expect(
+            "flow destroy 0 rule 0", "testpmd> ")
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv4 / tcp / end actions rss types ipv4-tcp end queues end / end", "testpmd> ")
+        self.send_packet(self.itf, "ipv4-tcp", inputsets)
+
+        self.dut.send_expect("quit", "# ", 30)
+
+        self.result_table_print()
+        result_rows = self.result_table_getrows()
+        self.verify(len(result_rows) > 1, "There is no data in the table, testcase failed!")
+
+        if ((result_rows[1][1] != result_rows[2][1]) or (result_rows[1][3] != result_rows[2][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] != result_rows[3][1]) or (result_rows[1][3] != result_rows[3][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] == result_rows[4][1]) and (result_rows[1][3] == result_rows[4][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are same, rss_granularity_config failed!")
+
+    def test_ipv4_tcp_all_input_set(self):
+        """
+        Test with flow type ipv4-tcp and input set src-ipv4, dst-ipv4, dst-port, src-port.
+        """
+        flag = 1
+
+        self.start_testpmd()
+
+        # set hash input set by testpmd on dut, enable src-ipv4, dst-ipv4, dst-port, src-port
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv4 / tcp / end actions rss types ipv4-tcp l3-src-only l3-dst-only l4-dst-only l4-src-only end queues end / end", "testpmd> ")
+        inputsets = ['ipv4-src-only', 'ipv4-dst-only', 'l4-dst-only', 'l4-src-only']
+        self.send_packet(self.itf, "ipv4-tcp", inputsets)
+
+        self.dut.send_expect(
+            "flow destroy 0 rule 0", "testpmd> ")
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv4 / tcp / end actions rss types ipv4-tcp end queues end / end", "testpmd> ")
+        self.send_packet(self.itf, "ipv4-tcp", inputsets)
+
+        self.dut.send_expect("quit", "# ", 30)
+
+        self.result_table_print()
+        result_rows = self.result_table_getrows()
+        self.verify(len(result_rows) > 1, "There is no data in the table, testcase failed!")
+
+        if ((result_rows[1][1] != result_rows[2][1]) or (result_rows[1][3] != result_rows[2][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+
+    def test_ipv4_udp_src_ipv4(self):
+        """
+        Test with flow type ipv4-udp and input set src-ipv4.
+        """
+        flag = 1
+
+        self.start_testpmd()
+
+        # set hash input set by testpmd on dut, enable src-ipv4
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv4 / udp / end actions rss types ipv4-udp l3-src-only end queues end / end", "testpmd> ")
+        inputsets = ['ipv4-src-only']
+        self.send_packet(self.itf, "ipv4-udp", inputsets)
+        self.send_packet(self.itf, "ipv4-udp", inputsets)
+        self.send_packet(self.itf, "ipv4-udp", inputsets)
+
+        self.dut.send_expect(
+            "flow destroy 0 rule 0", "testpmd> ")
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv4 / udp / end actions rss types ipv4-udp end queues end / end", "testpmd> ")
+        self.send_packet(self.itf, "ipv4-udp", inputsets)
+
+        self.dut.send_expect("quit", "# ", 30)
+
+        self.result_table_print()
+        result_rows = self.result_table_getrows()
+        self.verify(len(result_rows) > 1, "There is no data in the table, testcase failed!")
+
+        if ((result_rows[1][1] != result_rows[2][1]) or (result_rows[1][3] != result_rows[2][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] != result_rows[3][1]) or (result_rows[1][3] != result_rows[3][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] == result_rows[4][1]) and (result_rows[1][3] == result_rows[4][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are same, rss_granularity_config failed!")
+
+    def test_ipv4_udp_dst_ipv4(self):
+        """
+        Test with flow type ipv4-udp and input set dst-ipv4.
+        """
+        flag = 1
+
+        self.start_testpmd()
+
+        # set hash input set by testpmd on dut, enable dst-ipv4
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv4 / udp / end actions rss types ipv4-udp l3-dst-only end queues end / end", "testpmd> ")
+        inputsets = ['ipv4-dst-only']
+        self.send_packet(self.itf, "ipv4-udp", inputsets)
+        self.send_packet(self.itf, "ipv4-udp", inputsets)
+        self.send_packet(self.itf, "ipv4-udp", inputsets)
+
+        self.dut.send_expect(
+            "flow destroy 0 rule 0", "testpmd> ")
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv4 / udp / end actions rss types ipv4-udp end queues end / end", "testpmd> ")
+        self.send_packet(self.itf, "ipv4-udp", inputsets)
+
+        self.dut.send_expect("quit", "# ", 30)
+
+        self.result_table_print()
+        result_rows = self.result_table_getrows()
+        self.verify(len(result_rows) > 1, "There is no data in the table, testcase failed!")
+
+        if ((result_rows[1][1] != result_rows[2][1]) or (result_rows[1][3] != result_rows[2][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] != result_rows[3][1]) or (result_rows[1][3] != result_rows[3][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] == result_rows[4][1]) and (result_rows[1][3] == result_rows[4][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are same, rss_granularity_config failed!")
+
+    def test_ipv4_udp_src_port(self):
+        """
+        Test with flow type ipv4-udp and input set src-port.
+        """
+        flag = 1
+
+        self.start_testpmd()
+
+        # set hash input set by testpmd on dut, enable src-port
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv4 / udp / end actions rss types ipv4-udp l4-src-only end queues end / end", "testpmd> ")
+        inputsets = ['l4-src-only']
+        self.send_packet(self.itf, "ipv4-udp", inputsets)
+        self.send_packet(self.itf, "ipv4-udp", inputsets)
+        self.send_packet(self.itf, "ipv4-udp", inputsets)
+
+        self.dut.send_expect(
+            "flow destroy 0 rule 0", "testpmd> ")
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv4 / udp / end actions rss types ipv4-udp end queues end / end", "testpmd> ")
+        self.send_packet(self.itf, "ipv4-udp", inputsets)
+
+        self.dut.send_expect("quit", "# ", 30)
+
+        self.result_table_print()
+        result_rows = self.result_table_getrows()
+        self.verify(len(result_rows) > 1, "There is no data in the table, testcase failed!")
+
+        if ((result_rows[1][1] != result_rows[2][1]) or (result_rows[1][3] != result_rows[2][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] != result_rows[3][1]) or (result_rows[1][3] != result_rows[3][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] == result_rows[4][1]) and (result_rows[1][3] == result_rows[4][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are same, rss_granularity_config failed!")
+
+    def test_ipv4_udp_dst_port(self):
+        """
+        Test with flow type ipv4-udp and input set dst-port.
+        """
+        flag = 1
+
+        self.start_testpmd()
+
+        # set hash input set by testpmd on dut, enable dst-ipv4
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv4 / udp / end actions rss types ipv4-udp l4-dst-only end queues end / end", "testpmd> ")
+        inputsets = ['l4-dst-only']
+        self.send_packet(self.itf, "ipv4-udp", inputsets)
+        self.send_packet(self.itf, "ipv4-udp", inputsets)
+        self.send_packet(self.itf, "ipv4-udp", inputsets)
+
+        self.dut.send_expect(
+            "flow destroy 0 rule 0", "testpmd> ")
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv4 / udp / end actions rss types ipv4-udp end queues end / end", "testpmd> ")
+        self.send_packet(self.itf, "ipv4-udp", inputsets)
+
+        self.dut.send_expect("quit", "# ", 30)
+
+        self.result_table_print()
+        result_rows = self.result_table_getrows()
+        self.verify(len(result_rows) > 1, "There is no data in the table, testcase failed!")
+
+        if ((result_rows[1][1] != result_rows[2][1]) or (result_rows[1][3] != result_rows[2][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] != result_rows[3][1]) or (result_rows[1][3] != result_rows[3][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] == result_rows[4][1]) and (result_rows[1][3] == result_rows[4][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are same, rss_granularity_config failed!")
+
+    def test_ipv4_udp_dst_src_ipv4(self):
+        """
+        Test with flow type ipv4-udp and input set src-ipv4, dst-ipv4.
+        """
+        flag = 1
+
+        self.start_testpmd()
+
+        # set hash input set by testpmd on dut, enable src-ipv4, dst-ipv4
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv4 / udp / end actions rss types ipv4-udp l3-src-only l3-dst-only end queues end / end", "testpmd> ")
+        inputsets = ['ipv4-src-only', 'ipv4-dst-only']
+        self.send_packet(self.itf, "ipv4-udp", inputsets)
+        self.send_packet(self.itf, "ipv4-udp", inputsets)
+        self.send_packet(self.itf, "ipv4-udp", inputsets)
+
+        self.dut.send_expect(
+            "flow destroy 0 rule 0", "testpmd> ")
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv4 / udp / end actions rss types ipv4-udp end queues end / end", "testpmd> ")
+        self.send_packet(self.itf, "ipv4-udp", inputsets)
+
+        self.dut.send_expect("quit", "# ", 30)
+
+        self.result_table_print()
+        result_rows = self.result_table_getrows()
+        self.verify(len(result_rows) > 1, "There is no data in the table, testcase failed!")
+
+        if ((result_rows[1][1] != result_rows[2][1]) or (result_rows[1][3] != result_rows[2][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] != result_rows[3][1]) or (result_rows[1][3] != result_rows[3][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] == result_rows[4][1]) and (result_rows[1][3] == result_rows[4][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are same, rss_granularity_config failed!")
+
+    def test_ipv4_udp_src_ipv4_src_port(self):
+        """
+        Test with flow type ipv4-udp and input set src-ipv4, src-port.
+        """
+        flag = 1
+
+        self.start_testpmd()
+
+        # set hash input set by testpmd on dut, enable src-ipv4, src-port
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv4 / udp / end actions rss types ipv4-udp l3-src-only l4-src-only end queues end / end", "testpmd> ")
+        inputsets = ['ipv4-src-only', 'l4-src-only']
+        self.send_packet(self.itf, "ipv4-udp", inputsets)
+        self.send_packet(self.itf, "ipv4-udp", inputsets)
+        self.send_packet(self.itf, "ipv4-udp", inputsets)
+
+        self.dut.send_expect(
+            "flow destroy 0 rule 0", "testpmd> ")
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv4 / udp / end actions rss types ipv4-udp end queues end / end", "testpmd> ")
+        self.send_packet(self.itf, "ipv4-udp", inputsets)
+
+        self.dut.send_expect("quit", "# ", 30)
+
+        self.result_table_print()
+        result_rows = self.result_table_getrows()
+        self.verify(len(result_rows) > 1, "There is no data in the table, testcase failed!")
+
+        if ((result_rows[1][1] != result_rows[2][1]) or (result_rows[1][3] != result_rows[2][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] != result_rows[3][1]) or (result_rows[1][3] != result_rows[3][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] == result_rows[4][1]) and (result_rows[1][3] == result_rows[4][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are same, rss_granularity_config failed!")
+
+    def test_ipv4_udp_src_ipv4_dst_port(self):
+        """
+        Test with flow type ipv4-udp and input set src-ipv4, dst-port.
+        """
+        flag = 1
+
+        self.start_testpmd()
+
+        # set hash input set by testpmd on dut, enable src-ipv4, dst-port
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv4 / udp / end actions rss types ipv4-udp l3-src-only l4-dst-only end queues end / end", "testpmd> ")
+        inputsets = ['ipv4-src-only', 'l4-dst-only']
+        self.send_packet(self.itf, "ipv4-udp", inputsets)
+        self.send_packet(self.itf, "ipv4-udp", inputsets)
+        self.send_packet(self.itf, "ipv4-udp", inputsets)
+
+        self.dut.send_expect(
+            "flow destroy 0 rule 0", "testpmd> ")
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv4 / udp / end actions rss types ipv4-udp end queues end / end", "testpmd> ")
+        self.send_packet(self.itf, "ipv4-udp", inputsets)
+
+        self.dut.send_expect("quit", "# ", 30)
+
+        self.result_table_print()
+        result_rows = self.result_table_getrows()
+        self.verify(len(result_rows) > 1, "There is no data in the table, testcase failed!")
+
+        if ((result_rows[1][1] != result_rows[2][1]) or (result_rows[1][3] != result_rows[2][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] != result_rows[3][1]) or (result_rows[1][3] != result_rows[3][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] == result_rows[4][1]) and (result_rows[1][3] == result_rows[4][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are same, rss_granularity_config failed!")
+
+    def test_ipv4_udp_dst_ipv4_src_port(self):
+        """
+        Test with flow type ipv4-udp and input set dst-ipv4, src-port.
+        """
+        flag = 1
+
+        self.start_testpmd()
+
+        # set hash input set by testpmd on dut, enable dst-ipv4, src-port
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv4 / udp / end actions rss types ipv4-udp l3-dst-only l4-src-only end queues end / end", "testpmd> ")
+        inputsets = ['ipv4-dst-only', 'l4-src-only']
+        self.send_packet(self.itf, "ipv4-udp", inputsets)
+        self.send_packet(self.itf, "ipv4-udp", inputsets)
+        self.send_packet(self.itf, "ipv4-udp", inputsets)
+
+        self.dut.send_expect(
+            "flow destroy 0 rule 0", "testpmd> ")
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv4 / udp / end actions rss types ipv4-udp end queues end / end", "testpmd> ")
+        self.send_packet(self.itf, "ipv4-udp", inputsets)
+
+        self.dut.send_expect("quit", "# ", 30)
+
+        self.result_table_print()
+        result_rows = self.result_table_getrows()
+        self.verify(len(result_rows) > 1, "There is no data in the table, testcase failed!")
+
+        if ((result_rows[1][1] != result_rows[2][1]) or (result_rows[1][3] != result_rows[2][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] != result_rows[3][1]) or (result_rows[1][3] != result_rows[3][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] == result_rows[4][1]) and (result_rows[1][3] == result_rows[4][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are same, rss_granularity_config failed!")
+
+    def test_ipv4_udp_dst_ipv4_dst_port(self):
+        """
+        Test with flow type ipv4-udp and input set dst-ipv4, dst-port.
+        """
+        flag = 1
+
+        self.start_testpmd()
+
+        # set hash input set by testpmd on dut, enable dst-ipv4, dst-port
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv4 / udp / end actions rss types ipv4-udp l3-dst-only l4-dst-only end queues end / end", "testpmd> ")
+        inputsets = ['ipv4-dst-only', 'l4-dst-only']
+        self.send_packet(self.itf, "ipv4-udp", inputsets)
+        self.send_packet(self.itf, "ipv4-udp", inputsets)
+        self.send_packet(self.itf, "ipv4-udp", inputsets)
+
+        self.dut.send_expect(
+            "flow destroy 0 rule 0", "testpmd> ")
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv4 / udp / end actions rss types ipv4-udp end queues end / end", "testpmd> ")
+        self.send_packet(self.itf, "ipv4-udp", inputsets)
+
+        self.dut.send_expect("quit", "# ", 30)
+
+        self.result_table_print()
+        result_rows = self.result_table_getrows()
+        self.verify(len(result_rows) > 1, "There is no data in the table, testcase failed!")
+
+        if ((result_rows[1][1] != result_rows[2][1]) or (result_rows[1][3] != result_rows[2][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] != result_rows[3][1]) or (result_rows[1][3] != result_rows[3][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] == result_rows[4][1]) and (result_rows[1][3] == result_rows[4][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are same, rss_granularity_config failed!")
+
+    def test_ipv4_udp_dst_src_port(self):
+        """
+        Test with flow type ipv4-udp and input set src-port, dst-port.
+        """
+        flag = 1
+
+        self.start_testpmd()
+
+        # set hash input set by testpmd on dut, enable src-port, dst-port
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv4 / udp / end actions rss types ipv4-udp l4-src-only l4-dst-only end queues end / end", "testpmd> ")
+        inputsets = ['l4-src-only', 'l4-dst-only']
+        self.send_packet(self.itf, "ipv4-udp", inputsets)
+        self.send_packet(self.itf, "ipv4-udp", inputsets)
+        self.send_packet(self.itf, "ipv4-udp", inputsets)
+
+        self.dut.send_expect(
+            "flow destroy 0 rule 0", "testpmd> ")
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv4 / udp / end actions rss types ipv4-udp end queues end / end", "testpmd> ")
+        self.send_packet(self.itf, "ipv4-udp", inputsets)
+
+        self.dut.send_expect("quit", "# ", 30)
+
+        self.result_table_print()
+        result_rows = self.result_table_getrows()
+        self.verify(len(result_rows) > 1, "There is no data in the table, testcase failed!")
+
+        if ((result_rows[1][1] != result_rows[2][1]) or (result_rows[1][3] != result_rows[2][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] != result_rows[3][1]) or (result_rows[1][3] != result_rows[3][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] == result_rows[4][1]) and (result_rows[1][3] == result_rows[4][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are same, rss_granularity_config failed!")
+
+    def test_ipv4_udp_src_dst_ipv4_src_port(self):
+        """
+        Test with flow type ipv4-udp and input set src-ipv4, dst-ipv4, src-port.
+        """
+        flag = 1
+
+        self.start_testpmd()
+
+        # set hash input set by testpmd on dut, enable src-ipv4, dst-ipv4, src-port
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv4 / udp / end actions rss types ipv4-udp l3-src-only l3-dst-only l4-src-only end queues end / end", "testpmd> ")
+        inputsets = ['ipv4-src-only', 'ipv4-dst-only', 'l4-src-only']
+        self.send_packet(self.itf, "ipv4-udp", inputsets)
+        self.send_packet(self.itf, "ipv4-udp", inputsets)
+        self.send_packet(self.itf, "ipv4-udp", inputsets)
+
+        self.dut.send_expect(
+            "flow destroy 0 rule 0", "testpmd> ")
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv4 / udp / end actions rss types ipv4-udp end queues end / end", "testpmd> ")
+        self.send_packet(self.itf, "ipv4-udp", inputsets)
+
+        self.dut.send_expect("quit", "# ", 30)
+
+        self.result_table_print()
+        result_rows = self.result_table_getrows()
+        self.verify(len(result_rows) > 1, "There is no data in the table, testcase failed!")
+
+        if ((result_rows[1][1] != result_rows[2][1]) or (result_rows[1][3] != result_rows[2][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] != result_rows[3][1]) or (result_rows[1][3] != result_rows[3][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] == result_rows[4][1]) and (result_rows[1][3] == result_rows[4][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are same, rss_granularity_config failed!")
+
+    def test_ipv4_udp_src_dst_ipv4_dst_port(self):
+        """
+        Test with flow type ipv4-udp and input set src-ipv4, dst-ipv4, dst-port.
+        """
+        flag = 1
+
+        self.start_testpmd()
+
+        # set hash input set by testpmd on dut, enable src-ipv4, dst-ipv4, dst-port
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv4 / udp / end actions rss types ipv4-udp l3-src-only l3-dst-only l4-dst-only end queues end / end", "testpmd> ")
+        inputsets = ['ipv4-src-only', 'ipv4-dst-only', 'l4-dst-only']
+        self.send_packet(self.itf, "ipv4-udp", inputsets)
+        self.send_packet(self.itf, "ipv4-udp", inputsets)
+        self.send_packet(self.itf, "ipv4-udp", inputsets)
+
+        self.dut.send_expect(
+            "flow destroy 0 rule 0", "testpmd> ")
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv4 / udp / end actions rss types ipv4-udp end queues end / end", "testpmd> ")
+        self.send_packet(self.itf, "ipv4-udp", inputsets)
+
+        self.dut.send_expect("quit", "# ", 30)
+
+        self.result_table_print()
+        result_rows = self.result_table_getrows()
+        self.verify(len(result_rows) > 1, "There is no data in the table, testcase failed!")
+
+        if ((result_rows[1][1] != result_rows[2][1]) or (result_rows[1][3] != result_rows[2][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] != result_rows[3][1]) or (result_rows[1][3] != result_rows[3][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] == result_rows[4][1]) and (result_rows[1][3] == result_rows[4][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are same, rss_granularity_config failed!")
+
+    def test_ipv4_udp_src_ipv4_src_dst_port(self):
+        """
+        Test with flow type ipv4-udp and input set src-ipv4, dst-port, src-port.
+        """
+        flag = 1
+
+        self.start_testpmd()
+
+        # set hash input set by testpmd on dut, enable src-ipv4, dst-port, src-port
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv4 / udp / end actions rss types ipv4-udp l3-src-only l4-dst-only l4-src-only end queues end / end", "testpmd> ")
+        inputsets = ['ipv4-src-only', 'l4-dst-only', 'l4-src-only']
+        self.send_packet(self.itf, "ipv4-udp", inputsets)
+        self.send_packet(self.itf, "ipv4-udp", inputsets)
+        self.send_packet(self.itf, "ipv4-udp", inputsets)
+
+        self.dut.send_expect(
+            "flow destroy 0 rule 0", "testpmd> ")
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv4 / udp / end actions rss types ipv4-udp end queues end / end", "testpmd> ")
+        self.send_packet(self.itf, "ipv4-udp", inputsets)
+
+        self.dut.send_expect("quit", "# ", 30)
+
+        self.result_table_print()
+        result_rows = self.result_table_getrows()
+        self.verify(len(result_rows) > 1, "There is no data in the table, testcase failed!")
+
+        if ((result_rows[1][1] != result_rows[2][1]) or (result_rows[1][3] != result_rows[2][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] != result_rows[3][1]) or (result_rows[1][3] != result_rows[3][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] == result_rows[4][1]) and (result_rows[1][3] == result_rows[4][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are same, rss_granularity_config failed!")
+
+    def test_ipv4_udp_dst_ipv4_src_dst_port(self):
+        """
+        Test with flow type ipv4-udp and input set dst-ipv4, dst-port, src-port.
+        """
+        flag = 1
+
+        self.start_testpmd()
+
+        # set hash input set by testpmd on dut, enable dst-ipv4, dst-port, src-port
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv4 / udp / end actions rss types ipv4-udp l3-dst-only l4-dst-only l4-src-only end queues end / end", "testpmd> ")
+        inputsets = ['ipv4-dst-only', 'l4-dst-only', 'l4-src-only']
+        self.send_packet(self.itf, "ipv4-udp", inputsets)
+        self.send_packet(self.itf, "ipv4-udp", inputsets)
+        self.send_packet(self.itf, "ipv4-udp", inputsets)
+
+        self.dut.send_expect(
+            "flow destroy 0 rule 0", "testpmd> ")
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv4 / udp / end actions rss types ipv4-udp end queues end / end", "testpmd> ")
+        self.send_packet(self.itf, "ipv4-udp", inputsets)
+
+        self.dut.send_expect("quit", "# ", 30)
+
+        self.result_table_print()
+        result_rows = self.result_table_getrows()
+        self.verify(len(result_rows) > 1, "There is no data in the table, testcase failed!")
+
+        if ((result_rows[1][1] != result_rows[2][1]) or (result_rows[1][3] != result_rows[2][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] != result_rows[3][1]) or (result_rows[1][3] != result_rows[3][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] == result_rows[4][1]) and (result_rows[1][3] == result_rows[4][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are same, rss_granularity_config failed!")
+
+    def test_ipv4_udp_all_input_set(self):
+        """
+        Test with flow type ipv4-udp and input set src-ipv4, dst-ipv4, dst-port, src-port.
+        """
+        flag = 1
+
+        self.start_testpmd()
+
+        # set hash input set by testpmd on dut, enable src-ipv4, dst-ipv4, dst-port, src-port
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv4 / udp / end actions rss types ipv4-udp l3-src-only l3-dst-only l4-dst-only l4-src-only end queues end / end", "testpmd> ")
+        inputsets = ['ipv4-src-only', 'ipv4-dst-only', 'l4-dst-only', 'l4-src-only']
+        self.send_packet(self.itf, "ipv4-udp", inputsets)
+
+        self.dut.send_expect(
+            "flow destroy 0 rule 0", "testpmd> ")
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv4 / udp / end actions rss types ipv4-udp end queues end / end", "testpmd> ")
+        self.send_packet(self.itf, "ipv4-udp", inputsets)
+
+        self.dut.send_expect("quit", "# ", 30)
+
+        self.result_table_print()
+        result_rows = self.result_table_getrows()
+        self.verify(len(result_rows) > 1, "There is no data in the table, testcase failed!")
+
+        if ((result_rows[1][1] != result_rows[2][1]) or (result_rows[1][3] != result_rows[2][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+
+    def test_ipv4_sctp_src_ipv4(self):
+        """
+        Test with flow type ipv4-sctp and input set src-ipv4.
+        """
+        flag = 1
+
+        self.start_testpmd()
+
+        # set hash input set by testpmd on dut, enable src-ipv4
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv4 / sctp / end actions rss types ipv4-sctp l3-src-only end queues end / end", "testpmd> ")
+        inputsets = ['ipv4-src-only']
+        self.send_packet(self.itf, "ipv4-sctp", inputsets)
+        self.send_packet(self.itf, "ipv4-sctp", inputsets)
+        self.send_packet(self.itf, "ipv4-sctp", inputsets)
+
+        self.dut.send_expect(
+            "flow destroy 0 rule 0", "testpmd> ")
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv4 / sctp / end actions rss types ipv4-sctp end queues end / end", "testpmd> ")
+        self.send_packet(self.itf, "ipv4-sctp", inputsets)
+
+        self.dut.send_expect("quit", "# ", 30)
+
+        self.result_table_print()
+        result_rows = self.result_table_getrows()
+        self.verify(len(result_rows) > 1, "There is no data in the table, testcase failed!")
+
+        if ((result_rows[1][1] != result_rows[2][1]) or (result_rows[1][3] != result_rows[2][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] != result_rows[3][1]) or (result_rows[1][3] != result_rows[3][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] == result_rows[4][1]) and (result_rows[1][3] == result_rows[4][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are same, rss_granularity_config failed!")
+
+    def test_ipv4_sctp_dst_ipv4(self):
+        """
+        Test with flow type ipv4-sctp and input set dst-ipv4.
+        """
+        flag = 1
+
+        self.start_testpmd()
+
+        # set hash input set by testpmd on dut, enable dst-ipv4
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv4 / sctp / end actions rss types ipv4-sctp l3-dst-only end queues end / end", "testpmd> ")
+        inputsets = ['ipv4-dst-only']
+        self.send_packet(self.itf, "ipv4-sctp", inputsets)
+        self.send_packet(self.itf, "ipv4-sctp", inputsets)
+        self.send_packet(self.itf, "ipv4-sctp", inputsets)
+
+        self.dut.send_expect(
+            "flow destroy 0 rule 0", "testpmd> ")
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv4 / sctp / end actions rss types ipv4-sctp end queues end / end", "testpmd> ")
+        self.send_packet(self.itf, "ipv4-sctp", inputsets)
+
+        self.dut.send_expect("quit", "# ", 30)
+
+        self.result_table_print()
+        result_rows = self.result_table_getrows()
+        self.verify(len(result_rows) > 1, "There is no data in the table, testcase failed!")
+
+        if ((result_rows[1][1] != result_rows[2][1]) or (result_rows[1][3] != result_rows[2][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] != result_rows[3][1]) or (result_rows[1][3] != result_rows[3][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] == result_rows[4][1]) and (result_rows[1][3] == result_rows[4][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are same, rss_granularity_config failed!")
+
+    def test_ipv4_sctp_src_port(self):
+        """
+        Test with flow type ipv4-sctp and input set src-port.
+        """
+        flag = 1
+
+        self.start_testpmd()
+
+        # set hash input set by testpmd on dut, enable src-port
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv4 / sctp / end actions rss types ipv4-sctp l4-src-only end queues end / end", "testpmd> ")
+        inputsets = ['l4-src-only']
+        self.send_packet(self.itf, "ipv4-sctp", inputsets)
+        self.send_packet(self.itf, "ipv4-sctp", inputsets)
+        self.send_packet(self.itf, "ipv4-sctp", inputsets)
+
+        self.dut.send_expect(
+            "flow destroy 0 rule 0", "testpmd> ")
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv4 / sctp / end actions rss types ipv4-sctp end queues end / end", "testpmd> ")
+        self.send_packet(self.itf, "ipv4-sctp", inputsets)
+
+        self.dut.send_expect("quit", "# ", 30)
+
+        self.result_table_print()
+        result_rows = self.result_table_getrows()
+        self.verify(len(result_rows) > 1, "There is no data in the table, testcase failed!")
+
+        if ((result_rows[1][1] != result_rows[2][1]) or (result_rows[1][3] != result_rows[2][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] != result_rows[3][1]) or (result_rows[1][3] != result_rows[3][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] == result_rows[4][1]) and (result_rows[1][3] == result_rows[4][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are same, rss_granularity_config failed!")
+
+    def test_ipv4_sctp_dst_port(self):
+        """
+        Test with flow type ipv4-sctp and input set dst-port.
+        """
+        flag = 1
+
+        self.start_testpmd()
+
+        # set hash input set by testpmd on dut, enable dst-ipv4
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv4 / sctp / end actions rss types ipv4-sctp l4-dst-only end queues end / end", "testpmd> ")
+        inputsets = ['l4-dst-only']
+        self.send_packet(self.itf, "ipv4-sctp", inputsets)
+        self.send_packet(self.itf, "ipv4-sctp", inputsets)
+        self.send_packet(self.itf, "ipv4-sctp", inputsets)
+
+        self.dut.send_expect(
+            "flow destroy 0 rule 0", "testpmd> ")
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv4 / sctp / end actions rss types ipv4-sctp end queues end / end", "testpmd> ")
+        self.send_packet(self.itf, "ipv4-sctp", inputsets)
+
+        self.dut.send_expect("quit", "# ", 30)
+
+        self.result_table_print()
+        result_rows = self.result_table_getrows()
+        self.verify(len(result_rows) > 1, "There is no data in the table, testcase failed!")
+
+        if ((result_rows[1][1] != result_rows[2][1]) or (result_rows[1][3] != result_rows[2][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] != result_rows[3][1]) or (result_rows[1][3] != result_rows[3][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] == result_rows[4][1]) and (result_rows[1][3] == result_rows[4][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are same, rss_granularity_config failed!")
+
+    def test_ipv4_sctp_dst_src_ipv4(self):
+        """
+        Test with flow type ipv4-sctp and input set src-ipv4, dst-ipv4.
+        """
+        flag = 1
+
+        self.start_testpmd()
+
+        # set hash input set by testpmd on dut, enable src-ipv4, dst-ipv4
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv4 / sctp / end actions rss types ipv4-sctp l3-src-only l3-dst-only end queues end / end", "testpmd> ")
+        inputsets = ['ipv4-src-only', 'ipv4-dst-only']
+        self.send_packet(self.itf, "ipv4-sctp", inputsets)
+        self.send_packet(self.itf, "ipv4-sctp", inputsets)
+        self.send_packet(self.itf, "ipv4-sctp", inputsets)
+
+        self.dut.send_expect(
+            "flow destroy 0 rule 0", "testpmd> ")
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv4 / sctp / end actions rss types ipv4-sctp end queues end / end", "testpmd> ")
+        self.send_packet(self.itf, "ipv4-sctp", inputsets)
+
+        self.dut.send_expect("quit", "# ", 30)
+
+        self.result_table_print()
+        result_rows = self.result_table_getrows()
+        self.verify(len(result_rows) > 1, "There is no data in the table, testcase failed!")
+
+        if ((result_rows[1][1] != result_rows[2][1]) or (result_rows[1][3] != result_rows[2][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] != result_rows[3][1]) or (result_rows[1][3] != result_rows[3][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] == result_rows[4][1]) and (result_rows[1][3] == result_rows[4][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are same, rss_granularity_config failed!")
+
+    def test_ipv4_sctp_src_ipv4_src_port(self):
+        """
+        Test with flow type ipv4-sctp and input set src-ipv4, src-port.
+        """
+        flag = 1
+
+        self.start_testpmd()
+
+        # set hash input set by testpmd on dut, enable src-ipv4, src-port
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv4 / sctp / end actions rss types ipv4-sctp l3-src-only l4-src-only end queues end / end", "testpmd> ")
+        inputsets = ['ipv4-src-only', 'l4-src-only']
+        self.send_packet(self.itf, "ipv4-sctp", inputsets)
+        self.send_packet(self.itf, "ipv4-sctp", inputsets)
+        self.send_packet(self.itf, "ipv4-sctp", inputsets)
+
+        self.dut.send_expect(
+            "flow destroy 0 rule 0", "testpmd> ")
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv4 / sctp / end actions rss types ipv4-sctp end queues end / end", "testpmd> ")
+        self.send_packet(self.itf, "ipv4-sctp", inputsets)
+
+        self.dut.send_expect("quit", "# ", 30)
+
+        self.result_table_print()
+        result_rows = self.result_table_getrows()
+        self.verify(len(result_rows) > 1, "There is no data in the table, testcase failed!")
+
+        if ((result_rows[1][1] != result_rows[2][1]) or (result_rows[1][3] != result_rows[2][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] != result_rows[3][1]) or (result_rows[1][3] != result_rows[3][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] == result_rows[4][1]) and (result_rows[1][3] == result_rows[4][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are same, rss_granularity_config failed!")
+
+    def test_ipv4_sctp_src_ipv4_dst_port(self):
+        """
+        Test with flow type ipv4-sctp and input set src-ipv4, dst-port.
+        """
+        flag = 1
+
+        self.start_testpmd()
+
+        # set hash input set by testpmd on dut, enable src-ipv4, dst-port
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv4 / sctp / end actions rss types ipv4-sctp l3-src-only l4-dst-only end queues end / end", "testpmd> ")
+        inputsets = ['ipv4-src-only', 'l4-dst-only']
+        self.send_packet(self.itf, "ipv4-sctp", inputsets)
+        self.send_packet(self.itf, "ipv4-sctp", inputsets)
+        self.send_packet(self.itf, "ipv4-sctp", inputsets)
+
+        self.dut.send_expect(
+            "flow destroy 0 rule 0", "testpmd> ")
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv4 / sctp / end actions rss types ipv4-sctp end queues end / end", "testpmd> ")
+        self.send_packet(self.itf, "ipv4-sctp", inputsets)
+
+        self.dut.send_expect("quit", "# ", 30)
+
+        self.result_table_print()
+        result_rows = self.result_table_getrows()
+        self.verify(len(result_rows) > 1, "There is no data in the table, testcase failed!")
+
+        if ((result_rows[1][1] != result_rows[2][1]) or (result_rows[1][3] != result_rows[2][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] != result_rows[3][1]) or (result_rows[1][3] != result_rows[3][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] == result_rows[4][1]) and (result_rows[1][3] == result_rows[4][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are same, rss_granularity_config failed!")
+
+    def test_ipv4_sctp_dst_ipv4_src_port(self):
+        """
+        Test with flow type ipv4-sctp and input set dst-ipv4, src-port.
+        """
+        flag = 1
+
+        self.start_testpmd()
+
+        # set hash input set by testpmd on dut, enable dst-ipv4, src-port
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv4 / sctp / end actions rss types ipv4-sctp l3-dst-only l4-src-only end queues end / end", "testpmd> ")
+        inputsets = ['ipv4-dst-only', 'l4-src-only']
+        self.send_packet(self.itf, "ipv4-sctp", inputsets)
+        self.send_packet(self.itf, "ipv4-sctp", inputsets)
+        self.send_packet(self.itf, "ipv4-sctp", inputsets)
+
+        self.dut.send_expect(
+            "flow destroy 0 rule 0", "testpmd> ")
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv4 / sctp / end actions rss types ipv4-sctp end queues end / end", "testpmd> ")
+        self.send_packet(self.itf, "ipv4-sctp", inputsets)
+
+        self.dut.send_expect("quit", "# ", 30)
+
+        self.result_table_print()
+        result_rows = self.result_table_getrows()
+        self.verify(len(result_rows) > 1, "There is no data in the table, testcase failed!")
+
+        if ((result_rows[1][1] != result_rows[2][1]) or (result_rows[1][3] != result_rows[2][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] != result_rows[3][1]) or (result_rows[1][3] != result_rows[3][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] == result_rows[4][1]) and (result_rows[1][3] == result_rows[4][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are same, rss_granularity_config failed!")
+
+    def test_ipv4_sctp_dst_ipv4_dst_port(self):
+        """
+        Test with flow type ipv4-sctp and input set dst-ipv4, dst-port.
+        """
+        flag = 1
+
+        self.start_testpmd()
+
+        # set hash input set by testpmd on dut, enable dst-ipv4, dst-port
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv4 / sctp / end actions rss types ipv4-sctp l3-dst-only l4-dst-only end queues end / end", "testpmd> ")
+        inputsets = ['ipv4-dst-only', 'l4-dst-only']
+        self.send_packet(self.itf, "ipv4-sctp", inputsets)
+        self.send_packet(self.itf, "ipv4-sctp", inputsets)
+        self.send_packet(self.itf, "ipv4-sctp", inputsets)
+
+        self.dut.send_expect(
+            "flow destroy 0 rule 0", "testpmd> ")
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv4 / sctp / end actions rss types ipv4-sctp end queues end / end", "testpmd> ")
+        self.send_packet(self.itf, "ipv4-sctp", inputsets)
+
+        self.dut.send_expect("quit", "# ", 30)
+
+        self.result_table_print()
+        result_rows = self.result_table_getrows()
+        self.verify(len(result_rows) > 1, "There is no data in the table, testcase failed!")
+
+        if ((result_rows[1][1] != result_rows[2][1]) or (result_rows[1][3] != result_rows[2][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] != result_rows[3][1]) or (result_rows[1][3] != result_rows[3][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] == result_rows[4][1]) and (result_rows[1][3] == result_rows[4][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are same, rss_granularity_config failed!")
+
+    def test_ipv4_sctp_dst_src_port(self):
+        """
+        Test with flow type ipv4-sctp and input set src-port, dst-port.
+        """
+        flag = 1
+
+        self.start_testpmd()
+
+        # set hash input set by testpmd on dut, enable src-port, dst-port
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv4 / sctp / end actions rss types ipv4-sctp l4-src-only l4-dst-only end queues end / end", "testpmd> ")
+        inputsets = ['l4-src-only', 'l4-dst-only']
+        self.send_packet(self.itf, "ipv4-sctp", inputsets)
+        self.send_packet(self.itf, "ipv4-sctp", inputsets)
+        self.send_packet(self.itf, "ipv4-sctp", inputsets)
+
+        self.dut.send_expect(
+            "flow destroy 0 rule 0", "testpmd> ")
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv4 / sctp / end actions rss types ipv4-sctp end queues end / end", "testpmd> ")
+        self.send_packet(self.itf, "ipv4-sctp", inputsets)
+
+        self.dut.send_expect("quit", "# ", 30)
+
+        self.result_table_print()
+        result_rows = self.result_table_getrows()
+        self.verify(len(result_rows) > 1, "There is no data in the table, testcase failed!")
+
+        if ((result_rows[1][1] != result_rows[2][1]) or (result_rows[1][3] != result_rows[2][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] != result_rows[3][1]) or (result_rows[1][3] != result_rows[3][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] == result_rows[4][1]) and (result_rows[1][3] == result_rows[4][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are same, rss_granularity_config failed!")
+
+    def test_ipv4_sctp_src_dst_ipv4_src_port(self):
+        """
+        Test with flow type ipv4-sctp and input set src-ipv4, dst-ipv4, src-port.
+        """
+        flag = 1
+
+        self.start_testpmd()
+
+        # set hash input set by testpmd on dut, enable src-ipv4, dst-ipv4, src-port
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv4 / sctp / end actions rss types ipv4-sctp l3-src-only l3-dst-only l4-src-only end queues end / end", "testpmd> ")
+        inputsets = ['ipv4-src-only', 'ipv4-dst-only', 'l4-src-only']
+        self.send_packet(self.itf, "ipv4-sctp", inputsets)
+        self.send_packet(self.itf, "ipv4-sctp", inputsets)
+        self.send_packet(self.itf, "ipv4-sctp", inputsets)
+
+        self.dut.send_expect(
+            "flow destroy 0 rule 0", "testpmd> ")
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv4 / sctp / end actions rss types ipv4-sctp end queues end / end", "testpmd> ")
+        self.send_packet(self.itf, "ipv4-sctp", inputsets)
+
+        self.dut.send_expect("quit", "# ", 30)
+
+        self.result_table_print()
+        result_rows = self.result_table_getrows()
+        self.verify(len(result_rows) > 1, "There is no data in the table, testcase failed!")
+
+        if ((result_rows[1][1] != result_rows[2][1]) or (result_rows[1][3] != result_rows[2][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] != result_rows[3][1]) or (result_rows[1][3] != result_rows[3][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] == result_rows[4][1]) and (result_rows[1][3] == result_rows[4][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are same, rss_granularity_config failed!")
+
+    def test_ipv4_sctp_src_dst_ipv4_dst_port(self):
+        """
+        Test with flow type ipv4-sctp and input set src-ipv4, dst-ipv4, dst-port.
+        """
+        flag = 1
+
+        self.start_testpmd()
+
+        # set hash input set by testpmd on dut, enable src-ipv4, dst-ipv4, dst-port
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv4 / sctp / end actions rss types ipv4-sctp l3-src-only l3-dst-only l4-dst-only end queues end / end", "testpmd> ")
+        inputsets = ['ipv4-src-only', 'ipv4-dst-only', 'l4-dst-only']
+        self.send_packet(self.itf, "ipv4-sctp", inputsets)
+        self.send_packet(self.itf, "ipv4-sctp", inputsets)
+        self.send_packet(self.itf, "ipv4-sctp", inputsets)
+
+        self.dut.send_expect(
+            "flow destroy 0 rule 0", "testpmd> ")
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv4 / sctp / end actions rss types ipv4-sctp end queues end / end", "testpmd> ")
+        self.send_packet(self.itf, "ipv4-sctp", inputsets)
+
+        self.dut.send_expect("quit", "# ", 30)
+
+        self.result_table_print()
+        result_rows = self.result_table_getrows()
+        self.verify(len(result_rows) > 1, "There is no data in the table, testcase failed!")
+
+        if ((result_rows[1][1] != result_rows[2][1]) or (result_rows[1][3] != result_rows[2][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] != result_rows[3][1]) or (result_rows[1][3] != result_rows[3][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] == result_rows[4][1]) and (result_rows[1][3] == result_rows[4][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are same, rss_granularity_config failed!")
+
+    def test_ipv4_sctp_src_ipv4_src_dst_port(self):
+        """
+        Test with flow type ipv4-sctp and input set src-ipv4, dst-port, src-port.
+        """
+        flag = 1
+
+        self.start_testpmd()
+
+        # set hash input set by testpmd on dut, enable src-ipv4, dst-port, src-port
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv4 / sctp / end actions rss types ipv4-sctp l3-src-only l4-dst-only l4-src-only end queues end / end", "testpmd> ")
+        inputsets = ['ipv4-src-only', 'l4-dst-only', 'l4-src-only']
+        self.send_packet(self.itf, "ipv4-sctp", inputsets)
+        self.send_packet(self.itf, "ipv4-sctp", inputsets)
+        self.send_packet(self.itf, "ipv4-sctp", inputsets)
+
+        self.dut.send_expect(
+            "flow destroy 0 rule 0", "testpmd> ")
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv4 / sctp / end actions rss types ipv4-sctp end queues end / end", "testpmd> ")
+        self.send_packet(self.itf, "ipv4-sctp", inputsets)
+
+        self.dut.send_expect("quit", "# ", 30)
+
+        self.result_table_print()
+        result_rows = self.result_table_getrows()
+        self.verify(len(result_rows) > 1, "There is no data in the table, testcase failed!")
+
+        if ((result_rows[1][1] != result_rows[2][1]) or (result_rows[1][3] != result_rows[2][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] != result_rows[3][1]) or (result_rows[1][3] != result_rows[3][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] == result_rows[4][1]) and (result_rows[1][3] == result_rows[4][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are same, rss_granularity_config failed!")
+
+    def test_ipv4_sctp_dst_ipv4_src_dst_port(self):
+        """
+        Test with flow type ipv4-sctp and input set dst-ipv4, dst-port, src-port.
+        """
+        flag = 1
+
+        self.start_testpmd()
+
+        # set hash input set by testpmd on dut, enable dst-ipv4, dst-port, src-port
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv4 / sctp / end actions rss types ipv4-sctp l3-dst-only l4-dst-only l4-src-only end queues end / end", "testpmd> ")
+        inputsets = ['ipv4-dst-only', 'l4-dst-only', 'l4-src-only']
+        self.send_packet(self.itf, "ipv4-sctp", inputsets)
+        self.send_packet(self.itf, "ipv4-sctp", inputsets)
+        self.send_packet(self.itf, "ipv4-sctp", inputsets)
+
+        self.dut.send_expect(
+            "flow destroy 0 rule 0", "testpmd> ")
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv4 / sctp / end actions rss types ipv4-sctp end queues end / end", "testpmd> ")
+        self.send_packet(self.itf, "ipv4-sctp", inputsets)
+
+        self.dut.send_expect("quit", "# ", 30)
+
+        self.result_table_print()
+        result_rows = self.result_table_getrows()
+        self.verify(len(result_rows) > 1, "There is no data in the table, testcase failed!")
+
+        if ((result_rows[1][1] != result_rows[2][1]) or (result_rows[1][3] != result_rows[2][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] != result_rows[3][1]) or (result_rows[1][3] != result_rows[3][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] == result_rows[4][1]) and (result_rows[1][3] == result_rows[4][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are same, rss_granularity_config failed!")
+
+    def test_ipv4_sctp_all_input_set(self):
+        """
+        Test with flow type ipv4-sctp and input set src-ipv4, dst-ipv4, dst-port, src-port.
+        """
+        flag = 1
+
+        self.start_testpmd()
+
+        # set hash input set by testpmd on dut, enable src-ipv4, dst-ipv4, dst-port, src-port
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv4 / sctp / end actions rss types ipv4-sctp l3-src-only l3-dst-only l4-dst-only l4-src-only end queues end / end", "testpmd> ")
+        inputsets = ['ipv4-src-only', 'ipv4-dst-only', 'l4-dst-only', 'l4-src-only']
+        self.send_packet(self.itf, "ipv4-sctp", inputsets)
+
+        self.dut.send_expect(
+            "flow destroy 0 rule 0", "testpmd> ")
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv4 / sctp / end actions rss types ipv4-sctp end queues end / end", "testpmd> ")
+        self.send_packet(self.itf, "ipv4-sctp", inputsets)
+
+        self.dut.send_expect("quit", "# ", 30)
+
+        self.result_table_print()
+        result_rows = self.result_table_getrows()
+        self.verify(len(result_rows) > 1, "There is no data in the table, testcase failed!")
+
+        if ((result_rows[1][1] != result_rows[2][1]) or (result_rows[1][3] != result_rows[2][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+
+    def test_ipv6_tcp_src_ipv6(self):
+        """
+        Test with flow type ipv6-tcp and input set src-ipv6.
+        """
+        flag = 1
+
+        self.start_testpmd()
+
+        # set hash input set by testpmd on dut, enable src-ipv6
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv6 / tcp / end actions rss types ipv6-tcp l3-src-only end queues end / end", "testpmd> ")
+        inputsets = ['ipv6-src-only']
+        self.send_packet(self.itf, "ipv6-tcp", inputsets)
+        self.send_packet(self.itf, "ipv6-tcp", inputsets)
+        self.send_packet(self.itf, "ipv6-tcp", inputsets)
+
+        self.dut.send_expect(
+            "flow destroy 0 rule 0", "testpmd> ")
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv6 / tcp / end actions rss types ipv6-tcp end queues end / end", "testpmd> ")
+        self.send_packet(self.itf, "ipv6-tcp", inputsets)
+
+        self.dut.send_expect("quit", "# ", 30)
+
+        self.result_table_print()
+        result_rows = self.result_table_getrows()
+        self.verify(len(result_rows) > 1, "There is no data in the table, testcase failed!")
+
+        if ((result_rows[1][1] != result_rows[2][1]) or (result_rows[1][3] != result_rows[2][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] != result_rows[3][1]) or (result_rows[1][3] != result_rows[3][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] == result_rows[4][1]) and (result_rows[1][3] == result_rows[4][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are same, rss_granularity_config failed!")
+
+    def test_ipv6_tcp_dst_ipv6(self):
+        """
+        Test with flow type ipv6-tcp and input set dst-ipv6.
+        """
+        flag = 1
+
+        self.start_testpmd()
+
+        # set hash input set by testpmd on dut, enable dst-ipv6
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv6 / tcp / end actions rss types ipv6-tcp l3-dst-only end queues end / end", "testpmd> ")
+        inputsets = ['ipv6-dst-only']
+        self.send_packet(self.itf, "ipv6-tcp", inputsets)
+        self.send_packet(self.itf, "ipv6-tcp", inputsets)
+        self.send_packet(self.itf, "ipv6-tcp", inputsets)
+
+        self.dut.send_expect(
+            "flow destroy 0 rule 0", "testpmd> ")
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv6 / tcp / end actions rss types ipv6-tcp end queues end / end", "testpmd> ")
+        self.send_packet(self.itf, "ipv6-tcp", inputsets)
+
+        self.dut.send_expect("quit", "# ", 30)
+
+        self.result_table_print()
+        result_rows = self.result_table_getrows()
+        self.verify(len(result_rows) > 1, "There is no data in the table, testcase failed!")
+
+        if ((result_rows[1][1] != result_rows[2][1]) or (result_rows[1][3] != result_rows[2][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] != result_rows[3][1]) or (result_rows[1][3] != result_rows[3][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] == result_rows[4][1]) and (result_rows[1][3] == result_rows[4][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are same, rss_granularity_config failed!")
+
+    def test_ipv6_tcp_src_port(self):
+        """
+        Test with flow type ipv6-tcp and input set src-port.
+        """
+        flag = 1
+
+        self.start_testpmd()
+
+        # set hash input set by testpmd on dut, enable src-port
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv6 / tcp / end actions rss types ipv6-tcp l4-src-only end queues end / end", "testpmd> ")
+        inputsets = ['l4-src-only']
+        self.send_packet(self.itf, "ipv6-tcp", inputsets)
+        self.send_packet(self.itf, "ipv6-tcp", inputsets)
+        self.send_packet(self.itf, "ipv6-tcp", inputsets)
+
+        self.dut.send_expect(
+            "flow destroy 0 rule 0", "testpmd> ")
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv6 / tcp / end actions rss types ipv6-tcp end queues end / end", "testpmd> ")
+        self.send_packet(self.itf, "ipv6-tcp", inputsets)
+
+        self.dut.send_expect("quit", "# ", 30)
+
+        self.result_table_print()
+        result_rows = self.result_table_getrows()
+        self.verify(len(result_rows) > 1, "There is no data in the table, testcase failed!")
+
+        if ((result_rows[1][1] != result_rows[2][1]) or (result_rows[1][3] != result_rows[2][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] != result_rows[3][1]) or (result_rows[1][3] != result_rows[3][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] == result_rows[4][1]) and (result_rows[1][3] == result_rows[4][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are same, rss_granularity_config failed!")
+
+    def test_ipv6_tcp_dst_port(self):
+        """
+        Test with flow type ipv6-tcp and input set dst-port.
+        """
+        flag = 1
+
+        self.start_testpmd()
+
+        # set hash input set by testpmd on dut, enable dst-ipv6
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv6 / tcp / end actions rss types ipv6-tcp l4-dst-only end queues end / end", "testpmd> ")
+        inputsets = ['l4-dst-only']
+        self.send_packet(self.itf, "ipv6-tcp", inputsets)
+        self.send_packet(self.itf, "ipv6-tcp", inputsets)
+        self.send_packet(self.itf, "ipv6-tcp", inputsets)
+
+        self.dut.send_expect(
+            "flow destroy 0 rule 0", "testpmd> ")
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv6 / tcp / end actions rss types ipv6-tcp end queues end / end", "testpmd> ")
+        self.send_packet(self.itf, "ipv6-tcp", inputsets)
+
+        self.dut.send_expect("quit", "# ", 30)
+
+        self.result_table_print()
+        result_rows = self.result_table_getrows()
+        self.verify(len(result_rows) > 1, "There is no data in the table, testcase failed!")
+
+        if ((result_rows[1][1] != result_rows[2][1]) or (result_rows[1][3] != result_rows[2][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] != result_rows[3][1]) or (result_rows[1][3] != result_rows[3][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] == result_rows[4][1]) and (result_rows[1][3] == result_rows[4][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are same, rss_granularity_config failed!")
+
+    def test_ipv6_tcp_dst_src_ipv6(self):
+        """
+        Test with flow type ipv6-tcp and input set src-ipv6, dst-ipv6.
+        """
+        flag = 1
+
+        self.start_testpmd()
+
+        # set hash input set by testpmd on dut, enable src-ipv6, dst-ipv6
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv6 / tcp / end actions rss types ipv6-tcp l3-src-only l3-dst-only end queues end / end", "testpmd> ")
+        inputsets = ['ipv6-src-only', 'ipv6-dst-only']
+        self.send_packet(self.itf, "ipv6-tcp", inputsets)
+        self.send_packet(self.itf, "ipv6-tcp", inputsets)
+        self.send_packet(self.itf, "ipv6-tcp", inputsets)
+
+        self.dut.send_expect(
+            "flow destroy 0 rule 0", "testpmd> ")
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv6 / tcp / end actions rss types ipv6-tcp end queues end / end", "testpmd> ")
+        self.send_packet(self.itf, "ipv6-tcp", inputsets)
+
+        self.dut.send_expect("quit", "# ", 30)
+
+        self.result_table_print()
+        result_rows = self.result_table_getrows()
+        self.verify(len(result_rows) > 1, "There is no data in the table, testcase failed!")
+
+        if ((result_rows[1][1] != result_rows[2][1]) or (result_rows[1][3] != result_rows[2][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] != result_rows[3][1]) or (result_rows[1][3] != result_rows[3][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] == result_rows[4][1]) and (result_rows[1][3] == result_rows[4][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are same, rss_granularity_config failed!")
+
+    def test_ipv6_tcp_src_ipv6_src_port(self):
+        """
+        Test with flow type ipv6-tcp and input set src-ipv6, src-port.
+        """
+        flag = 1
+
+        self.start_testpmd()
+
+        # set hash input set by testpmd on dut, enable src-ipv6, src-port
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv6 / tcp / end actions rss types ipv6-tcp l3-src-only l4-src-only end queues end / end", "testpmd> ")
+        inputsets = ['ipv6-src-only', 'l4-src-only']
+        self.send_packet(self.itf, "ipv6-tcp", inputsets)
+        self.send_packet(self.itf, "ipv6-tcp", inputsets)
+        self.send_packet(self.itf, "ipv6-tcp", inputsets)
+
+        self.dut.send_expect(
+            "flow destroy 0 rule 0", "testpmd> ")
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv6 / tcp / end actions rss types ipv6-tcp end queues end / end", "testpmd> ")
+        self.send_packet(self.itf, "ipv6-tcp", inputsets)
+
+        self.dut.send_expect("quit", "# ", 30)
+
+        self.result_table_print()
+        result_rows = self.result_table_getrows()
+        self.verify(len(result_rows) > 1, "There is no data in the table, testcase failed!")
+
+        if ((result_rows[1][1] != result_rows[2][1]) or (result_rows[1][3] != result_rows[2][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] != result_rows[3][1]) or (result_rows[1][3] != result_rows[3][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] == result_rows[4][1]) and (result_rows[1][3] == result_rows[4][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are same, rss_granularity_config failed!")
+
+    def test_ipv6_tcp_src_ipv6_dst_port(self):
+        """
+        Test with flow type ipv6-tcp and input set src-ipv6, dst-port.
+        """
+        flag = 1
+
+        self.start_testpmd()
+
+        # set hash input set by testpmd on dut, enable src-ipv6, dst-port
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv6 / tcp / end actions rss types ipv6-tcp l3-src-only l4-dst-only end queues end / end", "testpmd> ")
+        inputsets = ['ipv6-src-only', 'l4-dst-only']
+        self.send_packet(self.itf, "ipv6-tcp", inputsets)
+        self.send_packet(self.itf, "ipv6-tcp", inputsets)
+        self.send_packet(self.itf, "ipv6-tcp", inputsets)
+
+        self.dut.send_expect(
+            "flow destroy 0 rule 0", "testpmd> ")
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv6 / tcp / end actions rss types ipv6-tcp end queues end / end", "testpmd> ")
+        self.send_packet(self.itf, "ipv6-tcp", inputsets)
+
+        self.dut.send_expect("quit", "# ", 30)
+
+        self.result_table_print()
+        result_rows = self.result_table_getrows()
+        self.verify(len(result_rows) > 1, "There is no data in the table, testcase failed!")
+
+        if ((result_rows[1][1] != result_rows[2][1]) or (result_rows[1][3] != result_rows[2][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] != result_rows[3][1]) or (result_rows[1][3] != result_rows[3][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] == result_rows[4][1]) and (result_rows[1][3] == result_rows[4][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are same, rss_granularity_config failed!")
+
+    def test_ipv6_tcp_dst_ipv6_src_port(self):
+        """
+        Test with flow type ipv6-tcp and input set dst-ipv6, src-port.
+        """
+        flag = 1
+
+        self.start_testpmd()
+
+        # set hash input set by testpmd on dut, enable dst-ipv6, src-port
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv6 / tcp / end actions rss types ipv6-tcp l3-dst-only l4-src-only end queues end / end", "testpmd> ")
+        inputsets = ['ipv6-dst-only', 'l4-src-only']
+        self.send_packet(self.itf, "ipv6-tcp", inputsets)
+        self.send_packet(self.itf, "ipv6-tcp", inputsets)
+        self.send_packet(self.itf, "ipv6-tcp", inputsets)
+
+        self.dut.send_expect(
+            "flow destroy 0 rule 0", "testpmd> ")
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv6 / tcp / end actions rss types ipv6-tcp end queues end / end", "testpmd> ")
+        self.send_packet(self.itf, "ipv6-tcp", inputsets)
+
+        self.dut.send_expect("quit", "# ", 30)
+
+        self.result_table_print()
+        result_rows = self.result_table_getrows()
+        self.verify(len(result_rows) > 1, "There is no data in the table, testcase failed!")
+
+        if ((result_rows[1][1] != result_rows[2][1]) or (result_rows[1][3] != result_rows[2][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] != result_rows[3][1]) or (result_rows[1][3] != result_rows[3][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] == result_rows[4][1]) and (result_rows[1][3] == result_rows[4][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are same, rss_granularity_config failed!")
+
+    def test_ipv6_tcp_dst_ipv6_dst_port(self):
+        """
+        Test with flow type ipv6-tcp and input set dst-ipv6, dst-port.
+        """
+        flag = 1
+
+        self.start_testpmd()
+
+        # set hash input set by testpmd on dut, enable dst-ipv6, dst-port
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv6 / tcp / end actions rss types ipv6-tcp l3-dst-only l4-dst-only end queues end / end", "testpmd> ")
+        inputsets = ['ipv6-dst-only', 'l4-dst-only']
+        self.send_packet(self.itf, "ipv6-tcp", inputsets)
+        self.send_packet(self.itf, "ipv6-tcp", inputsets)
+        self.send_packet(self.itf, "ipv6-tcp", inputsets)
+
+        self.dut.send_expect(
+            "flow destroy 0 rule 0", "testpmd> ")
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv6 / tcp / end actions rss types ipv6-tcp end queues end / end", "testpmd> ")
+        self.send_packet(self.itf, "ipv6-tcp", inputsets)
+
+        self.dut.send_expect("quit", "# ", 30)
+
+        self.result_table_print()
+        result_rows = self.result_table_getrows()
+        self.verify(len(result_rows) > 1, "There is no data in the table, testcase failed!")
+
+        if ((result_rows[1][1] != result_rows[2][1]) or (result_rows[1][3] != result_rows[2][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] != result_rows[3][1]) or (result_rows[1][3] != result_rows[3][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] == result_rows[4][1]) and (result_rows[1][3] == result_rows[4][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are same, rss_granularity_config failed!")
+
+    def test_ipv6_tcp_dst_src_port(self):
+        """
+        Test with flow type ipv6-tcp and input set src-port, dst-port.
+        """
+        flag = 1
+
+        self.start_testpmd()
+
+        # set hash input set by testpmd on dut, enable src-port, dst-port
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv6 / tcp / end actions rss types ipv6-tcp l4-src-only l4-dst-only end queues end / end", "testpmd> ")
+        inputsets = ['l4-src-only', 'l4-dst-only']
+        self.send_packet(self.itf, "ipv6-tcp", inputsets)
+        self.send_packet(self.itf, "ipv6-tcp", inputsets)
+        self.send_packet(self.itf, "ipv6-tcp", inputsets)
+
+        self.dut.send_expect(
+            "flow destroy 0 rule 0", "testpmd> ")
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv6 / tcp / end actions rss types ipv6-tcp end queues end / end", "testpmd> ")
+        self.send_packet(self.itf, "ipv6-tcp", inputsets)
+
+        self.dut.send_expect("quit", "# ", 30)
+
+        self.result_table_print()
+        result_rows = self.result_table_getrows()
+        self.verify(len(result_rows) > 1, "There is no data in the table, testcase failed!")
+
+        if ((result_rows[1][1] != result_rows[2][1]) or (result_rows[1][3] != result_rows[2][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] != result_rows[3][1]) or (result_rows[1][3] != result_rows[3][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] == result_rows[4][1]) and (result_rows[1][3] == result_rows[4][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are same, rss_granularity_config failed!")
+
+    def test_ipv6_tcp_src_dst_ipv6_src_port(self):
+        """
+        Test with flow type ipv6-tcp and input set src-ipv6, dst-ipv6, src-port.
+        """
+        flag = 1
+
+        self.start_testpmd()
+
+        # set hash input set by testpmd on dut, enable src-ipv6, dst-ipv6, src-port
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv6 / tcp / end actions rss types ipv6-tcp l3-src-only l3-dst-only l4-src-only end queues end / end", "testpmd> ")
+        inputsets = ['ipv6-src-only', 'ipv6-dst-only', 'l4-src-only']
+        self.send_packet(self.itf, "ipv6-tcp", inputsets)
+        self.send_packet(self.itf, "ipv6-tcp", inputsets)
+        self.send_packet(self.itf, "ipv6-tcp", inputsets)
+
+        self.dut.send_expect(
+            "flow destroy 0 rule 0", "testpmd> ")
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv6 / tcp / end actions rss types ipv6-tcp end queues end / end", "testpmd> ")
+        self.send_packet(self.itf, "ipv6-tcp", inputsets)
+
+        self.dut.send_expect("quit", "# ", 30)
+
+        self.result_table_print()
+        result_rows = self.result_table_getrows()
+        self.verify(len(result_rows) > 1, "There is no data in the table, testcase failed!")
+
+        if ((result_rows[1][1] != result_rows[2][1]) or (result_rows[1][3] != result_rows[2][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] != result_rows[3][1]) or (result_rows[1][3] != result_rows[3][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] == result_rows[4][1]) and (result_rows[1][3] == result_rows[4][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are same, rss_granularity_config failed!")
+
+    def test_ipv6_tcp_src_dst_ipv6_dst_port(self):
+        """
+        Test with flow type ipv6-tcp and input set src-ipv6, dst-ipv6, dst-port.
+        """
+        flag = 1
+
+        self.start_testpmd()
+
+        # set hash input set by testpmd on dut, enable src-ipv6, dst-ipv6, dst-port
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv6 / tcp / end actions rss types ipv6-tcp l3-src-only l3-dst-only l4-dst-only end queues end / end", "testpmd> ")
+        inputsets = ['ipv6-src-only', 'ipv6-dst-only', 'l4-dst-only']
+        self.send_packet(self.itf, "ipv6-tcp", inputsets)
+        self.send_packet(self.itf, "ipv6-tcp", inputsets)
+        self.send_packet(self.itf, "ipv6-tcp", inputsets)
+
+        self.dut.send_expect(
+            "flow destroy 0 rule 0", "testpmd> ")
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv6 / tcp / end actions rss types ipv6-tcp end queues end / end", "testpmd> ")
+        self.send_packet(self.itf, "ipv6-tcp", inputsets)
+
+        self.dut.send_expect("quit", "# ", 30)
+
+        self.result_table_print()
+        result_rows = self.result_table_getrows()
+        self.verify(len(result_rows) > 1, "There is no data in the table, testcase failed!")
+
+        if ((result_rows[1][1] != result_rows[2][1]) or (result_rows[1][3] != result_rows[2][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] != result_rows[3][1]) or (result_rows[1][3] != result_rows[3][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] == result_rows[4][1]) and (result_rows[1][3] == result_rows[4][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are same, rss_granularity_config failed!")
+
+    def test_ipv6_tcp_src_ipv6_src_dst_port(self):
+        """
+        Test with flow type ipv6-tcp and input set src-ipv6, dst-port, src-port.
+        """
+        flag = 1
+
+        self.start_testpmd()
+
+        # set hash input set by testpmd on dut, enable src-ipv6, dst-port, src-port
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv6 / tcp / end actions rss types ipv6-tcp l3-src-only l4-dst-only l4-src-only end queues end / end", "testpmd> ")
+        inputsets = ['ipv6-src-only', 'l4-dst-only', 'l4-src-only']
+        self.send_packet(self.itf, "ipv6-tcp", inputsets)
+        self.send_packet(self.itf, "ipv6-tcp", inputsets)
+        self.send_packet(self.itf, "ipv6-tcp", inputsets)
+
+        self.dut.send_expect(
+            "flow destroy 0 rule 0", "testpmd> ")
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv6 / tcp / end actions rss types ipv6-tcp end queues end / end", "testpmd> ")
+        self.send_packet(self.itf, "ipv6-tcp", inputsets)
+
+        self.dut.send_expect("quit", "# ", 30)
+
+        self.result_table_print()
+        result_rows = self.result_table_getrows()
+        self.verify(len(result_rows) > 1, "There is no data in the table, testcase failed!")
+
+        if ((result_rows[1][1] != result_rows[2][1]) or (result_rows[1][3] != result_rows[2][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] != result_rows[3][1]) or (result_rows[1][3] != result_rows[3][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] == result_rows[4][1]) and (result_rows[1][3] == result_rows[4][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are same, rss_granularity_config failed!")
+
+    def test_ipv6_tcp_dst_ipv6_src_dst_port(self):
+        """
+        Test with flow type ipv6-tcp and input set dst-ipv6, dst-port, src-port.
+        """
+        flag = 1
+
+        self.start_testpmd()
+
+        # set hash input set by testpmd on dut, enable dst-ipv6, dst-port, src-port
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv6 / tcp / end actions rss types ipv6-tcp l3-dst-only l4-dst-only l4-src-only end queues end / end", "testpmd> ")
+        inputsets = ['ipv6-dst-only', 'l4-dst-only', 'l4-src-only']
+        self.send_packet(self.itf, "ipv6-tcp", inputsets)
+        self.send_packet(self.itf, "ipv6-tcp", inputsets)
+        self.send_packet(self.itf, "ipv6-tcp", inputsets)
+
+        self.dut.send_expect(
+            "flow destroy 0 rule 0", "testpmd> ")
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv6 / tcp / end actions rss types ipv6-tcp end queues end / end", "testpmd> ")
+        self.send_packet(self.itf, "ipv6-tcp", inputsets)
+
+        self.dut.send_expect("quit", "# ", 30)
+
+        self.result_table_print()
+        result_rows = self.result_table_getrows()
+        self.verify(len(result_rows) > 1, "There is no data in the table, testcase failed!")
+
+        if ((result_rows[1][1] != result_rows[2][1]) or (result_rows[1][3] != result_rows[2][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] != result_rows[3][1]) or (result_rows[1][3] != result_rows[3][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] == result_rows[4][1]) and (result_rows[1][3] == result_rows[4][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are same, rss_granularity_config failed!")
+
+    def test_ipv6_tcp_all_input_set(self):
+        """
+        Test with flow type ipv6-tcp and input set src-ipv6, dst-ipv6, dst-port, src-port.
+        """
+        flag = 1
+
+        self.start_testpmd()
+
+        # set hash input set by testpmd on dut, enable src-ipv6, dst-ipv6, dst-port, src-port
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv6 / tcp / end actions rss types ipv6-tcp l3-src-only l3-dst-only l4-dst-only l4-src-only end queues end / end", "testpmd> ")
+        inputsets = ['ipv6-src-only', 'ipv6-dst-only', 'l4-dst-only', 'l4-src-only']
+        self.send_packet(self.itf, "ipv6-tcp", inputsets)
+
+        self.dut.send_expect(
+            "flow destroy 0 rule 0", "testpmd> ")
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv6 / tcp / end actions rss types ipv6-tcp end queues end / end", "testpmd> ")
+        self.send_packet(self.itf, "ipv6-tcp", inputsets)
+
+        self.dut.send_expect("quit", "# ", 30)
+
+        self.result_table_print()
+        result_rows = self.result_table_getrows()
+        self.verify(len(result_rows) > 1, "There is no data in the table, testcase failed!")
+
+        if ((result_rows[1][1] != result_rows[2][1]) or (result_rows[1][3] != result_rows[2][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+
+    def test_ipv6_udp_src_ipv6(self):
+        """
+        Test with flow type ipv6-udp and input set src-ipv6.
+        """
+        flag = 1
+
+        self.start_testpmd()
+
+        # set hash input set by testpmd on dut, enable src-ipv6
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv6 / udp / end actions rss types ipv6-udp l3-src-only end queues end / end", "testpmd> ")
+        inputsets = ['ipv6-src-only']
+        self.send_packet(self.itf, "ipv6-udp", inputsets)
+        self.send_packet(self.itf, "ipv6-udp", inputsets)
+        self.send_packet(self.itf, "ipv6-udp", inputsets)
+
+        self.dut.send_expect(
+            "flow destroy 0 rule 0", "testpmd> ")
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv6 / udp / end actions rss types ipv6-udp end queues end / end", "testpmd> ")
+        self.send_packet(self.itf, "ipv6-udp", inputsets)
+
+        self.dut.send_expect("quit", "# ", 30)
+
+        self.result_table_print()
+        result_rows = self.result_table_getrows()
+        self.verify(len(result_rows) > 1, "There is no data in the table, testcase failed!")
+
+        if ((result_rows[1][1] != result_rows[2][1]) or (result_rows[1][3] != result_rows[2][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] != result_rows[3][1]) or (result_rows[1][3] != result_rows[3][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] == result_rows[4][1]) and (result_rows[1][3] == result_rows[4][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are same, rss_granularity_config failed!")
+
+    def test_ipv6_udp_dst_ipv6(self):
+        """
+        Test with flow type ipv6-udp and input set dst-ipv6.
+        """
+        flag = 1
+
+        self.start_testpmd()
+
+        # set hash input set by testpmd on dut, enable dst-ipv6
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv6 / udp / end actions rss types ipv6-udp l3-dst-only end queues end / end", "testpmd> ")
+        inputsets = ['ipv6-dst-only']
+        self.send_packet(self.itf, "ipv6-udp", inputsets)
+        self.send_packet(self.itf, "ipv6-udp", inputsets)
+        self.send_packet(self.itf, "ipv6-udp", inputsets)
+
+        self.dut.send_expect(
+            "flow destroy 0 rule 0", "testpmd> ")
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv6 / udp / end actions rss types ipv6-udp end queues end / end", "testpmd> ")
+        self.send_packet(self.itf, "ipv6-udp", inputsets)
+
+        self.dut.send_expect("quit", "# ", 30)
+
+        self.result_table_print()
+        result_rows = self.result_table_getrows()
+        self.verify(len(result_rows) > 1, "There is no data in the table, testcase failed!")
+
+        if ((result_rows[1][1] != result_rows[2][1]) or (result_rows[1][3] != result_rows[2][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] != result_rows[3][1]) or (result_rows[1][3] != result_rows[3][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] == result_rows[4][1]) and (result_rows[1][3] == result_rows[4][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are same, rss_granularity_config failed!")
+
+    def test_ipv6_udp_src_port(self):
+        """
+        Test with flow type ipv6-udp and input set src-port.
+        """
+        flag = 1
+
+        self.start_testpmd()
+
+        # set hash input set by testpmd on dut, enable src-port
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv6 / udp / end actions rss types ipv6-udp l4-src-only end queues end / end", "testpmd> ")
+        inputsets = ['l4-src-only']
+        self.send_packet(self.itf, "ipv6-udp", inputsets)
+        self.send_packet(self.itf, "ipv6-udp", inputsets)
+        self.send_packet(self.itf, "ipv6-udp", inputsets)
+
+        self.dut.send_expect(
+            "flow destroy 0 rule 0", "testpmd> ")
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv6 / udp / end actions rss types ipv6-udp end queues end / end", "testpmd> ")
+        self.send_packet(self.itf, "ipv6-udp", inputsets)
+
+        self.dut.send_expect("quit", "# ", 30)
+
+        self.result_table_print()
+        result_rows = self.result_table_getrows()
+        self.verify(len(result_rows) > 1, "There is no data in the table, testcase failed!")
+
+        if ((result_rows[1][1] != result_rows[2][1]) or (result_rows[1][3] != result_rows[2][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] != result_rows[3][1]) or (result_rows[1][3] != result_rows[3][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] == result_rows[4][1]) and (result_rows[1][3] == result_rows[4][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are same, rss_granularity_config failed!")
+
+    def test_ipv6_udp_dst_port(self):
+        """
+        Test with flow type ipv6-udp and input set dst-port.
+        """
+        flag = 1
+
+        self.start_testpmd()
+
+        # set hash input set by testpmd on dut, enable dst-ipv6
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv6 / udp / end actions rss types ipv6-udp l4-dst-only end queues end / end", "testpmd> ")
+        inputsets = ['l4-dst-only']
+        self.send_packet(self.itf, "ipv6-udp", inputsets)
+        self.send_packet(self.itf, "ipv6-udp", inputsets)
+        self.send_packet(self.itf, "ipv6-udp", inputsets)
+
+        self.dut.send_expect(
+            "flow destroy 0 rule 0", "testpmd> ")
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv6 / udp / end actions rss types ipv6-udp end queues end / end", "testpmd> ")
+        self.send_packet(self.itf, "ipv6-udp", inputsets)
+
+        self.dut.send_expect("quit", "# ", 30)
+
+        self.result_table_print()
+        result_rows = self.result_table_getrows()
+        self.verify(len(result_rows) > 1, "There is no data in the table, testcase failed!")
+
+        if ((result_rows[1][1] != result_rows[2][1]) or (result_rows[1][3] != result_rows[2][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] != result_rows[3][1]) or (result_rows[1][3] != result_rows[3][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] == result_rows[4][1]) and (result_rows[1][3] == result_rows[4][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are same, rss_granularity_config failed!")
+
+    def test_ipv6_udp_dst_src_ipv6(self):
+        """
+        Test with flow type ipv6-udp and input set src-ipv6, dst-ipv6.
+        """
+        flag = 1
+
+        self.start_testpmd()
+
+        # set hash input set by testpmd on dut, enable src-ipv6, dst-ipv6
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv6 / udp / end actions rss types ipv6-udp l3-src-only l3-dst-only end queues end / end", "testpmd> ")
+        inputsets = ['ipv6-src-only', 'ipv6-dst-only']
+        self.send_packet(self.itf, "ipv6-udp", inputsets)
+        self.send_packet(self.itf, "ipv6-udp", inputsets)
+        self.send_packet(self.itf, "ipv6-udp", inputsets)
+
+        self.dut.send_expect(
+            "flow destroy 0 rule 0", "testpmd> ")
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv6 / udp / end actions rss types ipv6-udp end queues end / end", "testpmd> ")
+        self.send_packet(self.itf, "ipv6-udp", inputsets)
+
+        self.dut.send_expect("quit", "# ", 30)
+
+        self.result_table_print()
+        result_rows = self.result_table_getrows()
+        self.verify(len(result_rows) > 1, "There is no data in the table, testcase failed!")
+
+        if ((result_rows[1][1] != result_rows[2][1]) or (result_rows[1][3] != result_rows[2][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] != result_rows[3][1]) or (result_rows[1][3] != result_rows[3][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] == result_rows[4][1]) and (result_rows[1][3] == result_rows[4][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are same, rss_granularity_config failed!")
+
+    def test_ipv6_udp_src_ipv6_src_port(self):
+        """
+        Test with flow type ipv6-udp and input set src-ipv6, src-port.
+        """
+        flag = 1
+
+        self.start_testpmd()
+
+        # set hash input set by testpmd on dut, enable src-ipv6, src-port
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv6 / udp / end actions rss types ipv6-udp l3-src-only l4-src-only end queues end / end", "testpmd> ")
+        inputsets = ['ipv6-src-only', 'l4-src-only']
+        self.send_packet(self.itf, "ipv6-udp", inputsets)
+        self.send_packet(self.itf, "ipv6-udp", inputsets)
+        self.send_packet(self.itf, "ipv6-udp", inputsets)
+
+        self.dut.send_expect(
+            "flow destroy 0 rule 0", "testpmd> ")
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv6 / udp / end actions rss types ipv6-udp end queues end / end", "testpmd> ")
+        self.send_packet(self.itf, "ipv6-udp", inputsets)
+
+        self.dut.send_expect("quit", "# ", 30)
+
+        self.result_table_print()
+        result_rows = self.result_table_getrows()
+        self.verify(len(result_rows) > 1, "There is no data in the table, testcase failed!")
+
+        if ((result_rows[1][1] != result_rows[2][1]) or (result_rows[1][3] != result_rows[2][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] != result_rows[3][1]) or (result_rows[1][3] != result_rows[3][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] == result_rows[4][1]) and (result_rows[1][3] == result_rows[4][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are same, rss_granularity_config failed!")
+
+    def test_ipv6_udp_src_ipv6_dst_port(self):
+        """
+        Test with flow type ipv6-udp and input set src-ipv6, dst-port.
+        """
+        flag = 1
+
+        self.start_testpmd()
+
+        # set hash input set by testpmd on dut, enable src-ipv6, dst-port
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv6 / udp / end actions rss types ipv6-udp l3-src-only l4-dst-only end queues end / end", "testpmd> ")
+        inputsets = ['ipv6-src-only', 'l4-dst-only']
+        self.send_packet(self.itf, "ipv6-udp", inputsets)
+        self.send_packet(self.itf, "ipv6-udp", inputsets)
+        self.send_packet(self.itf, "ipv6-udp", inputsets)
+
+        self.dut.send_expect(
+            "flow destroy 0 rule 0", "testpmd> ")
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv6 / udp / end actions rss types ipv6-udp end queues end / end", "testpmd> ")
+        self.send_packet(self.itf, "ipv6-udp", inputsets)
+
+        self.dut.send_expect("quit", "# ", 30)
+
+        self.result_table_print()
+        result_rows = self.result_table_getrows()
+        self.verify(len(result_rows) > 1, "There is no data in the table, testcase failed!")
+
+        if ((result_rows[1][1] != result_rows[2][1]) or (result_rows[1][3] != result_rows[2][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] != result_rows[3][1]) or (result_rows[1][3] != result_rows[3][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] == result_rows[4][1]) and (result_rows[1][3] == result_rows[4][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are same, rss_granularity_config failed!")
+
+    def test_ipv6_udp_dst_ipv6_src_port(self):
+        """
+        Test with flow type ipv6-udp and input set dst-ipv6, src-port.
+        """
+        flag = 1
+
+        self.start_testpmd()
+
+        # set hash input set by testpmd on dut, enable dst-ipv6, src-port
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv6 / udp / end actions rss types ipv6-udp l3-dst-only l4-src-only end queues end / end", "testpmd> ")
+        inputsets = ['ipv6-dst-only', 'l4-src-only']
+        self.send_packet(self.itf, "ipv6-udp", inputsets)
+        self.send_packet(self.itf, "ipv6-udp", inputsets)
+        self.send_packet(self.itf, "ipv6-udp", inputsets)
+
+        self.dut.send_expect(
+            "flow destroy 0 rule 0", "testpmd> ")
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv6 / udp / end actions rss types ipv6-udp end queues end / end", "testpmd> ")
+        self.send_packet(self.itf, "ipv6-udp", inputsets)
+
+        self.dut.send_expect("quit", "# ", 30)
+
+        self.result_table_print()
+        result_rows = self.result_table_getrows()
+        self.verify(len(result_rows) > 1, "There is no data in the table, testcase failed!")
+
+        if ((result_rows[1][1] != result_rows[2][1]) or (result_rows[1][3] != result_rows[2][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] != result_rows[3][1]) or (result_rows[1][3] != result_rows[3][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] == result_rows[4][1]) and (result_rows[1][3] == result_rows[4][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are same, rss_granularity_config failed!")
+
+    def test_ipv6_udp_dst_ipv6_dst_port(self):
+        """
+        Test with flow type ipv6-udp and input set dst-ipv6, dst-port.
+        """
+        flag = 1
+
+        self.start_testpmd()
+
+        # set hash input set by testpmd on dut, enable dst-ipv6, dst-port
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv6 / udp / end actions rss types ipv6-udp l3-dst-only l4-dst-only end queues end / end", "testpmd> ")
+        inputsets = ['ipv6-dst-only', 'l4-dst-only']
+        self.send_packet(self.itf, "ipv6-udp", inputsets)
+        self.send_packet(self.itf, "ipv6-udp", inputsets)
+        self.send_packet(self.itf, "ipv6-udp", inputsets)
+
+        self.dut.send_expect(
+            "flow destroy 0 rule 0", "testpmd> ")
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv6 / udp / end actions rss types ipv6-udp end queues end / end", "testpmd> ")
+        self.send_packet(self.itf, "ipv6-udp", inputsets)
+
+        self.dut.send_expect("quit", "# ", 30)
+
+        self.result_table_print()
+        result_rows = self.result_table_getrows()
+        self.verify(len(result_rows) > 1, "There is no data in the table, testcase failed!")
+
+        if ((result_rows[1][1] != result_rows[2][1]) or (result_rows[1][3] != result_rows[2][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] != result_rows[3][1]) or (result_rows[1][3] != result_rows[3][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] == result_rows[4][1]) and (result_rows[1][3] == result_rows[4][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are same, rss_granularity_config failed!")
+
+    def test_ipv6_udp_dst_src_port(self):
+        """
+        Test with flow type ipv6-udp and input set src-port, dst-port.
+        """
+        flag = 1
+
+        self.start_testpmd()
+
+        # set hash input set by testpmd on dut, enable src-port, dst-port
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv6 / udp / end actions rss types ipv6-udp l4-src-only l4-dst-only end queues end / end", "testpmd> ")
+        inputsets = ['l4-src-only', 'l4-dst-only']
+        self.send_packet(self.itf, "ipv6-udp", inputsets)
+        self.send_packet(self.itf, "ipv6-udp", inputsets)
+        self.send_packet(self.itf, "ipv6-udp", inputsets)
+
+        self.dut.send_expect(
+            "flow destroy 0 rule 0", "testpmd> ")
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv6 / udp / end actions rss types ipv6-udp end queues end / end", "testpmd> ")
+        self.send_packet(self.itf, "ipv6-udp", inputsets)
+
+        self.dut.send_expect("quit", "# ", 30)
+
+        self.result_table_print()
+        result_rows = self.result_table_getrows()
+        self.verify(len(result_rows) > 1, "There is no data in the table, testcase failed!")
+
+        if ((result_rows[1][1] != result_rows[2][1]) or (result_rows[1][3] != result_rows[2][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] != result_rows[3][1]) or (result_rows[1][3] != result_rows[3][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] == result_rows[4][1]) and (result_rows[1][3] == result_rows[4][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are same, rss_granularity_config failed!")
+
+    def test_ipv6_udp_src_dst_ipv6_src_port(self):
+        """
+        Test with flow type ipv6-udp and input set src-ipv6, dst-ipv6, src-port.
+        """
+        flag = 1
+
+        self.start_testpmd()
+
+        # set hash input set by testpmd on dut, enable src-ipv6, dst-ipv6, src-port
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv6 / udp / end actions rss types ipv6-udp l3-src-only l3-dst-only l4-src-only end queues end / end", "testpmd> ")
+        inputsets = ['ipv6-src-only', 'ipv6-dst-only', 'l4-src-only']
+        self.send_packet(self.itf, "ipv6-udp", inputsets)
+        self.send_packet(self.itf, "ipv6-udp", inputsets)
+        self.send_packet(self.itf, "ipv6-udp", inputsets)
+
+        self.dut.send_expect(
+            "flow destroy 0 rule 0", "testpmd> ")
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv6 / udp / end actions rss types ipv6-udp end queues end / end", "testpmd> ")
+        self.send_packet(self.itf, "ipv6-udp", inputsets)
+
+        self.dut.send_expect("quit", "# ", 30)
+
+        self.result_table_print()
+        result_rows = self.result_table_getrows()
+        self.verify(len(result_rows) > 1, "There is no data in the table, testcase failed!")
+
+        if ((result_rows[1][1] != result_rows[2][1]) or (result_rows[1][3] != result_rows[2][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] != result_rows[3][1]) or (result_rows[1][3] != result_rows[3][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] == result_rows[4][1]) and (result_rows[1][3] == result_rows[4][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are same, rss_granularity_config failed!")
+
+    def test_ipv6_udp_src_dst_ipv6_dst_port(self):
+        """
+        Test with flow type ipv6-udp and input set src-ipv6, dst-ipv6, dst-port.
+        """
+        flag = 1
+
+        self.start_testpmd()
+
+        # set hash input set by testpmd on dut, enable src-ipv6, dst-ipv6, dst-port
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv6 / udp / end actions rss types ipv6-udp l3-src-only l3-dst-only l4-dst-only end queues end / end", "testpmd> ")
+        inputsets = ['ipv6-src-only', 'ipv6-dst-only', 'l4-dst-only']
+        self.send_packet(self.itf, "ipv6-udp", inputsets)
+        self.send_packet(self.itf, "ipv6-udp", inputsets)
+        self.send_packet(self.itf, "ipv6-udp", inputsets)
+
+        self.dut.send_expect(
+            "flow destroy 0 rule 0", "testpmd> ")
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv6 / udp / end actions rss types ipv6-udp end queues end / end", "testpmd> ")
+        self.send_packet(self.itf, "ipv6-udp", inputsets)
+
+        self.dut.send_expect("quit", "# ", 30)
+
+        self.result_table_print()
+        result_rows = self.result_table_getrows()
+        self.verify(len(result_rows) > 1, "There is no data in the table, testcase failed!")
+
+        if ((result_rows[1][1] != result_rows[2][1]) or (result_rows[1][3] != result_rows[2][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] != result_rows[3][1]) or (result_rows[1][3] != result_rows[3][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] == result_rows[4][1]) and (result_rows[1][3] == result_rows[4][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are same, rss_granularity_config failed!")
+
+    def test_ipv6_udp_src_ipv6_src_dst_port(self):
+        """
+        Test with flow type ipv6-udp and input set src-ipv6, dst-port, src-port.
+        """
+        flag = 1
+
+        self.start_testpmd()
+
+        # set hash input set by testpmd on dut, enable src-ipv6, dst-port, src-port
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv6 / udp / end actions rss types ipv6-udp l3-src-only l4-dst-only l4-src-only end queues end / end", "testpmd> ")
+        inputsets = ['ipv6-src-only', 'l4-dst-only', 'l4-src-only']
+        self.send_packet(self.itf, "ipv6-udp", inputsets)
+        self.send_packet(self.itf, "ipv6-udp", inputsets)
+        self.send_packet(self.itf, "ipv6-udp", inputsets)
+
+        self.dut.send_expect(
+            "flow destroy 0 rule 0", "testpmd> ")
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv6 / udp / end actions rss types ipv6-udp end queues end / end", "testpmd> ")
+        self.send_packet(self.itf, "ipv6-udp", inputsets)
+
+        self.dut.send_expect("quit", "# ", 30)
+
+        self.result_table_print()
+        result_rows = self.result_table_getrows()
+        self.verify(len(result_rows) > 1, "There is no data in the table, testcase failed!")
+
+        if ((result_rows[1][1] != result_rows[2][1]) or (result_rows[1][3] != result_rows[2][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] != result_rows[3][1]) or (result_rows[1][3] != result_rows[3][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] == result_rows[4][1]) and (result_rows[1][3] == result_rows[4][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are same, rss_granularity_config failed!")
+
+    def test_ipv6_udp_dst_ipv6_src_dst_port(self):
+        """
+        Test with flow type ipv6-udp and input set dst-ipv6, dst-port, src-port.
+        """
+        flag = 1
+
+        self.start_testpmd()
+
+        # set hash input set by testpmd on dut, enable dst-ipv6, dst-port, src-port
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv6 / udp / end actions rss types ipv6-udp l3-dst-only l4-dst-only l4-src-only end queues end / end", "testpmd> ")
+        inputsets = ['ipv6-dst-only', 'l4-dst-only', 'l4-src-only']
+        self.send_packet(self.itf, "ipv6-udp", inputsets)
+        self.send_packet(self.itf, "ipv6-udp", inputsets)
+        self.send_packet(self.itf, "ipv6-udp", inputsets)
+
+        self.dut.send_expect(
+            "flow destroy 0 rule 0", "testpmd> ")
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv6 / udp / end actions rss types ipv6-udp end queues end / end", "testpmd> ")
+        self.send_packet(self.itf, "ipv6-udp", inputsets)
+
+        self.dut.send_expect("quit", "# ", 30)
+
+        self.result_table_print()
+        result_rows = self.result_table_getrows()
+        self.verify(len(result_rows) > 1, "There is no data in the table, testcase failed!")
+
+        if ((result_rows[1][1] != result_rows[2][1]) or (result_rows[1][3] != result_rows[2][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] != result_rows[3][1]) or (result_rows[1][3] != result_rows[3][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] == result_rows[4][1]) and (result_rows[1][3] == result_rows[4][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are same, rss_granularity_config failed!")
+
+    def test_ipv6_udp_all_input_set(self):
+        """
+        Test with flow type ipv6-udp and input set src-ipv6, dst-ipv6, dst-port, src-port.
+        """
+        flag = 1
+
+        self.start_testpmd()
+
+        # set hash input set by testpmd on dut, enable src-ipv6, dst-ipv6, dst-port, src-port
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv6 / udp / end actions rss types ipv6-udp l3-src-only l3-dst-only l4-dst-only l4-src-only end queues end / end", "testpmd> ")
+        inputsets = ['ipv6-src-only', 'ipv6-dst-only', 'l4-dst-only', 'l4-src-only']
+        self.send_packet(self.itf, "ipv6-udp", inputsets)
+
+        self.dut.send_expect(
+            "flow destroy 0 rule 0", "testpmd> ")
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv6 / udp / end actions rss types ipv6-udp end queues end / end", "testpmd> ")
+        self.send_packet(self.itf, "ipv6-udp", inputsets)
+
+        self.dut.send_expect("quit", "# ", 30)
+
+        self.result_table_print()
+        result_rows = self.result_table_getrows()
+        self.verify(len(result_rows) > 1, "There is no data in the table, testcase failed!")
+
+        if ((result_rows[1][1] != result_rows[2][1]) or (result_rows[1][3] != result_rows[2][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+
+    def test_ipv6_sctp_src_ipv6(self):
+        """
+        Test with flow type ipv6-sctp and input set src-ipv6.
+        """
+        flag = 1
+
+        self.start_testpmd()
+
+        # set hash input set by testpmd on dut, enable src-ipv6
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv6 / sctp / end actions rss types ipv6-sctp l3-src-only end queues end / end", "testpmd> ")
+        inputsets = ['ipv6-src-only']
+        self.send_packet(self.itf, "ipv6-sctp", inputsets)
+        self.send_packet(self.itf, "ipv6-sctp", inputsets)
+        self.send_packet(self.itf, "ipv6-sctp", inputsets)
+
+        self.dut.send_expect(
+            "flow destroy 0 rule 0", "testpmd> ")
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv6 / sctp / end actions rss types ipv6-sctp end queues end / end", "testpmd> ")
+        self.send_packet(self.itf, "ipv6-sctp", inputsets)
+
+        self.dut.send_expect("quit", "# ", 30)
+
+        self.result_table_print()
+        result_rows = self.result_table_getrows()
+        self.verify(len(result_rows) > 1, "There is no data in the table, testcase failed!")
+
+        if ((result_rows[1][1] != result_rows[2][1]) or (result_rows[1][3] != result_rows[2][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] != result_rows[3][1]) or (result_rows[1][3] != result_rows[3][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] == result_rows[4][1]) and (result_rows[1][3] == result_rows[4][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are same, rss_granularity_config failed!")
+
+    def test_ipv6_sctp_dst_ipv6(self):
+        """
+        Test with flow type ipv6-sctp and input set dst-ipv6.
+        """
+        flag = 1
+
+        self.start_testpmd()
+
+        # set hash input set by testpmd on dut, enable dst-ipv6
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv6 / sctp / end actions rss types ipv6-sctp l3-dst-only end queues end / end", "testpmd> ")
+        inputsets = ['ipv6-dst-only']
+        self.send_packet(self.itf, "ipv6-sctp", inputsets)
+        self.send_packet(self.itf, "ipv6-sctp", inputsets)
+        self.send_packet(self.itf, "ipv6-sctp", inputsets)
+
+        self.dut.send_expect(
+            "flow destroy 0 rule 0", "testpmd> ")
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv6 / sctp / end actions rss types ipv6-sctp end queues end / end", "testpmd> ")
+        self.send_packet(self.itf, "ipv6-sctp", inputsets)
+
+        self.dut.send_expect("quit", "# ", 30)
+
+        self.result_table_print()
+        result_rows = self.result_table_getrows()
+        self.verify(len(result_rows) > 1, "There is no data in the table, testcase failed!")
+
+        if ((result_rows[1][1] != result_rows[2][1]) or (result_rows[1][3] != result_rows[2][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] != result_rows[3][1]) or (result_rows[1][3] != result_rows[3][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] == result_rows[4][1]) and (result_rows[1][3] == result_rows[4][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are same, rss_granularity_config failed!")
+
+    def test_ipv6_sctp_src_port(self):
+        """
+        Test with flow type ipv6-sctp and input set src-port.
+        """
+        flag = 1
+
+        self.start_testpmd()
+
+        # set hash input set by testpmd on dut, enable src-port
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv6 / sctp / end actions rss types ipv6-sctp l4-src-only end queues end / end", "testpmd> ")
+        inputsets = ['l4-src-only']
+        self.send_packet(self.itf, "ipv6-sctp", inputsets)
+        self.send_packet(self.itf, "ipv6-sctp", inputsets)
+        self.send_packet(self.itf, "ipv6-sctp", inputsets)
+
+        self.dut.send_expect(
+            "flow destroy 0 rule 0", "testpmd> ")
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv6 / sctp / end actions rss types ipv6-sctp end queues end / end", "testpmd> ")
+        self.send_packet(self.itf, "ipv6-sctp", inputsets)
+
+        self.dut.send_expect("quit", "# ", 30)
+
+        self.result_table_print()
+        result_rows = self.result_table_getrows()
+        self.verify(len(result_rows) > 1, "There is no data in the table, testcase failed!")
+
+        if ((result_rows[1][1] != result_rows[2][1]) or (result_rows[1][3] != result_rows[2][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] != result_rows[3][1]) or (result_rows[1][3] != result_rows[3][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] == result_rows[4][1]) and (result_rows[1][3] == result_rows[4][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are same, rss_granularity_config failed!")
+
+    def test_ipv6_sctp_dst_port(self):
+        """
+        Test with flow type ipv6-sctp and input set dst-port.
+        """
+        flag = 1
+
+        self.start_testpmd()
+
+        # set hash input set by testpmd on dut, enable dst-ipv6
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv6 / sctp / end actions rss types ipv6-sctp l4-dst-only end queues end / end", "testpmd> ")
+        inputsets = ['l4-dst-only']
+        self.send_packet(self.itf, "ipv6-sctp", inputsets)
+        self.send_packet(self.itf, "ipv6-sctp", inputsets)
+        self.send_packet(self.itf, "ipv6-sctp", inputsets)
+
+        self.dut.send_expect(
+            "flow destroy 0 rule 0", "testpmd> ")
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv6 / sctp / end actions rss types ipv6-sctp end queues end / end", "testpmd> ")
+        self.send_packet(self.itf, "ipv6-sctp", inputsets)
+
+        self.dut.send_expect("quit", "# ", 30)
+
+        self.result_table_print()
+        result_rows = self.result_table_getrows()
+        self.verify(len(result_rows) > 1, "There is no data in the table, testcase failed!")
+
+        if ((result_rows[1][1] != result_rows[2][1]) or (result_rows[1][3] != result_rows[2][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] != result_rows[3][1]) or (result_rows[1][3] != result_rows[3][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] == result_rows[4][1]) and (result_rows[1][3] == result_rows[4][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are same, rss_granularity_config failed!")
+
+    def test_ipv6_sctp_dst_src_ipv6(self):
+        """
+        Test with flow type ipv6-sctp and input set src-ipv6, dst-ipv6.
+        """
+        flag = 1
+
+        self.start_testpmd()
+
+        # set hash input set by testpmd on dut, enable src-ipv6, dst-ipv6
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv6 / sctp / end actions rss types ipv6-sctp l3-src-only l3-dst-only end queues end / end", "testpmd> ")
+        inputsets = ['ipv6-src-only', 'ipv6-dst-only']
+        self.send_packet(self.itf, "ipv6-sctp", inputsets)
+        self.send_packet(self.itf, "ipv6-sctp", inputsets)
+        self.send_packet(self.itf, "ipv6-sctp", inputsets)
+
+        self.dut.send_expect(
+            "flow destroy 0 rule 0", "testpmd> ")
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv6 / sctp / end actions rss types ipv6-sctp end queues end / end", "testpmd> ")
+        self.send_packet(self.itf, "ipv6-sctp", inputsets)
+
+        self.dut.send_expect("quit", "# ", 30)
+
+        self.result_table_print()
+        result_rows = self.result_table_getrows()
+        self.verify(len(result_rows) > 1, "There is no data in the table, testcase failed!")
+
+        if ((result_rows[1][1] != result_rows[2][1]) or (result_rows[1][3] != result_rows[2][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] != result_rows[3][1]) or (result_rows[1][3] != result_rows[3][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] == result_rows[4][1]) and (result_rows[1][3] == result_rows[4][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are same, rss_granularity_config failed!")
+
+    def test_ipv6_sctp_src_ipv6_src_port(self):
+        """
+        Test with flow type ipv6-sctp and input set src-ipv6, src-port.
+        """
+        flag = 1
+
+        self.start_testpmd()
+
+        # set hash input set by testpmd on dut, enable src-ipv6, src-port
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv6 / sctp / end actions rss types ipv6-sctp l3-src-only l4-src-only end queues end / end", "testpmd> ")
+        inputsets = ['ipv6-src-only', 'l4-src-only']
+        self.send_packet(self.itf, "ipv6-sctp", inputsets)
+        self.send_packet(self.itf, "ipv6-sctp", inputsets)
+        self.send_packet(self.itf, "ipv6-sctp", inputsets)
+
+        self.dut.send_expect(
+            "flow destroy 0 rule 0", "testpmd> ")
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv6 / sctp / end actions rss types ipv6-sctp end queues end / end", "testpmd> ")
+        self.send_packet(self.itf, "ipv6-sctp", inputsets)
+
+        self.dut.send_expect("quit", "# ", 30)
+
+        self.result_table_print()
+        result_rows = self.result_table_getrows()
+        self.verify(len(result_rows) > 1, "There is no data in the table, testcase failed!")
+
+        if ((result_rows[1][1] != result_rows[2][1]) or (result_rows[1][3] != result_rows[2][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] != result_rows[3][1]) or (result_rows[1][3] != result_rows[3][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] == result_rows[4][1]) and (result_rows[1][3] == result_rows[4][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are same, rss_granularity_config failed!")
+
+    def test_ipv6_sctp_src_ipv6_dst_port(self):
+        """
+        Test with flow type ipv6-sctp and input set src-ipv6, dst-port.
+        """
+        flag = 1
+
+        self.start_testpmd()
+
+        # set hash input set by testpmd on dut, enable src-ipv6, dst-port
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv6 / sctp / end actions rss types ipv6-sctp l3-src-only l4-dst-only end queues end / end", "testpmd> ")
+        inputsets = ['ipv6-src-only', 'l4-dst-only']
+        self.send_packet(self.itf, "ipv6-sctp", inputsets)
+        self.send_packet(self.itf, "ipv6-sctp", inputsets)
+        self.send_packet(self.itf, "ipv6-sctp", inputsets)
+
+        self.dut.send_expect(
+            "flow destroy 0 rule 0", "testpmd> ")
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv6 / sctp / end actions rss types ipv6-sctp end queues end / end", "testpmd> ")
+        self.send_packet(self.itf, "ipv6-sctp", inputsets)
+
+        self.dut.send_expect("quit", "# ", 30)
+
+        self.result_table_print()
+        result_rows = self.result_table_getrows()
+        self.verify(len(result_rows) > 1, "There is no data in the table, testcase failed!")
+
+        if ((result_rows[1][1] != result_rows[2][1]) or (result_rows[1][3] != result_rows[2][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] != result_rows[3][1]) or (result_rows[1][3] != result_rows[3][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] == result_rows[4][1]) and (result_rows[1][3] == result_rows[4][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are same, rss_granularity_config failed!")
+
+    def test_ipv6_sctp_dst_ipv6_src_port(self):
+        """
+        Test with flow type ipv6-sctp and input set dst-ipv6, src-port.
+        """
+        flag = 1
+
+        self.start_testpmd()
+
+        # set hash input set by testpmd on dut, enable dst-ipv6, src-port
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv6 / sctp / end actions rss types ipv6-sctp l3-dst-only l4-src-only end queues end / end", "testpmd> ")
+        inputsets = ['ipv6-dst-only', 'l4-src-only']
+        self.send_packet(self.itf, "ipv6-sctp", inputsets)
+        self.send_packet(self.itf, "ipv6-sctp", inputsets)
+        self.send_packet(self.itf, "ipv6-sctp", inputsets)
+
+        self.dut.send_expect(
+            "flow destroy 0 rule 0", "testpmd> ")
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv6 / sctp / end actions rss types ipv6-sctp end queues end / end", "testpmd> ")
+        self.send_packet(self.itf, "ipv6-sctp", inputsets)
+
+        self.dut.send_expect("quit", "# ", 30)
+
+        self.result_table_print()
+        result_rows = self.result_table_getrows()
+        self.verify(len(result_rows) > 1, "There is no data in the table, testcase failed!")
+
+        if ((result_rows[1][1] != result_rows[2][1]) or (result_rows[1][3] != result_rows[2][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] != result_rows[3][1]) or (result_rows[1][3] != result_rows[3][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] == result_rows[4][1]) and (result_rows[1][3] == result_rows[4][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are same, rss_granularity_config failed!")
+
+    def test_ipv6_sctp_dst_ipv6_dst_port(self):
+        """
+        Test with flow type ipv6-sctp and input set dst-ipv6, dst-port.
+        """
+        flag = 1
+
+        self.start_testpmd()
+
+        # set hash input set by testpmd on dut, enable dst-ipv6, dst-port
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv6 / sctp / end actions rss types ipv6-sctp l3-dst-only l4-dst-only end queues end / end", "testpmd> ")
+        inputsets = ['ipv6-dst-only', 'l4-dst-only']
+        self.send_packet(self.itf, "ipv6-sctp", inputsets)
+        self.send_packet(self.itf, "ipv6-sctp", inputsets)
+        self.send_packet(self.itf, "ipv6-sctp", inputsets)
+
+        self.dut.send_expect(
+            "flow destroy 0 rule 0", "testpmd> ")
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv6 / sctp / end actions rss types ipv6-sctp end queues end / end", "testpmd> ")
+        self.send_packet(self.itf, "ipv6-sctp", inputsets)
+
+        self.dut.send_expect("quit", "# ", 30)
+
+        self.result_table_print()
+        result_rows = self.result_table_getrows()
+        self.verify(len(result_rows) > 1, "There is no data in the table, testcase failed!")
+
+        if ((result_rows[1][1] != result_rows[2][1]) or (result_rows[1][3] != result_rows[2][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] != result_rows[3][1]) or (result_rows[1][3] != result_rows[3][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] == result_rows[4][1]) and (result_rows[1][3] == result_rows[4][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are same, rss_granularity_config failed!")
+
+    def test_ipv6_sctp_dst_src_port(self):
+        """
+        Test with flow type ipv6-sctp and input set src-port, dst-port.
+        """
+        flag = 1
+
+        self.start_testpmd()
+
+        # set hash input set by testpmd on dut, enable src-port, dst-port
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv6 / sctp / end actions rss types ipv6-sctp l4-src-only l4-dst-only end queues end / end", "testpmd> ")
+        inputsets = ['l4-src-only', 'l4-dst-only']
+        self.send_packet(self.itf, "ipv6-sctp", inputsets)
+        self.send_packet(self.itf, "ipv6-sctp", inputsets)
+        self.send_packet(self.itf, "ipv6-sctp", inputsets)
+
+        self.dut.send_expect(
+            "flow destroy 0 rule 0", "testpmd> ")
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv6 / sctp / end actions rss types ipv6-sctp end queues end / end", "testpmd> ")
+        self.send_packet(self.itf, "ipv6-sctp", inputsets)
+
+        self.dut.send_expect("quit", "# ", 30)
+
+        self.result_table_print()
+        result_rows = self.result_table_getrows()
+        self.verify(len(result_rows) > 1, "There is no data in the table, testcase failed!")
+
+        if ((result_rows[1][1] != result_rows[2][1]) or (result_rows[1][3] != result_rows[2][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] != result_rows[3][1]) or (result_rows[1][3] != result_rows[3][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] == result_rows[4][1]) and (result_rows[1][3] == result_rows[4][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are same, rss_granularity_config failed!")
+
+    def test_ipv6_sctp_src_dst_ipv6_src_port(self):
+        """
+        Test with flow type ipv6-sctp and input set src-ipv6, dst-ipv6, src-port.
+        """
+        flag = 1
+
+        self.start_testpmd()
+
+        # set hash input set by testpmd on dut, enable src-ipv6, dst-ipv6, src-port
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv6 / sctp / end actions rss types ipv6-sctp l3-src-only l3-dst-only l4-src-only end queues end / end", "testpmd> ")
+        inputsets = ['ipv6-src-only', 'ipv6-dst-only', 'l4-src-only']
+        self.send_packet(self.itf, "ipv6-sctp", inputsets)
+        self.send_packet(self.itf, "ipv6-sctp", inputsets)
+        self.send_packet(self.itf, "ipv6-sctp", inputsets)
+
+        self.dut.send_expect(
+            "flow destroy 0 rule 0", "testpmd> ")
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv6 / sctp / end actions rss types ipv6-sctp end queues end / end", "testpmd> ")
+        self.send_packet(self.itf, "ipv6-sctp", inputsets)
+
+        self.dut.send_expect("quit", "# ", 30)
+
+        self.result_table_print()
+        result_rows = self.result_table_getrows()
+        self.verify(len(result_rows) > 1, "There is no data in the table, testcase failed!")
+
+        if ((result_rows[1][1] != result_rows[2][1]) or (result_rows[1][3] != result_rows[2][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] != result_rows[3][1]) or (result_rows[1][3] != result_rows[3][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] == result_rows[4][1]) and (result_rows[1][3] == result_rows[4][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are same, rss_granularity_config failed!")
+
+    def test_ipv6_sctp_src_dst_ipv6_dst_port(self):
+        """
+        Test with flow type ipv6-sctp and input set src-ipv6, dst-ipv6, dst-port.
+        """
+        flag = 1
+
+        self.start_testpmd()
+
+        # set hash input set by testpmd on dut, enable src-ipv6, dst-ipv6, dst-port
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv6 / sctp / end actions rss types ipv6-sctp l3-src-only l3-dst-only l4-dst-only end queues end / end", "testpmd> ")
+        inputsets = ['ipv6-src-only', 'ipv6-dst-only', 'l4-dst-only']
+        self.send_packet(self.itf, "ipv6-sctp", inputsets)
+        self.send_packet(self.itf, "ipv6-sctp", inputsets)
+        self.send_packet(self.itf, "ipv6-sctp", inputsets)
+
+        self.dut.send_expect(
+            "flow destroy 0 rule 0", "testpmd> ")
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv6 / sctp / end actions rss types ipv6-sctp end queues end / end", "testpmd> ")
+        self.send_packet(self.itf, "ipv6-sctp", inputsets)
+
+        self.dut.send_expect("quit", "# ", 30)
+
+        self.result_table_print()
+        result_rows = self.result_table_getrows()
+        self.verify(len(result_rows) > 1, "There is no data in the table, testcase failed!")
+
+        if ((result_rows[1][1] != result_rows[2][1]) or (result_rows[1][3] != result_rows[2][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] != result_rows[3][1]) or (result_rows[1][3] != result_rows[3][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] == result_rows[4][1]) and (result_rows[1][3] == result_rows[4][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are same, rss_granularity_config failed!")
+
+    def test_ipv6_sctp_src_ipv6_src_dst_port(self):
+        """
+        Test with flow type ipv6-sctp and input set src-ipv6, dst-port, src-port.
+        """
+        flag = 1
+
+        self.start_testpmd()
+
+        # set hash input set by testpmd on dut, enable src-ipv6, dst-port, src-port
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv6 / sctp / end actions rss types ipv6-sctp l3-src-only l4-dst-only l4-src-only end queues end / end", "testpmd> ")
+        inputsets = ['ipv6-src-only', 'l4-dst-only', 'l4-src-only']
+        self.send_packet(self.itf, "ipv6-sctp", inputsets)
+        self.send_packet(self.itf, "ipv6-sctp", inputsets)
+        self.send_packet(self.itf, "ipv6-sctp", inputsets)
+
+        self.dut.send_expect(
+            "flow destroy 0 rule 0", "testpmd> ")
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv6 / sctp / end actions rss types ipv6-sctp end queues end / end", "testpmd> ")
+        self.send_packet(self.itf, "ipv6-sctp", inputsets)
+
+        self.dut.send_expect("quit", "# ", 30)
+
+        self.result_table_print()
+        result_rows = self.result_table_getrows()
+        self.verify(len(result_rows) > 1, "There is no data in the table, testcase failed!")
+
+        if ((result_rows[1][1] != result_rows[2][1]) or (result_rows[1][3] != result_rows[2][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] != result_rows[3][1]) or (result_rows[1][3] != result_rows[3][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] == result_rows[4][1]) and (result_rows[1][3] == result_rows[4][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are same, rss_granularity_config failed!")
+
+    def test_ipv6_sctp_dst_ipv6_src_dst_port(self):
+        """
+        Test with flow type ipv6-sctp and input set dst-ipv6, dst-port, src-port.
+        """
+        flag = 1
+
+        self.start_testpmd()
+
+        # set hash input set by testpmd on dut, enable dst-ipv6, dst-port, src-port
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv6 / sctp / end actions rss types ipv6-sctp l3-dst-only l4-dst-only l4-src-only end queues end / end", "testpmd> ")
+        inputsets = ['ipv6-dst-only', 'l4-dst-only', 'l4-src-only']
+        self.send_packet(self.itf, "ipv6-sctp", inputsets)
+        self.send_packet(self.itf, "ipv6-sctp", inputsets)
+        self.send_packet(self.itf, "ipv6-sctp", inputsets)
+
+        self.dut.send_expect(
+            "flow destroy 0 rule 0", "testpmd> ")
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv6 / sctp / end actions rss types ipv6-sctp end queues end / end", "testpmd> ")
+        self.send_packet(self.itf, "ipv6-sctp", inputsets)
+
+        self.dut.send_expect("quit", "# ", 30)
+
+        self.result_table_print()
+        result_rows = self.result_table_getrows()
+        self.verify(len(result_rows) > 1, "There is no data in the table, testcase failed!")
+
+        if ((result_rows[1][1] != result_rows[2][1]) or (result_rows[1][3] != result_rows[2][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] != result_rows[3][1]) or (result_rows[1][3] != result_rows[3][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] == result_rows[4][1]) and (result_rows[1][3] == result_rows[4][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are same, rss_granularity_config failed!")
+
+    def test_ipv6_sctp_all_input_set(self):
+        """
+        Test with flow type ipv6-sctp and input set src-ipv6, dst-ipv6, dst-port, src-port.
+        """
+        flag = 1
+
+        self.start_testpmd()
+
+        # set hash input set by testpmd on dut, enable src-ipv6, dst-ipv6, dst-port, src-port
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv6 / sctp / end actions rss types ipv6-sctp l3-src-only l3-dst-only l4-dst-only l4-src-only end queues end / end", "testpmd> ")
+        inputsets = ['ipv6-src-only', 'ipv6-dst-only', 'l4-dst-only', 'l4-src-only']
+        self.send_packet(self.itf, "ipv6-sctp", inputsets)
+
+        self.dut.send_expect(
+            "flow destroy 0 rule 0", "testpmd> ")
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv6 / sctp / end actions rss types ipv6-sctp end queues end / end", "testpmd> ")
+        self.send_packet(self.itf, "ipv6-sctp", inputsets)
+
+        self.dut.send_expect("quit", "# ", 30)
+
+        self.result_table_print()
+        result_rows = self.result_table_getrows()
+        self.verify(len(result_rows) > 1, "There is no data in the table, testcase failed!")
+
+        if ((result_rows[1][1] != result_rows[2][1]) or (result_rows[1][3] != result_rows[2][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+
+    def test_ipv4_other_src_ipv4(self):
+        """
+        Test with flow type ipv4-other and input set src-ipv4.
+        """
+        flag = 1
+
+        self.start_testpmd()
+
+        # set hash input set by testpmd on dut, enable src-ipv4
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv4 / end actions rss types ipv4-other l3-src-only end queues end / end", "testpmd> ")
+        inputsets = ['ipv4-src-only']
+        self.send_packet(self.itf, "ipv4-other", inputsets)
+        self.send_packet(self.itf, "ipv4-other", inputsets)
+        self.send_packet(self.itf, "ipv4-other", inputsets)
+
+        self.dut.send_expect(
+            "flow destroy 0 rule 0", "testpmd> ")
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv4 / end actions rss types ipv4-other end queues end / end", "testpmd> ")
+        self.send_packet(self.itf, "ipv4-other", inputsets)
+
+        self.dut.send_expect("quit", "# ", 30)
+
+        self.result_table_print()
+        result_rows = self.result_table_getrows()
+        self.verify(len(result_rows) > 1, "There is no data in the table, testcase failed!")
+
+        if ((result_rows[1][1] != result_rows[2][1]) or (result_rows[1][3] != result_rows[2][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] != result_rows[3][1]) or (result_rows[1][3] != result_rows[3][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] == result_rows[4][1]) and (result_rows[1][3] == result_rows[4][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are same, rss_granularity_config failed!")
+
+    def test_ipv4_other_dst_ipv4(self):
+        """
+        Test with flow type ipv4-other and input set dst-ipv4.
+        """
+        flag = 1
+
+        self.start_testpmd()
+
+        # set hash input set by testpmd on dut, enable dst-ipv4
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv4 / end actions rss types ipv4-other l3-dst-only end queues end / end", "testpmd> ")
+        inputsets = ['ipv4-dst-only']
+        self.send_packet(self.itf, "ipv4-other", inputsets)
+        self.send_packet(self.itf, "ipv4-other", inputsets)
+        self.send_packet(self.itf, "ipv4-other", inputsets)
+
+        self.dut.send_expect(
+            "flow destroy 0 rule 0", "testpmd> ")
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv4 / end actions rss types ipv4-other end queues end / end", "testpmd> ")
+        self.send_packet(self.itf, "ipv4-other", inputsets)
+
+        self.dut.send_expect("quit", "# ", 30)
+
+        self.result_table_print()
+        result_rows = self.result_table_getrows()
+        self.verify(len(result_rows) > 1, "There is no data in the table, testcase failed!")
+
+        if ((result_rows[1][1] != result_rows[2][1]) or (result_rows[1][3] != result_rows[2][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] != result_rows[3][1]) or (result_rows[1][3] != result_rows[3][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] == result_rows[4][1]) and (result_rows[1][3] == result_rows[4][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are same, rss_granularity_config failed!")
+
+    def test_ipv4_other_dst_src_ipv4(self):
+        """
+        Test with flow type ipv4-other and input set src-ipv4, dst-ipv4.
+        """
+        flag = 1
+
+        self.start_testpmd()
+
+        # set hash input set by testpmd on dut, enable src-ipv4, dst-ipv4
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv4 / end actions rss types ipv4-other l3-src-only l3-dst-only end queues end / end", "testpmd> ")
+        inputsets = ['ipv4-src-only', 'ipv4-dst-only']
+        self.send_packet(self.itf, "ipv4-other", inputsets)
+
+        self.dut.send_expect(
+            "flow destroy 0 rule 0", "testpmd> ")
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv4 / end actions rss types ipv4-other end queues end / end", "testpmd> ")
+        self.send_packet(self.itf, "ipv4-other", inputsets)
+
+        self.dut.send_expect("quit", "# ", 30)
+
+        self.result_table_print()
+        result_rows = self.result_table_getrows()
+        self.verify(len(result_rows) > 1, "There is no data in the table, testcase failed!")
+
+        if ((result_rows[1][1] != result_rows[2][1]) or (result_rows[1][3] != result_rows[2][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+
+    def test_ipv6_other_src_ipv6(self):
+        """
+        Test with flow type ipv6-other and input set src-ipv6.
+        """
+        flag = 1
+
+        self.start_testpmd()
+
+        # set hash input set by testpmd on dut, enable src-ipv6
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv6 / end actions rss types ipv6-other l3-src-only end queues end / end", "testpmd> ")
+        inputsets = ['ipv6-src-only']
+        self.send_packet(self.itf, "ipv6-other", inputsets)
+        self.send_packet(self.itf, "ipv6-other", inputsets)
+        self.send_packet(self.itf, "ipv6-other", inputsets)
+
+        self.dut.send_expect(
+            "flow destroy 0 rule 0", "testpmd> ")
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv6 / end actions rss types ipv6-other end queues end / end", "testpmd> ")
+        self.send_packet(self.itf, "ipv6-other", inputsets)
+
+        self.dut.send_expect("quit", "# ", 30)
+
+        self.result_table_print()
+        result_rows = self.result_table_getrows()
+        self.verify(len(result_rows) > 1, "There is no data in the table, testcase failed!")
+
+        if ((result_rows[1][1] != result_rows[2][1]) or (result_rows[1][3] != result_rows[2][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] != result_rows[3][1]) or (result_rows[1][3] != result_rows[3][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] == result_rows[4][1]) and (result_rows[1][3] == result_rows[4][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are same, rss_granularity_config failed!")
+
+    def test_ipv6_other_dst_ipv6(self):
+        """
+        Test with flow type ipv6-other and input set dst-ipv6.
+        """
+        flag = 1
+
+        self.start_testpmd()
+
+        # set hash input set by testpmd on dut, enable dst-ipv6
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv6 / end actions rss types ipv6-other l3-dst-only end queues end / end", "testpmd> ")
+        inputsets = ['ipv6-dst-only']
+        self.send_packet(self.itf, "ipv6-other", inputsets)
+        self.send_packet(self.itf, "ipv6-other", inputsets)
+        self.send_packet(self.itf, "ipv6-other", inputsets)
+
+        self.dut.send_expect(
+            "flow destroy 0 rule 0", "testpmd> ")
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv6 / end actions rss types ipv6-other end queues end / end", "testpmd> ")
+        self.send_packet(self.itf, "ipv6-other", inputsets)
+
+        self.dut.send_expect("quit", "# ", 30)
+
+        self.result_table_print()
+        result_rows = self.result_table_getrows()
+        self.verify(len(result_rows) > 1, "There is no data in the table, testcase failed!")
+
+        if ((result_rows[1][1] != result_rows[2][1]) or (result_rows[1][3] != result_rows[2][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] != result_rows[3][1]) or (result_rows[1][3] != result_rows[3][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+        elif ((result_rows[1][1] == result_rows[4][1]) and (result_rows[1][3] == result_rows[4][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are same, rss_granularity_config failed!")
+
+    def test_ipv6_other_dst_src_ipv6(self):
+        """
+        Test with flow type ipv6-other and input set src-ipv6, dst-ipv6.
+        """
+        flag = 1
+
+        self.start_testpmd()
+
+        # set hash input set by testpmd on dut, enable src-ipv6, dst-ipv6
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv6 / end actions rss types ipv6-other l3-src-only l3-dst-only end queues end / end", "testpmd> ")
+        inputsets = ['ipv6-src-only', 'ipv6-dst-only']
+        self.send_packet(self.itf, "ipv6-other", inputsets)
+
+        self.dut.send_expect(
+            "flow destroy 0 rule 0", "testpmd> ")
+        self.dut.send_expect(
+            "flow create 0 ingress pattern eth / ipv6 / end actions rss types ipv6-other end queues end / end", "testpmd> ")
+        self.send_packet(self.itf, "ipv6-other", inputsets)
+
+        self.dut.send_expect("quit", "# ", 30)
+
+        self.result_table_print()
+        result_rows = self.result_table_getrows()
+        self.verify(len(result_rows) > 1, "There is no data in the table, testcase failed!")
+
+        if ((result_rows[1][1] != result_rows[2][1]) or (result_rows[1][3] != result_rows[2][3])):
+            flag = 0
+            self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+
+    def test_flow_validate(self):
+        """
+        Test the flow rule validate.
+        """
+        self.start_testpmd()
+
+        out = self.dut.send_expect("flow validate 0 ingress pattern eth / ipv4 / tcp / end actions rss types ipv4-tcp l3-dst-only end queues end / end", "testpmd> ")
+        self.verify("Flow rule validated" in out, "Failed to validated!")
+
+        out = self.dut.send_expect("flow validate 0 ingress pattern end actions rss types end queues 0 1 end / end", "testpmd> ")
+        self.verify("Flow rule validated" in out, "Failed to validated!")
+        
+        out = self.dut.send_expect("flow validate 0 ingress pattern eth / ipv4 / tcp / end actions rss types ipv4-tcp l3-dst-only end queues 0 1 end / end", "testpmd> ")
+        self.verify("Flow rule validated" not in out, "Failed to validated!")
+
+        self.dut.send_expect("quit", "# ", 30)
+
+    def tear_down(self):
+        """
+        Run after each test case.
+        """
+        self.dut.kill_all()
+
+    def tear_down_all(self):
+        """
+        Run after each test suite.
+        """
+        pass
+
+    def tear_down(self):
+        """
+        Run after each test case.
+        """
+        self.dut.kill_all()
+
+    def tear_down_all(self):
+        """
+        Run after each test suite.
+        """
+        pass
-- 
2.17.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dts] [PATCH v6 0/2] add fortville rss input test
  2020-04-17  3:33 [dts] [PATCH v6 0/2] add fortville rss input test Chenxu Di
  2020-04-17  3:33 ` [dts] [PATCH v6 1/2] test_plans/fortville_rss_input: add fortville rss input test plan Chenxu Di
  2020-04-17  3:33 ` [dts] [PATCH v6 2/2] tests/fortville_rss_input: add fortville rss input Chenxu Di
@ 2020-04-17  7:21 ` Peng, Yuan
  2020-04-20  5:23 ` Tu, Lijuan
  3 siblings, 0 replies; 5+ messages in thread
From: Peng, Yuan @ 2020-04-17  7:21 UTC (permalink / raw)
  To: Di, ChenxuX, dts; +Cc: Peng, Yuan

Acked by Peng, Yuan <yuan.peng@intel.com>

-----Original Message-----
From: Di, ChenxuX <chenxux.di@intel.com> 
Sent: Friday, April 17, 2020 11:34 AM
To: dts@dpdk.org
Cc: Peng, Yuan <yuan.peng@intel.com>; Di, ChenxuX <chenxux.di@intel.com>
Subject: [PATCH v6 0/2] add fortville rss input test

add fortville rss input test plan
add fortville rss input test suite

--
v6:
-Fixed mistake about validate rule
v5:
-Fixed bug about ipv4-udp and ipv4-sctp packet
v4:
-Updated the test plan and test suite about hash function
v3:
-Update the test plan about all input set
v2:
-Updated the test plan and test suite about all inputset -Added test suite about hash global configuration

Chenxu Di (2):
  test_plans/fortville_rss_input: add fortville rss input test plan
  tests/fortville_rss_input: add fortville rss input

 test_plans/fortville_rss_input_test_plan.rst |  600 +++
 tests/TestSuite_fortville_rss_input.py       | 3987 ++++++++++++++++++
 2 files changed, 4587 insertions(+)
 create mode 100644 test_plans/fortville_rss_input_test_plan.rst
 create mode 100644 tests/TestSuite_fortville_rss_input.py

--
2.17.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dts] [PATCH v6 0/2] add fortville rss input test
  2020-04-17  3:33 [dts] [PATCH v6 0/2] add fortville rss input test Chenxu Di
                   ` (2 preceding siblings ...)
  2020-04-17  7:21 ` [dts] [PATCH v6 0/2] add fortville rss input test Peng, Yuan
@ 2020-04-20  5:23 ` Tu, Lijuan
  3 siblings, 0 replies; 5+ messages in thread
From: Tu, Lijuan @ 2020-04-20  5:23 UTC (permalink / raw)
  To: Di, ChenxuX, dts; +Cc: Peng, Yuan, Di, ChenxuX

Applied the series, thanks

> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Chenxu Di
> Sent: Friday, April 17, 2020 11:34 AM
> To: dts@dpdk.org
> Cc: Peng, Yuan <yuan.peng@intel.com>; Di, ChenxuX <chenxux.di@intel.com>
> Subject: [dts] [PATCH v6 0/2] add fortville rss input test
> 
> add fortville rss input test plan
> add fortville rss input test suite
> 
> --
> v6:
> -Fixed mistake about validate rule
> v5:
> -Fixed bug about ipv4-udp and ipv4-sctp packet
> v4:
> -Updated the test plan and test suite about hash function
> v3:
> -Update the test plan about all input set
> v2:
> -Updated the test plan and test suite about all inputset -Added test suite
> about hash global configuration
> 
> Chenxu Di (2):
>   test_plans/fortville_rss_input: add fortville rss input test plan
>   tests/fortville_rss_input: add fortville rss input
> 
>  test_plans/fortville_rss_input_test_plan.rst |  600 +++
>  tests/TestSuite_fortville_rss_input.py       | 3987 ++++++++++++++++++
>  2 files changed, 4587 insertions(+)
>  create mode 100644 test_plans/fortville_rss_input_test_plan.rst
>  create mode 100644 tests/TestSuite_fortville_rss_input.py
> 
> --
> 2.17.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-04-20  5:23 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-17  3:33 [dts] [PATCH v6 0/2] add fortville rss input test Chenxu Di
2020-04-17  3:33 ` [dts] [PATCH v6 1/2] test_plans/fortville_rss_input: add fortville rss input test plan Chenxu Di
2020-04-17  3:33 ` [dts] [PATCH v6 2/2] tests/fortville_rss_input: add fortville rss input Chenxu Di
2020-04-17  7:21 ` [dts] [PATCH v6 0/2] add fortville rss input test Peng, Yuan
2020-04-20  5:23 ` Tu, Lijuan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).