From: "xu,huilong" <huilongx.xu@intel.com>
To: dts@dpdk.org
Cc: "xu,huilong" <huilongx.xu@intel.com>
Subject: [dts] [PATCH 1/2] update fdir test case
Date: Fri, 12 May 2017 15:44:29 +0800 [thread overview]
Message-ID: <1494575072-44798-9-git-send-email-huilongx.xu@intel.com> (raw)
In-Reply-To: <1494575072-44798-1-git-send-email-huilongx.xu@intel.com>
update list:
1. support fortville 25G NIC
2. add three case for fortville
Signed-off-by: xu,huilong <huilongx.xu@intel.com>
---
tests/TestSuite_fdir.py | 367 ++++++++++++++++++++++++++++++++++++++++++++++--
1 file changed, 353 insertions(+), 14 deletions(-)
diff --git a/tests/TestSuite_fdir.py b/tests/TestSuite_fdir.py
index aa0ec52..44f1e96 100644
--- a/tests/TestSuite_fdir.py
+++ b/tests/TestSuite_fdir.py
@@ -64,7 +64,7 @@ class TestFdir(TestCase, IxiaPacketGenerator):
#
###########################################################################
- def send_and_verify(self, condition, packet):
+ def send_and_verify(self, condition, packet, queueid = -2):
"""
Send packages and verify behavior.
"""
@@ -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", "fortpark_TLV"]):
+ if(self.nic in ["kawela", "niantic", "fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV", "fortville_25g"]):
if ("fwd" == self.fdir_type):
if condition:
self.queue = 2
@@ -89,6 +89,8 @@ class TestFdir(TestCase, IxiaPacketGenerator):
self.queue = 0
else:
self.queue = -1
+ else:
+ self.queue = queueid
result_scanner = r"port ([0-9]+)/queue ([0-9]+): received ([0-9]+) packets\s*src=[A-F\d]{2}:[A-F\d]{2}:[A-F\d]{2}:[A-F\d]{2}:[A-F\d]{2}:[A-F\d]{2} - dst=[A-F\d]{2}:[A-F\d]{2}:[A-F\d]{2}:[A-F\d]{2}:[A-F\d]{2}:[A-F\d]{2}"
scanner = re.compile(result_scanner, re.DOTALL)
@@ -205,7 +207,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", "fortpark_TLV"]):
+ if(self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV", "fortville_25g"]):
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 +223,7 @@ class TestFdir(TestCase, IxiaPacketGenerator):
Fdir get flexbytes and payload according NIC
"""
- if(self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV"]):
+ if(self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV", "fortville_25g"]):
if not sctp:
self.flexbytes = "0x11,0x11,0x22,0x22,0x33,0x33,0x44,0x44,0x55,0x55,0x66,0x66,0x77,0x77,0x88,0x88"
else:
@@ -297,7 +299,7 @@ class TestFdir(TestCase, IxiaPacketGenerator):
# ipv4 frag
# ip-frag only support in fortville
- if (self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV"]):
+ if (self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV", "fortville_25g"]):
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 +318,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, utils.create_mask([self.dut_ports[0]])), "testpmd>", 120)
- elif self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV"]:
+ elif self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV", "fortville_25g"]:
# 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, utils.create_mask([self.dut_ports[0]])), "testpmd>", 120)
self.dut.send_expect("set verbose 1", "testpmd>")
@@ -373,7 +375,7 @@ class TestFdir(TestCase, IxiaPacketGenerator):
# ipv6 frag
# ip-frag only support in fortville
- if (self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV"]):
+ if (self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV", "fortville_25g"]):
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 +443,7 @@ class TestFdir(TestCase, IxiaPacketGenerator):
# ipv4 frag
# ip-frag only support in fortville
- if (self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV"]):
+ if (self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV", "fortville_25g"]):
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 +462,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", "fortpark_TLV"]:
+ if self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV", "fortville_25g"]:
# drop command testing
self.dut.kill_all()
@@ -563,7 +565,7 @@ class TestFdir(TestCase, IxiaPacketGenerator):
# ipv4 frag
# ip-frag only support fortville
- if (self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV"]):
+ if (self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV", "fortville_25g"]):
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 +603,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, utils.create_mask([self.dut_ports[0]])), "testpmd>", 120)
- elif self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV"]:
+ elif self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV", "fortville_25g"]:
# 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, utils.create_mask([self.dut_ports[0]])), "testpmd>", 120)
self.dut.send_expect("set verbose 1", "testpmd>")
@@ -657,7 +659,7 @@ class TestFdir(TestCase, IxiaPacketGenerator):
# ipv6 frag
# ip-frag only support fortville
- if (self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV"]):
+ if (self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV", "fortville_25g"]):
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 +709,7 @@ class TestFdir(TestCase, IxiaPacketGenerator):
# ipv4 frag
# ip-frag only support fortville
- if (self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV"]):
+ if (self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV", "fortville_25g"]):
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 +728,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", "fortpark_TLV"]):
+ if (self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV", "fortville_25g"]):
# 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, utils.create_mask([self.dut_ports[0]])), "testpmd>", 120)
self.dut.send_expect("set verbose 1", "testpmd>")
@@ -764,6 +766,343 @@ class TestFdir(TestCase, IxiaPacketGenerator):
self.dut.send_expect("quit", "# ", 30)
+ def test_ipv4_tos_proto_ttl(self):
+ """
+ Expand Flow Director for fortville to support ipv4 TOS, ipv4 PROTO, ipv4 TTL
+ """
+ if not self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortville_25g"]:
+ self.verify(False, "This case only support fortville nic")
+ self.dut.kill_all()
+ 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, utils.create_mask([self.dut_ports[0]])), "testpmd>", 120)
+ self.dut.send_expect("set verbose 1", "testpmd>")
+ self.dut.send_expect("set fwd rxonly", "testpmd>")
+
+ self.fdir_set_rule()
+ self.fdir_get_flexbytes()
+ # fwd comand testing
+ self.fdir_type = " "
+ self.dut.send_expect("set_fdir_input_set %d ipv4-other none select" % self.dut_ports[0], "testpmd>")
+ self.dut.send_expect("set_fdir_input_set %d ipv4-other src-ipv4 add" % self.dut_ports[0], "testpmd>")
+ self.dut.send_expect("set_fdir_input_set %d ipv4-other dst-ipv4 add" % self.dut_ports[0], "testpmd>")
+
+ # test add and remove tso rule
+ self.dut.send_expect("set_fdir_input_set %d ipv4-other ipv4-tos add" % self.dut_ports[0], "testpmd>")
+ self.dut.send_expect("flow_director_filter %d mode IP add flow ipv4-other src 192.168.1.1 dst 192.168.1.2 \
+ tos 16 proto 255 ttl 255 vlan 0 flexbytes (%s) fwd pf queue 1 fd_id 1"
+ % (self.dut_ports[0], self.flexbytes), "testpmd>")
+ self.dut.send_expect("flow_director_filter %d mode IP add flow ipv4-other src 192.168.1.1 dst 192.168.1.2 \
+ tos 8 proto 255 ttl 255 vlan 0 flexbytes (%s) fwd pf queue 2 fd_id 2"
+ % (self.dut_ports[0], self.flexbytes), "testpmd>")
+
+ self.send_and_verify(True, 'sendp([Ether(src=get_if_hwaddr("%s"), dst="00:1B:21:8E:B2:30") \
+ /IP(src="192.168.1.1", dst="192.168.1.2", tos=16, proto=255, ttl=255) \
+ /Raw(load="%s")], iface="%s")' \
+ % (self.dut_rx_interface, self.payload, self.dut_rx_interface), queueid = 1)
+ self.send_and_verify(True, 'sendp([Ether(src=get_if_hwaddr("%s"), dst="00:1B:21:8E:B2:30") \
+ /IP(src="192.168.1.1", dst="192.168.1.2", tos=8, proto=255, ttl=255) \
+ /Raw(load="%s")], iface="%s")' \
+ % (self.dut_rx_interface, self.payload, self.dut_rx_interface), queueid = 2)
+
+ self.dut.send_expect("flow_director_filter %d mode IP del flow ipv4-other src 192.168.1.1 dst 192.168.1.2 \
+ tos 16 proto 255 ttl 255 vlan 0 flexbytes (%s) fwd pf queue 1 fd_id 1"
+ % (self.dut_ports[0], self.flexbytes), "testpmd>")
+ self.dut.send_expect("flow_director_filter %d mode IP del flow ipv4-other src 192.168.1.1 dst 192.168.1.2 \
+ tos 8 proto 255 ttl 255 vlan 0 flexbytes (%s) fwd pf queue 2 fd_id 2"
+ % (self.dut_ports[0], self.flexbytes), "testpmd>")
+
+ self.send_and_verify(True, 'sendp([Ether(src=get_if_hwaddr("%s"), dst="00:1B:21:8E:B2:30") \
+ /IP(src="192.168.1.1", dst="192.168.1.2", tos=16, proto=255, ttl=255) \
+ /Raw(load="%s")], iface="%s")' \
+ % (self.dut_rx_interface, self.payload, self.dut_rx_interface), queueid = 0)
+ self.send_and_verify(True, 'sendp([Ether(src=get_if_hwaddr("%s"), dst="00:1B:21:8E:B2:30") \
+ /IP(src="192.168.1.1", dst="192.168.1.2", tos=8, proto=255, ttl=255) \
+ /Raw(load="%s")], iface="%s")' \
+ % (self.dut_rx_interface, self.payload, self.dut_rx_interface), queueid = 0)
+
+ # test add and remove proto reul
+ self.dut.send_expect("set_fdir_input_set %d ipv4-other ipv4-proto add" % self.dut_ports[0], "testpmd>")
+ self.dut.send_expect("flow_director_filter %d mode IP add flow ipv4-other src 192.168.1.1 dst 192.168.1.2 \
+ tos 16 proto 253 ttl 255 vlan 0 flexbytes (%s) fwd pf queue 1 fd_id 1"
+ % (self.dut_ports[0], self.flexbytes), "testpmd>")
+ self.dut.send_expect("flow_director_filter %d mode IP add flow ipv4-other src 192.168.1.1 dst 192.168.1.2 \
+ tos 16 proto 254 ttl 255 vlan 0 flexbytes (%s) fwd pf queue 2 fd_id 2"
+ % (self.dut_ports[0], self.flexbytes), "testpmd>")
+
+ self.send_and_verify(True, 'sendp([Ether(src=get_if_hwaddr("%s"), dst="00:1B:21:8E:B2:30") \
+ /IP(src="192.168.1.1", dst="192.168.1.2", tos=16, proto=253, ttl=255) \
+ /Raw(load="%s")], iface="%s")' \
+ % (self.dut_rx_interface, self.payload, self.dut_rx_interface), queueid = 1)
+ self.send_and_verify(True, 'sendp([Ether(src=get_if_hwaddr("%s"), dst="00:1B:21:8E:B2:30") \
+ /IP(src="192.168.1.1", dst="192.168.1.2", tos=16, proto=254, ttl=255) \
+ /Raw(load="%s")], iface="%s")' \
+ % (self.dut_rx_interface, self.payload, self.dut_rx_interface), queueid = 2)
+
+ self.dut.send_expect("flow_director_filter %d mode IP del flow ipv4-other src 192.168.1.1 dst 192.168.1.2 \
+ tos 16 proto 253 ttl 255 vlan 0 flexbytes (%s) fwd pf queue 1 fd_id 1"
+ % (self.dut_ports[0], self.flexbytes), "testpmd>")
+ self.dut.send_expect("flow_director_filter %d mode IP del flow ipv4-other src 192.168.1.1 dst 192.168.1.2 \
+ tos 16 proto 254 ttl 255 vlan 0 flexbytes (%s) fwd pf queue 2 fd_id 2"
+ % (self.dut_ports[0], self.flexbytes), "testpmd>")
+
+ self.send_and_verify(True, 'sendp([Ether(src=get_if_hwaddr("%s"), dst="00:1B:21:8E:B2:30") \
+ /IP(src="192.168.1.1", dst="192.168.1.2", tos=16, proto=253, ttl=255) \
+ /Raw(load="%s")], iface="%s")' \
+ % (self.dut_rx_interface, self.payload, self.dut_rx_interface), queueid = 0)
+ self.send_and_verify(True, 'sendp([Ether(src=get_if_hwaddr("%s"), dst="00:1B:21:8E:B2:30") \
+ /IP(src="192.168.1.1", dst="192.168.1.2", tos=16, proto=254, ttl=255) \
+ /Raw(load="%s")], iface="%s")' \
+ % (self.dut_rx_interface, self.payload, self.dut_rx_interface), queueid = 0)
+
+ # test add and remove ttl rule
+ self.dut.send_expect("set_fdir_input_set %d ipv4-other ipv4-ttl add" % self.dut_ports[0], "testpmd>")
+ self.dut.send_expect("flow_director_filter %d mode IP add flow ipv4-other src 192.168.1.1 dst 192.168.1.2 \
+ tos 16 proto 255 ttl 32 vlan 0 flexbytes (%s) fwd pf queue 1 fd_id 1"
+ % (self.dut_ports[0], self.flexbytes), "testpmd>")
+ self.dut.send_expect("flow_director_filter %d mode IP add flow ipv4-other src 192.168.1.1 dst 192.168.1.2 \
+ tos 16 proto 255 ttl 64 vlan 0 flexbytes (%s) fwd pf queue 2 fd_id 2"
+ % (self.dut_ports[0], self.flexbytes), "testpmd>")
+
+ self.send_and_verify(True, 'sendp([Ether(src=get_if_hwaddr("%s"), dst="00:1B:21:8E:B2:30") \
+ /IP(src="192.168.1.1", dst="192.168.1.2", tos=16, proto=255, ttl=32) \
+ /Raw(load="%s")], iface="%s")' \
+ % (self.dut_rx_interface, self.payload, self.dut_rx_interface), queueid = 1)
+ self.send_and_verify(True, 'sendp([Ether(src=get_if_hwaddr("%s"), dst="00:1B:21:8E:B2:30") \
+ /IP(src="192.168.1.1", dst="192.168.1.2", tos=16, proto=255, ttl=64) \
+ /Raw(load="%s")], iface="%s")' \
+ % (self.dut_rx_interface, self.payload, self.dut_rx_interface), queueid = 2)
+
+ self.dut.send_expect("flow_director_filter %d mode IP del flow ipv4-other src 192.168.1.1 dst 192.168.1.2 \
+ tos 16 proto 255 ttl 32 vlan 0 flexbytes (%s) fwd pf queue 1 fd_id 1"
+ % (self.dut_ports[0], self.flexbytes), "testpmd>")
+ self.dut.send_expect("flow_director_filter %d mode IP del flow ipv4-other src 192.168.1.1 dst 192.168.1.2 \
+ tos 16 proto 255 ttl 64 vlan 0 flexbytes (%s) fwd pf queue 2 fd_id 2"
+ % (self.dut_ports[0], self.flexbytes), "testpmd>")
+
+ self.send_and_verify(True, 'sendp([Ether(src=get_if_hwaddr("%s"), dst="00:1B:21:8E:B2:30") \
+ /IP(src="192.168.1.1", dst="192.168.1.2", tos=16, proto=255, ttl=32) \
+ /Raw(load="%s")], iface="%s")' \
+ % (self.dut_rx_interface, self.payload, self.dut_rx_interface), queueid = 0)
+ self.send_and_verify(True, 'sendp([Ether(src=get_if_hwaddr("%s"), dst="00:1B:21:8E:B2:30") \
+ /IP(src="192.168.1.1", dst="192.168.1.2", tos=16, proto=255, ttl=64) \
+ /Raw(load="%s")], iface="%s")' \
+ % (self.dut_rx_interface, self.payload, self.dut_rx_interface), queueid = 0)
+
+ def test_fdir_ipv6_tc(self):
+ """
+ Expand Flow Director for fortville to support ipv6 TC, next-header, hop-limits
+ """
+ if not self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortville_25g"]:
+ self.verify(False, "This case only support fortville nic")
+ self.dut.kill_all()
+ 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, utils.create_mask([self.dut_ports[0]])), "testpmd>", 120)
+ self.dut.send_expect("set verbose 1", "testpmd>")
+ self.dut.send_expect("set fwd rxonly", "testpmd>")
+
+ self.fdir_set_rule()
+ self.fdir_get_flexbytes()
+ # fwd comand testing
+ self.fdir_type = " "
+ self.dut.send_expect("set_fdir_input_set %d ipv6-other none select" % self.dut_ports[0], "testpmd>")
+ self.dut.send_expect("set_fdir_input_set %d ipv6-other src-ipv6 add" % self.dut_ports[0], "testpmd>")
+ self.dut.send_expect("set_fdir_input_set %d ipv6-other dst-ipv6 add" % self.dut_ports[0], "testpmd>")
+
+ # test add and remove ipv6 tc reul
+ self.dut.send_expect("set_fdir_input_set %d ipv6-other ipv6-tc add" % self.dut_ports[0], "testpmd>")
+ self.dut.send_expect("flow_director_filter %d mode IP add flow ipv6-other src 2000::1 dst 2000::2 \
+ tos 16 proto 255 ttl 255 vlan 0 flexbytes (%s) fwd pf queue 1 fd_id 1"
+ % (self.dut_ports[0], self.flexbytes), "testpmd>")
+ self.dut.send_expect("flow_director_filter %d mode IP add flow ipv6-other src 2000::1 dst 2000::2 \
+ tos 8 proto 255 ttl 255 vlan 0 flexbytes (%s) fwd pf queue 2 fd_id 2"
+ % (self.dut_ports[0], self.flexbytes), "testpmd>")
+
+ self.send_and_verify(True, 'sendp([Ether(src=get_if_hwaddr("%s"), dst="00:1B:21:8E:B2:30") \
+ /IPv6(src="2000::1", dst="2000::2", tc=16, nh=255, hlim=64) \
+ /Raw(load="%s")], iface="%s")' \
+ % (self.dut_rx_interface, self.payload, self.dut_rx_interface), queueid = 1)
+ self.send_and_verify(True, 'sendp([Ether(src=get_if_hwaddr("%s"), dst="00:1B:21:8E:B2:30") \
+ /IPv6(src="2000::1", dst="2000::2", tc=8, nh=255, hlim=64) \
+ /Raw(load="%s")], iface="%s")' \
+ % (self.dut_rx_interface, self.payload, self.dut_rx_interface), queueid = 2)
+
+ self.dut.send_expect("flow_director_filter %d mode IP del flow ipv6-other src 2000::1 dst 2000::2 \
+ tos 16 proto 255 ttl 255 vlan 0 flexbytes (%s) fwd pf queue 1 fd_id 1"
+ % (self.dut_ports[0], self.flexbytes), "testpmd>")
+ self.dut.send_expect("flow_director_filter %d mode IP del flow ipv6-other src 2000::1 dst 2000::2 \
+ tos 8 proto 255 ttl 255 vlan 0 flexbytes (%s) fwd pf queue 2 fd_id 2"
+ % (self.dut_ports[0], self.flexbytes), "testpmd>")
+
+ self.send_and_verify(True, 'sendp([Ether(src=get_if_hwaddr("%s"), dst="00:1B:21:8E:B2:30") \
+ /IPv6(src="2000::1", dst="2000::2", tc=16, nh=255, hlim=64) \
+ /Raw(load="%s")], iface="%s")' \
+ % (self.dut_rx_interface, self.payload, self.dut_rx_interface), queueid = 0)
+ self.send_and_verify(True, 'sendp([Ether(src=get_if_hwaddr("%s"), dst="00:1B:21:8E:B2:30") \
+ /IPv6(src="2000::1", dst="2000::2", tc=8, nh=255, hlim=255) \
+ /Raw(load="%s")], iface="%s")' \
+ % (self.dut_rx_interface, self.payload, self.dut_rx_interface), queueid = 0)
+
+ # test add and remove pv6-next-header reul
+ self.dut.send_expect("set_fdir_input_set %d ipv6-other ipv6-next-header add" % self.dut_ports[0], "testpmd>")
+ self.dut.send_expect("flow_director_filter %d mode IP add flow ipv6-other src 2000::1 dst 2000::2 \
+ tos 16 proto 253 ttl 255 vlan 0 flexbytes (%s) fwd pf queue 1 fd_id 1"
+ % (self.dut_ports[0], self.flexbytes), "testpmd>")
+ self.dut.send_expect("flow_director_filter %d mode IP add flow ipv6-other src 2000::1 dst 2000::2 \
+ tos 16 proto 254 ttl 255 vlan 0 flexbytes (%s) fwd pf queue 2 fd_id 2"
+ % (self.dut_ports[0], self.flexbytes), "testpmd>")
+
+ self.send_and_verify(True, 'sendp([Ether(src=get_if_hwaddr("%s"), dst="00:1B:21:8E:B2:30") \
+ /IPv6(src="2000::1", dst="2000::2", tc=16, nh=253, hlim=64) \
+ /Raw(load="%s")], iface="%s")' \
+ % (self.dut_rx_interface, self.payload, self.dut_rx_interface), queueid = 1)
+ self.send_and_verify(True, 'sendp([Ether(src=get_if_hwaddr("%s"), dst="00:1B:21:8E:B2:30") \
+ /IPv6(src="2000::1", dst="2000::2", tc=16, nh=254, hlim=64) \
+ /Raw(load="%s")], iface="%s")' \
+ % (self.dut_rx_interface, self.payload, self.dut_rx_interface), queueid = 2)
+
+ self.dut.send_expect("flow_director_filter %d mode IP del flow ipv6-other src 2000::1 dst 2000::2 \
+ tos 16 proto 253 ttl 255 vlan 0 flexbytes (%s) fwd pf queue 1 fd_id 1"
+ % (self.dut_ports[0], self.flexbytes), "testpmd>")
+ self.dut.send_expect("flow_director_filter %d mode IP del flow ipv6-other src 2000::1 dst 2000::2 \
+ tos 16 proto 254 ttl 255 vlan 0 flexbytes (%s) fwd pf queue 2 fd_id 2"
+ % (self.dut_ports[0], self.flexbytes), "testpmd>")
+
+ self.send_and_verify(True, 'sendp([Ether(src=get_if_hwaddr("%s"), dst="00:1B:21:8E:B2:30") \
+ /IPv6(src="2000::1", dst="2000::2", tc=16, nh=253, hlim=64) \
+ /Raw(load="%s")], iface="%s")' \
+ % (self.dut_rx_interface, self.payload, self.dut_rx_interface), queueid = 0)
+ self.send_and_verify(True, 'sendp([Ether(src=get_if_hwaddr("%s"), dst="00:1B:21:8E:B2:30") \
+ /IPv6(src="2000::1", dst="2000::2", tc=16, nh=254, hlim=255) \
+ /Raw(load="%s")], iface="%s")' \
+ % (self.dut_rx_interface, self.payload, self.dut_rx_interface), queueid = 0)
+
+ # test add and remove ipv6-hop-limits rule
+ self.dut.send_expect("set_fdir_input_set %d ipv6-other ipv6-hop-limits add" % self.dut_ports[0], "testpmd>")
+ self.dut.send_expect("flow_director_filter %d mode IP add flow ipv6-other src 2000::1 dst 2000::2 \
+ tos 16 proto 255 ttl 32 vlan 0 flexbytes (%s) fwd pf queue 1 fd_id 1"
+ % (self.dut_ports[0], self.flexbytes), "testpmd>")
+ self.dut.send_expect("flow_director_filter %d mode IP add flow ipv6-other src 2000::1 dst 2000::2 \
+ tos 16 proto 255 ttl 64 vlan 0 flexbytes (%s) fwd pf queue 2 fd_id 2"
+ % (self.dut_ports[0], self.flexbytes), "testpmd>")
+
+ self.send_and_verify(True, 'sendp([Ether(src=get_if_hwaddr("%s"), dst="00:1B:21:8E:B2:30") \
+ /IPv6(src="2000::1", dst="2000::2", tc=16, nh=255, hlim=32) \
+ /Raw(load="%s")], iface="%s")' \
+ % (self.dut_rx_interface, self.payload, self.dut_rx_interface), queueid = 1)
+ self.send_and_verify(True, 'sendp([Ether(src=get_if_hwaddr("%s"), dst="00:1B:21:8E:B2:30") \
+ /IPv6(src="2000::1", dst="2000::2", tc=16, nh=255, hlim=64) \
+ /Raw(load="%s")], iface="%s")' \
+ % (self.dut_rx_interface, self.payload, self.dut_rx_interface), queueid = 2)
+
+ self.dut.send_expect("flow_director_filter %d mode IP del flow ipv6-other src 2000::1 dst 2000::2 \
+ tos 16 proto 255 ttl 32 vlan 0 flexbytes (%s) fwd pf queue 1 fd_id 1"
+ % (self.dut_ports[0], self.flexbytes), "testpmd>")
+ self.dut.send_expect("flow_director_filter %d mode IP del flow ipv6-other src 2000::1 dst 2000::2 \
+ tos 16 proto 255 ttl 64 vlan 0 flexbytes (%s) fwd pf queue 2 fd_id 2"
+ % (self.dut_ports[0], self.flexbytes), "testpmd>")
+
+ self.send_and_verify(True, 'sendp([Ether(src=get_if_hwaddr("%s"), dst="00:1B:21:8E:B2:30") \
+ /IPv6(src="2000::1", dst="2000::2", tc=16, nh=255, hlim=32) \
+ /Raw(load="%s")], iface="%s")' \
+ % (self.dut_rx_interface, self.payload, self.dut_rx_interface), queueid = 0)
+ self.send_and_verify(True, 'sendp([Ether(src=get_if_hwaddr("%s"), dst="00:1B:21:8E:B2:30") \
+ /IPv6(src="2000::1", dst="2000::2", tc=16, nh=255, hlim=64) \
+ /Raw(load="%s")], iface="%s")' \
+ % (self.dut_rx_interface, self.payload, self.dut_rx_interface), queueid = 0)
+
+ def test_fdir_ivlan(self):
+ """
+ Expand Flow Director for fortville to support ipv4 TOS, ipv4 PROTO, ipv4 TTL
+ """
+ if not self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortville_25g"]:
+ self.verify(False, "This case only support fortville nic")
+ self.dut.kill_all()
+ 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, utils.create_mask([self.dut_ports[0]])), "testpmd>", 120)
+ self.dut.send_expect("set verbose 1", "testpmd>")
+ self.dut.send_expect("set fwd rxonly", "testpmd>")
+
+ self.fdir_type = " "
+ self.dut.send_expect("set_fdir_input_set %d ipv4-udp ivlan add" % self.dut_ports[0], "testpmd>")
+
+
+ self.dut.send_expect("flow_director_filter %d mode IP add flow ipv4-udp src 192.168.1.1 1001 dst 192.168.1.2 1002 \
+ tos 2 ttl 40 vlan 1 flexbytes () fwd pf queue 1 fd_id 1"
+ % self.dut_ports[0], "testpmd>")
+ self.dut.send_expect("flow_director_filter %d mode IP add flow ipv4-udp src 192.168.1.1 1001 dst 192.168.1.2 1002\
+ tos 2 ttl 40 vlan 15 flexbytes () fwd pf queue 2 fd_id 2"
+ % self.dut_ports[0], "testpmd>")
+ self.dut.send_expect("flow_director_filter %d mode IP add flow ipv4-udp src 192.168.1.1 1001 dst 192.168.1.2 1002\
+ tos 2 ttl 40 vlan 255 flexbytes () fwd pf queue 3 fd_id 3"
+ % self.dut_ports[0], "testpmd>")
+ self.dut.send_expect("flow_director_filter %d mode IP add flow ipv4-udp src 192.168.1.1 1001 dst 192.168.1.2 1002\
+ tos 2 ttl 40 vlan 4095 flexbytes () fwd pf queue 3 fd_id 4"
+ % self.dut_ports[0], "testpmd>")
+
+ self.send_and_verify(True, 'sendp([Ether(src=get_if_hwaddr("%s"), dst="00:1B:21:8E:B2:30") \
+ /Dot1Q(id=0x8100,vlan=1) \
+ /IP(src="192.168.1.1", dst="192.168.1.2", tos=2, proto=17, ttl=40) \
+ /UDP(sport=1001,dport=1002) \
+ /Raw(load="X"*20)], iface="%s")' \
+ % (self.dut_rx_interface, self.dut_rx_interface), queueid = 1)
+
+ self.send_and_verify(True, 'sendp([Ether(src=get_if_hwaddr("%s"), dst="00:1B:21:8E:B2:30") \
+ /Dot1Q(id=0x8100,vlan=15) \
+ /IP(src="192.168.1.1", dst="192.168.1.2", tos=2, proto=17, ttl=40) \
+ /UDP(sport=1001,dport=1002) \
+ /Raw(load="X"*20)], iface="%s")' \
+ % (self.dut_rx_interface, self.dut_rx_interface), queueid = 2)
+ self.send_and_verify(True, 'sendp([Ether(src=get_if_hwaddr("%s"), dst="00:1B:21:8E:B2:30") \
+ /Dot1Q(id=0x8100,vlan=255) \
+ /IP(src="192.168.1.1", dst="192.168.1.2", tos=2, proto=17, ttl=40) \
+ /UDP(sport=1001,dport=1002) \
+ /Raw(load="X"*20)], iface="%s")' \
+ % (self.dut_rx_interface, self.dut_rx_interface), queueid = 3)
+ self.send_and_verify(True, 'sendp([Ether(src=get_if_hwaddr("%s"), dst="00:1B:21:8E:B2:30") \
+ /Dot1Q(id=0x8100,vlan=4095) \
+ /IP(src="192.168.1.1", dst="192.168.1.2", tos=2, proto=17, ttl=40) \
+ /UDP(sport=1001,dport=1002) \
+ /Raw(load="X"*20)], iface="%s")' \
+ % (self.dut_rx_interface, self.dut_rx_interface), queueid = 3)
+
+ self.dut.send_expect("flow_director_filter %d mode IP del flow ipv4-udp src 192.168.1.1 1001 dst 192.168.1.2 1002\
+ tos 2 ttl 40 vlan 1 flexbytes () fwd pf queue 1 fd_id 1"
+ % self.dut_ports[0], "testpmd>")
+ self.dut.send_expect("flow_director_filter %d mode IP del flow ipv4-udp src 192.168.1.1 1001 dst 192.168.1.2 1002\
+ tos 2 ttl 40 vlan 15 flexbytes () fwd pf queue 2 fd_id 2"
+ % self.dut_ports[0], "testpmd>")
+ self.dut.send_expect("flow_director_filter %d mode IP del flow ipv4-udp src 192.168.1.1 1001 dst 192.168.1.2 1002\
+ tos 2 ttl 40 vlan 255 flexbytes () fwd pf queue 3 fd_id 3"
+ % self.dut_ports[0], "testpmd>")
+ self.dut.send_expect("flow_director_filter %d mode IP del flow ipv4-udp src 192.168.1.1 1001 dst 192.168.1.2 1002\
+ tos 2 ttl 40 vlan 4095 flexbytes () fwd pf queue 3 fd_id 4"
+ % self.dut_ports[0], "testpmd>")
+
+ self.send_and_verify(True, 'sendp([Ether(src=get_if_hwaddr("%s"), dst="00:1B:21:8E:B2:30") \
+ /Dot1Q(id=0x8100,vlan=1) \
+ /IP(src="192.168.1.1", dst="192.168.1.2", tos=2, proto=17, ttl=40) \
+ /UDP(sport=1001,dport=1002) \
+ /Raw(load="X"*20)], iface="%s")' \
+ % (self.dut_rx_interface, self.dut_rx_interface), queueid = 0)
+
+ self.send_and_verify(True, 'sendp([Ether(src=get_if_hwaddr("%s"), dst="00:1B:21:8E:B2:30") \
+ /Dot1Q(id=0x8100,vlan=15) \
+ /IP(src="192.168.1.1", dst="192.168.1.2", tos=2, proto=17, ttl=40) \
+ /UDP(sport=1001,dport=1002) \
+ /Raw(load="X"*20)], iface="%s")' \
+ % (self.dut_rx_interface, self.dut_rx_interface), queueid = 0)
+ self.send_and_verify(True, 'sendp([Ether(src=get_if_hwaddr("%s"), dst="00:1B:21:8E:B2:30") \
+ /Dot1Q(id=0x8100,vlan=255) \
+ /IP(src="192.168.1.1", dst="192.168.1.2", tos=2, proto=17, ttl=40) \
+ /UDP(sport=1001,dport=1002) \
+ /Raw(load="X"*20)], iface="%s")' \
+ % (self.dut_rx_interface, self.dut_rx_interface), queueid = 0)
+ self.send_and_verify(True, 'sendp([Ether(src=get_if_hwaddr("%s"), dst="00:1B:21:8E:B2:30") \
+ /Dot1Q(id=0x8100,vlan=4095) \
+ /IP(src="192.168.1.1", dst="192.168.1.2", tos=2, proto=17, ttl=40) \
+ /UDP(sport=1001,dport=1002) \
+ /Raw(load="X"*20)], iface="%s")' \
+ % (self.dut_rx_interface, self.dut_rx_interface), queueid = 0)
+
+
+
def failed_test_fdir_flush(self):
"""
FDir flush in Fortville.
--
1.9.3
next prev parent reply other threads:[~2017-05-12 7:43 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-12 7:44 [dts] [PATCH V2] add filter lldp in sniff model xu,huilong
2017-05-12 7:44 ` [dts] [PATCH V2] add fortville 25G NIC for this case xu,huilong
2017-05-12 8:47 ` Liu, Yong
2017-05-12 7:44 ` [dts] [PATCH 1/2] add link bonding rss dynamic config test plane xu,huilong
2017-05-15 2:30 ` Liu, Yong
2017-05-12 7:44 ` [dts] [PATCH] fix check packet failure by lldp have different packet size xu,huilong
2017-05-15 2:54 ` Liu, Yong
2017-05-12 7:44 ` [dts] [PATCH V2] fix test app compile error xu,huilong
2017-05-12 8:57 ` Liu, Yong
2017-05-12 7:44 ` [dts] [PATCH V2] fix timeout when setup dpdk app xu,huilong
2017-05-12 9:01 ` Liu, Yong
2017-05-12 7:44 ` [dts] [PATCH V2] fix user space ethtool failed case xu,huilong
2017-05-12 9:07 ` Liu, Yong
2017-05-15 1:27 ` Xu, HuilongX
2017-05-12 7:44 ` [dts] [PATCH] remove --crc-strip parameter in testpmd xu,huilong
2017-05-12 9:10 ` Liu, Yong
2017-05-12 7:44 ` xu,huilong [this message]
2017-05-15 2:19 ` [dts] [PATCH 1/2] update fdir test case Liu, Yong
2017-05-12 7:44 ` [dts] [PATCH V2] update testpmd path in dpdk xu,huilong
2017-05-12 9:12 ` Liu, Yong
2017-05-12 7:44 ` [dts] [PATCH 2/2] add link bond slave dynamic config test case xu,huilong
2017-05-12 8:53 ` Liu, Yong
2017-05-15 1:08 ` Xu, HuilongX
2017-05-12 7:44 ` [dts] [PATCH 2/2] update fdir test plane xu,huilong
2017-05-15 2:16 ` Liu, Yong
2017-05-12 8:45 ` [dts] [PATCH V2] add filter lldp in sniff model Liu, Yong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1494575072-44798-9-git-send-email-huilongx.xu@intel.com \
--to=huilongx.xu@intel.com \
--cc=dts@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).