* [dts] [PATCH] Support fortpark_TLV
[not found] <yes>
@ 2016-06-15 8:12 ` pengyuan
2016-06-21 9:01 ` Liu, Yong
2016-06-15 8:46 ` [dts] [PATCH] Support NIC type fortpark_TLV pengyuan
2016-06-16 1:19 ` [dts] [PATCH] *** tests: add fortville rss granularity script *** pengyuan
2 siblings, 1 reply; 7+ messages in thread
From: pengyuan @ 2016-06-15 8:12 UTC (permalink / raw)
To: dts; +Cc: pengyuan
Signed-off-by: pengyuan <yuan.peng@intel.com>
diff --git a/framework/settings.py b/framework/settings.py
index 5572e47..2f440c9 100644
--- a/framework/settings.py
+++ b/framework/settings.py
@@ -77,6 +77,8 @@ NICS = {
'fortville_spirit_single': '8086:1584',
'redrockcanyou': '8086:15a4',
'fortpark':'8086:374c',
+ 'fortpark_TLV':'8086:37d0',
+ 'fortpark_TLV_vf':'8086:37cd',
'fvl10g_vf':'8086:154c',
'atwood': '8086:15d5',
'ConnectX3':'15b3:1003',
@@ -115,6 +117,8 @@ DRIVERS = {
'fortville_spirit_single': 'i40e',
'redrockcanyou': 'fm10k',
'fortpark':'i40e',
+ 'fortpark_TLV':'i40e',
+ 'fortpark_TLV_vf':'i40evf',
'fvl10g_vf':'i40evf',
'atwood': 'fm10k',
'ConnectX3':'mlx4_core',
diff --git a/framework/test_case.py b/framework/test_case.py
index 296dbf7..84d15c7 100644
--- a/framework/test_case.py
+++ b/framework/test_case.py
@@ -104,6 +104,8 @@ class TestCase(object):
bitrate *= 40
elif nic == 'fortville_eagle':
bitrate *= 10
+ elif nic == 'fortpark_TLV':
+ bitrate *= 10
elif nic == 'redrockcanyou':
bitrate *= 40
--
2.5.0
^ permalink raw reply [flat|nested] 7+ messages in thread
* [dts] [PATCH] Support NIC type fortpark_TLV
[not found] <yes>
2016-06-15 8:12 ` [dts] [PATCH] Support fortpark_TLV pengyuan
@ 2016-06-15 8:46 ` pengyuan
2016-06-21 9:08 ` Liu, Yong
2016-06-16 1:19 ` [dts] [PATCH] *** tests: add fortville rss granularity script *** pengyuan
2 siblings, 1 reply; 7+ messages in thread
From: pengyuan @ 2016-06-15 8:46 UTC (permalink / raw)
To: dts; +Cc: pengyuan
Signed-off-by: pengyuan <yuan.peng@intel.com>
diff --git a/tests/TestSuite_dual_vlan.py b/tests/TestSuite_dual_vlan.py
index a4ae23e..1089b7f 100644
--- a/tests/TestSuite_dual_vlan.py
+++ b/tests/TestSuite_dual_vlan.py
@@ -103,7 +103,7 @@ class TestDualVlan(TestCase):
self.pmdout = PmdOutput(self.dut)
self.pmdout.start_testpmd("Default", "--portmask=%s" % portMask, socket=self.ports_socket)
- if self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single"]:
+ if self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV"]:
self.dut.send_expect("vlan set filter on all", "testpmd> ")
self.dut.send_expect("set promisc all off", "testpmd> ")
@@ -147,7 +147,7 @@ class TestDualVlan(TestCase):
"""
for mode in modeName:
- if self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single"]:
+ if self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV"]:
# fortville NIC vlan filter can't close, if want close need remove rx_vlan
if mode == "filter":
if modeName[mode] == "off":
@@ -164,7 +164,7 @@ class TestDualVlan(TestCase):
out = self.dut.send_expect("show port info %s" % dutRxPortId, "testpmd> ")
for mode in modeName:
- if self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single"]:
+ if self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV"]:
# fortville NIC vlan filter can't close, if want close need remove rx_vlan
if mode == "filter":
if modeName[mode] == "off":
@@ -254,7 +254,7 @@ class TestDualVlan(TestCase):
print out
self.verify(out is not None and "vlan %s" % outvlan not in out, "Vlan filter enable error: " + out)
- if self.nic not in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single"]:
+ if self.nic not in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV"]:
self.mode_config(filter="off")
self.vlan_send_packet(outvlan)
out = self.get_tcpdump_package()
@@ -293,7 +293,7 @@ class TestDualVlan(TestCase):
self.mode_config(filter="off")
self.mode_config(qinq="off")
self.mode_config(strip="on")
- if self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single"]:
+ if self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV"]:
self.dut.send_expect('rx_vlan add %s %s' % (outvlan, dutRxPortId), "testpmd> ")
self.vlan_send_packet(outvlan)
out = self.get_tcpdump_package()
@@ -303,20 +303,20 @@ class TestDualVlan(TestCase):
self.vlan_send_packet(outvlan)
out = self.get_tcpdump_package()
self.verify("vlan %s" % outvlan in out, "Vlan strip disable error: " + out)
- if self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single"]:
+ if self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV"]:
self.dut.send_expect('rx_vlan rm %s %s' % (outvlan, dutRxPortId), "testpmd> ")
def test_vlan_stripq_config(self):
"""
Enable/Disable VLAN packets strip on queue
"""
- self.verify(self.nic not in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single"], "%s NIC not support queue vlan strip " % self.nic)
+ self.verify(self.nic not in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV"], "%s NIC not support queue vlan strip " % self.nic)
self.mode_config(filter="off")
self.mode_config(qinq="off")
self.mode_config(strip="off")
self.mode_config(stripq="off")
- if self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single"]:
+ if self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV"]:
self.dut.send_expect('rx_vlan add %s %s' % (outvlan, dutRxPortId), "testpmd> ")
self.vlan_send_packet(outvlan)
out = self.get_tcpdump_package()
@@ -332,7 +332,7 @@ class TestDualVlan(TestCase):
self.vlan_send_packet(outvlan)
out = self.get_tcpdump_package()
self.verify("vlan %s" % outvlan in out, "vlan strip queue disable error: " + out)
- if self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single"]:
+ if self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV"]:
self.dut.send_expect('rx_vlan rm %s %s' % (outvlan, dutRxPortId), "testpmd> ")
def test_vlan_insert_config(self):
@@ -361,7 +361,7 @@ class TestDualVlan(TestCase):
"""
Configure receive port out vlan TPID
"""
- self.verify(self.nic not in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "hartwell"], "%s NIC not support tcpid " % self.nic)
+ self.verify(self.nic not in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV", "hartwell"], "%s NIC not support tcpid " % self.nic)
self.mode_config(filter="on", strip="on", qinq="on")
# nic only support inner model, except fortville nic
diff --git a/tests/TestSuite_fdir.py b/tests/TestSuite_fdir.py
index 5a0a6b0..537ab1f 100644
--- a/tests/TestSuite_fdir.py
+++ b/tests/TestSuite_fdir.py
@@ -78,7 +78,7 @@ class TestFdir(TestCase, IxiaPacketGenerator):
out = self.dut.get_session_output()
self.dut.send_expect("stop", "testpmd>")
- if(self.nic in ["kawela", "niantic", "fortville_eagle", "fortville_spirit", "fortville_spirit_single"]):
+ if(self.nic in ["kawela", "niantic", "fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV"]):
if ("fwd" == self.fdir_type):
if condition:
self.queue = 2
@@ -205,7 +205,7 @@ class TestFdir(TestCase, IxiaPacketGenerator):
Fdir Performance Benchmarking set rules
"""
self.dut.send_expect("port stop %s" % self.dut_ports[0], "testpmd>")
- if(self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single"]):
+ if(self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV"]):
self.dut.send_expect("flow_director_flex_payload %s l2 (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15)" % self.dut_ports[0], "testpmd>")
self.dut.send_expect("flow_director_flex_payload %s l3 (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15)" % self.dut_ports[0], "testpmd>")
self.dut.send_expect("flow_director_flex_payload %s l4 (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15)" % self.dut_ports[0], "testpmd>")
@@ -221,7 +221,7 @@ class TestFdir(TestCase, IxiaPacketGenerator):
Fdir get flexbytes and payload according NIC
"""
- if(self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single"]):
+ if(self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV"]):
if not sctp:
self.flexbytes = "0x11,0x11,0x22,0x22,0x33,0x33,0x44,0x44,0x55,0x55,0x66,0x66,0x77,0x77,0x88,0x88"
else:
@@ -297,7 +297,7 @@ class TestFdir(TestCase, IxiaPacketGenerator):
# ipv4 frag
# ip-frag only support in fortville
- if (self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single"]):
+ if (self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV"]):
self.dut.send_expect("flow_director_filter %s mode IP add flow ipv4-other src 192.168.0.1 dst 192.168.0.2 tos 2 proto 20 ttl 40 vlan 0 flexbytes () fwd pf queue %d fd_id %d " % (self.dut_ports[0], 3, 1), "testpmd>")
self.dut.send_expect("flow_director_filter %s mode IP add flow ipv4-frag src 192.168.0.1 dst 192.168.0.2 tos 2 proto 20 ttl 40 vlan 0 flexbytes () fwd pf queue %d fd_id %d " % (self.dut_ports[0], 2, 1), "testpmd>")
self.send_and_verify(True, 'sendp([Ether(src=get_if_hwaddr("%s"), dst="00:1B:21:8E:B2:30")/IP(src="192.168.0.1", dst="192.168.0.2", frag=1, flags="MF")/Raw(load="X"*46)], iface="%s")' % (self.dut_rx_interface, self.dut_rx_interface))
@@ -316,7 +316,7 @@ class TestFdir(TestCase, IxiaPacketGenerator):
if self.nic in ["niantic"]:
# Niantic ipv6 only support signature mode
self.dut.send_expect("./%s/app/testpmd -c %s -n 4 -- -i --portmask=%s --disable-rss --rxq=4 --txq=4 --nb-cores=4 --nb-ports=1 --pkt-filter-mode=signature" % (self.target, self.coreMask, dts.create_mask([self.dut_ports[0]])), "testpmd>", 120)
- elif self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single"]:
+ elif self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV"]:
# Fortville ipv6 support perfect mode
self.dut.send_expect("./%s/app/testpmd -c %s -n 4 -- -i --portmask=%s --disable-rss --rxq=4 --txq=4 --nb-cores=4 --nb-ports=1 --pkt-filter-mode=perfect" % (self.target, self.coreMask, dts.create_mask([self.dut_ports[0]])), "testpmd>", 120)
self.dut.send_expect("set verbose 1", "testpmd>")
@@ -373,7 +373,7 @@ class TestFdir(TestCase, IxiaPacketGenerator):
# ipv6 frag
# ip-frag only support in fortville
- if (self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single"]):
+ if (self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV"]):
self.dut.send_expect("flow_director_filter %s mode IP add flow ipv6-other src FE80:0:0:0:200:1FF:FE00:200 dst 3555:5555:6666:6666:7777:7777:8888:8888 tos 2 proto 20 ttl 40 vlan 0 flexbytes () fwd pf queue %d fd_id %d " % (self.dut_ports[0], 3, 1), "testpmd>")
self.dut.send_expect("flow_director_filter %s mode IP add flow ipv6-frag src FE80:0:0:0:200:1FF:FE00:200 dst 3555:5555:6666:6666:7777:7777:8888:8888 tos 2 proto 20 ttl 40 vlan 0 flexbytes () fwd pf queue %d fd_id %d " % (self.dut_ports[0], 2, 1), "testpmd>")
self.send_and_verify(True, 'sendp([Ether(src=get_if_hwaddr("%s"), dst="00:1B:21:8E:B2:30")/IPv6(src="FE80:0:0:0:200:1FF:FE00:200", dst="3555:5555:6666:6666:7777:7777:8888:8888", nh=44)/IPv6ExtHdrFragment()/Raw(load="X"*46)], iface="%s")' % (self.dut_rx_interface, self.dut_rx_interface))
@@ -441,7 +441,7 @@ class TestFdir(TestCase, IxiaPacketGenerator):
# ipv4 frag
# ip-frag only support in fortville
- if (self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single"]):
+ if (self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV"]):
self.dut.send_expect("flow_director_filter %s mode IP add flow ipv4-other src 192.168.0.1 dst 192.168.0.2 tos 2 proto 20 ttl 40 vlan 0 flexbytes () drop pf queue %d fd_id %d " % (self.dut_ports[0], 3, 1), "testpmd>")
self.dut.send_expect("flow_director_filter %s mode IP add flow ipv4-frag src 192.168.0.1 dst 192.168.0.2 tos 2 proto 20 ttl 40 vlan 0 flexbytes () drop pf queue %d fd_id %d " % (self.dut_ports[0], 2, 1), "testpmd>")
self.dut.send_expect("flow_director_filter %s mode IP add flow ipv4-frag src 192.168.0.1 dst 192.168.0.2 tos 2 proto 20 ttl 40 vlan 0 flexbytes () drop pf queue %d fd_id %d " % (self.dut_ports[0], 2, 1), "testpmd>")
@@ -460,7 +460,7 @@ class TestFdir(TestCase, IxiaPacketGenerator):
def test_fdir_noflexword_drop_ipv6(self):
# drop not support signature mode, niantic only can work in signature mode with ipv6
# Niantic is not support in drop ipv6
- if self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single"]:
+ if self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV"]:
# drop command testing
self.dut.kill_all()
@@ -563,7 +563,7 @@ class TestFdir(TestCase, IxiaPacketGenerator):
# ipv4 frag
# ip-frag only support fortville
- if (self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single"]):
+ if (self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV"]):
self.dut.send_expect("flow_director_filter %s mode IP add flow ipv4-other src 192.168.0.1 dst 192.168.0.2 tos 2 proto 20 ttl 40 vlan 0 flexbytes (%s) fwd pf queue %d fd_id %d " % (self.dut_ports[0], self.flexbytes, 3, 1), "testpmd>")
self.dut.send_expect("flow_director_filter %s mode IP add flow ipv4-frag src 192.168.0.1 dst 192.168.0.2 tos 2 proto 20 ttl 40 vlan 0 flexbytes (%s) fwd pf queue %d fd_id %d " % (self.dut_ports[0], self.flexbytes, 2, 1), "testpmd>")
self.send_and_verify(True, 'sendp([Ether(src=get_if_hwaddr("%s"), dst="00:1B:21:8E:B2:30")/IP(src="192.168.0.1", dst="192.168.0.2", frag=1, flags="MF")/Raw(load="%s")], iface="%s")' % (self.dut_rx_interface, self.payload, self.dut_rx_interface))
@@ -601,7 +601,7 @@ class TestFdir(TestCase, IxiaPacketGenerator):
if self.nic in ["niantic"]:
# Niantic ipv6 only support signature mode
self.dut.send_expect("./%s/app/testpmd -c %s -n 4 -- -i --portmask=%s --disable-rss --rxq=4 --txq=4 --nb-cores=4 --nb-ports=1 --pkt-filter-mode=signature" % (self.target, self.coreMask, dts.create_mask([self.dut_ports[0]])), "testpmd>", 120)
- elif self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single"]:
+ elif self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV"]:
# fortville ipv6 support perfect mode
self.dut.send_expect("./%s/app/testpmd -c %s -n 4 -- -i --portmask=%s --disable-rss --rxq=4 --txq=4 --nb-cores=4 --nb-ports=1 --pkt-filter-mode=perfect" % (self.target, self.coreMask, dts.create_mask([self.dut_ports[0]])), "testpmd>", 120)
self.dut.send_expect("set verbose 1", "testpmd>")
@@ -657,7 +657,7 @@ class TestFdir(TestCase, IxiaPacketGenerator):
# ipv6 frag
# ip-frag only support fortville
- if (self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single"]):
+ if (self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV"]):
self.dut.send_expect("flow_director_filter %s mode IP add flow ipv6-other src FE80:0:0:0:200:1FF:FE00:200 dst 3555:5555:6666:6666:7777:7777:8888:8888 tos 2 proto 20 ttl 40 vlan 0 flexbytes (%s) fwd pf queue %d fd_id %d " % (self.dut_ports[0], self.flexbytes, 3, 1), "testpmd>")
self.dut.send_expect("flow_director_filter %s mode IP add flow ipv6-frag src FE80:0:0:0:200:1FF:FE00:200 dst 3555:5555:6666:6666:7777:7777:8888:8888 tos 2 proto 20 ttl 40 vlan 0 flexbytes (%s) fwd pf queue %d fd_id %d " % (self.dut_ports[0], self.flexbytes, 2, 1), "testpmd>")
self.send_and_verify(True, 'sendp([Ether(src=get_if_hwaddr("%s"), dst="00:1B:21:8E:B2:30")/IPv6(src="FE80:0:0:0:200:1FF:FE00:200", dst="3555:5555:6666:6666:7777:7777:8888:8888", nh=44)/IPv6ExtHdrFragment()/Raw(load="%s")], iface="%s")' % (self.dut_rx_interface, self.payload, self.dut_rx_interface))
@@ -707,7 +707,7 @@ class TestFdir(TestCase, IxiaPacketGenerator):
# ipv4 frag
# ip-frag only support fortville
- if (self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single"]):
+ if (self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV"]):
self.dut.send_expect("flow_director_filter %s mode IP add flow ipv4-other src 192.168.0.1 dst 192.168.0.2 tos 2 proto 20 ttl 40 vlan 0 flexbytes (%s) drop pf queue %d fd_id %d " % (self.dut_ports[0], self.flexbytes, 3, 1), "testpmd>")
self.dut.send_expect("flow_director_filter %s mode IP add flow ipv4-frag src 192.168.0.1 dst 192.168.0.2 tos 2 proto 20 ttl 40 vlan 0 flexbytes (%s) drop pf queue %d fd_id %d " % (self.dut_ports[0], self.flexbytes, 2, 1), "testpmd>")
self.dut.send_expect("flow_director_filter %s mode IP add flow ipv4-frag src 192.168.0.1 dst 192.168.0.2 tos 2 proto 20 ttl 40 vlan 0 flexbytes (%s) drop pf queue %d fd_id %d " % (self.dut_ports[0], self.flexbytes, 2, 1), "testpmd>")
@@ -726,7 +726,7 @@ class TestFdir(TestCase, IxiaPacketGenerator):
def test_fdir_flexword_drop_ipv6(self):
# drop not support signature mode, niantic only can work in signature mode with ipv6
# Niantic is not support in drop ipv6
- if (self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single"]):
+ if (self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV"]):
# drop testing with flexword
self.dut.send_expect("./%s/app/testpmd -c %s -n 4 -- -i --portmask=%s --disable-rss --rxq=4 --txq=4 --nb-cores=4 --nb-ports=1 --pkt-filter-mode=perfect" % (self.target, self.coreMask, dts.create_mask([self.dut_ports[0]])), "testpmd>", 120)
self.dut.send_expect("set verbose 1", "testpmd>")
diff --git a/tests/TestSuite_generic_filter.py b/tests/TestSuite_generic_filter.py
index 663001c..9f6676c 100644
--- a/tests/TestSuite_generic_filter.py
+++ b/tests/TestSuite_generic_filter.py
@@ -81,7 +81,7 @@ class TestGeneric_filter(TestCase):
"""
set port queue mapping, fortville not support this function
"""
- if self.nic not in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single"]:
+ if self.nic not in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV"]:
self.dut.send_expect(
"set stat_qmap rx %s 0 0" % valports[0], "testpmd> ")
self.dut.send_expect(
@@ -366,7 +366,7 @@ class TestGeneric_filter(TestCase):
self.verify(self.nic in ["niantic", "kawela_4", "bartonhills",
"powerville", "fortville_eagle", "fortville_spirit",
- "fortville_spirit_single"], "%s nic not support syn filter" % self.nic)
+ "fortville_spirit_single", "fortpark_TLV"], "%s nic not support syn filter" % self.nic)
self.pmdout.start_testpmd(
"%s" % self.cores, "--disable-rss --rxq=4 --txq=4 --portmask=%s --nb-cores=4 --nb-ports=1" % portMask)
self.port_config()
@@ -619,7 +619,7 @@ class TestGeneric_filter(TestCase):
self.verify(False, "%s nic not support this test" % self.nic)
def test_jumbo_frame_size(self):
- self.verify(self.nic not in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single"], "%s nic not support this test" % self.nic)
+ self.verify(self.nic not in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV"], "%s nic not support this test" % self.nic)
self.pmdout.start_testpmd(
"%s" % self.cores, "--disable-rss --rxq=4 --txq=4 --portmask=%s --nb-cores=4 --nb-ports=1 --mbcache=200 --mbuf-size=2048 --max-pkt-len=9600" % portMask)
port = self.tester.get_local_port(valports[0])
diff --git a/tests/TestSuite_nvgre.py b/tests/TestSuite_nvgre.py
index 99b1d6b..1da551b 100644
--- a/tests/TestSuite_nvgre.py
+++ b/tests/TestSuite_nvgre.py
@@ -349,7 +349,7 @@ class TestNvgre(TestCase):
nvgre Prerequisites
"""
# this feature only enable in FVL now
- self.verify(self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "sageville", "sagepond"], "NVGRE Only supported by Fortville and Sageville")
+ self.verify(self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV", "sageville", "sagepond"], "NVGRE Only supported by Fortville and Sageville")
# Based on h/w type, choose how many ports to use
ports = self.dut.get_ports(self.nic)
self.portmask = dts.create_mask(self.dut.get_ports(self.nic))
diff --git a/tests/TestSuite_pmdrss_hash.py b/tests/TestSuite_pmdrss_hash.py
index e753a17..0cb703b 100644
--- a/tests/TestSuite_pmdrss_hash.py
+++ b/tests/TestSuite_pmdrss_hash.py
@@ -417,10 +417,10 @@ class TestPmdrssHash(TestCase):
"""
self.verify(self.nic in ["fortville_eagle", "fortville_spirit",
- "fortville_spirit_single", "redrockcanyou", "atwood", "boulderrapid"],
+ "fortville_spirit_single", "redrockcanyou", "atwood", "boulderrapid", "fortpark_TLV"],
"NIC Unsupported: " + str(self.nic))
global reta_num
- if self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single"]:
+ if self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV"]:
reta_num = 512
elif self.nic in ["niantic"]:
reta_num = 128
diff --git a/tests/TestSuite_pmdrssreta.py b/tests/TestSuite_pmdrssreta.py
index 9a0ad2f..6445330 100644
--- a/tests/TestSuite_pmdrssreta.py
+++ b/tests/TestSuite_pmdrssreta.py
@@ -228,7 +228,7 @@ class TestPmdrssreta(TestCase):
self.dut.send_expect("quit", "# ", 30)
def test_rss_key_size(self):
- nic_rss_key_size = {"fortville_eagle": 52, "fortville_spirit": 52, "fortville_spirit_single": 52, "niantic": 40, "e1000": 40, "redrockcanyou": 40, "atwood": 40, "boulderrapid": 40}
+ nic_rss_key_size = {"fortville_eagle": 52, "fortville_spirit": 52, "fortville_spirit_single": 52, "niantic": 40, "e1000": 40, "redrockcanyou": 40, "atwood": 40, "boulderrapid": 40, "fortpark_TLV": 52}
self.verify(self.nic in nic_rss_key_size.keys(), "Not supporte rss key on %s" % self.nic)
dutPorts = self.dut.get_ports(self.nic)
diff --git a/tests/TestSuite_scatter.py b/tests/TestSuite_scatter.py
index 44a55b6..9a3a10a 100644
--- a/tests/TestSuite_scatter.py
+++ b/tests/TestSuite_scatter.py
@@ -67,7 +67,7 @@ class TestScatter(TestCase):
if self.nic in ["niantic", "sageville", "fortpark", "fortville_eagle",
"fortville_spirit", "fortville_spirit_single",
"redrockcanyou", "atwood", "boulderrapid",
- "ironpond", "twinpond", "springfountain"]:
+ "ironpond", "twinpond", "springfountain", "fortpark_TLV"]:
self.mbsize = 2048
else:
self.mbsize = 1024
diff --git a/tests/TestSuite_tso.py b/tests/TestSuite_tso.py
index 6e45fdc..32db524 100644
--- a/tests/TestSuite_tso.py
+++ b/tests/TestSuite_tso.py
@@ -55,7 +55,7 @@ class TestTSO(TestCase):
self.verify(self.nic in ["kawela_2", "niantic", "bartonhills", "82545EM",
"82540EM", "springfountain", "fortville_eagle",
"fortville_spirit", "fortville_spirit_single",
- "redrockcanyou", "atwood", "boulderrapid"],
+ "redrockcanyou", "atwood", "boulderrapid", "fortpark_TLV"],
"NIC Unsupported: " + str(self.nic))
# Based on h/w type, choose how many ports to use
diff --git a/tests/TestSuite_uni_pkt.py b/tests/TestSuite_uni_pkt.py
index ca72e75..429546a 100644
--- a/tests/TestSuite_uni_pkt.py
+++ b/tests/TestSuite_uni_pkt.py
@@ -93,7 +93,7 @@ class TestUniPacket(TestCase):
"""
Check whether L2 packet can be detected"
"""
- self.verify("fortville" in self.nic,
+ self.verify(("fortville" in self.nic or "fortpark_TLV" in self.nic),
"L2 packet detect only support by Fortville")
self.L2_types = {
"TIMESYNC": "(outer) L2 type: ETHER_Timesync",
@@ -115,7 +115,7 @@ class TestUniPacket(TestCase):
"""
checked that whether L3 and L4 packet can be normally detected.
"""
- if "fortville" in self.nic.lower():
+ if "fortville" in self.nic.lower() or "fortpark_TLV" in self.nic.lower():
outerL4Type = "(outer) L4 type: L4_NONFRAG"
elif "niantic" in self.nic.lower() or "i350" in self.nic.lower():
outerL4Type = "(outer) L4 type: Unknown"
@@ -132,7 +132,7 @@ class TestUniPacket(TestCase):
}
# delete the unsupported packet based on nic type
- if "fortville" in self.nic.lower():
+ if "fortville" in self.nic.lower() or "fortpark_TLV" in self.nic.lower():
pktType.pop("MAC_IPihl_PKT")
pktType.pop("MAC_IPihl_SCTP_PKT")
elif "niantic" in self.nic.lower() or "i350" in self.nic.lower():
@@ -145,7 +145,7 @@ class TestUniPacket(TestCase):
"""
checked that whether IPv6 and L4 packet can be normally detected.
"""
- if "fortville" in self.nic.lower():
+ if "fortville" in self.nic.lower() or "fortpark_TLV" in self.nic.lower():
outerL4Type = "(outer) L4 type: L4_NONFRAG"
outerL3Type = "(outer) L3 type: IPV6_EXT_UNKNOWN"
elif "niantic" in self.nic.lower() or "i350" in self.nic.lower():
@@ -161,7 +161,7 @@ class TestUniPacket(TestCase):
}
# delete the unsupported packet based on nic type
- if "fortville" in self.nic.lower():
+ if "fortville" in self.nic.lower() or "fortpark_TLV" in self.nic.lower():
pktType.pop("MAC_IPv6FRAG_PKT_N")
elif "niantic" in self.nic.lower() or "i350" in self.nic.lower():
pktType.pop("MAC_IPv6FRAG_PKT_F")
@@ -173,7 +173,7 @@ class TestUniPacket(TestCase):
checked that whether IP in IPv4 tunnel packet can be normally
detected by Fortville.
"""
- self.verify("fortville" in self.nic,
+ self.verify(("fortville" in self.nic or "fortpark_TLV" in self.nic),
"IP in IPv4 tunnel packet type detect only support by Fortville")
pktType = {
@@ -216,7 +216,7 @@ class TestUniPacket(TestCase):
checked that whether IP in IPv6 tunnel packet can be normally
detected by Fortville.
"""
- self.verify("fortville" in self.nic,
+ self.verify(("fortville" in self.nic or "fortpark_TLV" in self.nic),
"IP in IPv6 tunnel packet type detect only support by Fortville")
pktType = {
@@ -240,7 +240,7 @@ class TestUniPacket(TestCase):
checked that whether NVGRE tunnel packet can be normally detected
by Fortville.
"""
- self.verify("fortville" in self.nic,
+ self.verify(("fortville" in self.nic or "fortpark_TLV" in self.nic),
"NVGRE tunnel packet type detect only support by Fortville")
pktType = {
@@ -267,7 +267,7 @@ class TestUniPacket(TestCase):
checked that whether NVGRE in IPv6 tunnel packet can be normally
detected by Fortville.
"""
- self.verify("fortville" in self.nic,
+ self.verify(("fortville" in self.nic or "fortpark_TLV" in self.nic),
"NVGRE in IPv6 detect only support by Fortville")
pkt_types = {
@@ -304,7 +304,7 @@ class TestUniPacket(TestCase):
"""
checked that whether GRE tunnel packet can be normally detected by Fortville.
"""
- self.verify("fortville" in self.nic,
+ self.verify(("fortville" in self.nic or "fortpark_TLV" in self.nic),
"GRE tunnel packet type detect only support by Fortville")
pktType = {
@@ -323,7 +323,7 @@ class TestUniPacket(TestCase):
checked that whether Vxlan tunnel packet can be normally detected by
Fortville.
"""
- self.verify("fortville" in self.nic,
+ self.verify(("fortville" in self.nic or "fortpark_TLV" in self.nic),
"Vxlan tunnel packet type detect only support by Fortville")
self.dut.send_expect("rx_vxlan_port add 4789 0", "testpmd>", 10)
diff --git a/tests/TestSuite_vf_vlan.py b/tests/TestSuite_vf_vlan.py
index 7d1ec73..e32e5bd 100644
--- a/tests/TestSuite_vf_vlan.py
+++ b/tests/TestSuite_vf_vlan.py
@@ -367,7 +367,7 @@ class TestVfVlan(TestCase):
"received 1 packets" in out, "Not received vlan packet as expected!!!")
nic_type = self.vm_dut_0.ports_info[0]['type']
nic_name = get_nic_name(nic_type)
- if nic_name in ['fvl10g_vf']:
+ if nic_name in ['fvl10g_vf', 'fortpark_TLV_vf']:
self.verify("VLAN tci=%s" %
vlan_hex in out, "Failed to disable strip vlan!!!")
else:
diff --git a/tests/TestSuite_vlan.py b/tests/TestSuite_vlan.py
index ba3741e..bf20455 100644
--- a/tests/TestSuite_vlan.py
+++ b/tests/TestSuite_vlan.py
@@ -75,7 +75,7 @@ class TestVlan(TestCase):
self.dut.send_expect("set verbose 1", "testpmd> ")
out = self.dut.send_expect("set fwd mac", "testpmd> ")
- if self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single"]:
+ if self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV"]:
self.dut.send_expect("vlan set filter on %s" % dutRxPortId, "testpmd> ")
self.dut.send_expect("vlan set strip off %s" % dutRxPortId, "testpmd> ")
diff --git a/tests/TestSuite_vxlan.py b/tests/TestSuite_vxlan.py
index 4438bb0..e9104f2 100644
--- a/tests/TestSuite_vxlan.py
+++ b/tests/TestSuite_vxlan.py
@@ -258,7 +258,7 @@ class TestVxlan(TestCase, IxiaPacketGenerator):
"""
# this feature only enable in FVL now
self.verify(self.nic in ["fortville_eagle", "fortville_spirit",
- "fortville_spirit_single", "sagepond"],
+ "fortville_spirit_single", "sagepond","fortpark_TLV"],
"Vxlan Only supported by Fortville and Sageville")
# Based on h/w type, choose how many ports to use
ports = self.dut.get_ports()
diff --git a/tests/TestSuite_vxlan_sample.py b/tests/TestSuite_vxlan_sample.py
index 13e63c5..189bc38 100644
--- a/tests/TestSuite_vxlan_sample.py
+++ b/tests/TestSuite_vxlan_sample.py
@@ -87,7 +87,7 @@ class TestVxlanSample(TestCase):
# this feature only enable in FVL now
self.verify(self.nic in ["fortville_eagle", "fortville_spirit",
- "fortville_spirit_single"],
+ "fortville_spirit_single", "fortpark_TLV"],
"Vxlan Only supported by Fortville")
# Based on h/w type, choose how many ports to use
self.dut_ports = self.dut.get_ports()
--
2.5.0
^ permalink raw reply [flat|nested] 7+ messages in thread
* [dts] [PATCH] *** tests: add fortville rss granularity script ***
[not found] <yes>
2016-06-15 8:12 ` [dts] [PATCH] Support fortpark_TLV pengyuan
2016-06-15 8:46 ` [dts] [PATCH] Support NIC type fortpark_TLV pengyuan
@ 2016-06-16 1:19 ` pengyuan
2016-06-16 1:19 ` [dts] [PATCH] tests: add fortville rss granularity script pengyuan
2 siblings, 1 reply; 7+ messages in thread
From: pengyuan @ 2016-06-16 1:19 UTC (permalink / raw)
To: dts; +Cc: pengyuan
*** fortville rss granularity ***
1. 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. 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
pengyuan (1):
tests: add fortville rss granularity script
.../fortville_rss_granularity_config_test_plan.rst | 340 +++++++++++
.../TestSuite_fortville_rss_granularity_config.py | 634 +++++++++++++++++++++
2 files changed, 974 insertions(+)
create mode 100644 test_plans/fortville_rss_granularity_config_test_plan.rst
create mode 100644 tests/TestSuite_fortville_rss_granularity_config.py
--
2.5.0
^ permalink raw reply [flat|nested] 7+ messages in thread
* [dts] [PATCH] tests: add fortville rss granularity script
2016-06-16 1:19 ` [dts] [PATCH] *** tests: add fortville rss granularity script *** pengyuan
@ 2016-06-16 1:19 ` pengyuan
2016-06-22 8:25 ` Pei, Yulong
0 siblings, 1 reply; 7+ messages in thread
From: pengyuan @ 2016-06-16 1:19 UTC (permalink / raw)
To: dts; +Cc: pengyuan
Signed-off-by: pengyuan <yuan.peng@intel.com>
diff --git a/test_plans/fortville_rss_granularity_config_test_plan.rst b/test_plans/fortville_rss_granularity_config_test_plan.rst
new file mode 100644
index 0000000..28d3b49
--- /dev/null
+++ b/test_plans/fortville_rss_granularity_config_test_plan.rst
@@ -0,0 +1,340 @@
+.. Copyright (c) <2015>, 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 - support granularity configuration of RSS, support 32-bit GRE keys
+==================================================================
+
+Description
+===========
+This document provides test plan for testing the function of Fortville:
+
+1. 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. 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
+
+
+Prerequisites
+-------------
+
+1. Hardware:
+ 1x Fortville_eagle NIC (4x 10G)
+ 1x Fortville_spirit NIC (2x 40G)
+ 2x Fortville_spirit_single NIC (1x 40G)
+
+2. software:
+ dpdk: http://dpdk.org/git/dpdk
+ scapy: http://www.secdev.org/projects/scapy/
+
+
+Test Case 1: test with flow type ipv4-tcp
+===============================
+
+1. config testpmd on DUT
+
+1). set up testpmd with fortville NICs::
+ ./testpmd -c 0x1ffff -n 4 -- -i --coremask=0x1fffe --portmask=0x3 --rxq=16 --txq=16 --txqflags=0
+
+2). Reta Configuration(optional, if not set, will use default)::
+ testpmd> port config 0 rss reta (hash_index,queue_id)
+
+3). PMD fwd only receive the packets::
+ testpmd> set fwd rxonly
+
+4). rss recived package type configuration::
+ testpmd> port config all rss tcp
+
+5). set hash function::
+ testpmd>set_hash_global_config 0 toeplitz ipv4-tcp enable
+
+6). verbose configuration::
+ testpmd> set verbose 8
+
+7). start packet receive::
+ testpmd> start
+
+2. using scapy to send packets with ipv4-tcp on tester,
+
+ sendp([Ether(dst="%s")/IP(src="192.168.0.%d", dst="192.168.0.%d")/TCP(sport=1024,dport=1025)], iface="%s")
+
+then got hash value and queue value that output from the testpmd on DUT.
+
+3. set hash input set to "none" by testpmd on dut,
+
+testpmd> set_hash_input_set 0 ipv4-tcp none select
+
+send packet as step 2, got hash value and queue value that output from the testpmd on DUT, the values shoud be
+different from the values in step 2.
+
+4. set hash input set by testpmd on dut, enable src-ipv4 & dst-ipv4,
+
+testpmd> set_hash_input_set 0 ipv4-tcp src-ipv4 add
+testpmd> set_hash_input_set 0 ipv4-tcp dst-ipv4 add
+
+send packet as step 2, got hash value and queue value that output from the testpmd on DUT, the values shoud be
+different from the values in step 2.
+
+5. set hash input set by testpmd on dut, enable src-ipv4, dst-ipv4, tcp-src-port, tcp-dst-port
+
+testpmd> set_hash_input_set 0 ipv4-tcp tcp-src-port add
+testpmd> set_hash_input_set 0 ipv4-tcp tcp-dst-port add
+
+send packet as step 2, got hash value and queue value that output from the testpmd on DUT, the values shoud be
+should be different with the values from step 3 & step 4, should be same as step 2.
+
+6. set hash input set by testpmd on dut, enable tcp-src-port, tcp-dst-port
+
+testpmd> set_hash_input_set 0 ipv4-tcp none select
+testpmd> set_hash_input_set 0 ipv4-tcp tcp-src-port add
+testpmd> set_hash_input_set 0 ipv4-tcp tcp-dst-port add
+
+send packet as step 2, got hash value and queue value that output from the testpmd on DUT, the values shoud be
+should be different with the values from step2 & step 3 & step 4 & step 5.
+
+So it can be approved that with flow type ipv4-tcp, rss hash can be calculated by only included IPv4 fields
+or only included TCP fields or both IPv4+TCP fields.
+
+
+Test Case 2: test with flow type ipv4-udp
+=========================================
+
+1. config testpmd on DUT
+
+1). set up testpmd with fortville NICs::
+ ./testpmd -c 0x1ffff -n 4 -- -i --coremask=0x1fffe --portmask=0x3 --rxq=16 --txq=16 --txqflags=0
+
+2). Reta Configuration(optional, if not set, will use default)::
+ testpmd> port config 0 rss reta (hash_index,queue_id)
+
+3). PMD fwd only receive the packets::
+ testpmd> set fwd rxonly
+
+4). rss recived package type configuration::
+ testpmd> port config all rss udp
+
+5). set hash function::
+ testpmd>set_hash_global_config 0 toeplitz ipv4-udp enable
+
+6). verbose configuration::
+ testpmd> set verbose 8
+
+7). start packet receive::
+ testpmd> start
+
+2. using scapy to send packets with ipv4-udp on tester::
+
+ sendp([Ether(dst="%s")/IP(src="192.168.0.%d", dst="192.168.0.%d")/UDP(sport=1024,dport=1025)], iface="%s"))
+
+then got hash value and queue value that output from the testpmd on DUT.
+
+3. set hash input set to "none" by testpmd on dut,
+
+testpmd> set_hash_input_set 0 ipv4-udp none select
+
+send packet as step 2, got hash value and queue value that output from the testpmd on DUT, the values shoud be
+different from the values in step 2.
+
+4. set hash input set by testpmd on dut, enable src-ipv4 and dst-ipv4,
+
+testpmd> set_hash_input_set 0 ipv4-udp src-ipv4 add
+testpmd> set_hash_input_set 0 ipv4-udp dst-ipv4 add
+
+send packet as step 2, got hash value and queue value that output from the testpmd on DUT, the values shoud be
+different from the values in step 2 & step 3.
+
+5. set hash input set by testpmd on dut, enable src-ipv4, dst-ipv4, udp-src-port, udp-dst-port
+
+testpmd> set_hash_input_set 0 ipv4-udp udp-src-port add
+testpmd> set_hash_input_set 0 ipv4-udp udp-dst-port add
+
+send packet as step 2, got hash value and queue value that output from the testpmd on DUT, the values shoud be
+should be different with the values from step 3 & step 4, should be same as step 2.
+
+6. set hash input set by testpmd on dut, enable udp-src-port, udp-dst-port
+
+testpmd> set_hash_input_set 0 ipv4-udp none select
+testpmd> set_hash_input_set 0 ipv4-udp udp-src-port add
+testpmd> set_hash_input_set 0 ipv4-udp udp-dst-port add
+
+send packet as step 2, got hash value and queue value that output from the testpmd on DUT, the values shoud be
+should be different with the values from step2 & step 3 & step 4 & step 5.
+
+So it can be approved that with flow type ipv4-udp, rss hash can be calculated by only included IPv4 fields
+or only included UDP fields or both IPv4+UDP fields.
+
+Test Case 3: test with flow type ipv6-tcp
+=========================================
+
+test mothed is same as Test Case 1, but it need change all ipv4 to ipv6,
+and using scapy to send packets with ipv6-tcp on tester,
+
+sendp([Ether(dst="%s")/IPv6(src="3ffe:2501:200:1fff::%d", dst="3ffe:2501:200:3::%d")/TCP(sport=1024,dport=1025)], iface="%s")
+
+and the test result should be same as Test Case 1.
+
+
+Test Case 4: test with flow type ipv6-udp
+=========================================
+
+test mothed is same as Test Case 2, but it need change all ipv4 to ipv6,
+and using scapy to send packets with ipv6-udp on tester,
+
+sendp([Ether(dst="%s")/IPv6(src="3ffe:2501:200:1fff::%d", dst="3ffe:2501:200:3::%d")/UDP(sport=1024,dport=1025)], iface="%s")
+
+and the test result should be same as Test Case 2.
+
+Test Case 5: test dual vlan(QinQ)
+=====================================================
+1. config testpmd on DUT
+
+1). set up testpmd with fortville NICs::
+ ./testpmd -c 0x1ffff -n 4 -- -i --coremask=0x1fffe --portmask=0x3 --rxq=16 --txq=16 --txqflags=0
+
+2). set qinq on::
+ testpmd> vlan set qinq on <port_id>
+
+3). Reta Configuration(optional, if not set, will use default)::
+ testpmd> port config 0 rss reta (hash_index,queue_id)
+
+4). PMD fwd only receive the packets::
+ testpmd> set fwd rxonly
+
+5). verbose configuration::
+ testpmd> set verbose 8
+
+6). start packet receive::
+ testpmd> start
+
+7). rss recived package type configuration::
+ testpmd> port config all rss ether
+
+2. using scapy to send packets with dual vlan (QinQ) on tester::
+
+ sendp([Ether(dst="%s")/Dot1Q(id=0x8100,vlan=%s)/Dot1Q(id=0x8100,vlan=%s)], iface="%s")
+
+then got hash value and queue value that output from the testpmd on DUT.
+
+3. set hash input set to "none" by testpmd on dut::
+
+testpmd> set_hash_input_set 0 l2_payload none select
+
+send packet as step 2, got hash value and queue value that output from the testpmd on DUT, the value shoud be
+same with the values in step 2.
+
+4. set hash input set by testpmd on dut, enable ovlan field::
+
+testpmd> set_hash_input_set 0 l2_payload ovlan add
+
+send packet as step 2, got hash value and queue value that output from the testpmd on DUT, the value shoud be
+different with the values in step 2.
+
+5. set hash input set by testpmd on dut, enable ovlan, ivlan field::
+
+testpmd> set_hash_input_set 0 l2_payload ivlan add
+
+send packet as step 2, got hash value and queue value that output from the testpmd on DUT, the value shoud be
+different with the values in step 2.
+
+Test Case 6: 32-bit GRE keys and 24-bit GRE keys test
+=====================================================
+
+1. config testpmd on DUT
+
+1). set up testpmd with fortville NICs::
+ ./testpmd -c 0x1ffff -n 4 -- -i --coremask=0x1fffe --portmask=0x3 --rxq=16 --txq=16 --txqflags=0
+
+2). Reta Configuration(optional, if not set, will use default)::
+ testpmd> port config 0 rss reta (hash_index,queue_id)
+
+3). PMD fwd only receive the packets::
+ testpmd> set fwd rxonly
+
+4). rss recived package type configuration::
+ testpmd> port config all rss all
+
+5). set hash function::
+ testpmd>set_hash_global_config 0 toeplitz ipv4-other enable
+
+6). verbose configuration::
+ testpmd> set verbose 8
+
+7). start packet receive::
+ testpmd> start
+
+2. using scapy to send packets with GRE header on tester::
+
+ sendp([Ether(dst="%s")/IP(src="192.168.0.1",dst="192.168.0.2",proto=47)/GRE(key_present=1,proto=2048,key=67108863)/IP()], iface="%s")
+
+then got hash value and queue value that output from the testpmd on DUT.
+
+3. set hash input set to "none" by testpmd on dut,
+
+testpmd> set_hash_input_set 0 ipv4-other none select
+
+send packet as step 2, got hash value and queue value that output from the testpmd on DUT, the value shoud be
+different with the values in step 2.
+
+4. set hash input set by testpmd on dut, enable src-ipv4, dst-ipv4
+
+testpmd> set_hash_input_set 0 ipv4-other src-ipv4 add
+testpmd> set_hash_input_set 0 ipv4-other dst-ipv4 add
+
+send packet as step 2, got hash value and queue value that output from the testpmd on DUT, the value shoud be
+same with the values in step 2.
+
+4. set hash input set and gre-key-len=3 by testpmd on dut, enable gre-key
+
+testpmd> global_config 0 gre-key-len 3
+testpmd> set_hash_input_set 0 ipv4-other gre-key add
+
+send packet as step 2, got hash value and queue value that output from the testpmd on DUT, the values shoud be
+different with the values in step 2.
+
+5. set gre-key-len=4 by testpmd on dut, enable gre-key
+
+testpmd> global_config 0 gre-key-len 4
+
+send packet as step 2, got hash value and queue value that output from the testpmd on DUT, the values shoud be
+different with the values in step 4.
+
+So with gre-key-len=3 (24bit gre key) or gre-key-len=4 (32bit gre key), different rss hash value and queue value
+can be got, it can be proved that 32bit & 24bit gre key are supported by fortville.
diff --git a/tests/TestSuite_fortville_rss_granularity_config.py b/tests/TestSuite_fortville_rss_granularity_config.py
new file mode 100644
index 0000000..4982344
--- /dev/null
+++ b/tests/TestSuite_fortville_rss_granularity_config.py
@@ -0,0 +1,634 @@
+# 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 dts
+import dut
+
+testQueues = [16]
+reta_entries = []
+reta_lines = []
+reta_num = 128
+
+# 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", "redrockcanyou", "atwood", "boulderrapid", "fortpark_TLV"],
+ "NIC Unsupported: " + str(self.nic))
+ global reta_num
+ if self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV"]:
+ reta_num = 512
+ elif self.nic in ["niantic"]:
+ reta_num = 128
+ elif self.nic in ["redrockcanyou", "atwood", "boulderrapid"]:
+ reta_num = 128
+ else:
+ self.verify(False, "NIC Unsupported:%s" % str(self.nic))
+ ports = self.dut.get_ports(self.nic)
+ self.verify(len(ports) >= 1, "Not enough ports available")
+
+ def set_up(self):
+ """
+ Run before each test case.
+ """
+ pass
+ def send_packet(self, itf, tran_type):
+ """
+ Sends packets.
+ """
+ global reta_lines
+ global reta_num
+ self.tester.scapy_foreground()
+ self.dut.send_expect("start", "testpmd>")
+ mac = self.dut.get_mac_address(0)
+
+ # send packet with different source and dest ip
+ i = 0
+ if tran_type == "ipv4-other":
+ packet = r'sendp([Ether(dst="%s", src=get_if_hwaddr("%s"))/IP(src="192.168.0.%d", dst="192.168.0.%d", proto=47)/GRE(key_present=1,proto=2048,key=67108863)/IP()], iface="%s")' % (
+ mac, itf, i + 1, i + 2, 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="192.168.0.%d", dst="192.168.0.%d")/TCP(sport=1024,dport=1024)], iface="%s")' % (
+ mac, itf, i + 1, i + 2, 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="192.168.0.%d", dst="192.168.0.%d")/UDP(sport=1024,dport=1024)], iface="%s")' % (
+ mac, itf, i + 1, i + 2, itf)
+ self.tester.scapy_append(packet)
+ self.tester.scapy_execute()
+ time.sleep(.5)
+ elif tran_type == "l2_payload":
+ packet = r'sendp([Ether(dst="%s", src=get_if_hwaddr("%s"))/Dot1Q(id=0x8100,vlan=%s)/Dot1Q(id=0x8100,vlan=%s)], iface="%s")' % (
+ mac, itf, i + 1, i + 2, 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="3ffe:2501:200:1fff::%d", dst="3ffe:2501:200:3::%d")/TCP(sport=1024,dport=1024)], iface="%s")' % (
+ mac, itf, i + 1, i + 2, 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="3ffe:2501:200:1fff::%d", dst="3ffe:2501:200:3::%d")/UDP(sport=1024,dport=1024)], iface="%s")' % (
+ mac, itf, i + 1, i + 2, 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
+ global reta_num
+
+ #append the the hash value and queue id into table
+ dts.results_table_add_header(
+ ['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) % reta_num
+ dts.results_table_add_row(
+ [i, tmp_reta_line["RSS hash"], hash_index, tmp_reta_line["queue"]])
+ i = i + 1
+
+
+ def test_ipv4_tcp(self):
+ dutPorts = self.dut.get_ports(self.nic)
+ localPort = self.tester.get_local_port(dutPorts[0])
+ itf = self.tester.get_interface(localPort)
+ global reta_num
+ global reta_lines
+ flag = 1
+ self.dut.kill_all()
+
+ # test with different rss queues
+ for queue in testQueues:
+ self.dut.send_expect(
+ "./%s/app/testpmd -c fffff -n %d -- -i --coremask=0xffffe --portmask=0x3 --rxq=%d --txq=%d --txqflags=0" %
+ (self.target, self.dut.get_memory_channels(), queue, queue), "testpmd> ", 120)
+
+ self.dut.send_expect("set verbose 8", "testpmd> ")
+ self.dut.send_expect("set fwd rxonly", "testpmd> ")
+
+ self.dut.send_expect("port stop all", "testpmd> ")
+ self.dut.send_expect(
+ "set_hash_global_config 0 toeplitz ipv4-tcp enable", "testpmd> ")
+ self.dut.send_expect("port start all", "testpmd> ")
+ self.dut.send_expect(
+ "port config all rss tcp", "testpmd> ")
+ self.send_packet(itf, "ipv4-tcp")
+
+ #set hash input set to "none" by testpmd on dut
+ self.dut.send_expect("set_hash_input_set 0 ipv4-tcp none select", "testpmd> ")
+ self.send_packet(itf, "ipv4-tcp")
+
+ #set hash input set by testpmd on dut, enable src-ipv4 & dst-ipv4
+ self.dut.send_expect("set_hash_input_set 0 ipv4-tcp src-ipv4 add", "testpmd> ")
+ self.dut.send_expect("set_hash_input_set 0 ipv4-tcp dst-ipv4 add", "testpmd> ")
+ self.send_packet(itf, "ipv4-tcp")
+
+ #set hash input set by testpmd on dut, enable src-ipv4, dst-ipv4, tcp-src-port, tcp-dst-port
+ self.dut.send_expect("set_hash_input_set 0 ipv4-tcp tcp-src-port add", "testpmd> ")
+ self.dut.send_expect("set_hash_input_set 0 ipv4-tcp tcp-dst-port add", "testpmd> ")
+ self.send_packet(itf, "ipv4-tcp")
+
+ #set hash input set by testpmd on dut, enable tcp-src-port, tcp-dst-port
+ self.dut.send_expect("set_hash_input_set 0 ipv4-tcp none select", "testpmd> ")
+ self.dut.send_expect("set_hash_input_set 0 ipv4-tcp tcp-src-port add", "testpmd> ")
+ self.dut.send_expect("set_hash_input_set 0 ipv4-tcp tcp-dst-port add", "testpmd> ")
+ self.send_packet(itf, "ipv4-tcp")
+
+ self.dut.send_expect("quit", "# ", 30)
+ dts.results_table_print()
+ self.verify(len(dts.results_table_rows) > 1, "There is no data in the table, testcase failed!")
+
+
+ if ((dts.results_table_rows[1][1]==dts.results_table_rows[2][1])or(dts.results_table_rows[1][3]==dts.results_table_rows[2][3])):
+ flag = 0
+ self.verify(flag, "The two hash values are the same, rss_granularity_config failed!")
+ elif ((dts.results_table_rows[1][1]==dts.results_table_rows[3][1])or(dts.results_table_rows[1][3]==dts.results_table_rows[3][3])):
+ flag = 0
+ self.verify(flag, "The two hash values are the same, rss_granularity_config failed!")
+ elif ((dts.results_table_rows[2][1]==dts.results_table_rows[3][1])or(dts.results_table_rows[2][3]==dts.results_table_rows[3][3])):
+ flag = 0
+ self.verify(flag, "The two hash values are the same, rss_granularity_config failed!")
+ elif ((dts.results_table_rows[1][1]==dts.results_table_rows[5][1])or(dts.results_table_rows[1][3]==dts.results_table_rows[5][3])):
+ flag = 0
+ self.verify(flag, "The two hash values are the same, rss_granularity_config failed!")
+ elif ((dts.results_table_rows[2][1]==dts.results_table_rows[5][1])or(dts.results_table_rows[2][3]==dts.results_table_rows[5][3])):
+ flag = 0
+ self.verify(flag, "The two hash values are the same, rss_granularity_config failed!")
+ elif ((dts.results_table_rows[3][1]==dts.results_table_rows[5][1])or(dts.results_table_rows[3][3]==dts.results_table_rows[5][3])):
+ flag = 0
+ self.verify(flag, "The two hash values are the same, rss_granularity_config failed!")
+ elif ((dts.results_table_rows[1][1]!=dts.results_table_rows[4][1])or(dts.results_table_rows[1][3]!=dts.results_table_rows[4][3])):
+ flag = 0
+ self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+
+ reta_lines = []
+
+ def test_ipv4_udp(self):
+ dutPorts = self.dut.get_ports(self.nic)
+ localPort = self.tester.get_local_port(dutPorts[0])
+ itf = self.tester.get_interface(localPort)
+ global reta_num
+ global reta_lines
+ flag = 1
+ self.dut.kill_all()
+
+ # test with different rss queues
+ for queue in testQueues:
+ self.dut.send_expect(
+ "./%s/app/testpmd -c fffff -n %d -- -i --coremask=0xffffe --portmask=0x3 --rxq=%d --txq=%d --txqflags=0" %
+ (self.target, self.dut.get_memory_channels(), queue, queue), "testpmd> ", 120)
+
+ self.dut.send_expect("set verbose 8", "testpmd> ")
+ self.dut.send_expect("set fwd rxonly", "testpmd> ")
+
+ self.dut.send_expect("port stop all", "testpmd> ")
+ self.dut.send_expect(
+ "set_hash_global_config 0 toeplitz ipv4-udp enable", "testpmd> ")
+ self.dut.send_expect("port start all", "testpmd> ")
+ self.dut.send_expect(
+ "port config all rss udp", "testpmd> ")
+ self.send_packet(itf, "ipv4-udp")
+
+ #set hash input set to "none" by testpmd on dut
+ self.dut.send_expect("set_hash_input_set 0 ipv4-udp none select", "testpmd> ")
+ self.send_packet(itf, "ipv4-udp")
+
+ #set hash input set by testpmd on dut, enable src-ipv4 & dst-ipv4
+ self.dut.send_expect("set_hash_input_set 0 ipv4-udp src-ipv4 add", "testpmd> ")
+ self.dut.send_expect("set_hash_input_set 0 ipv4-udp dst-ipv4 add", "testpmd> ")
+ self.send_packet(itf, "ipv4-udp")
+
+ #set hash input set by testpmd on dut, enable src-ipv4, dst-ipv4, udp-src-port, udp-dst-port
+ self.dut.send_expect("set_hash_input_set 0 ipv4-udp udp-src-port add", "testpmd> ")
+ self.dut.send_expect("set_hash_input_set 0 ipv4-udp udp-dst-port add", "testpmd> ")
+ self.send_packet(itf, "ipv4-udp")
+
+ #set hash input set by testpmd on dut, enable udp-src-port, udp-dst-port
+ self.dut.send_expect("set_hash_input_set 0 ipv4-udp none select", "testpmd> ")
+ self.dut.send_expect("set_hash_input_set 0 ipv4-udp udp-src-port add", "testpmd> ")
+ self.dut.send_expect("set_hash_input_set 0 ipv4-udp udp-dst-port add", "testpmd> ")
+ self.send_packet(itf, "ipv4-udp")
+
+ self.dut.send_expect("quit", "# ", 30)
+ dts.results_table_print()
+ self.verify(len(dts.results_table_rows) > 1, "There is no data in the table, testcase failed!")
+
+ #check the results
+ if ((dts.results_table_rows[1][1]==dts.results_table_rows[2][1])or(dts.results_table_rows[1][3]==dts.results_table_rows[2][3])):
+ flag = 0
+ self.verify(flag, "The two hash values are the same, rss_granularity_config failed!")
+ elif ((dts.results_table_rows[1][1]==dts.results_table_rows[3][1])or(dts.results_table_rows[1][3]==dts.results_table_rows[3][3])):
+ flag = 0
+ self.verify(flag, "The two hash values are the same, rss_granularity_config failed!")
+ elif ((dts.results_table_rows[2][1]==dts.results_table_rows[3][1])or(dts.results_table_rows[2][3]==dts.results_table_rows[3][3])):
+ flag = 0
+ self.verify(flag, "The two hash values are the same, rss_granularity_config failed!")
+ elif ((dts.results_table_rows[1][1]==dts.results_table_rows[5][1])or(dts.results_table_rows[1][3]==dts.results_table_rows[5][3])):
+ flag = 0
+ self.verify(flag, "The two hash values are the same, rss_granularity_config failed!")
+ elif ((dts.results_table_rows[2][1]==dts.results_table_rows[5][1])or(dts.results_table_rows[2][3]==dts.results_table_rows[5][3])):
+ flag = 0
+ self.verify(flag, "The two hash values are the same, rss_granularity_config failed!")
+ elif ((dts.results_table_rows[3][1]==dts.results_table_rows[5][1])or(dts.results_table_rows[3][3]==dts.results_table_rows[5][3])):
+ flag = 0
+ self.verify(flag, "The two hash values are the same, rss_granularity_config failed!")
+ elif ((dts.results_table_rows[1][1]!=dts.results_table_rows[4][1])or(dts.results_table_rows[1][3]!=dts.results_table_rows[4][3])):
+ flag = 0
+ self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+
+ reta_lines = []
+
+ def test_ipv6_tcp(self):
+ dutPorts = self.dut.get_ports(self.nic)
+ localPort = self.tester.get_local_port(dutPorts[0])
+ itf = self.tester.get_interface(localPort)
+ global reta_num
+ global reta_lines
+ flag = 1
+ self.dut.kill_all()
+
+ # test with different rss queues
+ for queue in testQueues:
+ self.dut.send_expect(
+ "./%s/app/testpmd -c fffff -n %d -- -i --coremask=0xffffe --portmask=0x3 --rxq=%d --txq=%d --txqflags=0" %
+ (self.target, self.dut.get_memory_channels(), queue, queue), "testpmd> ", 120)
+
+ self.dut.send_expect("set verbose 8", "testpmd> ")
+ self.dut.send_expect("set fwd rxonly", "testpmd> ")
+
+ self.dut.send_expect("port stop all", "testpmd> ")
+ self.dut.send_expect(
+ "set_hash_global_config 0 toeplitz ipv6-tcp enable", "testpmd> ")
+ self.dut.send_expect("port start all", "testpmd> ")
+ self.dut.send_expect(
+ "port config all rss tcp", "testpmd> ")
+ self.send_packet(itf, "ipv6-tcp")
+
+ #set hash input set to "none" by testpmd on dut
+ self.dut.send_expect("set_hash_input_set 0 ipv6-tcp none select", "testpmd> ")
+ self.send_packet(itf, "ipv6-tcp")
+
+ #set hash input set by testpmd on dut, enable src-ipv6 & dst-ipv6
+ self.dut.send_expect("set_hash_input_set 0 ipv6-tcp src-ipv6 add", "testpmd> ")
+ self.dut.send_expect("set_hash_input_set 0 ipv6-tcp dst-ipv6 add", "testpmd> ")
+ self.send_packet(itf, "ipv6-tcp")
+
+ #set hash input set by testpmd on dut, enable src-ipv6, dst-ipv6, tcp-src-port, tcp-dst-port
+ self.dut.send_expect("set_hash_input_set 0 ipv6-tcp tcp-src-port add", "testpmd> ")
+ self.dut.send_expect("set_hash_input_set 0 ipv6-tcp tcp-dst-port add", "testpmd> ")
+ self.send_packet(itf, "ipv6-tcp")
+
+ #set hash input set by testpmd on dut, enable tcp-src-port, tcp-dst-port
+ self.dut.send_expect("set_hash_input_set 0 ipv6-tcp none select", "testpmd> ")
+ self.dut.send_expect("set_hash_input_set 0 ipv6-tcp tcp-src-port add", "testpmd> ")
+ self.dut.send_expect("set_hash_input_set 0 ipv6-tcp tcp-dst-port add", "testpmd> ")
+ self.send_packet(itf, "ipv6-tcp")
+
+ self.dut.send_expect("quit", "# ", 30)
+ dts.results_table_print()
+ self.verify(len(dts.results_table_rows) > 1, "There is no data in the table, testcase failed!")
+
+ #check the results
+ if ((dts.results_table_rows[1][1]==dts.results_table_rows[2][1])or(dts.results_table_rows[1][3]==dts.results_table_rows[2][3])):
+ flag = 0
+ self.verify(flag, "The two hash values are the same, rss_granularity_config failed!")
+ elif ((dts.results_table_rows[1][1]==dts.results_table_rows[3][1])or(dts.results_table_rows[1][3]==dts.results_table_rows[3][3])):
+ flag = 0
+ self.verify(flag, "The two hash values are the same, rss_granularity_config failed!")
+ elif ((dts.results_table_rows[2][1]==dts.results_table_rows[3][1])or(dts.results_table_rows[2][3]==dts.results_table_rows[3][3])):
+ flag = 0
+ self.verify(flag, "The two hash values are the same, rss_granularity_config failed!")
+ elif ((dts.results_table_rows[1][1]==dts.results_table_rows[5][1])or(dts.results_table_rows[1][3]==dts.results_table_rows[5][3])):
+ flag = 0
+ self.verify(flag, "The two hash values are the same, rss_granularity_config failed!")
+ elif ((dts.results_table_rows[2][1]==dts.results_table_rows[5][1])or(dts.results_table_rows[2][3]==dts.results_table_rows[5][3])):
+ flag = 0
+ self.verify(flag, "The two hash values are the same, rss_granularity_config failed!")
+ elif ((dts.results_table_rows[3][1]==dts.results_table_rows[5][1])or(dts.results_table_rows[3][3]==dts.results_table_rows[5][3])):
+ flag = 0
+ self.verify(flag, "The two hash values are the same, rss_granularity_config failed!")
+ elif ((dts.results_table_rows[1][1]!=dts.results_table_rows[4][1])or(dts.results_table_rows[1][3]!=dts.results_table_rows[4][3])):
+ flag = 0
+ self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+
+ reta_lines = []
+
+ def test_ipv6_udp(self):
+ dutPorts = self.dut.get_ports(self.nic)
+ localPort = self.tester.get_local_port(dutPorts[0])
+ itf = self.tester.get_interface(localPort)
+ global reta_num
+ global reta_lines
+ flag = 1
+ self.dut.kill_all()
+
+ # test with different rss queues
+ for queue in testQueues:
+ self.dut.send_expect(
+ "./%s/app/testpmd -c fffff -n %d -- -i --coremask=0xffffe --portmask=0x3 --rxq=%d --txq=%d --txqflags=0" %
+ (self.target, self.dut.get_memory_channels(), queue, queue), "testpmd> ", 120)
+
+ self.dut.send_expect("set verbose 8", "testpmd> ")
+ self.dut.send_expect("set fwd rxonly", "testpmd> ")
+
+ self.dut.send_expect("port stop all", "testpmd> ")
+ self.dut.send_expect(
+ "set_hash_global_config 0 toeplitz ipv6-udp enable", "testpmd> ")
+ self.dut.send_expect("port start all", "testpmd> ")
+ self.dut.send_expect(
+ "port config all rss udp", "testpmd> ")
+ self.send_packet(itf, "ipv6-udp")
+
+ #set hash input set to "none" by testpmd on dut
+ self.dut.send_expect("set_hash_input_set 0 ipv6-udp none select", "testpmd> ")
+ self.send_packet(itf, "ipv6-udp")
+
+ #set hash input set by testpmd on dut, enable src-ipv6 & dst-ipv6
+ self.dut.send_expect("set_hash_input_set 0 ipv6-udp src-ipv6 add", "testpmd> ")
+ self.dut.send_expect("set_hash_input_set 0 ipv6-udp dst-ipv6 add", "testpmd> ")
+ self.send_packet(itf, "ipv6-udp")
+
+ #set hash input set by testpmd on dut, enable src-ipv6, dst-ipv6, udp-src-port, udp-dst-port
+ self.dut.send_expect("set_hash_input_set 0 ipv6-udp udp-src-port add", "testpmd> ")
+ self.dut.send_expect("set_hash_input_set 0 ipv6-udp udp-dst-port add", "testpmd> ")
+ self.send_packet(itf, "ipv6-udp")
+
+ #set hash input set by testpmd on dut, enable udp-src-port, udp-dst-port
+ self.dut.send_expect("set_hash_input_set 0 ipv6-udp none select", "testpmd> ")
+ self.dut.send_expect("set_hash_input_set 0 ipv6-udp udp-src-port add", "testpmd> ")
+ self.dut.send_expect("set_hash_input_set 0 ipv6-udp udp-dst-port add", "testpmd> ")
+ self.send_packet(itf, "ipv6-udp")
+
+ self.dut.send_expect("quit", "# ", 30)
+ dts.results_table_print()
+ self.verify(len(dts.results_table_rows) > 1, "There is no data in the table, testcase failed!")
+
+ #check the results
+ if ((dts.results_table_rows[1][1]==dts.results_table_rows[2][1])or(dts.results_table_rows[1][3]==dts.results_table_rows[2][3])):
+ flag = 0
+ self.verify(flag, "The two hash values are the same, rss_granularity_config failed!")
+ elif ((dts.results_table_rows[1][1]==dts.results_table_rows[3][1])or(dts.results_table_rows[1][3]==dts.results_table_rows[3][3])):
+ flag = 0
+ self.verify(flag, "The two hash values are the same, rss_granularity_config failed!")
+ elif ((dts.results_table_rows[2][1]==dts.results_table_rows[3][1])or(dts.results_table_rows[2][3]==dts.results_table_rows[3][3])):
+ flag = 0
+ self.verify(flag, "The two hash values are the same, rss_granularity_config failed!")
+ elif ((dts.results_table_rows[1][1]==dts.results_table_rows[5][1])or(dts.results_table_rows[1][3]==dts.results_table_rows[5][3])):
+ flag = 0
+ self.verify(flag, "The two hash values are the same, rss_granularity_config failed!")
+ elif ((dts.results_table_rows[2][1]==dts.results_table_rows[5][1])or(dts.results_table_rows[2][3]==dts.results_table_rows[5][3])):
+ flag = 0
+ self.verify(flag, "The two hash values are the same, rss_granularity_config failed!")
+ elif ((dts.results_table_rows[3][1]==dts.results_table_rows[5][1])or(dts.results_table_rows[3][3]==dts.results_table_rows[5][3])):
+ flag = 0
+ self.verify(flag, "The two hash values are the same, rss_granularity_config failed!")
+ elif ((dts.results_table_rows[1][1]!=dts.results_table_rows[4][1])or(dts.results_table_rows[1][3]!=dts.results_table_rows[4][3])):
+ flag = 0
+ self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+
+ reta_lines = []
+
+ def test_dual_vlan(self):
+ dutPorts = self.dut.get_ports(self.nic)
+ localPort = self.tester.get_local_port(dutPorts[0])
+ itf = self.tester.get_interface(localPort)
+ global reta_num
+ global reta_lines
+ flag = 1
+ self.dut.kill_all()
+
+ # test with different rss queues
+ for queue in testQueues:
+ self.dut.send_expect(
+ "./%s/app/testpmd -c fffff -n %d -- -i --coremask=0xffffe --portmask=0x3 --rxq=%d --txq=%d --txqflags=0" %
+ (self.target, self.dut.get_memory_channels(), queue, queue), "testpmd> ", 120)
+
+ self.dut.send_expect("set verbose 8", "testpmd> ")
+ self.dut.send_expect("set fwd rxonly", "testpmd> ")
+
+ self.dut.send_expect("port stop all", "testpmd> ")
+ self.dut.send_expect("vlan set qinq on 0", "testpmd> ")
+ self.dut.send_expect(
+ "set_hash_global_config 0 toeplitz l2_payload enable", "testpmd> ")
+ self.dut.send_expect("port start all", "testpmd> ")
+ self.dut.send_expect(
+ "port config all rss ether", "testpmd> ")
+ self.send_packet(itf, "l2_payload")
+
+ #set hash input set to "none" by testpmd on dut
+ self.dut.send_expect("set_hash_input_set 0 l2_payload none select", "testpmd> ")
+ self.send_packet(itf, "l2_payload")
+
+ #set hash input set by testpmd on dut, enable ovlan
+ self.dut.send_expect("set_hash_input_set 0 l2_payload ovlan add", "testpmd> ")
+ self.send_packet(itf, "l2_payload")
+
+ #set hash input set by testpmd on dut, enable ovlan & ivlan
+ self.dut.send_expect("set_hash_input_set 0 l2_payload ivlan add", "testpmd> ")
+ self.send_packet(itf, "l2_payload")
+
+
+ self.dut.send_expect("quit", "# ", 30)
+ dts.results_table_print()
+ self.verify(len(dts.results_table_rows) > 1, "There is no data in the table, testcase failed!")
+
+ #check the results
+ if ((dts.results_table_rows[1][1]!=dts.results_table_rows[2][1])or(dts.results_table_rows[1][3]!=dts.results_table_rows[2][3])):
+ flag = 0
+ self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+ elif ((dts.results_table_rows[1][1]==dts.results_table_rows[3][1])or(dts.results_table_rows[1][3]==dts.results_table_rows[3][3])):
+ flag = 0
+ self.verify(flag, "The two hash values are the same, rss_granularity_config failed!")
+ elif ((dts.results_table_rows[1][1]==dts.results_table_rows[4][1])or(dts.results_table_rows[1][3]==dts.results_table_rows[4][3])):
+ flag = 0
+ self.verify(flag, "The two hash values are the same, rss_granularity_config failed!")
+ elif ((dts.results_table_rows[3][1]==dts.results_table_rows[4][1])or(dts.results_table_rows[3][3]==dts.results_table_rows[4][3])):
+ flag = 0
+ self.verify(flag, "The two hash values are the same, rss_granularity_config failed!")
+
+ reta_lines = []
+
+ def test_GRE_keys(self):
+ dutPorts = self.dut.get_ports(self.nic)
+ localPort = self.tester.get_local_port(dutPorts[0])
+ itf = self.tester.get_interface(localPort)
+ global reta_num
+ global reta_lines
+ flag = 1
+ self.dut.kill_all()
+
+ # test with different rss queues
+ for queue in testQueues:
+ self.dut.send_expect(
+ "./%s/app/testpmd -c fffff -n %d -- -i --coremask=0xffffe --portmask=0x3 --rxq=%d --txq=%d --txqflags=0" %
+ (self.target, self.dut.get_memory_channels(), queue, queue), "testpmd> ", 120)
+
+ self.dut.send_expect("set verbose 8", "testpmd> ")
+ self.dut.send_expect("set fwd rxonly", "testpmd> ")
+
+ self.dut.send_expect("port stop all", "testpmd> ")
+ self.dut.send_expect(
+ "set_hash_global_config 0 toeplitz ipv4-other enable", "testpmd> ")
+ self.dut.send_expect("port start all", "testpmd> ")
+ self.dut.send_expect(
+ "port config all rss all", "testpmd> ")
+ self.send_packet(itf, "ipv4-other")
+
+ #set hash input set to "none" by testpmd on dut
+ self.dut.send_expect("set_hash_input_set 0 ipv4-other none select", "testpmd> ")
+ self.send_packet(itf, "ipv4-other")
+
+ #set hash input set by testpmd on dut, enable src-ipv4 & dst-ipv4
+ self.dut.send_expect("set_hash_input_set 0 ipv4-other src-ipv4 add", "testpmd> ")
+ self.dut.send_expect("set_hash_input_set 0 ipv4-other dst-ipv4 add", "testpmd> ")
+ self.send_packet(itf, "ipv4-other")
+
+ #set hash input set by testpmd on dut, enable src-ipv4, dst-ipv4, gre-key-len 3
+ self.dut.send_expect("global_config 0 gre-key-len 3", "testpmd> ")
+ self.dut.send_expect("set_hash_input_set 0 ipv4-other gre-key add", "testpmd> ")
+ self.send_packet(itf, "ipv4-other")
+
+ #set hash input set by testpmd on dut, enable src-ipv4, dst-ipv4, gre-key-len 4
+ self.dut.send_expect("global_config 0 gre-key-len 4", "testpmd> ")
+ self.send_packet(itf, "ipv4-other")
+
+ self.dut.send_expect("quit", "# ", 30)
+ dts.results_table_print()
+ self.verify(len(dts.results_table_rows) > 1, "There is no data in the table, testcase failed!")
+
+ #check the results
+ if ((dts.results_table_rows[1][1]==dts.results_table_rows[2][1])or(dts.results_table_rows[1][3]==dts.results_table_rows[2][3])):
+ flag = 0
+ self.verify(flag, "The two hash values are the same, rss_granularity_config failed!")
+ elif ((dts.results_table_rows[1][1]!=dts.results_table_rows[3][1])or(dts.results_table_rows[1][3]!=dts.results_table_rows[3][3])):
+ flag = 0
+ self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+ elif ((dts.results_table_rows[1][1]==dts.results_table_rows[4][1])or(dts.results_table_rows[1][3]==dts.results_table_rows[4][3])):
+ flag = 0
+ self.verify(flag, "The two hash values are the same, rss_granularity_config failed!")
+ elif ((dts.results_table_rows[4][1]==dts.results_table_rows[5][1])or(dts.results_table_rows[4][3]==dts.results_table_rows[5][3])):
+ flag = 0
+ self.verify(flag, "The two hash values are the same, rss_granularity_config failed!")
+
+ reta_lines = []
+
+
+ def tear_down(self):
+ """
+ Run after each test case.
+ """
+ pass
+
+ def tear_down_all(self):
+ """
+ Run after each test suite.
+ """
+ pass
+
--
2.5.0
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [dts] [PATCH] Support fortpark_TLV
2016-06-15 8:12 ` [dts] [PATCH] Support fortpark_TLV pengyuan
@ 2016-06-21 9:01 ` Liu, Yong
0 siblings, 0 replies; 7+ messages in thread
From: Liu, Yong @ 2016-06-21 9:01 UTC (permalink / raw)
To: pengyuan, dts
Thanks yuan, applied this patch.
On 06/15/2016 04:12 PM, pengyuan wrote:
> Signed-off-by: pengyuan <yuan.peng@intel.com>
>
> diff --git a/framework/settings.py b/framework/settings.py
> index 5572e47..2f440c9 100644
> --- a/framework/settings.py
> +++ b/framework/settings.py
> @@ -77,6 +77,8 @@ NICS = {
> 'fortville_spirit_single': '8086:1584',
> 'redrockcanyou': '8086:15a4',
> 'fortpark':'8086:374c',
> + 'fortpark_TLV':'8086:37d0',
> + 'fortpark_TLV_vf':'8086:37cd',
> 'fvl10g_vf':'8086:154c',
> 'atwood': '8086:15d5',
> 'ConnectX3':'15b3:1003',
> @@ -115,6 +117,8 @@ DRIVERS = {
> 'fortville_spirit_single': 'i40e',
> 'redrockcanyou': 'fm10k',
> 'fortpark':'i40e',
> + 'fortpark_TLV':'i40e',
> + 'fortpark_TLV_vf':'i40evf',
> 'fvl10g_vf':'i40evf',
> 'atwood': 'fm10k',
> 'ConnectX3':'mlx4_core',
> diff --git a/framework/test_case.py b/framework/test_case.py
> index 296dbf7..84d15c7 100644
> --- a/framework/test_case.py
> +++ b/framework/test_case.py
> @@ -104,6 +104,8 @@ class TestCase(object):
> bitrate *= 40
> elif nic == 'fortville_eagle':
> bitrate *= 10
> + elif nic == 'fortpark_TLV':
> + bitrate *= 10
> elif nic == 'redrockcanyou':
> bitrate *= 40
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [dts] [PATCH] Support NIC type fortpark_TLV
2016-06-15 8:46 ` [dts] [PATCH] Support NIC type fortpark_TLV pengyuan
@ 2016-06-21 9:08 ` Liu, Yong
0 siblings, 0 replies; 7+ messages in thread
From: Liu, Yong @ 2016-06-21 9:08 UTC (permalink / raw)
To: pengyuan, dts
Applied with manually add commit log. Yuan, please remember to add git
commit log in the patch.
On 06/15/2016 04:46 PM, pengyuan wrote:
> Signed-off-by: pengyuan <yuan.peng@intel.com>
>
> diff --git a/tests/TestSuite_dual_vlan.py b/tests/TestSuite_dual_vlan.py
> index a4ae23e..1089b7f 100644
> --- a/tests/TestSuite_dual_vlan.py
> +++ b/tests/TestSuite_dual_vlan.py
> @@ -103,7 +103,7 @@ class TestDualVlan(TestCase):
> self.pmdout = PmdOutput(self.dut)
> self.pmdout.start_testpmd("Default", "--portmask=%s" % portMask, socket=self.ports_socket)
>
> - if self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single"]:
> + if self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV"]:
> self.dut.send_expect("vlan set filter on all", "testpmd> ")
> self.dut.send_expect("set promisc all off", "testpmd> ")
>
> @@ -147,7 +147,7 @@ class TestDualVlan(TestCase):
> """
>
> for mode in modeName:
> - if self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single"]:
> + if self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV"]:
> # fortville NIC vlan filter can't close, if want close need remove rx_vlan
> if mode == "filter":
> if modeName[mode] == "off":
> @@ -164,7 +164,7 @@ class TestDualVlan(TestCase):
>
> out = self.dut.send_expect("show port info %s" % dutRxPortId, "testpmd> ")
> for mode in modeName:
> - if self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single"]:
> + if self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV"]:
> # fortville NIC vlan filter can't close, if want close need remove rx_vlan
> if mode == "filter":
> if modeName[mode] == "off":
> @@ -254,7 +254,7 @@ class TestDualVlan(TestCase):
> print out
> self.verify(out is not None and "vlan %s" % outvlan not in out, "Vlan filter enable error: " + out)
>
> - if self.nic not in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single"]:
> + if self.nic not in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV"]:
> self.mode_config(filter="off")
> self.vlan_send_packet(outvlan)
> out = self.get_tcpdump_package()
> @@ -293,7 +293,7 @@ class TestDualVlan(TestCase):
> self.mode_config(filter="off")
> self.mode_config(qinq="off")
> self.mode_config(strip="on")
> - if self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single"]:
> + if self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV"]:
> self.dut.send_expect('rx_vlan add %s %s' % (outvlan, dutRxPortId), "testpmd> ")
> self.vlan_send_packet(outvlan)
> out = self.get_tcpdump_package()
> @@ -303,20 +303,20 @@ class TestDualVlan(TestCase):
> self.vlan_send_packet(outvlan)
> out = self.get_tcpdump_package()
> self.verify("vlan %s" % outvlan in out, "Vlan strip disable error: " + out)
> - if self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single"]:
> + if self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV"]:
> self.dut.send_expect('rx_vlan rm %s %s' % (outvlan, dutRxPortId), "testpmd> ")
>
> def test_vlan_stripq_config(self):
> """
> Enable/Disable VLAN packets strip on queue
> """
> - self.verify(self.nic not in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single"], "%s NIC not support queue vlan strip " % self.nic)
> + self.verify(self.nic not in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV"], "%s NIC not support queue vlan strip " % self.nic)
>
> self.mode_config(filter="off")
> self.mode_config(qinq="off")
> self.mode_config(strip="off")
> self.mode_config(stripq="off")
> - if self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single"]:
> + if self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV"]:
> self.dut.send_expect('rx_vlan add %s %s' % (outvlan, dutRxPortId), "testpmd> ")
> self.vlan_send_packet(outvlan)
> out = self.get_tcpdump_package()
> @@ -332,7 +332,7 @@ class TestDualVlan(TestCase):
> self.vlan_send_packet(outvlan)
> out = self.get_tcpdump_package()
> self.verify("vlan %s" % outvlan in out, "vlan strip queue disable error: " + out)
> - if self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single"]:
> + if self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV"]:
> self.dut.send_expect('rx_vlan rm %s %s' % (outvlan, dutRxPortId), "testpmd> ")
>
> def test_vlan_insert_config(self):
> @@ -361,7 +361,7 @@ class TestDualVlan(TestCase):
> """
> Configure receive port out vlan TPID
> """
> - self.verify(self.nic not in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "hartwell"], "%s NIC not support tcpid " % self.nic)
> + self.verify(self.nic not in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV", "hartwell"], "%s NIC not support tcpid " % self.nic)
>
> self.mode_config(filter="on", strip="on", qinq="on")
> # nic only support inner model, except fortville nic
> diff --git a/tests/TestSuite_fdir.py b/tests/TestSuite_fdir.py
> index 5a0a6b0..537ab1f 100644
> --- a/tests/TestSuite_fdir.py
> +++ b/tests/TestSuite_fdir.py
> @@ -78,7 +78,7 @@ class TestFdir(TestCase, IxiaPacketGenerator):
> out = self.dut.get_session_output()
> self.dut.send_expect("stop", "testpmd>")
>
> - if(self.nic in ["kawela", "niantic", "fortville_eagle", "fortville_spirit", "fortville_spirit_single"]):
> + if(self.nic in ["kawela", "niantic", "fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV"]):
> if ("fwd" == self.fdir_type):
> if condition:
> self.queue = 2
> @@ -205,7 +205,7 @@ class TestFdir(TestCase, IxiaPacketGenerator):
> Fdir Performance Benchmarking set rules
> """
> self.dut.send_expect("port stop %s" % self.dut_ports[0], "testpmd>")
> - if(self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single"]):
> + if(self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV"]):
> self.dut.send_expect("flow_director_flex_payload %s l2 (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15)" % self.dut_ports[0], "testpmd>")
> self.dut.send_expect("flow_director_flex_payload %s l3 (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15)" % self.dut_ports[0], "testpmd>")
> self.dut.send_expect("flow_director_flex_payload %s l4 (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15)" % self.dut_ports[0], "testpmd>")
> @@ -221,7 +221,7 @@ class TestFdir(TestCase, IxiaPacketGenerator):
> Fdir get flexbytes and payload according NIC
> """
>
> - if(self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single"]):
> + if(self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV"]):
> if not sctp:
> self.flexbytes = "0x11,0x11,0x22,0x22,0x33,0x33,0x44,0x44,0x55,0x55,0x66,0x66,0x77,0x77,0x88,0x88"
> else:
> @@ -297,7 +297,7 @@ class TestFdir(TestCase, IxiaPacketGenerator):
>
> # ipv4 frag
> # ip-frag only support in fortville
> - if (self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single"]):
> + if (self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV"]):
> self.dut.send_expect("flow_director_filter %s mode IP add flow ipv4-other src 192.168.0.1 dst 192.168.0.2 tos 2 proto 20 ttl 40 vlan 0 flexbytes () fwd pf queue %d fd_id %d " % (self.dut_ports[0], 3, 1), "testpmd>")
> self.dut.send_expect("flow_director_filter %s mode IP add flow ipv4-frag src 192.168.0.1 dst 192.168.0.2 tos 2 proto 20 ttl 40 vlan 0 flexbytes () fwd pf queue %d fd_id %d " % (self.dut_ports[0], 2, 1), "testpmd>")
> self.send_and_verify(True, 'sendp([Ether(src=get_if_hwaddr("%s"), dst="00:1B:21:8E:B2:30")/IP(src="192.168.0.1", dst="192.168.0.2", frag=1, flags="MF")/Raw(load="X"*46)], iface="%s")' % (self.dut_rx_interface, self.dut_rx_interface))
> @@ -316,7 +316,7 @@ class TestFdir(TestCase, IxiaPacketGenerator):
> if self.nic in ["niantic"]:
> # Niantic ipv6 only support signature mode
> self.dut.send_expect("./%s/app/testpmd -c %s -n 4 -- -i --portmask=%s --disable-rss --rxq=4 --txq=4 --nb-cores=4 --nb-ports=1 --pkt-filter-mode=signature" % (self.target, self.coreMask, dts.create_mask([self.dut_ports[0]])), "testpmd>", 120)
> - elif self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single"]:
> + elif self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV"]:
> # Fortville ipv6 support perfect mode
> self.dut.send_expect("./%s/app/testpmd -c %s -n 4 -- -i --portmask=%s --disable-rss --rxq=4 --txq=4 --nb-cores=4 --nb-ports=1 --pkt-filter-mode=perfect" % (self.target, self.coreMask, dts.create_mask([self.dut_ports[0]])), "testpmd>", 120)
> self.dut.send_expect("set verbose 1", "testpmd>")
> @@ -373,7 +373,7 @@ class TestFdir(TestCase, IxiaPacketGenerator):
>
> # ipv6 frag
> # ip-frag only support in fortville
> - if (self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single"]):
> + if (self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV"]):
> self.dut.send_expect("flow_director_filter %s mode IP add flow ipv6-other src FE80:0:0:0:200:1FF:FE00:200 dst 3555:5555:6666:6666:7777:7777:8888:8888 tos 2 proto 20 ttl 40 vlan 0 flexbytes () fwd pf queue %d fd_id %d " % (self.dut_ports[0], 3, 1), "testpmd>")
> self.dut.send_expect("flow_director_filter %s mode IP add flow ipv6-frag src FE80:0:0:0:200:1FF:FE00:200 dst 3555:5555:6666:6666:7777:7777:8888:8888 tos 2 proto 20 ttl 40 vlan 0 flexbytes () fwd pf queue %d fd_id %d " % (self.dut_ports[0], 2, 1), "testpmd>")
> self.send_and_verify(True, 'sendp([Ether(src=get_if_hwaddr("%s"), dst="00:1B:21:8E:B2:30")/IPv6(src="FE80:0:0:0:200:1FF:FE00:200", dst="3555:5555:6666:6666:7777:7777:8888:8888", nh=44)/IPv6ExtHdrFragment()/Raw(load="X"*46)], iface="%s")' % (self.dut_rx_interface, self.dut_rx_interface))
> @@ -441,7 +441,7 @@ class TestFdir(TestCase, IxiaPacketGenerator):
>
> # ipv4 frag
> # ip-frag only support in fortville
> - if (self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single"]):
> + if (self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV"]):
> self.dut.send_expect("flow_director_filter %s mode IP add flow ipv4-other src 192.168.0.1 dst 192.168.0.2 tos 2 proto 20 ttl 40 vlan 0 flexbytes () drop pf queue %d fd_id %d " % (self.dut_ports[0], 3, 1), "testpmd>")
> self.dut.send_expect("flow_director_filter %s mode IP add flow ipv4-frag src 192.168.0.1 dst 192.168.0.2 tos 2 proto 20 ttl 40 vlan 0 flexbytes () drop pf queue %d fd_id %d " % (self.dut_ports[0], 2, 1), "testpmd>")
> self.dut.send_expect("flow_director_filter %s mode IP add flow ipv4-frag src 192.168.0.1 dst 192.168.0.2 tos 2 proto 20 ttl 40 vlan 0 flexbytes () drop pf queue %d fd_id %d " % (self.dut_ports[0], 2, 1), "testpmd>")
> @@ -460,7 +460,7 @@ class TestFdir(TestCase, IxiaPacketGenerator):
> def test_fdir_noflexword_drop_ipv6(self):
> # drop not support signature mode, niantic only can work in signature mode with ipv6
> # Niantic is not support in drop ipv6
> - if self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single"]:
> + if self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV"]:
> # drop command testing
> self.dut.kill_all()
>
> @@ -563,7 +563,7 @@ class TestFdir(TestCase, IxiaPacketGenerator):
>
> # ipv4 frag
> # ip-frag only support fortville
> - if (self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single"]):
> + if (self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV"]):
> self.dut.send_expect("flow_director_filter %s mode IP add flow ipv4-other src 192.168.0.1 dst 192.168.0.2 tos 2 proto 20 ttl 40 vlan 0 flexbytes (%s) fwd pf queue %d fd_id %d " % (self.dut_ports[0], self.flexbytes, 3, 1), "testpmd>")
> self.dut.send_expect("flow_director_filter %s mode IP add flow ipv4-frag src 192.168.0.1 dst 192.168.0.2 tos 2 proto 20 ttl 40 vlan 0 flexbytes (%s) fwd pf queue %d fd_id %d " % (self.dut_ports[0], self.flexbytes, 2, 1), "testpmd>")
> self.send_and_verify(True, 'sendp([Ether(src=get_if_hwaddr("%s"), dst="00:1B:21:8E:B2:30")/IP(src="192.168.0.1", dst="192.168.0.2", frag=1, flags="MF")/Raw(load="%s")], iface="%s")' % (self.dut_rx_interface, self.payload, self.dut_rx_interface))
> @@ -601,7 +601,7 @@ class TestFdir(TestCase, IxiaPacketGenerator):
> if self.nic in ["niantic"]:
> # Niantic ipv6 only support signature mode
> self.dut.send_expect("./%s/app/testpmd -c %s -n 4 -- -i --portmask=%s --disable-rss --rxq=4 --txq=4 --nb-cores=4 --nb-ports=1 --pkt-filter-mode=signature" % (self.target, self.coreMask, dts.create_mask([self.dut_ports[0]])), "testpmd>", 120)
> - elif self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single"]:
> + elif self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV"]:
> # fortville ipv6 support perfect mode
> self.dut.send_expect("./%s/app/testpmd -c %s -n 4 -- -i --portmask=%s --disable-rss --rxq=4 --txq=4 --nb-cores=4 --nb-ports=1 --pkt-filter-mode=perfect" % (self.target, self.coreMask, dts.create_mask([self.dut_ports[0]])), "testpmd>", 120)
> self.dut.send_expect("set verbose 1", "testpmd>")
> @@ -657,7 +657,7 @@ class TestFdir(TestCase, IxiaPacketGenerator):
>
> # ipv6 frag
> # ip-frag only support fortville
> - if (self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single"]):
> + if (self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV"]):
> self.dut.send_expect("flow_director_filter %s mode IP add flow ipv6-other src FE80:0:0:0:200:1FF:FE00:200 dst 3555:5555:6666:6666:7777:7777:8888:8888 tos 2 proto 20 ttl 40 vlan 0 flexbytes (%s) fwd pf queue %d fd_id %d " % (self.dut_ports[0], self.flexbytes, 3, 1), "testpmd>")
> self.dut.send_expect("flow_director_filter %s mode IP add flow ipv6-frag src FE80:0:0:0:200:1FF:FE00:200 dst 3555:5555:6666:6666:7777:7777:8888:8888 tos 2 proto 20 ttl 40 vlan 0 flexbytes (%s) fwd pf queue %d fd_id %d " % (self.dut_ports[0], self.flexbytes, 2, 1), "testpmd>")
> self.send_and_verify(True, 'sendp([Ether(src=get_if_hwaddr("%s"), dst="00:1B:21:8E:B2:30")/IPv6(src="FE80:0:0:0:200:1FF:FE00:200", dst="3555:5555:6666:6666:7777:7777:8888:8888", nh=44)/IPv6ExtHdrFragment()/Raw(load="%s")], iface="%s")' % (self.dut_rx_interface, self.payload, self.dut_rx_interface))
> @@ -707,7 +707,7 @@ class TestFdir(TestCase, IxiaPacketGenerator):
>
> # ipv4 frag
> # ip-frag only support fortville
> - if (self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single"]):
> + if (self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV"]):
> self.dut.send_expect("flow_director_filter %s mode IP add flow ipv4-other src 192.168.0.1 dst 192.168.0.2 tos 2 proto 20 ttl 40 vlan 0 flexbytes (%s) drop pf queue %d fd_id %d " % (self.dut_ports[0], self.flexbytes, 3, 1), "testpmd>")
> self.dut.send_expect("flow_director_filter %s mode IP add flow ipv4-frag src 192.168.0.1 dst 192.168.0.2 tos 2 proto 20 ttl 40 vlan 0 flexbytes (%s) drop pf queue %d fd_id %d " % (self.dut_ports[0], self.flexbytes, 2, 1), "testpmd>")
> self.dut.send_expect("flow_director_filter %s mode IP add flow ipv4-frag src 192.168.0.1 dst 192.168.0.2 tos 2 proto 20 ttl 40 vlan 0 flexbytes (%s) drop pf queue %d fd_id %d " % (self.dut_ports[0], self.flexbytes, 2, 1), "testpmd>")
> @@ -726,7 +726,7 @@ class TestFdir(TestCase, IxiaPacketGenerator):
> def test_fdir_flexword_drop_ipv6(self):
> # drop not support signature mode, niantic only can work in signature mode with ipv6
> # Niantic is not support in drop ipv6
> - if (self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single"]):
> + if (self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV"]):
> # drop testing with flexword
> self.dut.send_expect("./%s/app/testpmd -c %s -n 4 -- -i --portmask=%s --disable-rss --rxq=4 --txq=4 --nb-cores=4 --nb-ports=1 --pkt-filter-mode=perfect" % (self.target, self.coreMask, dts.create_mask([self.dut_ports[0]])), "testpmd>", 120)
> self.dut.send_expect("set verbose 1", "testpmd>")
> diff --git a/tests/TestSuite_generic_filter.py b/tests/TestSuite_generic_filter.py
> index 663001c..9f6676c 100644
> --- a/tests/TestSuite_generic_filter.py
> +++ b/tests/TestSuite_generic_filter.py
> @@ -81,7 +81,7 @@ class TestGeneric_filter(TestCase):
> """
> set port queue mapping, fortville not support this function
> """
> - if self.nic not in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single"]:
> + if self.nic not in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV"]:
> self.dut.send_expect(
> "set stat_qmap rx %s 0 0" % valports[0], "testpmd> ")
> self.dut.send_expect(
> @@ -366,7 +366,7 @@ class TestGeneric_filter(TestCase):
>
> self.verify(self.nic in ["niantic", "kawela_4", "bartonhills",
> "powerville", "fortville_eagle", "fortville_spirit",
> - "fortville_spirit_single"], "%s nic not support syn filter" % self.nic)
> + "fortville_spirit_single", "fortpark_TLV"], "%s nic not support syn filter" % self.nic)
> self.pmdout.start_testpmd(
> "%s" % self.cores, "--disable-rss --rxq=4 --txq=4 --portmask=%s --nb-cores=4 --nb-ports=1" % portMask)
> self.port_config()
> @@ -619,7 +619,7 @@ class TestGeneric_filter(TestCase):
> self.verify(False, "%s nic not support this test" % self.nic)
> def test_jumbo_frame_size(self):
>
> - self.verify(self.nic not in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single"], "%s nic not support this test" % self.nic)
> + self.verify(self.nic not in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV"], "%s nic not support this test" % self.nic)
> self.pmdout.start_testpmd(
> "%s" % self.cores, "--disable-rss --rxq=4 --txq=4 --portmask=%s --nb-cores=4 --nb-ports=1 --mbcache=200 --mbuf-size=2048 --max-pkt-len=9600" % portMask)
> port = self.tester.get_local_port(valports[0])
> diff --git a/tests/TestSuite_nvgre.py b/tests/TestSuite_nvgre.py
> index 99b1d6b..1da551b 100644
> --- a/tests/TestSuite_nvgre.py
> +++ b/tests/TestSuite_nvgre.py
> @@ -349,7 +349,7 @@ class TestNvgre(TestCase):
> nvgre Prerequisites
> """
> # this feature only enable in FVL now
> - self.verify(self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "sageville", "sagepond"], "NVGRE Only supported by Fortville and Sageville")
> + self.verify(self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV", "sageville", "sagepond"], "NVGRE Only supported by Fortville and Sageville")
> # Based on h/w type, choose how many ports to use
> ports = self.dut.get_ports(self.nic)
> self.portmask = dts.create_mask(self.dut.get_ports(self.nic))
> diff --git a/tests/TestSuite_pmdrss_hash.py b/tests/TestSuite_pmdrss_hash.py
> index e753a17..0cb703b 100644
> --- a/tests/TestSuite_pmdrss_hash.py
> +++ b/tests/TestSuite_pmdrss_hash.py
> @@ -417,10 +417,10 @@ class TestPmdrssHash(TestCase):
> """
>
> self.verify(self.nic in ["fortville_eagle", "fortville_spirit",
> - "fortville_spirit_single", "redrockcanyou", "atwood", "boulderrapid"],
> + "fortville_spirit_single", "redrockcanyou", "atwood", "boulderrapid", "fortpark_TLV"],
> "NIC Unsupported: " + str(self.nic))
> global reta_num
> - if self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single"]:
> + if self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV"]:
> reta_num = 512
> elif self.nic in ["niantic"]:
> reta_num = 128
> diff --git a/tests/TestSuite_pmdrssreta.py b/tests/TestSuite_pmdrssreta.py
> index 9a0ad2f..6445330 100644
> --- a/tests/TestSuite_pmdrssreta.py
> +++ b/tests/TestSuite_pmdrssreta.py
> @@ -228,7 +228,7 @@ class TestPmdrssreta(TestCase):
> self.dut.send_expect("quit", "# ", 30)
>
> def test_rss_key_size(self):
> - nic_rss_key_size = {"fortville_eagle": 52, "fortville_spirit": 52, "fortville_spirit_single": 52, "niantic": 40, "e1000": 40, "redrockcanyou": 40, "atwood": 40, "boulderrapid": 40}
> + nic_rss_key_size = {"fortville_eagle": 52, "fortville_spirit": 52, "fortville_spirit_single": 52, "niantic": 40, "e1000": 40, "redrockcanyou": 40, "atwood": 40, "boulderrapid": 40, "fortpark_TLV": 52}
> self.verify(self.nic in nic_rss_key_size.keys(), "Not supporte rss key on %s" % self.nic)
>
> dutPorts = self.dut.get_ports(self.nic)
> diff --git a/tests/TestSuite_scatter.py b/tests/TestSuite_scatter.py
> index 44a55b6..9a3a10a 100644
> --- a/tests/TestSuite_scatter.py
> +++ b/tests/TestSuite_scatter.py
> @@ -67,7 +67,7 @@ class TestScatter(TestCase):
> if self.nic in ["niantic", "sageville", "fortpark", "fortville_eagle",
> "fortville_spirit", "fortville_spirit_single",
> "redrockcanyou", "atwood", "boulderrapid",
> - "ironpond", "twinpond", "springfountain"]:
> + "ironpond", "twinpond", "springfountain", "fortpark_TLV"]:
> self.mbsize = 2048
> else:
> self.mbsize = 1024
> diff --git a/tests/TestSuite_tso.py b/tests/TestSuite_tso.py
> index 6e45fdc..32db524 100644
> --- a/tests/TestSuite_tso.py
> +++ b/tests/TestSuite_tso.py
> @@ -55,7 +55,7 @@ class TestTSO(TestCase):
> self.verify(self.nic in ["kawela_2", "niantic", "bartonhills", "82545EM",
> "82540EM", "springfountain", "fortville_eagle",
> "fortville_spirit", "fortville_spirit_single",
> - "redrockcanyou", "atwood", "boulderrapid"],
> + "redrockcanyou", "atwood", "boulderrapid", "fortpark_TLV"],
> "NIC Unsupported: " + str(self.nic))
>
> # Based on h/w type, choose how many ports to use
> diff --git a/tests/TestSuite_uni_pkt.py b/tests/TestSuite_uni_pkt.py
> index ca72e75..429546a 100644
> --- a/tests/TestSuite_uni_pkt.py
> +++ b/tests/TestSuite_uni_pkt.py
> @@ -93,7 +93,7 @@ class TestUniPacket(TestCase):
> """
> Check whether L2 packet can be detected"
> """
> - self.verify("fortville" in self.nic,
> + self.verify(("fortville" in self.nic or "fortpark_TLV" in self.nic),
> "L2 packet detect only support by Fortville")
> self.L2_types = {
> "TIMESYNC": "(outer) L2 type: ETHER_Timesync",
> @@ -115,7 +115,7 @@ class TestUniPacket(TestCase):
> """
> checked that whether L3 and L4 packet can be normally detected.
> """
> - if "fortville" in self.nic.lower():
> + if "fortville" in self.nic.lower() or "fortpark_TLV" in self.nic.lower():
> outerL4Type = "(outer) L4 type: L4_NONFRAG"
> elif "niantic" in self.nic.lower() or "i350" in self.nic.lower():
> outerL4Type = "(outer) L4 type: Unknown"
> @@ -132,7 +132,7 @@ class TestUniPacket(TestCase):
> }
>
> # delete the unsupported packet based on nic type
> - if "fortville" in self.nic.lower():
> + if "fortville" in self.nic.lower() or "fortpark_TLV" in self.nic.lower():
> pktType.pop("MAC_IPihl_PKT")
> pktType.pop("MAC_IPihl_SCTP_PKT")
> elif "niantic" in self.nic.lower() or "i350" in self.nic.lower():
> @@ -145,7 +145,7 @@ class TestUniPacket(TestCase):
> """
> checked that whether IPv6 and L4 packet can be normally detected.
> """
> - if "fortville" in self.nic.lower():
> + if "fortville" in self.nic.lower() or "fortpark_TLV" in self.nic.lower():
> outerL4Type = "(outer) L4 type: L4_NONFRAG"
> outerL3Type = "(outer) L3 type: IPV6_EXT_UNKNOWN"
> elif "niantic" in self.nic.lower() or "i350" in self.nic.lower():
> @@ -161,7 +161,7 @@ class TestUniPacket(TestCase):
> }
>
> # delete the unsupported packet based on nic type
> - if "fortville" in self.nic.lower():
> + if "fortville" in self.nic.lower() or "fortpark_TLV" in self.nic.lower():
> pktType.pop("MAC_IPv6FRAG_PKT_N")
> elif "niantic" in self.nic.lower() or "i350" in self.nic.lower():
> pktType.pop("MAC_IPv6FRAG_PKT_F")
> @@ -173,7 +173,7 @@ class TestUniPacket(TestCase):
> checked that whether IP in IPv4 tunnel packet can be normally
> detected by Fortville.
> """
> - self.verify("fortville" in self.nic,
> + self.verify(("fortville" in self.nic or "fortpark_TLV" in self.nic),
> "IP in IPv4 tunnel packet type detect only support by Fortville")
>
> pktType = {
> @@ -216,7 +216,7 @@ class TestUniPacket(TestCase):
> checked that whether IP in IPv6 tunnel packet can be normally
> detected by Fortville.
> """
> - self.verify("fortville" in self.nic,
> + self.verify(("fortville" in self.nic or "fortpark_TLV" in self.nic),
> "IP in IPv6 tunnel packet type detect only support by Fortville")
>
> pktType = {
> @@ -240,7 +240,7 @@ class TestUniPacket(TestCase):
> checked that whether NVGRE tunnel packet can be normally detected
> by Fortville.
> """
> - self.verify("fortville" in self.nic,
> + self.verify(("fortville" in self.nic or "fortpark_TLV" in self.nic),
> "NVGRE tunnel packet type detect only support by Fortville")
>
> pktType = {
> @@ -267,7 +267,7 @@ class TestUniPacket(TestCase):
> checked that whether NVGRE in IPv6 tunnel packet can be normally
> detected by Fortville.
> """
> - self.verify("fortville" in self.nic,
> + self.verify(("fortville" in self.nic or "fortpark_TLV" in self.nic),
> "NVGRE in IPv6 detect only support by Fortville")
>
> pkt_types = {
> @@ -304,7 +304,7 @@ class TestUniPacket(TestCase):
> """
> checked that whether GRE tunnel packet can be normally detected by Fortville.
> """
> - self.verify("fortville" in self.nic,
> + self.verify(("fortville" in self.nic or "fortpark_TLV" in self.nic),
> "GRE tunnel packet type detect only support by Fortville")
>
> pktType = {
> @@ -323,7 +323,7 @@ class TestUniPacket(TestCase):
> checked that whether Vxlan tunnel packet can be normally detected by
> Fortville.
> """
> - self.verify("fortville" in self.nic,
> + self.verify(("fortville" in self.nic or "fortpark_TLV" in self.nic),
> "Vxlan tunnel packet type detect only support by Fortville")
>
> self.dut.send_expect("rx_vxlan_port add 4789 0", "testpmd>", 10)
> diff --git a/tests/TestSuite_vf_vlan.py b/tests/TestSuite_vf_vlan.py
> index 7d1ec73..e32e5bd 100644
> --- a/tests/TestSuite_vf_vlan.py
> +++ b/tests/TestSuite_vf_vlan.py
> @@ -367,7 +367,7 @@ class TestVfVlan(TestCase):
> "received 1 packets" in out, "Not received vlan packet as expected!!!")
> nic_type = self.vm_dut_0.ports_info[0]['type']
> nic_name = get_nic_name(nic_type)
> - if nic_name in ['fvl10g_vf']:
> + if nic_name in ['fvl10g_vf', 'fortpark_TLV_vf']:
> self.verify("VLAN tci=%s" %
> vlan_hex in out, "Failed to disable strip vlan!!!")
> else:
> diff --git a/tests/TestSuite_vlan.py b/tests/TestSuite_vlan.py
> index ba3741e..bf20455 100644
> --- a/tests/TestSuite_vlan.py
> +++ b/tests/TestSuite_vlan.py
> @@ -75,7 +75,7 @@ class TestVlan(TestCase):
> self.dut.send_expect("set verbose 1", "testpmd> ")
> out = self.dut.send_expect("set fwd mac", "testpmd> ")
>
> - if self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single"]:
> + if self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV"]:
> self.dut.send_expect("vlan set filter on %s" % dutRxPortId, "testpmd> ")
>
> self.dut.send_expect("vlan set strip off %s" % dutRxPortId, "testpmd> ")
> diff --git a/tests/TestSuite_vxlan.py b/tests/TestSuite_vxlan.py
> index 4438bb0..e9104f2 100644
> --- a/tests/TestSuite_vxlan.py
> +++ b/tests/TestSuite_vxlan.py
> @@ -258,7 +258,7 @@ class TestVxlan(TestCase, IxiaPacketGenerator):
> """
> # this feature only enable in FVL now
> self.verify(self.nic in ["fortville_eagle", "fortville_spirit",
> - "fortville_spirit_single", "sagepond"],
> + "fortville_spirit_single", "sagepond","fortpark_TLV"],
> "Vxlan Only supported by Fortville and Sageville")
> # Based on h/w type, choose how many ports to use
> ports = self.dut.get_ports()
> diff --git a/tests/TestSuite_vxlan_sample.py b/tests/TestSuite_vxlan_sample.py
> index 13e63c5..189bc38 100644
> --- a/tests/TestSuite_vxlan_sample.py
> +++ b/tests/TestSuite_vxlan_sample.py
> @@ -87,7 +87,7 @@ class TestVxlanSample(TestCase):
>
> # this feature only enable in FVL now
> self.verify(self.nic in ["fortville_eagle", "fortville_spirit",
> - "fortville_spirit_single"],
> + "fortville_spirit_single", "fortpark_TLV"],
> "Vxlan Only supported by Fortville")
> # Based on h/w type, choose how many ports to use
> self.dut_ports = self.dut.get_ports()
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [dts] [PATCH] tests: add fortville rss granularity script
2016-06-16 1:19 ` [dts] [PATCH] tests: add fortville rss granularity script pengyuan
@ 2016-06-22 8:25 ` Pei, Yulong
0 siblings, 0 replies; 7+ messages in thread
From: Pei, Yulong @ 2016-06-22 8:25 UTC (permalink / raw)
To: Peng, Yuan, dts; +Cc: Peng, Yuan
Hi,
See my comment below,
-----Original Message-----
From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of pengyuan
Sent: Thursday, June 16, 2016 9:20 AM
To: dts@dpdk.org
Cc: Peng, Yuan <yuan.peng@intel.com>
Subject: [dts] [PATCH] tests: add fortville rss granularity script
Signed-off-by: pengyuan <yuan.peng@intel.com>
diff --git a/test_plans/fortville_rss_granularity_config_test_plan.rst b/test_plans/fortville_rss_granularity_config_test_plan.rst
new file mode 100644
index 0000000..28d3b49
--- /dev/null
+++ b/test_plans/fortville_rss_granularity_config_test_plan.rst
@@ -0,0 +1,340 @@
+.. Copyright (c) <2015>, 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 - support granularity configuration of RSS, support 32-bit
+GRE keys
+==================================================================
+
+Description
+===========
+This document provides test plan for testing the function of Fortville:
+
+1. 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. 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
+
+
+Prerequisites
+-------------
+
+1. Hardware:
+ 1x Fortville_eagle NIC (4x 10G)
+ 1x Fortville_spirit NIC (2x 40G)
+ 2x Fortville_spirit_single NIC (1x 40G)
+
+2. software:
+ dpdk: http://dpdk.org/git/dpdk
+ scapy: http://www.secdev.org/projects/scapy/
+
+
+Test Case 1: test with flow type ipv4-tcp
+===============================
+
+1. config testpmd on DUT
+
+1). set up testpmd with fortville NICs::
+ ./testpmd -c 0x1ffff -n 4 -- -i --coremask=0x1fffe --portmask=0x3
+--rxq=16 --txq=16 --txqflags=0
+
+2). Reta Configuration(optional, if not set, will use default)::
+ testpmd> port config 0 rss reta (hash_index,queue_id)
+
+3). PMD fwd only receive the packets::
+ testpmd> set fwd rxonly
+
+4). rss recived package type configuration::
+ testpmd> port config all rss tcp
+
+5). set hash function::
+ testpmd>set_hash_global_config 0 toeplitz ipv4-tcp enable
+
+6). verbose configuration::
+ testpmd> set verbose 8
+
+7). start packet receive::
+ testpmd> start
+
+2. using scapy to send packets with ipv4-tcp on tester,
+
+ sendp([Ether(dst="%s")/IP(src="192.168.0.%d",
+ dst="192.168.0.%d")/TCP(sport=1024,dport=1025)], iface="%s")
+
+then got hash value and queue value that output from the testpmd on DUT.
+
+3. set hash input set to "none" by testpmd on dut,
+
+testpmd> set_hash_input_set 0 ipv4-tcp none select
+
+send packet as step 2, got hash value and queue value that output from
+the testpmd on DUT, the values shoud be different from the values in step 2.
+
+4. set hash input set by testpmd on dut, enable src-ipv4 & dst-ipv4,
+
+testpmd> set_hash_input_set 0 ipv4-tcp src-ipv4 add set_hash_input_set
+testpmd> 0 ipv4-tcp dst-ipv4 add
+
+send packet as step 2, got hash value and queue value that output from
+the testpmd on DUT, the values shoud be different from the values in step 2.
+
+5. set hash input set by testpmd on dut, enable src-ipv4, dst-ipv4,
+tcp-src-port, tcp-dst-port
+
+testpmd> set_hash_input_set 0 ipv4-tcp tcp-src-port add
+testpmd> set_hash_input_set 0 ipv4-tcp tcp-dst-port add
+
+send packet as step 2, got hash value and queue value that output from
+the testpmd on DUT, the values shoud be should be different with the values from step 3 & step 4, should be same as step 2.
+
+6. set hash input set by testpmd on dut, enable tcp-src-port,
+tcp-dst-port
+
+testpmd> set_hash_input_set 0 ipv4-tcp none select set_hash_input_set 0
+testpmd> ipv4-tcp tcp-src-port add set_hash_input_set 0 ipv4-tcp
+testpmd> tcp-dst-port add
+
+send packet as step 2, got hash value and queue value that output from
+the testpmd on DUT, the values shoud be should be different with the values from step2 & step 3 & step 4 & step 5.
+
+So it can be approved that with flow type ipv4-tcp, rss hash can be
+calculated by only included IPv4 fields or only included TCP fields or both IPv4+TCP fields.
+
+
+Test Case 2: test with flow type ipv4-udp
+=========================================
+
+1. config testpmd on DUT
+
+1). set up testpmd with fortville NICs::
+ ./testpmd -c 0x1ffff -n 4 -- -i --coremask=0x1fffe --portmask=0x3
+--rxq=16 --txq=16 --txqflags=0
+
+2). Reta Configuration(optional, if not set, will use default)::
+ testpmd> port config 0 rss reta (hash_index,queue_id)
+
+3). PMD fwd only receive the packets::
+ testpmd> set fwd rxonly
+
+4). rss recived package type configuration::
+ testpmd> port config all rss udp
+
+5). set hash function::
+ testpmd>set_hash_global_config 0 toeplitz ipv4-udp enable
+
+6). verbose configuration::
+ testpmd> set verbose 8
+
+7). start packet receive::
+ testpmd> start
+
+2. using scapy to send packets with ipv4-udp on tester::
+
+ sendp([Ether(dst="%s")/IP(src="192.168.0.%d",
+ dst="192.168.0.%d")/UDP(sport=1024,dport=1025)], iface="%s"))
+
+then got hash value and queue value that output from the testpmd on DUT.
+
+3. set hash input set to "none" by testpmd on dut,
+
+testpmd> set_hash_input_set 0 ipv4-udp none select
+
+send packet as step 2, got hash value and queue value that output from
+the testpmd on DUT, the values shoud be different from the values in step 2.
+
+4. set hash input set by testpmd on dut, enable src-ipv4 and dst-ipv4,
+
+testpmd> set_hash_input_set 0 ipv4-udp src-ipv4 add set_hash_input_set
+testpmd> 0 ipv4-udp dst-ipv4 add
+
+send packet as step 2, got hash value and queue value that output from
+the testpmd on DUT, the values shoud be different from the values in step 2 & step 3.
+
+5. set hash input set by testpmd on dut, enable src-ipv4, dst-ipv4,
+udp-src-port, udp-dst-port
+
+testpmd> set_hash_input_set 0 ipv4-udp udp-src-port add
+testpmd> set_hash_input_set 0 ipv4-udp udp-dst-port add
+
+send packet as step 2, got hash value and queue value that output from
+the testpmd on DUT, the values shoud be should be different with the values from step 3 & step 4, should be same as step 2.
+
+6. set hash input set by testpmd on dut, enable udp-src-port,
+udp-dst-port
+
+testpmd> set_hash_input_set 0 ipv4-udp none select set_hash_input_set 0
+testpmd> ipv4-udp udp-src-port add set_hash_input_set 0 ipv4-udp
+testpmd> udp-dst-port add
+
+send packet as step 2, got hash value and queue value that output from
+the testpmd on DUT, the values shoud be should be different with the values from step2 & step 3 & step 4 & step 5.
+
+So it can be approved that with flow type ipv4-udp, rss hash can be
+calculated by only included IPv4 fields or only included UDP fields or both IPv4+UDP fields.
+
+Test Case 3: test with flow type ipv6-tcp
+=========================================
+
+test mothed is same as Test Case 1, but it need change all ipv4 to
+ipv6, and using scapy to send packets with ipv6-tcp on tester,
+
+sendp([Ether(dst="%s")/IPv6(src="3ffe:2501:200:1fff::%d",
+dst="3ffe:2501:200:3::%d")/TCP(sport=1024,dport=1025)], iface="%s")
+
+and the test result should be same as Test Case 1.
+
+
+Test Case 4: test with flow type ipv6-udp
+=========================================
+
+test mothed is same as Test Case 2, but it need change all ipv4 to
+ipv6, and using scapy to send packets with ipv6-udp on tester,
+
+sendp([Ether(dst="%s")/IPv6(src="3ffe:2501:200:1fff::%d",
+dst="3ffe:2501:200:3::%d")/UDP(sport=1024,dport=1025)], iface="%s")
+
+and the test result should be same as Test Case 2.
+
+Test Case 5: test dual vlan(QinQ)
+=====================================================
+1. config testpmd on DUT
+
+1). set up testpmd with fortville NICs::
+ ./testpmd -c 0x1ffff -n 4 -- -i --coremask=0x1fffe --portmask=0x3
+--rxq=16 --txq=16 --txqflags=0
+
+2). set qinq on::
+ testpmd> vlan set qinq on <port_id>
+
+3). Reta Configuration(optional, if not set, will use default)::
+ testpmd> port config 0 rss reta (hash_index,queue_id)
+
+4). PMD fwd only receive the packets::
+ testpmd> set fwd rxonly
+
+5). verbose configuration::
+ testpmd> set verbose 8
+
+6). start packet receive::
+ testpmd> start
+
+7). rss recived package type configuration::
+ testpmd> port config all rss ether
+
+2. using scapy to send packets with dual vlan (QinQ) on tester::
+
+
+ sendp([Ether(dst="%s")/Dot1Q(id=0x8100,vlan=%s)/Dot1Q(id=0x8100,vlan=%
+ s)], iface="%s")
+
+then got hash value and queue value that output from the testpmd on DUT.
+
+3. set hash input set to "none" by testpmd on dut::
+
+testpmd> set_hash_input_set 0 l2_payload none select
+
+send packet as step 2, got hash value and queue value that output from
+the testpmd on DUT, the value shoud be same with the values in step 2.
+
+4. set hash input set by testpmd on dut, enable ovlan field::
+
+testpmd> set_hash_input_set 0 l2_payload ovlan add
+
+send packet as step 2, got hash value and queue value that output from
+the testpmd on DUT, the value shoud be different with the values in step 2.
+
+5. set hash input set by testpmd on dut, enable ovlan, ivlan field::
+
+testpmd> set_hash_input_set 0 l2_payload ivlan add
+
+send packet as step 2, got hash value and queue value that output from
+the testpmd on DUT, the value shoud be different with the values in step 2.
+
+Test Case 6: 32-bit GRE keys and 24-bit GRE keys test
+=====================================================
+
+1. config testpmd on DUT
+
+1). set up testpmd with fortville NICs::
+ ./testpmd -c 0x1ffff -n 4 -- -i --coremask=0x1fffe --portmask=0x3
+--rxq=16 --txq=16 --txqflags=0
+
+2). Reta Configuration(optional, if not set, will use default)::
+ testpmd> port config 0 rss reta (hash_index,queue_id)
+
+3). PMD fwd only receive the packets::
+ testpmd> set fwd rxonly
+
+4). rss recived package type configuration::
+ testpmd> port config all rss all
+
+5). set hash function::
+ testpmd>set_hash_global_config 0 toeplitz ipv4-other enable
+
+6). verbose configuration::
+ testpmd> set verbose 8
+
+7). start packet receive::
+ testpmd> start
+
+2. using scapy to send packets with GRE header on tester::
+
+
+ sendp([Ether(dst="%s")/IP(src="192.168.0.1",dst="192.168.0.2",proto=47
+ )/GRE(key_present=1,proto=2048,key=67108863)/IP()], iface="%s")
+
+then got hash value and queue value that output from the testpmd on DUT.
+
+3. set hash input set to "none" by testpmd on dut,
+
+testpmd> set_hash_input_set 0 ipv4-other none select
+
+send packet as step 2, got hash value and queue value that output from
+the testpmd on DUT, the value shoud be different with the values in step 2.
+
+4. set hash input set by testpmd on dut, enable src-ipv4, dst-ipv4
+
+testpmd> set_hash_input_set 0 ipv4-other src-ipv4 add
+testpmd> set_hash_input_set 0 ipv4-other dst-ipv4 add
+
+send packet as step 2, got hash value and queue value that output from
+the testpmd on DUT, the value shoud be same with the values in step 2.
+
+4. set hash input set and gre-key-len=3 by testpmd on dut, enable
+gre-key
+
+testpmd> global_config 0 gre-key-len 3
+testpmd> set_hash_input_set 0 ipv4-other gre-key add
+
+send packet as step 2, got hash value and queue value that output from
+the testpmd on DUT, the values shoud be different with the values in step 2.
+
+5. set gre-key-len=4 by testpmd on dut, enable gre-key
+
+testpmd> global_config 0 gre-key-len 4
+
+send packet as step 2, got hash value and queue value that output from
+the testpmd on DUT, the values shoud be different with the values in step 4.
+
+So with gre-key-len=3 (24bit gre key) or gre-key-len=4 (32bit gre key),
+different rss hash value and queue value can be got, it can be proved that 32bit & 24bit gre key are supported by fortville.
diff --git a/tests/TestSuite_fortville_rss_granularity_config.py b/tests/TestSuite_fortville_rss_granularity_config.py
new file mode 100644
index 0000000..4982344
--- /dev/null
+++ b/tests/TestSuite_fortville_rss_granularity_config.py
@@ -0,0 +1,634 @@
+# 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 dts
+import dut
+
+testQueues = [16]
+reta_entries = []
+reta_lines = []
+reta_num = 128
+
+# 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", "redrockcanyou", "atwood", "boulderrapid", "fortpark_TLV"],
+ "NIC Unsupported: " + str(self.nic))
+ global reta_num
+ if self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV"]:
+ reta_num = 512
+ elif self.nic in ["niantic"]:
+ reta_num = 128
+ elif self.nic in ["redrockcanyou", "atwood", "boulderrapid"]:
+ reta_num = 128
This feature only supported by Fortville, why it need care other nics ?
Best Regards
Yulong Pei
+ else:
+ self.verify(False, "NIC Unsupported:%s" % str(self.nic))
+ ports = self.dut.get_ports(self.nic)
+ self.verify(len(ports) >= 1, "Not enough ports available")
+
+ def set_up(self):
+ """
+ Run before each test case.
+ """
+ pass
+ def send_packet(self, itf, tran_type):
+ """
+ Sends packets.
+ """
+ global reta_lines
+ global reta_num
+ self.tester.scapy_foreground()
+ self.dut.send_expect("start", "testpmd>")
+ mac = self.dut.get_mac_address(0)
+
+ # send packet with different source and dest ip
+ i = 0
+ if tran_type == "ipv4-other":
+ packet = r'sendp([Ether(dst="%s", src=get_if_hwaddr("%s"))/IP(src="192.168.0.%d", dst="192.168.0.%d", proto=47)/GRE(key_present=1,proto=2048,key=67108863)/IP()], iface="%s")' % (
+ mac, itf, i + 1, i + 2, 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="192.168.0.%d", dst="192.168.0.%d")/TCP(sport=1024,dport=1024)], iface="%s")' % (
+ mac, itf, i + 1, i + 2, 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="192.168.0.%d", dst="192.168.0.%d")/UDP(sport=1024,dport=1024)], iface="%s")' % (
+ mac, itf, i + 1, i + 2, itf)
+ self.tester.scapy_append(packet)
+ self.tester.scapy_execute()
+ time.sleep(.5)
+ elif tran_type == "l2_payload":
+ packet = r'sendp([Ether(dst="%s", src=get_if_hwaddr("%s"))/Dot1Q(id=0x8100,vlan=%s)/Dot1Q(id=0x8100,vlan=%s)], iface="%s")' % (
+ mac, itf, i + 1, i + 2, 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="3ffe:2501:200:1fff::%d", dst="3ffe:2501:200:3::%d")/TCP(sport=1024,dport=1024)], iface="%s")' % (
+ mac, itf, i + 1, i + 2, 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="3ffe:2501:200:1fff::%d", dst="3ffe:2501:200:3::%d")/UDP(sport=1024,dport=1024)], iface="%s")' % (
+ mac, itf, i + 1, i + 2, 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
+ global reta_num
+
+ #append the the hash value and queue id into table
+ dts.results_table_add_header(
+ ['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) % reta_num
+ dts.results_table_add_row(
+ [i, tmp_reta_line["RSS hash"], hash_index, tmp_reta_line["queue"]])
+ i = i + 1
+
+
+ def test_ipv4_tcp(self):
+ dutPorts = self.dut.get_ports(self.nic)
+ localPort = self.tester.get_local_port(dutPorts[0])
+ itf = self.tester.get_interface(localPort)
+ global reta_num
+ global reta_lines
+ flag = 1
+ self.dut.kill_all()
+
+ # test with different rss queues
+ for queue in testQueues:
+ self.dut.send_expect(
+ "./%s/app/testpmd -c fffff -n %d -- -i --coremask=0xffffe --portmask=0x3 --rxq=%d --txq=%d --txqflags=0" %
+ (self.target, self.dut.get_memory_channels(), queue,
+ queue), "testpmd> ", 120)
+
+ self.dut.send_expect("set verbose 8", "testpmd> ")
+ self.dut.send_expect("set fwd rxonly", "testpmd> ")
+
+ self.dut.send_expect("port stop all", "testpmd> ")
+ self.dut.send_expect(
+ "set_hash_global_config 0 toeplitz ipv4-tcp enable", "testpmd> ")
+ self.dut.send_expect("port start all", "testpmd> ")
+ self.dut.send_expect(
+ "port config all rss tcp", "testpmd> ")
+ self.send_packet(itf, "ipv4-tcp")
+
+ #set hash input set to "none" by testpmd on dut
+ self.dut.send_expect("set_hash_input_set 0 ipv4-tcp none select", "testpmd> ")
+ self.send_packet(itf, "ipv4-tcp")
+
+ #set hash input set by testpmd on dut, enable src-ipv4 & dst-ipv4
+ self.dut.send_expect("set_hash_input_set 0 ipv4-tcp src-ipv4 add", "testpmd> ")
+ self.dut.send_expect("set_hash_input_set 0 ipv4-tcp dst-ipv4 add", "testpmd> ")
+ self.send_packet(itf, "ipv4-tcp")
+
+ #set hash input set by testpmd on dut, enable src-ipv4, dst-ipv4, tcp-src-port, tcp-dst-port
+ self.dut.send_expect("set_hash_input_set 0 ipv4-tcp tcp-src-port add", "testpmd> ")
+ self.dut.send_expect("set_hash_input_set 0 ipv4-tcp tcp-dst-port add", "testpmd> ")
+ self.send_packet(itf, "ipv4-tcp")
+
+ #set hash input set by testpmd on dut, enable tcp-src-port, tcp-dst-port
+ self.dut.send_expect("set_hash_input_set 0 ipv4-tcp none select", "testpmd> ")
+ self.dut.send_expect("set_hash_input_set 0 ipv4-tcp tcp-src-port add", "testpmd> ")
+ self.dut.send_expect("set_hash_input_set 0 ipv4-tcp tcp-dst-port add", "testpmd> ")
+ self.send_packet(itf, "ipv4-tcp")
+
+ self.dut.send_expect("quit", "# ", 30)
+ dts.results_table_print()
+ self.verify(len(dts.results_table_rows) > 1, "There is no data in the
+table, testcase failed!")
+
+
+ if ((dts.results_table_rows[1][1]==dts.results_table_rows[2][1])or(dts.results_table_rows[1][3]==dts.results_table_rows[2][3])):
+ flag = 0
+ self.verify(flag, "The two hash values are the same, rss_granularity_config failed!")
+ elif ((dts.results_table_rows[1][1]==dts.results_table_rows[3][1])or(dts.results_table_rows[1][3]==dts.results_table_rows[3][3])):
+ flag = 0
+ self.verify(flag, "The two hash values are the same, rss_granularity_config failed!")
+ elif ((dts.results_table_rows[2][1]==dts.results_table_rows[3][1])or(dts.results_table_rows[2][3]==dts.results_table_rows[3][3])):
+ flag = 0
+ self.verify(flag, "The two hash values are the same, rss_granularity_config failed!")
+ elif ((dts.results_table_rows[1][1]==dts.results_table_rows[5][1])or(dts.results_table_rows[1][3]==dts.results_table_rows[5][3])):
+ flag = 0
+ self.verify(flag, "The two hash values are the same, rss_granularity_config failed!")
+ elif ((dts.results_table_rows[2][1]==dts.results_table_rows[5][1])or(dts.results_table_rows[2][3]==dts.results_table_rows[5][3])):
+ flag = 0
+ self.verify(flag, "The two hash values are the same, rss_granularity_config failed!")
+ elif ((dts.results_table_rows[3][1]==dts.results_table_rows[5][1])or(dts.results_table_rows[3][3]==dts.results_table_rows[5][3])):
+ flag = 0
+ self.verify(flag, "The two hash values are the same, rss_granularity_config failed!")
+ elif ((dts.results_table_rows[1][1]!=dts.results_table_rows[4][1])or(dts.results_table_rows[1][3]!=dts.results_table_rows[4][3])):
+ flag = 0
+ self.verify(flag, "The two hash values are different,
+rss_granularity_config failed!")
+
+ reta_lines = []
+
+ def test_ipv4_udp(self):
+ dutPorts = self.dut.get_ports(self.nic)
+ localPort = self.tester.get_local_port(dutPorts[0])
+ itf = self.tester.get_interface(localPort)
+ global reta_num
+ global reta_lines
+ flag = 1
+ self.dut.kill_all()
+
+ # test with different rss queues
+ for queue in testQueues:
+ self.dut.send_expect(
+ "./%s/app/testpmd -c fffff -n %d -- -i --coremask=0xffffe --portmask=0x3 --rxq=%d --txq=%d --txqflags=0" %
+ (self.target, self.dut.get_memory_channels(), queue,
+ queue), "testpmd> ", 120)
+
+ self.dut.send_expect("set verbose 8", "testpmd> ")
+ self.dut.send_expect("set fwd rxonly", "testpmd> ")
+
+ self.dut.send_expect("port stop all", "testpmd> ")
+ self.dut.send_expect(
+ "set_hash_global_config 0 toeplitz ipv4-udp enable", "testpmd> ")
+ self.dut.send_expect("port start all", "testpmd> ")
+ self.dut.send_expect(
+ "port config all rss udp", "testpmd> ")
+ self.send_packet(itf, "ipv4-udp")
+
+ #set hash input set to "none" by testpmd on dut
+ self.dut.send_expect("set_hash_input_set 0 ipv4-udp none select", "testpmd> ")
+ self.send_packet(itf, "ipv4-udp")
+
+ #set hash input set by testpmd on dut, enable src-ipv4 & dst-ipv4
+ self.dut.send_expect("set_hash_input_set 0 ipv4-udp src-ipv4 add", "testpmd> ")
+ self.dut.send_expect("set_hash_input_set 0 ipv4-udp dst-ipv4 add", "testpmd> ")
+ self.send_packet(itf, "ipv4-udp")
+
+ #set hash input set by testpmd on dut, enable src-ipv4, dst-ipv4, udp-src-port, udp-dst-port
+ self.dut.send_expect("set_hash_input_set 0 ipv4-udp udp-src-port add", "testpmd> ")
+ self.dut.send_expect("set_hash_input_set 0 ipv4-udp udp-dst-port add", "testpmd> ")
+ self.send_packet(itf, "ipv4-udp")
+
+ #set hash input set by testpmd on dut, enable udp-src-port, udp-dst-port
+ self.dut.send_expect("set_hash_input_set 0 ipv4-udp none select", "testpmd> ")
+ self.dut.send_expect("set_hash_input_set 0 ipv4-udp udp-src-port add", "testpmd> ")
+ self.dut.send_expect("set_hash_input_set 0 ipv4-udp udp-dst-port add", "testpmd> ")
+ self.send_packet(itf, "ipv4-udp")
+
+ self.dut.send_expect("quit", "# ", 30)
+ dts.results_table_print()
+ self.verify(len(dts.results_table_rows) > 1, "There is no data
+ in the table, testcase failed!")
+
+ #check the results
+ if ((dts.results_table_rows[1][1]==dts.results_table_rows[2][1])or(dts.results_table_rows[1][3]==dts.results_table_rows[2][3])):
+ flag = 0
+ self.verify(flag, "The two hash values are the same, rss_granularity_config failed!")
+ elif ((dts.results_table_rows[1][1]==dts.results_table_rows[3][1])or(dts.results_table_rows[1][3]==dts.results_table_rows[3][3])):
+ flag = 0
+ self.verify(flag, "The two hash values are the same, rss_granularity_config failed!")
+ elif ((dts.results_table_rows[2][1]==dts.results_table_rows[3][1])or(dts.results_table_rows[2][3]==dts.results_table_rows[3][3])):
+ flag = 0
+ self.verify(flag, "The two hash values are the same, rss_granularity_config failed!")
+ elif ((dts.results_table_rows[1][1]==dts.results_table_rows[5][1])or(dts.results_table_rows[1][3]==dts.results_table_rows[5][3])):
+ flag = 0
+ self.verify(flag, "The two hash values are the same, rss_granularity_config failed!")
+ elif ((dts.results_table_rows[2][1]==dts.results_table_rows[5][1])or(dts.results_table_rows[2][3]==dts.results_table_rows[5][3])):
+ flag = 0
+ self.verify(flag, "The two hash values are the same, rss_granularity_config failed!")
+ elif ((dts.results_table_rows[3][1]==dts.results_table_rows[5][1])or(dts.results_table_rows[3][3]==dts.results_table_rows[5][3])):
+ flag = 0
+ self.verify(flag, "The two hash values are the same, rss_granularity_config failed!")
+ elif ((dts.results_table_rows[1][1]!=dts.results_table_rows[4][1])or(dts.results_table_rows[1][3]!=dts.results_table_rows[4][3])):
+ flag = 0
+ self.verify(flag, "The two hash values are different,
+ rss_granularity_config failed!")
+
+ reta_lines = []
+
+ def test_ipv6_tcp(self):
+ dutPorts = self.dut.get_ports(self.nic)
+ localPort = self.tester.get_local_port(dutPorts[0])
+ itf = self.tester.get_interface(localPort)
+ global reta_num
+ global reta_lines
+ flag = 1
+ self.dut.kill_all()
+
+ # test with different rss queues
+ for queue in testQueues:
+ self.dut.send_expect(
+ "./%s/app/testpmd -c fffff -n %d -- -i --coremask=0xffffe --portmask=0x3 --rxq=%d --txq=%d --txqflags=0" %
+ (self.target, self.dut.get_memory_channels(), queue,
+ queue), "testpmd> ", 120)
+
+ self.dut.send_expect("set verbose 8", "testpmd> ")
+ self.dut.send_expect("set fwd rxonly", "testpmd> ")
+
+ self.dut.send_expect("port stop all", "testpmd> ")
+ self.dut.send_expect(
+ "set_hash_global_config 0 toeplitz ipv6-tcp enable", "testpmd> ")
+ self.dut.send_expect("port start all", "testpmd> ")
+ self.dut.send_expect(
+ "port config all rss tcp", "testpmd> ")
+ self.send_packet(itf, "ipv6-tcp")
+
+ #set hash input set to "none" by testpmd on dut
+ self.dut.send_expect("set_hash_input_set 0 ipv6-tcp none select", "testpmd> ")
+ self.send_packet(itf, "ipv6-tcp")
+
+ #set hash input set by testpmd on dut, enable src-ipv6 & dst-ipv6
+ self.dut.send_expect("set_hash_input_set 0 ipv6-tcp src-ipv6 add", "testpmd> ")
+ self.dut.send_expect("set_hash_input_set 0 ipv6-tcp dst-ipv6 add", "testpmd> ")
+ self.send_packet(itf, "ipv6-tcp")
+
+ #set hash input set by testpmd on dut, enable src-ipv6, dst-ipv6, tcp-src-port, tcp-dst-port
+ self.dut.send_expect("set_hash_input_set 0 ipv6-tcp tcp-src-port add", "testpmd> ")
+ self.dut.send_expect("set_hash_input_set 0 ipv6-tcp tcp-dst-port add", "testpmd> ")
+ self.send_packet(itf, "ipv6-tcp")
+
+ #set hash input set by testpmd on dut, enable tcp-src-port, tcp-dst-port
+ self.dut.send_expect("set_hash_input_set 0 ipv6-tcp none select", "testpmd> ")
+ self.dut.send_expect("set_hash_input_set 0 ipv6-tcp tcp-src-port add", "testpmd> ")
+ self.dut.send_expect("set_hash_input_set 0 ipv6-tcp tcp-dst-port add", "testpmd> ")
+ self.send_packet(itf, "ipv6-tcp")
+
+ self.dut.send_expect("quit", "# ", 30)
+ dts.results_table_print()
+ self.verify(len(dts.results_table_rows) > 1, "There is no data
+in the table, testcase failed!")
+
+ #check the results
+ if ((dts.results_table_rows[1][1]==dts.results_table_rows[2][1])or(dts.results_table_rows[1][3]==dts.results_table_rows[2][3])):
+ flag = 0
+ self.verify(flag, "The two hash values are the same, rss_granularity_config failed!")
+ elif ((dts.results_table_rows[1][1]==dts.results_table_rows[3][1])or(dts.results_table_rows[1][3]==dts.results_table_rows[3][3])):
+ flag = 0
+ self.verify(flag, "The two hash values are the same, rss_granularity_config failed!")
+ elif ((dts.results_table_rows[2][1]==dts.results_table_rows[3][1])or(dts.results_table_rows[2][3]==dts.results_table_rows[3][3])):
+ flag = 0
+ self.verify(flag, "The two hash values are the same, rss_granularity_config failed!")
+ elif ((dts.results_table_rows[1][1]==dts.results_table_rows[5][1])or(dts.results_table_rows[1][3]==dts.results_table_rows[5][3])):
+ flag = 0
+ self.verify(flag, "The two hash values are the same, rss_granularity_config failed!")
+ elif ((dts.results_table_rows[2][1]==dts.results_table_rows[5][1])or(dts.results_table_rows[2][3]==dts.results_table_rows[5][3])):
+ flag = 0
+ self.verify(flag, "The two hash values are the same, rss_granularity_config failed!")
+ elif ((dts.results_table_rows[3][1]==dts.results_table_rows[5][1])or(dts.results_table_rows[3][3]==dts.results_table_rows[5][3])):
+ flag = 0
+ self.verify(flag, "The two hash values are the same, rss_granularity_config failed!")
+ elif ((dts.results_table_rows[1][1]!=dts.results_table_rows[4][1])or(dts.results_table_rows[1][3]!=dts.results_table_rows[4][3])):
+ flag = 0
+ self.verify(flag, "The two hash values are different,
+ rss_granularity_config failed!")
+
+ reta_lines = []
+
+ def test_ipv6_udp(self):
+ dutPorts = self.dut.get_ports(self.nic)
+ localPort = self.tester.get_local_port(dutPorts[0])
+ itf = self.tester.get_interface(localPort)
+ global reta_num
+ global reta_lines
+ flag = 1
+ self.dut.kill_all()
+
+ # test with different rss queues
+ for queue in testQueues:
+ self.dut.send_expect(
+ "./%s/app/testpmd -c fffff -n %d -- -i --coremask=0xffffe --portmask=0x3 --rxq=%d --txq=%d --txqflags=0" %
+ (self.target, self.dut.get_memory_channels(), queue,
+ queue), "testpmd> ", 120)
+
+ self.dut.send_expect("set verbose 8", "testpmd> ")
+ self.dut.send_expect("set fwd rxonly", "testpmd> ")
+
+ self.dut.send_expect("port stop all", "testpmd> ")
+ self.dut.send_expect(
+ "set_hash_global_config 0 toeplitz ipv6-udp enable", "testpmd> ")
+ self.dut.send_expect("port start all", "testpmd> ")
+ self.dut.send_expect(
+ "port config all rss udp", "testpmd> ")
+ self.send_packet(itf, "ipv6-udp")
+
+ #set hash input set to "none" by testpmd on dut
+ self.dut.send_expect("set_hash_input_set 0 ipv6-udp none select", "testpmd> ")
+ self.send_packet(itf, "ipv6-udp")
+
+ #set hash input set by testpmd on dut, enable src-ipv6 & dst-ipv6
+ self.dut.send_expect("set_hash_input_set 0 ipv6-udp src-ipv6 add", "testpmd> ")
+ self.dut.send_expect("set_hash_input_set 0 ipv6-udp dst-ipv6 add", "testpmd> ")
+ self.send_packet(itf, "ipv6-udp")
+
+ #set hash input set by testpmd on dut, enable src-ipv6, dst-ipv6, udp-src-port, udp-dst-port
+ self.dut.send_expect("set_hash_input_set 0 ipv6-udp udp-src-port add", "testpmd> ")
+ self.dut.send_expect("set_hash_input_set 0 ipv6-udp udp-dst-port add", "testpmd> ")
+ self.send_packet(itf, "ipv6-udp")
+
+ #set hash input set by testpmd on dut, enable udp-src-port, udp-dst-port
+ self.dut.send_expect("set_hash_input_set 0 ipv6-udp none select", "testpmd> ")
+ self.dut.send_expect("set_hash_input_set 0 ipv6-udp udp-src-port add", "testpmd> ")
+ self.dut.send_expect("set_hash_input_set 0 ipv6-udp udp-dst-port add", "testpmd> ")
+ self.send_packet(itf, "ipv6-udp")
+
+ self.dut.send_expect("quit", "# ", 30)
+ dts.results_table_print()
+ self.verify(len(dts.results_table_rows) > 1, "There is no data
+ in the table, testcase failed!")
+
+ #check the results
+ if ((dts.results_table_rows[1][1]==dts.results_table_rows[2][1])or(dts.results_table_rows[1][3]==dts.results_table_rows[2][3])):
+ flag = 0
+ self.verify(flag, "The two hash values are the same, rss_granularity_config failed!")
+ elif ((dts.results_table_rows[1][1]==dts.results_table_rows[3][1])or(dts.results_table_rows[1][3]==dts.results_table_rows[3][3])):
+ flag = 0
+ self.verify(flag, "The two hash values are the same, rss_granularity_config failed!")
+ elif ((dts.results_table_rows[2][1]==dts.results_table_rows[3][1])or(dts.results_table_rows[2][3]==dts.results_table_rows[3][3])):
+ flag = 0
+ self.verify(flag, "The two hash values are the same, rss_granularity_config failed!")
+ elif ((dts.results_table_rows[1][1]==dts.results_table_rows[5][1])or(dts.results_table_rows[1][3]==dts.results_table_rows[5][3])):
+ flag = 0
+ self.verify(flag, "The two hash values are the same, rss_granularity_config failed!")
+ elif ((dts.results_table_rows[2][1]==dts.results_table_rows[5][1])or(dts.results_table_rows[2][3]==dts.results_table_rows[5][3])):
+ flag = 0
+ self.verify(flag, "The two hash values are the same, rss_granularity_config failed!")
+ elif ((dts.results_table_rows[3][1]==dts.results_table_rows[5][1])or(dts.results_table_rows[3][3]==dts.results_table_rows[5][3])):
+ flag = 0
+ self.verify(flag, "The two hash values are the same, rss_granularity_config failed!")
+ elif ((dts.results_table_rows[1][1]!=dts.results_table_rows[4][1])or(dts.results_table_rows[1][3]!=dts.results_table_rows[4][3])):
+ flag = 0
+ self.verify(flag, "The two hash values are different,
+ rss_granularity_config failed!")
+
+ reta_lines = []
+
+ def test_dual_vlan(self):
+ dutPorts = self.dut.get_ports(self.nic)
+ localPort = self.tester.get_local_port(dutPorts[0])
+ itf = self.tester.get_interface(localPort)
+ global reta_num
+ global reta_lines
+ flag = 1
+ self.dut.kill_all()
+
+ # test with different rss queues
+ for queue in testQueues:
+ self.dut.send_expect(
+ "./%s/app/testpmd -c fffff -n %d -- -i --coremask=0xffffe --portmask=0x3 --rxq=%d --txq=%d --txqflags=0" %
+ (self.target, self.dut.get_memory_channels(), queue,
+ queue), "testpmd> ", 120)
+
+ self.dut.send_expect("set verbose 8", "testpmd> ")
+ self.dut.send_expect("set fwd rxonly", "testpmd> ")
+
+ self.dut.send_expect("port stop all", "testpmd> ")
+ self.dut.send_expect("vlan set qinq on 0", "testpmd> ")
+ self.dut.send_expect(
+ "set_hash_global_config 0 toeplitz l2_payload enable", "testpmd> ")
+ self.dut.send_expect("port start all", "testpmd> ")
+ self.dut.send_expect(
+ "port config all rss ether", "testpmd> ")
+ self.send_packet(itf, "l2_payload")
+
+ #set hash input set to "none" by testpmd on dut
+ self.dut.send_expect("set_hash_input_set 0 l2_payload none select", "testpmd> ")
+ self.send_packet(itf, "l2_payload")
+
+ #set hash input set by testpmd on dut, enable ovlan
+ self.dut.send_expect("set_hash_input_set 0 l2_payload ovlan add", "testpmd> ")
+ self.send_packet(itf, "l2_payload")
+
+ #set hash input set by testpmd on dut, enable ovlan & ivlan
+ self.dut.send_expect("set_hash_input_set 0 l2_payload ivlan add", "testpmd> ")
+ self.send_packet(itf, "l2_payload")
+
+
+ self.dut.send_expect("quit", "# ", 30)
+ dts.results_table_print()
+ self.verify(len(dts.results_table_rows) > 1, "There is no data
+in the table, testcase failed!")
+
+ #check the results
+ if ((dts.results_table_rows[1][1]!=dts.results_table_rows[2][1])or(dts.results_table_rows[1][3]!=dts.results_table_rows[2][3])):
+ flag = 0
+ self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+ elif ((dts.results_table_rows[1][1]==dts.results_table_rows[3][1])or(dts.results_table_rows[1][3]==dts.results_table_rows[3][3])):
+ flag = 0
+ self.verify(flag, "The two hash values are the same, rss_granularity_config failed!")
+ elif ((dts.results_table_rows[1][1]==dts.results_table_rows[4][1])or(dts.results_table_rows[1][3]==dts.results_table_rows[4][3])):
+ flag = 0
+ self.verify(flag, "The two hash values are the same, rss_granularity_config failed!")
+ elif ((dts.results_table_rows[3][1]==dts.results_table_rows[4][1])or(dts.results_table_rows[3][3]==dts.results_table_rows[4][3])):
+ flag = 0
+ self.verify(flag, "The two hash values are the same,
+ rss_granularity_config failed!")
+
+ reta_lines = []
+
+ def test_GRE_keys(self):
+ dutPorts = self.dut.get_ports(self.nic)
+ localPort = self.tester.get_local_port(dutPorts[0])
+ itf = self.tester.get_interface(localPort)
+ global reta_num
+ global reta_lines
+ flag = 1
+ self.dut.kill_all()
+
+ # test with different rss queues
+ for queue in testQueues:
+ self.dut.send_expect(
+ "./%s/app/testpmd -c fffff -n %d -- -i --coremask=0xffffe --portmask=0x3 --rxq=%d --txq=%d --txqflags=0" %
+ (self.target, self.dut.get_memory_channels(), queue,
+ queue), "testpmd> ", 120)
+
+ self.dut.send_expect("set verbose 8", "testpmd> ")
+ self.dut.send_expect("set fwd rxonly", "testpmd> ")
+
+ self.dut.send_expect("port stop all", "testpmd> ")
+ self.dut.send_expect(
+ "set_hash_global_config 0 toeplitz ipv4-other enable", "testpmd> ")
+ self.dut.send_expect("port start all", "testpmd> ")
+ self.dut.send_expect(
+ "port config all rss all", "testpmd> ")
+ self.send_packet(itf, "ipv4-other")
+
+ #set hash input set to "none" by testpmd on dut
+ self.dut.send_expect("set_hash_input_set 0 ipv4-other none select", "testpmd> ")
+ self.send_packet(itf, "ipv4-other")
+
+ #set hash input set by testpmd on dut, enable src-ipv4 & dst-ipv4
+ self.dut.send_expect("set_hash_input_set 0 ipv4-other src-ipv4 add", "testpmd> ")
+ self.dut.send_expect("set_hash_input_set 0 ipv4-other dst-ipv4 add", "testpmd> ")
+ self.send_packet(itf, "ipv4-other")
+
+ #set hash input set by testpmd on dut, enable src-ipv4, dst-ipv4, gre-key-len 3
+ self.dut.send_expect("global_config 0 gre-key-len 3", "testpmd> ")
+ self.dut.send_expect("set_hash_input_set 0 ipv4-other gre-key add", "testpmd> ")
+ self.send_packet(itf, "ipv4-other")
+
+ #set hash input set by testpmd on dut, enable src-ipv4, dst-ipv4, gre-key-len 4
+ self.dut.send_expect("global_config 0 gre-key-len 4", "testpmd> ")
+ self.send_packet(itf, "ipv4-other")
+
+ self.dut.send_expect("quit", "# ", 30)
+ dts.results_table_print()
+ self.verify(len(dts.results_table_rows) > 1, "There is no data
+ in the table, testcase failed!")
+
+ #check the results
+ if ((dts.results_table_rows[1][1]==dts.results_table_rows[2][1])or(dts.results_table_rows[1][3]==dts.results_table_rows[2][3])):
+ flag = 0
+ self.verify(flag, "The two hash values are the same, rss_granularity_config failed!")
+ elif ((dts.results_table_rows[1][1]!=dts.results_table_rows[3][1])or(dts.results_table_rows[1][3]!=dts.results_table_rows[3][3])):
+ flag = 0
+ self.verify(flag, "The two hash values are different, rss_granularity_config failed!")
+ elif ((dts.results_table_rows[1][1]==dts.results_table_rows[4][1])or(dts.results_table_rows[1][3]==dts.results_table_rows[4][3])):
+ flag = 0
+ self.verify(flag, "The two hash values are the same, rss_granularity_config failed!")
+ elif ((dts.results_table_rows[4][1]==dts.results_table_rows[5][1])or(dts.results_table_rows[4][3]==dts.results_table_rows[5][3])):
+ flag = 0
+ self.verify(flag, "The two hash values are the same,
+ rss_granularity_config failed!")
+
+ reta_lines = []
+
+
+ def tear_down(self):
+ """
+ Run after each test case.
+ """
+ pass
+
+ def tear_down_all(self):
+ """
+ Run after each test suite.
+ """
+ pass
+
--
2.5.0
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2016-06-22 8:25 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <yes>
2016-06-15 8:12 ` [dts] [PATCH] Support fortpark_TLV pengyuan
2016-06-21 9:01 ` Liu, Yong
2016-06-15 8:46 ` [dts] [PATCH] Support NIC type fortpark_TLV pengyuan
2016-06-21 9:08 ` Liu, Yong
2016-06-16 1:19 ` [dts] [PATCH] *** tests: add fortville rss granularity script *** pengyuan
2016-06-16 1:19 ` [dts] [PATCH] tests: add fortville rss granularity script pengyuan
2016-06-22 8:25 ` Pei, Yulong
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).