test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH] tests fdir: add flow_director_flex_mask check
@ 2016-09-12  6:51 Peng yuan
  0 siblings, 0 replies; only message in thread
From: Peng yuan @ 2016-09-12  6:51 UTC (permalink / raw)
  To: dts; +Cc: pengyuan

From: pengyuan <yuan.peng@intel.com>

Signed-off-by: pengyuan <yuan.peng@intel.com>

diff --git a/tests/TestSuite_fdir.py b/tests/TestSuite_fdir.py
index 537ab1f..f97e8da 100644
--- a/tests/TestSuite_fdir.py
+++ b/tests/TestSuite_fdir.py
@@ -209,25 +209,36 @@ class TestFdir(TestCase, IxiaPacketGenerator):
             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>")
-            self.dut.send_expect("flow_director_flex_mask %s flow all (0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff)" % self.dut_ports[0], "testpmd>")
+	    self.dut.send_expect("flow_director_flex_mask %s flow all (0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff)" % self.dut_ports[0], "testpmd>")
         elif (self.nic in ["niantic"]):
             self.dut.send_expect("flow_director_flex_payload %s raw (12,13)" % self.dut_ports[0], "testpmd>")
             self.dut.send_expect("flow_director_flex_mask %s flow raw (0xff,0xff)" % self.dut_ports[0], "testpmd>")
         self.dut.send_expect("port start %s" % self.dut_ports[0], "testpmd>")
+    
+    def fdir_set_rule_for_sctp(self,sctp=False):
+	"""
+	Fdir Performance Benchmarking set rules for sctp
+	"""
+        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 not sctp:
+	        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>")
+            else:
+	        self.dut.send_expect("flow_director_flex_payload %s l4 (16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31)" % self.dut_ports[0], "testpmd>")
+	self.dut.send_expect("port start %s" % self.dut_ports[0], "testpmd>")  
 
-    def fdir_get_flexbytes(self, sctp=False):
+    def fdir_get_flexbytes(self):
 
         """
         Fdir get flexbytes and payload according NIC
         """
 
         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:
-                self.flexbytes = '0x0,0x0,0x0,0x20,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0'
+            self.flexbytes = "0x11,0x11,0x22,0x22,0x33,0x33,0x44,0x44,0x55,0x55,0x66,0x66,0x77,0x77,0x88,0x88"
             self.payload = "\\x11\\x11\\x22\\x22\\x33\\x33\\x44\\x44\\x55\\x55\\x66\\x66\\x77\\x77\\x88\\x88"
-            self.flexlength = 16
+	    self.mask_payload1 = "\\x11\\x11\\x11\\x22\\x33\\x33\\x44\\x44\\x55\\x55\\x66\\x66\\x77\\x77\\x88\\x88"
+	    self.mask_payload2 = "\\x11\\x22\\x22\\x22\\x33\\x33\\x44\\x44\\x55\\x55\\x66\\x66\\x77\\x77\\x88\\x88"
+	    self.flexlength = 16
         elif (self.nic in ["niantic"]):
             self.flexbytes = "0x00,0x00"
             self.payload = "\\x11\\x11\\x22\\x22\\x33\\x33\\x44\\x44\\x55\\x55\\x66\\x66\\x77\\x77\\x88\\x88"
@@ -271,19 +282,40 @@ class TestFdir(TestCase, IxiaPacketGenerator):
             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")/UDP(sport=1024,dport=1024)], iface="%s")' % (self.dut_rx_interface, self.dut_rx_interface))
             self.dut.send_expect("flow_director_filter %s mode IP  del flow ipv4-udp src 192.168.0.1 1024 dst 192.168.0.2 1024  tos 2  ttl 40 vlan 0 flexbytes () fwd pf queue %d fd_id %d " % (self.dut_ports[0], 2, 1), "testpmd>")
 
+        if (self.nic in ["fortpark_TLV"]):
+	    #ipv4 udp unicast
+            self.dut.send_expect("flow_director_filter %s mode IP  add flow ipv4-udp-unicast src 192.168.0.1 1024 dst 192.168.0.2 1024  tos 2  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")/UDP(sport=1024,dport=1024)], iface="%s")' % (self.dut_rx_interface, self.dut_rx_interface))
+            self.dut.send_expect("flow_director_filter %s mode IP  del flow ipv4-udp-unicast src 192.168.0.1 1024 dst 192.168.0.2 1024  tos 2  ttl 40 vlan 0 flexbytes () fwd pf queue %d fd_id %d " % (self.dut_ports[0], 2, 1), "testpmd>")
+            self.send_and_verify(False, '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")/UDP(sport=1024,dport=1024)], iface="%s")' % (self.dut_rx_interface, self.dut_rx_interface))
+       
+	    #ipv4 udp multicast
+            self.dut.send_expect("flow_director_filter %s mode IP  add flow ipv4-udp-multicast src 224.215.145.229 1024 dst 224.215.145.230 1024  tos 2  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="01:00:5e:57:91:e6")/IP(src="224.215.145.229", dst="224.215.145.230")/UDP(sport=1024,dport=1024)], iface="%s")' % (self.dut_rx_interface, self.dut_rx_interface))
+            self.dut.send_expect("flow_director_filter %s mode IP  del flow ipv4-udp-multicast src 224.215.145.229 1024 dst 224.215.145.230 1024  tos 2  ttl 40 vlan 0 flexbytes () fwd pf queue %d fd_id %d " % (self.dut_ports[0], 2, 1), "testpmd>")
+            self.send_and_verify(False, 'sendp([Ether(src=get_if_hwaddr("%s"), dst="01:00:5e:57:91:e6")/IP(src="224.215.145.229", dst="224.215.145.230")/UDP(sport=1024,dport=1024)], iface="%s")' % (self.dut_rx_interface, self.dut_rx_interface))
+
         # ipv4 tcp
         self.dut.send_expect("flow_director_filter %s mode IP  add flow ipv4-tcp src 192.168.0.1 32 dst 192.168.0.2 32  tos 2  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")/TCP(sport=32,dport=32)], iface="%s")' % (self.dut_rx_interface, self.dut_rx_interface))
         self.dut.send_expect("flow_director_filter %s mode IP  del flow ipv4-tcp src 192.168.0.1 32 dst 192.168.0.2 32  tos 2  ttl 40 vlan 0 flexbytes () fwd pf queue %d fd_id %d " % (self.dut_ports[0], 2, 1), "testpmd>")
         self.send_and_verify(False, '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")/TCP(sport=32,dport=32)], iface="%s")' % (self.dut_rx_interface, self.dut_rx_interface))
-        if (self.nic in ["niantic"]):
+
+	if (self.nic in ["niantic"]):
             self.dut.send_expect("flow_director_filter %s mode IP  add flow ipv4-tcp src 192.168.0.1 32 dst 192.168.0.2 32  tos 2  ttl 40 vlan 0 flexbytes () fwd pf queue %d fd_id %d " % (self.dut_ports[0], 1, 1), "testpmd>")
             self.dut.send_expect("flow_director_filter %s mode IP  update flow ipv4-tcp src 192.168.0.1 32 dst 192.168.0.2 32  tos 2  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")/TCP(sport=32,dport=32)], iface="%s")' % (self.dut_rx_interface, self.dut_rx_interface))
             self.dut.send_expect("flow_director_filter %s mode IP  del flow ipv4-tcp src 192.168.0.1 32 dst 192.168.0.2 32  tos 2  ttl 40 vlan 0 flexbytes () fwd pf queue %d fd_id %d " % (self.dut_ports[0], 2, 1), "testpmd>")
 
+        # ipv4 tcp syn no ack
+        if (self.nic in ["fortpark_TLV"]):
+	    self.dut.send_expect("flow_director_filter %s mode IP  add flow ipv4-tcp-syn-no-ack src 192.168.0.1 32 dst 192.168.0.2 32  tos 2  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")/TCP(sport=32,dport=32)], iface="%s")' % (self.dut_rx_interface, self.dut_rx_interface))
+            self.dut.send_expect("flow_director_filter %s mode IP  del flow ipv4-tcp-syn-no-ack src 192.168.0.1 32 dst 192.168.0.2 32  tos 2  ttl 40 vlan 0 flexbytes () fwd pf queue %d fd_id %d " % (self.dut_ports[0], 2, 1), "testpmd>")
+            self.send_and_verify(False, '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")/TCP(sport=32,dport=32)], iface="%s")' % (self.dut_rx_interface, self.dut_rx_interface))
+
+
         # ipv4 sctp
-        self.fdir_get_flexbytes(sctp=True)
         self.dut.send_expect("flow_director_filter %s mode IP  add flow ipv4-sctp src 192.168.0.1 32 dst 192.168.0.2 32 verify_tag 1  tos 2  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")/SCTP(sport=32, dport=32, tag=1)/SCTPChunkData(data="X"*46)], iface="%s")' % (self.dut_rx_interface, self.dut_rx_interface))
         self.dut.send_expect("flow_director_filter %s mode IP  del flow ipv4-sctp src 192.168.0.1 32 dst 192.168.0.2 32 verify_tag 1  tos 2  ttl 40 vlan 0 flexbytes () fwd pf queue %d fd_id %d " % (self.dut_ports[0], 2, 1), "testpmd>")
@@ -293,7 +325,6 @@ class TestFdir(TestCase, IxiaPacketGenerator):
             self.dut.send_expect("flow_director_filter %s mode IP  update flow ipv4-sctp src 192.168.0.1 32 dst 192.168.0.2 32  tos 2  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")/SCTP(sport=32, dport=32, tag=1)/SCTPChunkData(data="X"*46)], iface="%s")' % (self.dut_rx_interface, self.dut_rx_interface))
             self.dut.send_expect("flow_director_filter %s mode IP  del flow ipv4-sctp src 192.168.0.1 32 dst 192.168.0.2 32 verify_tag 1  tos 2  ttl 40 vlan 0 flexbytes () fwd pf queue %d fd_id %d " % (self.dut_ports[0], 2, 1), "testpmd>")
-        self.fdir_get_flexbytes()
 
         # ipv4 frag
         # ip-frag only support in fortville
@@ -347,6 +378,19 @@ class TestFdir(TestCase, IxiaPacketGenerator):
             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")/UDP(sport=1024,dport=1024)], iface="%s")' % (self.dut_rx_interface, self.dut_rx_interface))
             self.dut.send_expect("flow_director_filter %s mode IP  del flow ipv6-udp src FE80:0:0:0:200:1FF:FE00:200 1024 dst 3555:5555:6666:6666:7777:7777:8888:8888 1024 flexbytes () fwd pf queue %d fd_id %d " % (self.dut_ports[0], 2, 1), "testpmd>")
 
+        if (self.nic in ["fortpark_TLV"]):
+            #ipv6 udp unicast
+	    self.dut.send_expect("flow_director_filter %s mode IP  add flow ipv6-udp-unicast src FE80:0:0:0:200:1FF:FE00:200 1024 dst 3555:5555:6666:6666:7777:7777:8888:8888 1024  tos 2  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")/UDP(sport=1024,dport=1024)], iface="%s")' % (self.dut_rx_interface, self.dut_rx_interface))
+            self.dut.send_expect("flow_director_filter %s mode IP  del flow ipv6-udp-unicast src FE80:0:0:0:200:1FF:FE00:200 1024 dst 3555:5555:6666:6666:7777:7777:8888:8888 1024  tos 2  ttl 40 vlan 0 flexbytes () fwd pf queue %d fd_id %d " % (self.dut_ports[0], 2, 1), "testpmd>")
+            self.send_and_verify(False, '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")/UDP(sport=1024,dport=1024)], iface="%s")' % (self.dut_rx_interface, self.dut_rx_interface))
+
+	    #ipv6 udp multicast
+            self.dut.send_expect("flow_director_filter %s mode IP  add flow ipv6-udp-multicast src FE80:0:0:0:200:1FF:FE00:200 1024 dst FF1E:5555:6666:6666:7777:7777:8888:8888 1024  tos 2  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="33:33:88:88:88:88")/IPv6(src="FE80:0:0:0:200:1FF:FE00:200", dst="FF1E:5555:6666:6666:7777:7777:8888:8888")/UDP(sport=1024,dport=1024)], iface="%s")' % (self.dut_rx_interface, self.dut_rx_interface))
+            self.dut.send_expect("flow_director_filter %s mode IP  del flow ipv6-udp-multicast src FE80:0:0:0:200:1FF:FE00:200 1024 dst FF1E:5555:6666:6666:7777:7777:8888:8888 1024  tos 2  ttl 40 vlan 0 flexbytes () fwd pf queue %d fd_id %d " % (self.dut_ports[0], 2, 1), "testpmd>")
+            self.send_and_verify(False, 'sendp([Ether(src=get_if_hwaddr("%s"), dst="33:33:88:88:88:88")/IPv6(src="FE80:0:0:0:200:1FF:FE00:200", dst="FF1E:5555:6666:6666:7777:7777:8888:8888")/UDP(sport=1024,dport=1024)], iface="%s")' % (self.dut_rx_interface, self.dut_rx_interface))
+
         # ipv6 tcp
         self.dut.send_expect("flow_director_filter %s mode IP  add flow ipv6-tcp src FE80:0:0:0:200:1FF:FE00:200 32 dst 3555:5555:6666:6666:7777:7777:8888:8888 32  tos 2  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")/TCP(sport=32,dport=32)], iface="%s")' % (self.dut_rx_interface, self.dut_rx_interface))
@@ -358,8 +402,14 @@ class TestFdir(TestCase, IxiaPacketGenerator):
             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")/TCP(sport=32,dport=32)], iface="%s")' % (self.dut_rx_interface, self.dut_rx_interface))
             self.dut.send_expect("flow_director_filter %s mode IP  del flow ipv6-tcp src FE80:0:0:0:200:1FF:FE00:200 32 dst 3555:5555:6666:6666:7777:7777:8888:8888 32  tos 2  proto 20 ttl 40 vlan 0 flexbytes () fwd pf queue %d fd_id %d " % (self.dut_ports[0], 2, 1), "testpmd>")
 
+        if (self.nic in ["fortpark_TLV"]):
+       	    #ipv6 tcp syn no ack
+	    self.dut.send_expect("flow_director_filter %s mode IP  add flow ipv6-tcp-syn-no-ack src FE80:0:0:0:200:1FF:FE00:200 32 dst 3555:5555:6666:6666:7777:7777:8888:8888 32  tos 2  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")/TCP(sport=32,dport=32)], iface="%s")' % (self.dut_rx_interface, self.dut_rx_interface))
+            self.dut.send_expect("flow_director_filter %s mode IP  del flow ipv6-tcp-syn-no-ack src FE80:0:0:0:200:1FF:FE00:200 32 dst 3555:5555:6666:6666:7777:7777:8888:8888 32  tos 2  ttl 40 vlan 0 flexbytes () fwd pf queue %d fd_id %d " % (self.dut_ports[0], 2, 1), "testpmd>")
+            self.send_and_verify(False, '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")/TCP(sport=32,dport=32)], iface="%s")' % (self.dut_rx_interface, self.dut_rx_interface))
+
         #ipv6 sctp
-        self.fdir_get_flexbytes(sctp=True)
         self.dut.send_expect("flow_director_filter 0 mode IP  add flow ipv6-sctp src FE80:0:0:0:200:1FF:FE00:200 32 dst 3555:5555:6666:6666:7777:7777:8888:8888 32 verify_tag 1  tos 2  ttl 40 vlan 0 flexbytes () fwd pf queue %d fd_id %d "%(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=132)/SCTP(sport=32, dport=32, tag=1)/SCTPChunkData(data="X"*46)], iface="%s")' % (self.dut_rx_interface, self.dut_rx_interface))
         self.dut.send_expect("flow_director_filter 0 mode IP  del flow ipv6-sctp src FE80:0:0:0:200:1FF:FE00:200 32 dst 3555:5555:6666:6666:7777:7777:8888:8888 32 verify_tag 1  tos 2   ttl 40 vlan 0 flexbytes () fwd pf queue %d fd_id %d "%(2,1), "testpmd>")
@@ -369,7 +419,6 @@ class TestFdir(TestCase, IxiaPacketGenerator):
             self.dut.send_expect("flow_director_filter 0 mode IP  update flow ipv6-sctp src FE80:0:0:0:200:1FF:FE00:200 32 dst 3555:5555:6666:6666:7777:7777:8888:8888 32 verify_tag 1  tos 2  proto 20 ttl 40 vlan 0 flexbytes () fwd pf queue %d fd_id %d "%(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=132)/SCTP(sport=32, dport=32, tag=1)/SCTPChunkData(data="X"*46)], iface="%s")' % (self.dut_rx_interface, self.dut_rx_interface))
             self.dut.send_expect("flow_director_filter 0 mode IP  del flow ipv6-sctp src FE80:0:0:0:200:1FF:FE00:200 32 dst 3555:5555:6666:6666:7777:7777:8888:8888 32 verify_tag 1  tos 2  proto 20 ttl 40 vlan 0 flexbytes () fwd pf queue %d fd_id %d "%(2,1), "testpmd>")
-        self.fdir_get_flexbytes()
 
         # ipv6 frag
         # ip-frag only support in fortville
@@ -415,7 +464,21 @@ class TestFdir(TestCase, IxiaPacketGenerator):
             self.send_and_verify(False, '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")/UDP(sport=1024,dport=1024)], iface="%s")' % (self.dut_rx_interface, self.dut_rx_interface))
             self.dut.send_expect("flow_director_filter %s mode IP  del flow ipv4-udp src 192.168.0.1 1024 dst 192.168.0.2 1024  tos 2  ttl 40 vlan 0 flexbytes () drop pf queue %d fd_id %d " % (self.dut_ports[0], 2, 1), "testpmd>")
 
-        # ipv4 tcp
+	if (self.nic in ["fortpark_TLV"]):
+	    # ipv4 udp unicast
+            self.dut.send_expect("flow_director_filter %s mode IP  add flow ipv4-udp-unicast src 192.168.0.1 1024 dst 192.168.0.2 1024  tos 2  ttl 40 vlan 0 flexbytes () drop pf queue %d fd_id %d " % (self.dut_ports[0], 2, 1), "testpmd>")
+            self.send_and_verify(False, '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")/UDP(sport=1024,dport=1024)], iface="%s")' % (self.dut_rx_interface, self.dut_rx_interface))
+            self.dut.send_expect("flow_director_filter %s mode IP  del flow ipv4-udp-unicast src 192.168.0.1 1024 dst 192.168.0.2 1024  tos 2  ttl 40 vlan 0 flexbytes () drop 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")/UDP(sport=1024,dport=1024)], iface="%s")' % (self.dut_rx_interface, self.dut_rx_interface))        
+
+            # ipv4 udp multicast
+            self.dut.send_expect("flow_director_filter %s mode IP  add flow ipv4-udp-multicast src 192.168.0.1 1024 dst 192.168.0.2 1024  tos 2  ttl 40 vlan 0 flexbytes () drop pf queue %d fd_id %d " % (self.dut_ports[0], 2, 1), "testpmd>")
+            self.send_and_verify(False, 'sendp([Ether(src=get_if_hwaddr("%s"), dst="01:00:5E:28:00:02")/IP(src="192.168.0.1", dst="192.168.0.2")/UDP(sport=1024,dport=1024)], iface="%s")' % (self.dut_rx_interface, self.dut_rx_interface))
+            self.dut.send_expect("flow_director_filter %s mode IP  del flow ipv4-udp-multicast src 192.168.0.1 1024 dst 192.168.0.2 1024  tos 2  ttl 40 vlan 0 flexbytes () drop 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="01:00:5E:28:00:02")/IP(src="192.168.0.1", dst="192.168.0.2")/UDP(sport=1024,dport=1024)], iface="%s")' % (self.dut_rx_interface, self.dut_rx_interface))
+
+
+	# ipv4 tcp
         self.dut.send_expect("flow_director_filter %s mode IP  add flow ipv4-tcp src 192.168.0.1 32 dst 192.168.0.2 32  tos 2  ttl 40 vlan 0 flexbytes () drop pf queue %d fd_id %d " % (self.dut_ports[0], 2, 1), "testpmd>")
         self.send_and_verify(False, '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")/TCP(sport=32,dport=32)], iface="%s")' % (self.dut_rx_interface, self.dut_rx_interface))
         self.dut.send_expect("flow_director_filter %s mode IP  del flow ipv4-tcp src 192.168.0.1 32 dst 192.168.0.2 32  tos 2  ttl 40 vlan 0 flexbytes () drop pf queue %d fd_id %d " % (self.dut_ports[0], 2, 1), "testpmd>")
@@ -426,8 +489,15 @@ class TestFdir(TestCase, IxiaPacketGenerator):
             self.send_and_verify(False, '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")/TCP(sport=32,dport=32)], iface="%s")' % (self.dut_rx_interface, self.dut_rx_interface))
             self.dut.send_expect("flow_director_filter %s mode IP  del flow ipv4-tcp src 192.168.0.1 32 dst 192.168.0.2 32  tos 2  ttl 40 vlan 0 flexbytes () drop pf queue %d fd_id %d " % (self.dut_ports[0], 2, 1), "testpmd>")
 
+        if (self.nic in ["fortpark_TLV"]):
+	    # ipv4 tcp syn no ack
+            self.dut.send_expect("flow_director_filter %s mode IP  add flow ipv4-tcp-syn-no-ack src 192.168.0.1 32 dst 192.168.0.2 32  tos 2  ttl 40 vlan 0 flexbytes () drop pf queue %d fd_id %d " % (self.dut_ports[0], 2, 1), "testpmd>")
+            self.send_and_verify(False, '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")/TCP(sport=32,dport=32)], iface="%s")' % (self.dut_rx_interface, self.dut_rx_interface))
+            self.dut.send_expect("flow_director_filter %s mode IP  del flow ipv4-tcp-syn-no-ack src 192.168.0.1 32 dst 192.168.0.2 32  tos 2  ttl 40 vlan 0 flexbytes () drop 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")/TCP(sport=32,dport=32)], iface="%s")' % (self.dut_rx_interface, self.dut_rx_interface))
+
+
         # ipv4 sctp
-        self.fdir_get_flexbytes(sctp=True)
         self.dut.send_expect("flow_director_filter %s mode IP  add flow ipv4-sctp src 192.168.0.1 32 dst 192.168.0.2 32 verify_tag 1  tos 2  ttl 40 vlan 0 flexbytes () drop pf queue %d fd_id %d " % (self.dut_ports[0], 2, 1), "testpmd>")
         self.send_and_verify(False, '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")/SCTP(sport=32, dport=32, tag=1)/SCTPChunkData(data="X"*46)], iface="%s")' % (self.dut_rx_interface, self.dut_rx_interface))
         self.dut.send_expect("flow_director_filter %s mode IP  del flow ipv4-sctp src 192.168.0.1 32 dst 192.168.0.2 32 verify_tag 1  tos 2  ttl 40 vlan 0 flexbytes () drop pf queue %d fd_id %d " % (self.dut_ports[0], 2, 1), "testpmd>")
@@ -437,7 +507,6 @@ class TestFdir(TestCase, IxiaPacketGenerator):
             self.dut.send_expect("flow_director_filter %s mode IP  update flow ipv4-sctp src 192.168.0.1 32 dst 192.168.0.2 32 verify_tag 1  tos 2  ttl 40 vlan 0 flexbytes () drop pf queue %d fd_id %d " % (self.dut_ports[0], 2, 1), "testpmd>")
             self.send_and_verify(False, '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")/SCTP(sport=32, dport=32, tag=1)/SCTPChunkData(data="X"*46)], iface="%s")' % (self.dut_rx_interface, self.dut_rx_interface))
             self.dut.send_expect("flow_director_filter %s mode IP  del flow ipv4-sctp src 192.168.0.1 32 dst 192.168.0.2 32 verify_tag 1  tos 2  ttl 40 vlan 0 flexbytes () drop pf queue %d fd_id %d " % (self.dut_ports[0], 2, 1), "testpmd>")
-        self.fdir_get_flexbytes()
 
         # ipv4 frag
         # ip-frag only support in fortville
@@ -482,15 +551,34 @@ class TestFdir(TestCase, IxiaPacketGenerator):
             self.send_and_verify(False, '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")/UDP(sport=1024,dport=1024)], iface="%s")' % (self.dut_rx_interface, self.dut_rx_interface))
             self.dut.send_expect("flow_director_filter %s mode IP  del flow ipv6-udp src FE80:0:0:0:200:1FF:FE00:200 1024 dst 3555:5555:6666:6666:7777:7777:8888:8888 1024  tos 2   ttl 40 vlan 0 flexbytes () drop 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")/UDP(sport=1024,dport=1024)], iface="%s")' % (self.dut_rx_interface, self.dut_rx_interface))
-
-            # ipv6 tcp
+          
+            if (self.nic in ["fortpark_TLV"]):
+    	        #ipv6 udp unicast
+	        self.dut.send_expect("flow_director_filter %s mode IP  add flow ipv6-udp-unicast src FE80:0:0:0:200:1FF:FE00:200 1024 dst 3555:5555:6666:6666:7777:7777:8888:8888 1024  tos 2   ttl 40 vlan 0 flexbytes () drop pf queue %d fd_id %d " % (self.dut_ports[0], 2, 1), "testpmd>")
+                self.send_and_verify(False, '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")/UDP(sport=1024,dport=1024)], iface="%s")' % (self.dut_rx_interface, self.dut_rx_interface))
+                self.dut.send_expect("flow_director_filter %s mode IP  del flow ipv6-udp-unicast src FE80:0:0:0:200:1FF:FE00:200 1024 dst 3555:5555:6666:6666:7777:7777:8888:8888 1024  tos 2   ttl 40 vlan 0 flexbytes () drop 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")/UDP(sport=1024,dport=1024)], iface="%s")' % (self.dut_rx_interface, self.dut_rx_interface))
+	        #ipv6 udp multicast
+                self.dut.send_expect("flow_director_filter %s mode IP  add flow ipv6-udp-multicast src FE80:0:0:0:200:1FF:FE00:200 1024 dst FF1E:5555:6666:6666:7777:7777:8888:8888 1024  tos 2   ttl 40 vlan 0 flexbytes () drop pf queue %d fd_id %d " % (self.dut_ports[0], 2, 1), "testpmd>")
+                self.send_and_verify(False, 'sendp([Ether(src=get_if_hwaddr("%s"), dst="33:33:88:88:88:88")/IPv6(src="FE80:0:0:0:200:1FF:FE00:200", dst="FF1E:5555:6666:6666:7777:7777:8888:8888")/UDP(sport=1024,dport=1024)], iface="%s")' % (self.dut_rx_interface, self.dut_rx_interface))
+                self.dut.send_expect("flow_director_filter %s mode IP  del flow ipv6-udp-multicast src FE80:0:0:0:200:1FF:FE00:200 1024 dst FF1E:5555:6666:6666:7777:7777:8888:8888 1024  tos 2   ttl 40 vlan 0 flexbytes () drop 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="33:33:88:88:88:88")/IPv6(src="FE80:0:0:0:200:1FF:FE00:200", dst="FF1E:5555:6666:6666:7777:7777:8888:8888")/UDP(sport=1024,dport=1024)], iface="%s")' % (self.dut_rx_interface, self.dut_rx_interface))
+            
+
+	    # ipv6 tcp
             self.dut.send_expect("flow_director_filter %s mode IP  add flow ipv6-tcp src FE80:0:0:0:200:1FF:FE00:200 32 dst 3555:5555:6666:6666:7777:7777:8888:8888 32  tos 2  ttl 40 vlan 0 flexbytes () drop pf queue %d fd_id %d " % (self.dut_ports[0], 2, 1), "testpmd>")
             self.send_and_verify(False, '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")/TCP(sport=32,dport=32)], iface="%s")' % (self.dut_rx_interface, self.dut_rx_interface))
             self.dut.send_expect("flow_director_filter %s mode IP  del flow ipv6-tcp src FE80:0:0:0:200:1FF:FE00:200 32 dst 3555:5555:6666:6666:7777:7777:8888:8888 32  tos 2  ttl 40 vlan 0 flexbytes () drop 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")/TCP(sport=32,dport=32)], iface="%s")' % (self.dut_rx_interface, self.dut_rx_interface))
 
-            # ipv6 sctp
-            self.fdir_get_flexbytes(sctp=True)
+	    if (self.nic in ["fortpark_TLV"]):
+	        #ipv6 tcp syn no ack
+	        self.dut.send_expect("flow_director_filter %s mode IP  add flow ipv6-tcp-syn-no-ack src FE80:0:0:0:200:1FF:FE00:200 32 dst 3555:5555:6666:6666:7777:7777:8888:8888 32  tos 2  ttl 40 vlan 0 flexbytes () drop pf queue %d fd_id %d " % (self.dut_ports[0], 2, 1), "testpmd>")
+                self.send_and_verify(False, '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")/TCP(sport=32,dport=32)], iface="%s")' % (self.dut_rx_interface, self.dut_rx_interface))
+                self.dut.send_expect("flow_director_filter %s mode IP  del flow ipv6-tcp-syn-no-ack src FE80:0:0:0:200:1FF:FE00:200 32 dst 3555:5555:6666:6666:7777:7777:8888:8888 32  tos 2  ttl 40 vlan 0 flexbytes () drop 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")/TCP(sport=32,dport=32)], iface="%s")' % (self.dut_rx_interface, self.dut_rx_interface))
+           
+	    # ipv6 sctp
             self.dut.send_expect("flow_director_filter %s mode IP  add flow ipv6-sctp src FE80:0:0:0:200:1FF:FE00:200 32 dst 3555:5555:6666:6666:7777:7777:8888:8888 32 verify_tag 1  tos 2 ttl 40 vlan 0 flexbytes () drop pf queue %d fd_id %d "%(self.dut_ports[0],2,1), "testpmd>")
             self.send_and_verify(False, '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=132)/SCTP(sport=32, dport=32, tag=1)/SCTPChunkData(data="X"*46)], iface="%s")' % (self.dut_rx_interface, self.dut_rx_interface))
             self.dut.send_expect("flow_director_filter %s mode IP  del flow ipv6-sctp src FE80:0:0:0:200:1FF:FE00:200 32 dst 3555:5555:6666:6666:7777:7777:8888:8888 32 verify_tag 1  tos 2 ttl 40 vlan 0 flexbytes () drop pf queue %d fd_id %d "%(self.dut_ports[0],2,1), "testpmd>")
@@ -500,7 +588,6 @@ class TestFdir(TestCase, IxiaPacketGenerator):
                 self.dut.send_expect("flow_director_filter %s mode IP  update flow ipv6-sctp src FE80:0:0:0:200:1FF:FE00:200 32 dst 3555:5555:6666:6666:7777:7777:8888:8888 32 verify_tag 1  tos 2  proto 20 ttl 40 vlan 0 flexbytes () drop pf queue %d fd_id %d "%(self.dut_ports[0],2,1), "testpmd>")
                 self.send_and_verify(False, '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=132)/SCTP(sport=32, dport=32, tag=1)/SCTPChunkData(data="X"*46)], iface="%s")' % (self.dut_rx_interface, self.dut_rx_interface))
                 self.dut.send_expect("flow_director_filter %s mode IP  del flow ipv6-sctp src FE80:0:0:0:200:1FF:FE00:200 32 dst 3555:5555:6666:6666:7777:7777:8888:8888 32 verify_tag 1  tos 2  proto 20 ttl 40 vlan 0 flexbytes () drop pf queue %d fd_id %d "%(self.dut_ports[0],2,1), "testpmd>")
-            self.fdir_get_flexbytes()
 
             # ipv6 frag
             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 () drop pf queue %d fd_id %d " % (self.dut_ports[0], 3, 1), "testpmd>")
@@ -550,6 +637,19 @@ class TestFdir(TestCase, IxiaPacketGenerator):
             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")/UDP(sport=1024,dport=1024)/Raw(load="%s")], iface="%s")' % (self.dut_rx_interface, self.payload, self.dut_rx_interface))
             self.dut.send_expect("flow_director_filter %s mode IP  del flow ipv4-udp src 192.168.0.1 1024 dst 192.168.0.2 1024  tos 2  ttl 40 vlan 0 flexbytes (%s) fwd pf queue %d fd_id %d " % (self.dut_ports[0], self.flexbytes, 2, 1), "testpmd>")
 
+        if (self.nic in ["fortpark_TLV"]):
+	    # ipv4 udp unicast
+            self.dut.send_expect("flow_director_filter %s mode IP  add flow ipv4-udp-unicast src 192.168.0.1 1024 dst 192.168.0.2 1024  tos 2  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")/UDP(sport=1024,dport=1024)/Raw(load="%s")], iface="%s")' % (self.dut_rx_interface, self.payload, self.dut_rx_interface))
+            self.dut.send_expect("flow_director_filter %s mode IP  del flow ipv4-udp-unicast src 192.168.0.1 1024 dst 192.168.0.2 1024  tos 2  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(False, '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")/UDP(sport=1024,dport=1024)/Raw(load="%s")], iface="%s")' % (self.dut_rx_interface, self.payload, self.dut_rx_interface))
+
+            # ipv4 udp multicast
+            self.dut.send_expect("flow_director_filter %s mode IP  add flow ipv4-udp-multicast src 192.168.0.1 1024 dst 192.168.0.2 1024  tos 2  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="01:00:5E:28:00:02")/IP(src="192.168.0.1", dst="192.168.0.2")/UDP(sport=1024,dport=1024)/Raw(load="%s")], iface="%s")' % (self.dut_rx_interface, self.payload, self.dut_rx_interface))
+            self.dut.send_expect("flow_director_filter %s mode IP  del flow ipv4-udp-multicast src 192.168.0.1 1024 dst 192.168.0.2 1024  tos 2  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(False, 'sendp([Ether(src=get_if_hwaddr("%s"), dst="01:00:5E:28:00:02")/IP(src="192.168.0.1", dst="192.168.0.2")/UDP(sport=1024,dport=1024)/Raw(load="%s")], iface="%s")' % (self.dut_rx_interface, self.payload, self.dut_rx_interface))
+
         # ipv4 tcp
         self.dut.send_expect("flow_director_filter %s mode IP  add flow ipv4-tcp src 192.168.0.1 32 dst 192.168.0.2 32  tos 2  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")/TCP(sport=32,dport=32)/Raw(load="%s")], iface="%s")' % (self.dut_rx_interface, self.payload, self.dut_rx_interface))
@@ -561,6 +661,13 @@ class TestFdir(TestCase, IxiaPacketGenerator):
             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")/TCP(sport=32,dport=32)/Raw(load="%s")], iface="%s")' % (self.dut_rx_interface, self.payload, self.dut_rx_interface))
             self.dut.send_expect("flow_director_filter %s mode IP  del flow ipv4-tcp src 192.168.0.1 32 dst 192.168.0.2 32  tos 2  ttl 40 vlan 0 flexbytes (%s) fwd pf queue %d fd_id %d " % (self.dut_ports[0], self.flexbytes, 2, 1), "testpmd>")
 
+        if (self.nic in ["fortpark_TLV"]):
+	    # ipv4 tcp syn no ack
+            self.dut.send_expect("flow_director_filter %s mode IP  add flow ipv4-tcp-syn-no-ack src 192.168.0.1 32 dst 192.168.0.2 32  tos 2  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")/TCP(sport=32,dport=32)/Raw(load="%s")], iface="%s")' % (self.dut_rx_interface, self.payload, self.dut_rx_interface))
+            self.dut.send_expect("flow_director_filter %s mode IP  del flow ipv4-tcp-syn-no-ack src 192.168.0.1 32 dst 192.168.0.2 32  tos 2  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(False, '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")/TCP(sport=32,dport=32)/Raw(load="%s")], iface="%s")' % (self.dut_rx_interface, self.payload, self.dut_rx_interface))
+
         # ipv4 frag
         # ip-frag only support fortville
         if (self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV"]):
@@ -575,7 +682,7 @@ class TestFdir(TestCase, IxiaPacketGenerator):
             self.send_and_verify(False, '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))
 
         # ipv4 sctp
-        self.fdir_get_flexbytes(sctp=True)
+        self.fdir_set_rule_for_sctp(sctp=True)
         self.dut.send_expect("flow_director_filter %s mode IP  add flow ipv4-sctp src 192.168.0.1 32 dst 192.168.0.2 32 verify_tag 1  tos 2  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")/SCTP(sport=32, dport=32, tag=1)/SCTPChunkData(data="%s")], iface="%s")' % (self.dut_rx_interface, self.payload, self.dut_rx_interface))
         self.dut.send_expect("flow_director_filter %s mode IP  del flow ipv4-sctp src 192.168.0.1 32 dst 192.168.0.2 32 verify_tag 1  tos 2  ttl 40 vlan 0 flexbytes (%s) fwd pf queue %d fd_id %d "%(self.dut_ports[0],self.flexbytes, 2, 1), "testpmd>")
@@ -585,7 +692,7 @@ class TestFdir(TestCase, IxiaPacketGenerator):
             self.dut.send_expect("flow_director_filter %s mode IP  update flow ipv4-sctp src 192.168.0.1 32 dst 192.168.0.2 32 verify_tag 1  tos 2  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")/SCTP(sport=32, dport=32, tag=1)/SCTPChunkData(data="%s")], iface="%s")' % (self.dut_rx_interface, self.payload, self.dut_rx_interface))
             self.dut.send_expect("flow_director_filter %s mode IP  del flow ipv4-sctp src 192.168.0.1 32 dst 192.168.0.2 32 verify_tag 1  tos 2  ttl 40 vlan 0 flexbytes (%s) fwd pf queue %d fd_id %d "%(self.dut_ports[0],self.flexbytes, 2, 1), "testpmd>")
-        self.fdir_get_flexbytes()
+        self.fdir_set_rule_for_sctp()
 
         self.dut.send_expect("quit", "# ", 30)
 
@@ -632,6 +739,18 @@ class TestFdir(TestCase, IxiaPacketGenerator):
             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")/UDP(sport=1024,dport=1024)/Raw(load="%s")], iface="%s")' % (self.dut_rx_interface, self.payload, self.dut_rx_interface))
             self.dut.send_expect("flow_director_filter %s mode IP  del flow ipv6-udp src FE80:0:0:0:200:1FF:FE00:200 1024 dst 3555:5555:6666:6666:7777:7777:8888:8888 1024  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>")
 
+        if (self.nic in ["fortpark_TLV"]):
+	    # ipv6 udp unicast
+	    self.dut.send_expect("flow_director_filter %s mode IP  add flow ipv6-udp-unicast src FE80:0:0:0:200:1FF:FE00:200 1024 dst 3555:5555:6666:6666:7777:7777:8888:8888 1024  tos 2   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")/UDP(sport=1024,dport=1024)/Raw(load="%s")], iface="%s")' % (self.dut_rx_interface, self.payload, self.dut_rx_interface))
+            self.dut.send_expect("flow_director_filter %s mode IP  del flow ipv6-udp-unicast src FE80:0:0:0:200:1FF:FE00:200 1024 dst 3555:5555:6666:6666:7777:7777:8888:8888 1024  tos 2   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(False, '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")/UDP(sport=1024,dport=1024)/Raw(load="%s")], iface="%s")' % (self.dut_rx_interface, self.payload, self.dut_rx_interface))
+            # ipv6 udp multicast
+            self.dut.send_expect("flow_director_filter %s mode IP  add flow ipv6-udp-multicast src FE80:0:0:0:200:1FF:FE00:200 1024 dst FF1E:5555:6666:6666:7777:7777:8888:8888 1024  tos 2   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="33:33:88:88:88:88")/IPv6(src="FE80:0:0:0:200:1FF:FE00:200", dst="FF1E:5555:6666:6666:7777:7777:8888:8888")/UDP(sport=1024,dport=1024)/Raw(load="%s")], iface="%s")' % (self.dut_rx_interface, self.payload, self.dut_rx_interface))
+            self.dut.send_expect("flow_director_filter %s mode IP  del flow ipv6-udp-multicast src FE80:0:0:0:200:1FF:FE00:200 1024 dst FF1E:5555:6666:6666:7777:7777:8888:8888 1024  tos 2   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(False, 'sendp([Ether(src=get_if_hwaddr("%s"), dst="33:33:88:88:88:88")/IPv6(src="FE80:0:0:0:200:1FF:FE00:200", dst="FF1E:5555:6666:6666:7777:7777:8888:8888")/UDP(sport=1024,dport=1024)/Raw(load="%s")], iface="%s")' % (self.dut_rx_interface, self.payload, self.dut_rx_interface))
+
         # ipv6 tcp
         self.dut.send_expect("flow_director_filter %s mode IP  add flow ipv6-tcp src FE80:0:0:0:200:1FF:FE00:200 32 dst 3555:5555:6666:6666:7777:7777:8888:8888 32  tos 2   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")/TCP(sport=32,dport=32)/Raw(load="%s")], iface="%s")' % (self.dut_rx_interface, self.payload, self.dut_rx_interface))
@@ -642,8 +761,16 @@ class TestFdir(TestCase, IxiaPacketGenerator):
             self.dut.send_expect("flow_director_filter %s mode IP  update flow ipv6-tcp src FE80:0:0:0:200:1FF:FE00:200 32 dst 3555:5555:6666:6666:7777:7777:8888:8888 32  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")/TCP(sport=32,dport=32)/Raw(load="%s")], iface="%s")' % (self.dut_rx_interface, self.payload, self.dut_rx_interface))
             self.dut.send_expect("flow_director_filter %s mode IP  del flow ipv6-tcp src FE80:0:0:0:200:1FF:FE00:200 32 dst 3555:5555:6666:6666:7777:7777:8888:8888 32  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>")
+        if (self.nic in ["fortpark_TLV"]):
+            # ipv6 tcp syn no ack
+            self.dut.send_expect("flow_director_filter %s mode IP  add flow ipv6-tcp-syn-no-ack src FE80:0:0:0:200:1FF:FE00:200 32 dst 3555:5555:6666:6666:7777:7777:8888:8888 32  tos 2   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")/TCP(sport=32,dport=32)/Raw(load="%s")], iface="%s")' % (self.dut_rx_interface, self.payload, self.dut_rx_interface))
+            self.dut.send_expect("flow_director_filter %s mode IP  del flow ipv6-tcp-syn-no-ack src FE80:0:0:0:200:1FF:FE00:200 32 dst 3555:5555:6666:6666:7777:7777:8888:8888 32  tos 2   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(False, '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")/TCP(sport=32,dport=32)/Raw(load="%s")], iface="%s")' % (self.dut_rx_interface, self.payload, self.dut_rx_interface))
+
+
         #ipv6 sctp
-        self.fdir_get_flexbytes(sctp=True)
+        self.fdir_set_rule_for_sctp(sctp=True)
         self.dut.send_expect("flow_director_filter %s mode IP  add flow ipv6-sctp src FE80:0:0:0:200:1FF:FE00:200 32 dst 3555:5555:6666:6666:7777:7777:8888:8888 32 verify_tag 1  tos 2   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=132)/SCTP(sport=32, dport=32, tag=1)/SCTPChunkData(data="%s")], iface="%s")' % (self.dut_rx_interface, self.payload, self.dut_rx_interface))
         self.dut.send_expect("flow_director_filter %s mode IP  del flow ipv6-sctp src FE80:0:0:0:200:1FF:FE00:200 32 dst 3555:5555:6666:6666:7777:7777:8888:8888 32 verify_tag 1  tos 2  ttl 40 vlan 0 flexbytes (%s) fwd pf queue %d fd_id %d "%(self.dut_ports[0],self.flexbytes,2,1), "testpmd>")
@@ -653,7 +780,7 @@ class TestFdir(TestCase, IxiaPacketGenerator):
             self.dut.send_expect("flow_director_filter %s mode IP  update flow ipv6-sctp src FE80:0:0:0:200:1FF:FE00:200 32 dst 3555:5555:6666:6666:7777:7777:8888:8888 32 verify_tag 1  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=132)/SCTP(sport=32, dport=32, tag=1)/SCTPChunkData(data="%s")], iface="%s")' % (self.dut_rx_interface, self.payload, self.dut_rx_interface))
             self.dut.send_expect("flow_director_filter %s mode IP  del flow ipv6-sctp src FE80:0:0:0:200:1FF:FE00:200 32 dst 3555:5555:6666:6666:7777:7777:8888:8888 32 verify_tag 1  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.fdir_get_flexbytes()
+        self.fdir_set_rule_for_sctp()
 
         # ipv6 frag
         # ip-frag only support fortville
@@ -691,19 +818,39 @@ class TestFdir(TestCase, IxiaPacketGenerator):
         self.dut.send_expect("flow_director_filter %s mode IP  del flow ipv4-udp src 192.168.0.1 1024 dst 192.168.0.2 1024  tos 2  ttl 40 vlan 0 flexbytes (%s) drop 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")/UDP(sport=1024,dport=1024)/Raw(load="%s")], iface="%s")' % (self.dut_rx_interface, self.payload, self.dut_rx_interface))
 
+        if (self.nic in ["fortpark_TLV"]):
+	    # ipv4 udp unicast
+            self.dut.send_expect("flow_director_filter %s mode IP  add flow ipv4-udp-unicast src 192.168.0.1 1024 dst 192.168.0.2 1024  tos 2  ttl 40 vlan 0 flexbytes (%s) drop pf queue %d fd_id %d " % (self.dut_ports[0], self.flexbytes, 2, 1), "testpmd>")
+            self.send_and_verify(False, '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")/UDP(sport=1024,dport=1024)/Raw(load="%s")], iface="%s")' % (self.dut_rx_interface, self.payload, self.dut_rx_interface))
+            self.dut.send_expect("flow_director_filter %s mode IP  del flow ipv4-udp-unicast src 192.168.0.1 1024 dst 192.168.0.2 1024  tos 2  ttl 40 vlan 0 flexbytes (%s) drop 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")/UDP(sport=1024,dport=1024)/Raw(load="%s")], iface="%s")' % (self.dut_rx_interface, self.payload, self.dut_rx_interface))
+
+            # ipv4 udp multicast
+            self.dut.send_expect("flow_director_filter %s mode IP  add flow ipv4-udp-multicast src 192.168.0.1 1024 dst 192.168.0.2 1024  tos 2  ttl 40 vlan 0 flexbytes (%s) drop pf queue %d fd_id %d " % (self.dut_ports[0], self.flexbytes, 2, 1), "testpmd>")
+            self.send_and_verify(False, 'sendp([Ether(src=get_if_hwaddr("%s"), dst="01:00:5E:28:00:02")/IP(src="192.168.0.1", dst="192.168.0.2")/UDP(sport=1024,dport=1024)/Raw(load="%s")], iface="%s")' % (self.dut_rx_interface, self.payload, self.dut_rx_interface))
+            self.dut.send_expect("flow_director_filter %s mode IP  del flow ipv4-udp-multicast src 192.168.0.1 1024 dst 192.168.0.2 1024  tos 2  ttl 40 vlan 0 flexbytes (%s) drop 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="01:00:5E:28:00:02")/IP(src="192.168.0.1", dst="192.168.0.2")/UDP(sport=1024,dport=1024)/Raw(load="%s")], iface="%s")' % (self.dut_rx_interface, self.payload, self.dut_rx_interface))
+
         # ipv4 tcp
         self.dut.send_expect("flow_director_filter %s mode IP  add flow ipv4-tcp src 192.168.0.1 32 dst 192.168.0.2 32  tos 2  ttl 40 vlan 0 flexbytes (%s) drop pf queue %d fd_id %d " % (self.dut_ports[0], self.flexbytes, 2, 1), "testpmd>")
         self.send_and_verify(False, '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")/TCP(sport=32,dport=32)/Raw(load="%s")], iface="%s")' % (self.dut_rx_interface, self.payload, self.dut_rx_interface))
         self.dut.send_expect("flow_director_filter %s mode IP  del flow ipv4-tcp src 192.168.0.1 32 dst 192.168.0.2 32  tos 2  ttl 40 vlan 0 flexbytes (%s) drop 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")/TCP(sport=32,dport=32)/Raw(load="%s")], iface="%s")' % (self.dut_rx_interface, self.payload, self.dut_rx_interface))
 
+        if (self.nic in ["fortpark_TLV"]):
+	    # ipv4 tcp syn no ack
+            self.dut.send_expect("flow_director_filter %s mode IP  add flow ipv4-tcp-syn-no-ack src 192.168.0.1 32 dst 192.168.0.2 32  tos 2  ttl 40 vlan 0 flexbytes (%s) drop pf queue %d fd_id %d " % (self.dut_ports[0], self.flexbytes, 2, 1), "testpmd>")
+            self.send_and_verify(False, '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")/TCP(sport=32,dport=32)/Raw(load="%s")], iface="%s")' % (self.dut_rx_interface, self.payload, self.dut_rx_interface))
+            self.dut.send_expect("flow_director_filter %s mode IP  del flow ipv4-tcp-syn-no-ack src 192.168.0.1 32 dst 192.168.0.2 32  tos 2  ttl 40 vlan 0 flexbytes (%s) drop 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")/TCP(sport=32,dport=32)/Raw(load="%s")], iface="%s")' % (self.dut_rx_interface, self.payload, self.dut_rx_interface))
+
         # ipv4 sctp
-        self.fdir_get_flexbytes(sctp=True)
+        self.fdir_set_rule_for_sctp(sctp=True)
         self.dut.send_expect("flow_director_filter %s mode IP  add flow ipv4-sctp src 192.168.0.1 32 dst 192.168.0.2 32 verify_tag 1  tos 2  ttl 40 vlan 0 flexbytes (%s) drop pf queue %d fd_id %d "%(self.dut_ports[0],self.flexbytes, 2, 1), "testpmd>")
         self.send_and_verify(False, '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")/SCTP(sport=32, dport=32, tag=1)/SCTPChunkData(data="%s")], iface="%s")' % (self.dut_rx_interface, self.payload, self.dut_rx_interface))
         self.dut.send_expect("flow_director_filter %s mode IP  del flow ipv4-sctp src 192.168.0.1 32 dst 192.168.0.2 32 verify_tag 1  tos 2  ttl 40 vlan 0 flexbytes (%s) drop 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")/SCTP(sport=32, dport=32, tag=1)/SCTPChunkData(data="%s")], iface="%s")' % (self.dut_rx_interface, self.payload, self.dut_rx_interface))
-        self.fdir_get_flexbytes()
+        self.fdir_set_rule_for_sctp()
 
         # ipv4 frag
         # ip-frag only support fortville
@@ -749,12 +896,30 @@ class TestFdir(TestCase, IxiaPacketGenerator):
             self.dut.send_expect("flow_director_filter %s mode IP  del flow ipv6-udp src FE80:0:0:0:200:1FF:FE00:200 1024 dst 3555:5555:6666:6666:7777:7777:8888:8888 1024  tos 2  ttl 40 vlan 0 flexbytes (%s) drop 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")/UDP(sport=1024,dport=1024)/Raw(load="%s")], iface="%s")' % (self.dut_rx_interface, self.payload, self.dut_rx_interface))
 
+       	    if (self.nic in ["fortpark_TLV"]):
+                #ipv6 udp unicast
+		self.dut.send_expect("flow_director_filter %s mode IP  add flow ipv6-udp-unicast src FE80:0:0:0:200:1FF:FE00:200 1024 dst 3555:5555:6666:6666:7777:7777:8888:8888 1024  tos 2  ttl 40 vlan 0 flexbytes (%s) drop pf queue %d fd_id %d " % (self.dut_ports[0], self.flexbytes, 2, 1), "testpmd>")
+                self.send_and_verify(False, '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")/UDP(sport=1024,dport=1024)/Raw(load="%s")], iface="%s")' % (self.dut_rx_interface, self.payload, self.dut_rx_interface))
+                self.dut.send_expect("flow_director_filter %s mode IP  del flow ipv6-udp-unicast src FE80:0:0:0:200:1FF:FE00:200 1024 dst 3555:5555:6666:6666:7777:7777:8888:8888 1024  tos 2  ttl 40 vlan 0 flexbytes (%s) drop 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")/UDP(sport=1024,dport=1024)/Raw(load="%s")], iface="%s")' % (self.dut_rx_interface, self.payload, self.dut_rx_interface))
+	        #ipv6 udp multicast
+                self.dut.send_expect("flow_director_filter %s mode IP  add flow ipv6-udp-multicast src FE80:0:0:0:200:1FF:FE00:200 1024 dst FF1E:5555:6666:6666:7777:7777:8888:8888 1024  tos 2  ttl 40 vlan 0 flexbytes (%s) drop pf queue %d fd_id %d " % (self.dut_ports[0], self.flexbytes, 2, 1), "testpmd>")
+                self.send_and_verify(False, 'sendp([Ether(src=get_if_hwaddr("%s"), dst="33:33:88:88:88:88")/IPv6(src="FE80:0:0:0:200:1FF:FE00:200", dst="FF1E:5555:6666:6666:7777:7777:8888:8888")/UDP(sport=1024,dport=1024)/Raw(load="%s")], iface="%s")' % (self.dut_rx_interface, self.payload, self.dut_rx_interface))
+                self.dut.send_expect("flow_director_filter %s mode IP  del flow ipv6-udp-multicast src FE80:0:0:0:200:1FF:FE00:200 1024 dst FF1E:5555:6666:6666:7777:7777:8888:8888 1024  tos 2  ttl 40 vlan 0 flexbytes (%s) drop 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="33:33:88:88:88:88")/IPv6(src="FE80:0:0:0:200:1FF:FE00:200", dst="FF1E:5555:6666:6666:7777:7777:8888:8888")/UDP(sport=1024,dport=1024)/Raw(load="%s")], iface="%s")' % (self.dut_rx_interface, self.payload, self.dut_rx_interface))
+
             # ipv6 tcp
             self.dut.send_expect("flow_director_filter %s mode IP  add flow ipv6-tcp src FE80:0:0:0:200:1FF:FE00:200 32 dst 3555:5555:6666:6666:7777:7777:8888:8888 32  tos 2   ttl 40 vlan 0 flexbytes (%s) drop pf queue %d fd_id %d " % (self.dut_ports[0], self.flexbytes, 2, 1), "testpmd>")
             self.send_and_verify(False, '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")/TCP(sport=32,dport=32)/Raw(load="%s")], iface="%s")' % (self.dut_rx_interface, self.payload, self.dut_rx_interface))
             self.dut.send_expect("flow_director_filter %s mode IP  del flow ipv6-tcp src FE80:0:0:0:200:1FF:FE00:200 32 dst 3555:5555:6666:6666:7777:7777:8888:8888 32  tos 2   ttl 40 vlan 0 flexbytes (%s) drop 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")/TCP(sport=32,dport=32)/Raw(load="%s")], iface="%s")' % (self.dut_rx_interface, self.payload, self.dut_rx_interface))
-
+            if (self.nic in ["fortpark_TLV"]):
+		# ipv6 tcp syn no ack
+                self.dut.send_expect("flow_director_filter %s mode IP  add flow ipv6-tcp-syn-no-ack src FE80:0:0:0:200:1FF:FE00:200 32 dst 3555:5555:6666:6666:7777:7777:8888:8888 32  tos 2   ttl 40 vlan 0 flexbytes (%s) drop pf queue %d fd_id %d " % (self.dut_ports[0], self.flexbytes, 2, 1), "testpmd>")
+                self.send_and_verify(False, '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")/TCP(sport=32,dport=32)/Raw(load="%s")], iface="%s")' % (self.dut_rx_interface, self.payload, self.dut_rx_interface))
+                self.dut.send_expect("flow_director_filter %s mode IP  del flow ipv6-tcp-syn-no-ack src FE80:0:0:0:200:1FF:FE00:200 32 dst 3555:5555:6666:6666:7777:7777:8888:8888 32  tos 2   ttl 40 vlan 0 flexbytes (%s) drop 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")/TCP(sport=32,dport=32)/Raw(load="%s")], iface="%s")' % (self.dut_rx_interface, self.payload, self.dut_rx_interface))
+	
             # ipv6 frag
             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) drop pf queue %d fd_id %d " % (self.dut_ports[0], self.flexbytes, 2, 1), "testpmd>")
             self.send_and_verify(False, '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))
@@ -764,6 +929,287 @@ class TestFdir(TestCase, IxiaPacketGenerator):
 
             self.dut.send_expect("quit", "# ", 30)
 
+    def test_fdir_flex_mask_ipv4(self):
+        """
+        FDir signature matching mode.
+        """
+        # fwd comand testing
+        self.fdir_type = "fwd"
+
+        self.dut.kill_all()
+        # fwd 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>")
+        self.dut.send_expect("set fwd rxonly", "testpmd>")
+
+        self.fdir_set_rule()
+        self.fdir_get_flexbytes()
+
+        # ipv4 ip
+        self.dut.send_expect("port stop %s" % self.dut_ports[0], "testpmd>")
+	self.dut.send_expect("flow_director_flex_mask %s flow ipv4-other (0xff,0xff,0,0,0,0,0,0,0,0,0,0,0,0,0,0) " % self.dut_ports[0], "testpmd>")
+        self.dut.send_expect("port start %s" % self.dut_ports[0], "testpmd>")
+
+	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, 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")/Raw(load="%s")], iface="%s")' % (self.dut_rx_interface, self.payload, self.dut_rx_interface))
+        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")/Raw(load="%s")], iface="%s")' % (self.dut_rx_interface, self.mask_payload1, self.dut_rx_interface))
+	self.send_and_verify(False, '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")/Raw(load="%s")], iface="%s")' % (self.dut_rx_interface, self.mask_payload2, self.dut_rx_interface))
+	self.dut.send_expect("flow_director_filter %s mode IP  del 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, 2, 1), "testpmd>")
+        
+	if (self.nic in ["niantic"]):
+            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, 1, 1), "testpmd>")
+            self.dut.send_expect("flow_director_filter %s mode IP  update 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, 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")/Raw(load="%s")], iface="%s")' % (self.dut_rx_interface, self.payload, self.dut_rx_interface))
+            self.dut.send_expect("flow_director_filter %s mode IP  del 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, 2, 1), "testpmd>")
+
+        # ipv4 udp
+	# the packet type ipv4-udp doesn't match the masked packet type ipv4-other, so the flow should be arranged to queue 0 
+        self.dut.send_expect("flow_director_filter %s mode IP  add flow ipv4-udp src 192.168.0.1 1024 dst 192.168.0.2 1024  tos 2  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(False, '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")/UDP(sport=1024,dport=1024)/Raw(load="%s")], iface="%s")' % (self.dut_rx_interface, self.mask_payload1, self.dut_rx_interface))
+
+	self.dut.send_expect("port stop %s" % self.dut_ports[0], "testpmd>")
+	self.dut.send_expect("flow_director_flex_mask %s flow ipv4-udp (0xff,0xff,0,0,0,0,0,0,0,0,0,0,0,0,0,0) " % self.dut_ports[0], "testpmd>")
+        self.dut.send_expect("port start %s" % self.dut_ports[0], "testpmd>")
+
+	self.dut.send_expect("flow_director_filter %s mode IP  add flow ipv4-udp src 192.168.0.1 1024 dst 192.168.0.2 1024  tos 2  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")/UDP(sport=1024,dport=1024)/Raw(load="%s")], iface="%s")' % (self.dut_rx_interface, self.payload, self.dut_rx_interface))
+	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")/UDP(sport=1024,dport=1024)/Raw(load="%s")], iface="%s")' % (self.dut_rx_interface, self.mask_payload1, self.dut_rx_interface))
+	self.send_and_verify(False, '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")/UDP(sport=1024,dport=1024)/Raw(load="%s")], iface="%s")' % (self.dut_rx_interface, self.mask_payload2, self.dut_rx_interface))
+        self.dut.send_expect("flow_director_filter %s mode IP  del flow ipv4-udp src 192.168.0.1 1024 dst 192.168.0.2 1024  tos 2  ttl 40 vlan 0 flexbytes (%s) fwd pf queue %d fd_id %d " % (self.dut_ports[0], self.flexbytes, 2, 1), "testpmd>")
+        if (self.nic in ["niantic"]):
+            self.dut.send_expect("flow_director_filter %s mode IP  add flow ipv4-udp src 192.168.0.1 1024 dst 192.168.0.2 1024  tos 2  ttl 40 vlan 0 flexbytes (%s) fwd pf queue %d fd_id %d " % (self.dut_ports[0], self.flexbytes, 1, 1), "testpmd>")
+            self.dut.send_expect("flow_director_filter %s mode IP  update flow ipv4-udp src 192.168.0.1 1024 dst 192.168.0.2 1024  tos 2  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")/UDP(sport=1024,dport=1024)/Raw(load="%s")], iface="%s")' % (self.dut_rx_interface, self.payload, self.dut_rx_interface))
+            self.dut.send_expect("flow_director_filter %s mode IP  del flow ipv4-udp src 192.168.0.1 1024 dst 192.168.0.2 1024  tos 2  ttl 40 vlan 0 flexbytes (%s) fwd pf queue %d fd_id %d " % (self.dut_ports[0], self.flexbytes, 2, 1), "testpmd>")
+
+        if (self.nic in ["fortpark_TLV"]):
+            # ipv4 udp unicast
+            self.dut.send_expect("port stop %s" % self.dut_ports[0], "testpmd>")
+	    self.dut.send_expect("flow_director_flex_mask %s flow ipv4-udp-unicast (0xff,0xff,0,0,0,0,0,0,0,0,0,0,0,0,0,0) " % self.dut_ports[0], "testpmd>")
+            self.dut.send_expect("port start %s" % self.dut_ports[0], "testpmd>")
+
+            self.dut.send_expect("flow_director_filter %s mode IP  add flow ipv4-udp-unicast src 192.168.0.1 1024 dst 192.168.0.2 1024  tos 2  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")/UDP(sport=1024,dport=1024)/Raw(load="%s")], iface="%s")' % (self.dut_rx_interface, self.payload, self.dut_rx_interface))
+            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")/UDP(sport=1024,dport=1024)/Raw(load="%s")], iface="%s")' % (self.dut_rx_interface, self.mask_payload1, self.dut_rx_interface))
+	    self.send_and_verify(False, '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")/UDP(sport=1024,dport=1024)/Raw(load="%s")], iface="%s")' % (self.dut_rx_interface, self.mask_payload2, self.dut_rx_interface))
+	    self.dut.send_expect("flow_director_filter %s mode IP  del flow ipv4-udp-unicast src 192.168.0.1 1024 dst 192.168.0.2 1024  tos 2  ttl 40 vlan 0 flexbytes (%s) fwd pf queue %d fd_id %d " % (self.dut_ports[0], self.flexbytes, 2, 1), "testpmd>")
+
+            # ipv4 udp multicast
+	    self.dut.send_expect("port stop %s" % self.dut_ports[0], "testpmd>")
+            self.dut.send_expect("flow_director_flex_mask %s flow ipv4-udp-multicast (0xff,0xff,0,0,0,0,0,0,0,0,0,0,0,0,0,0) " % self.dut_ports[0], "testpmd>")
+            self.dut.send_expect("port start %s" % self.dut_ports[0], "testpmd>")
+
+	    self.dut.send_expect("flow_director_filter %s mode IP  add flow ipv4-udp-multicast src 192.168.0.1 1024 dst 192.168.0.2 1024  tos 2  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="01:00:5E:28:00:02")/IP(src="192.168.0.1", dst="192.168.0.2")/UDP(sport=1024,dport=1024)/Raw(load="%s")], iface="%s")' % (self.dut_rx_interface, self.payload, self.dut_rx_interface))
+            self.send_and_verify(True, 'sendp([Ether(src=get_if_hwaddr("%s"), dst="01:00:5E:28:00:02")/IP(src="192.168.0.1", dst="192.168.0.2")/UDP(sport=1024,dport=1024)/Raw(load="%s")], iface="%s")' % (self.dut_rx_interface, self.mask_payload1, self.dut_rx_interface))
+	    self.send_and_verify(False, 'sendp([Ether(src=get_if_hwaddr("%s"), dst="01:00:5E:28:00:02")/IP(src="192.168.0.1", dst="192.168.0.2")/UDP(sport=1024,dport=1024)/Raw(load="%s")], iface="%s")' % (self.dut_rx_interface, self.mask_payload2, self.dut_rx_interface))
+            self.dut.send_expect("flow_director_filter %s mode IP  del flow ipv4-udp-multicast src 192.168.0.1 1024 dst 192.168.0.2 1024  tos 2  ttl 40 vlan 0 flexbytes (%s) fwd pf queue %d fd_id %d " % (self.dut_ports[0], self.flexbytes, 2, 1), "testpmd>")
+
+        # ipv4 tcp
+        self.dut.send_expect("port stop %s" % self.dut_ports[0], "testpmd>")
+        self.dut.send_expect("flow_director_flex_mask %s flow ipv4-tcp (0xff,0xff,0,0,0,0,0,0,0,0,0,0,0,0,0,0) " % self.dut_ports[0], "testpmd>")
+        self.dut.send_expect("port start %s" % self.dut_ports[0], "testpmd>")
+
+	self.dut.send_expect("flow_director_filter %s mode IP  add flow ipv4-tcp src 192.168.0.1 32 dst 192.168.0.2 32  tos 2  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")/TCP(sport=32,dport=32)/Raw(load="%s")], iface="%s")' % (self.dut_rx_interface, self.payload, self.dut_rx_interface))
+        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")/TCP(sport=32,dport=32)/Raw(load="%s")], iface="%s")' % (self.dut_rx_interface, self.mask_payload1, self.dut_rx_interface))
+        self.send_and_verify(False, '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")/TCP(sport=32,dport=32)/Raw(load="%s")], iface="%s")' % (self.dut_rx_interface, self.mask_payload2, self.dut_rx_interface))
+	self.dut.send_expect("flow_director_filter %s mode IP  del flow ipv4-tcp src 192.168.0.1 32 dst 192.168.0.2 32  tos 2  ttl 40 vlan 0 flexbytes (%s) fwd pf queue %d fd_id %d " % (self.dut_ports[0], self.flexbytes, 2, 1), "testpmd>")
+        
+	if (self.nic in ["niantic"]):
+            self.dut.send_expect("flow_director_filter %s mode IP  add flow ipv4-tcp src 192.168.0.1 32 dst 192.168.0.2 32  tos 2  ttl 40 vlan 0 flexbytes (%s) fwd pf queue %d fd_id %d " % (self.dut_ports[0], self.flexbytes, 1, 1), "testpmd>")
+            self.dut.send_expect("flow_director_filter %s mode IP  update flow ipv4-tcp src 192.168.0.1 32 dst 192.168.0.2 32  tos 2  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")/TCP(sport=32,dport=32)/Raw(load="%s")], iface="%s")' % (self.dut_rx_interface, self.payload, self.dut_rx_interface))
+            self.dut.send_expect("flow_director_filter %s mode IP  del flow ipv4-tcp src 192.168.0.1 32 dst 192.168.0.2 32  tos 2  ttl 40 vlan 0 flexbytes (%s) fwd pf queue %d fd_id %d " % (self.dut_ports[0], self.flexbytes, 2, 1), "testpmd>")
+
+        if (self.nic in ["fortpark_TLV"]):
+            # ipv4 tcp syn no ack
+            self.dut.send_expect("port stop %s" % self.dut_ports[0], "testpmd>")
+            self.dut.send_expect("flow_director_flex_mask %s flow ipv4-tcp-syn-no-ack (0xff,0xff,0,0,0,0,0,0,0,0,0,0,0,0,0,0) " % self.dut_ports[0], "testpmd>")
+            self.dut.send_expect("port start %s" % self.dut_ports[0], "testpmd>")
+
+	    self.dut.send_expect("flow_director_filter %s mode IP  add flow ipv4-tcp-syn-no-ack src 192.168.0.1 32 dst 192.168.0.2 32  tos 2  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")/TCP(sport=32,dport=32)/Raw(load="%s")], iface="%s")' % (self.dut_rx_interface, self.payload, self.dut_rx_interface))
+            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")/TCP(sport=32,dport=32)/Raw(load="%s")], iface="%s")' % (self.dut_rx_interface, self.mask_payload1, self.dut_rx_interface))
+            self.send_and_verify(False, '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")/TCP(sport=32,dport=32)/Raw(load="%s")], iface="%s")' % (self.dut_rx_interface, self.mask_payload2, self.dut_rx_interface))
+            self.dut.send_expect("flow_director_filter %s mode IP  del flow ipv4-tcp-syn-no-ack src 192.168.0.1 32 dst 192.168.0.2 32  tos 2  ttl 40 vlan 0 flexbytes (%s) fwd pf queue %d fd_id %d " % (self.dut_ports[0], self.flexbytes, 2, 1), "testpmd>")
+
+        # ipv4 frag
+        # ip-frag only support fortville
+        if (self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV"]):
+            self.dut.send_expect("port stop %s" % self.dut_ports[0], "testpmd>")
+            self.dut.send_expect("flow_director_flex_mask %s flow ipv4-frag (0xff,0xff,0,0,0,0,0,0,0,0,0,0,0,0,0,0) " % self.dut_ports[0], "testpmd>")
+            self.dut.send_expect("port start %s" % self.dut_ports[0], "testpmd>")
+
+	    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))
+            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.mask_payload1, self.dut_rx_interface))
+            self.send_and_verify(False, '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.mask_payload2, self.dut_rx_interface))
+
+	    self.dut.send_expect("flow_director_filter %s mode IP  del 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  del 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(False, '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))
+
+        # ipv4 sctp
+        self.fdir_set_rule_for_sctp(sctp=True)
+        self.dut.send_expect("port stop %s" % self.dut_ports[0], "testpmd>")
+        self.dut.send_expect("flow_director_flex_payload %s l4 (16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31)" % self.dut_ports[0], "testpmd>")
+	self.dut.send_expect("flow_director_flex_mask %s flow ipv4-sctp (0xff,0xff,0,0,0,0,0,0,0,0,0,0,0,0,0,0) " % self.dut_ports[0], "testpmd>")
+        self.dut.send_expect("port start %s" % self.dut_ports[0], "testpmd>")
+
+        self.dut.send_expect("flow_director_filter %s mode IP  add flow ipv4-sctp src 192.168.0.1 32 dst 192.168.0.2 32 verify_tag 1  tos 2  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")/SCTP(sport=32, dport=32, tag=1)/SCTPChunkData(data="%s")], iface="%s")' % (self.dut_rx_interface, self.payload, self.dut_rx_interface))
+        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")/SCTP(sport=32, dport=32, tag=1)/SCTPChunkData(data="%s")], iface="%s")' % (self.dut_rx_interface, self.mask_payload1, self.dut_rx_interface))
+        self.send_and_verify(False, '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")/SCTP(sport=32, dport=32, tag=1)/SCTPChunkData(data="%s")], iface="%s")' % (self.dut_rx_interface, self.mask_payload2, self.dut_rx_interface))
+        self.dut.send_expect("flow_director_filter %s mode IP  del flow ipv4-sctp src 192.168.0.1 32 dst 192.168.0.2 32 verify_tag 1  tos 2  ttl 40 vlan 0 flexbytes (%s) fwd pf queue %d fd_id %d "%(self.dut_ports[0],self.flexbytes, 2, 1), "testpmd>")
+        if (self.nic in ["niantic"]):
+            self.dut.send_expect("flow_director_filter %s mode IP  add flow ipv4-sctp src 192.168.0.1 32 dst 192.168.0.2 32 verify_tag 1  tos 2  ttl 40 vlan 0 flexbytes (%s) fwd pf queue %d fd_id %d "%(self.dut_ports[0],self.flexbytes, 1, 1), "testpmd>")
+            self.dut.send_expect("flow_director_filter %s mode IP  update flow ipv4-sctp src 192.168.0.1 32 dst 192.168.0.2 32 verify_tag 1  tos 2  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")/SCTP(sport=32, dport=32, tag=1)/SCTPChunkData(data="%s")], iface="%s")' % (self.dut_rx_interface, self.payload, self.dut_rx_interface))
+            self.dut.send_expect("flow_director_filter %s mode IP  del flow ipv4-sctp src 192.168.0.1 32 dst 192.168.0.2 32 verify_tag 1  tos 2  ttl 40 vlan 0 flexbytes (%s) fwd pf queue %d fd_id %d "%(self.dut_ports[0],self.flexbytes, 2, 1), "testpmd>")
+        self.fdir_set_rule_for_sctp()
+
+        self.dut.send_expect("quit", "# ", 30)
+
+    def test_fdir_flex_mask_ipv6(self):
+        """
+        FDir signature matching mode.
+        """
+        # fwd comand testing
+        self.fdir_type = "fwd"
+
+        self.dut.kill_all()
+        # fwd testing with flexword
+        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", "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>")
+        self.dut.send_expect("set fwd rxonly", "testpmd>")
+
+        self.fdir_set_rule()
+        self.fdir_get_flexbytes()
+
+        # ipv6 ip
+        self.dut.send_expect("port stop %s" % self.dut_ports[0], "testpmd>")
+        self.dut.send_expect("flow_director_flex_mask %s flow ipv6-other (0xff,0xff,0,0,0,0,0,0,0,0,0,0,0,0,0,0) " % self.dut_ports[0], "testpmd>")
+        self.dut.send_expect("port start %s" % self.dut_ports[0], "testpmd>")
+
+	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, 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")/Raw(load="%s")], iface="%s")' % (self.dut_rx_interface, self.payload, self.dut_rx_interface))
+        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")/Raw(load="%s")], iface="%s")' % (self.dut_rx_interface, self.mask_payload1, self.dut_rx_interface))
+        self.send_and_verify(False, '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")/Raw(load="%s")], iface="%s")' % (self.dut_rx_interface, self.mask_payload2, self.dut_rx_interface)) 
+	self.dut.send_expect("flow_director_filter %s mode IP  del 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, 2, 1), "testpmd>")
+        if (self.nic in ["niantic"]):
+            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, 1, 1), "testpmd>")
+            self.dut.send_expect("flow_director_filter %s mode IP  update 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, 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")/Raw(load="%s")], iface="%s")' % (self.dut_rx_interface, self.payload, self.dut_rx_interface))
+            self.dut.send_expect("flow_director_filter %s mode IP  del 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, 2, 1), "testpmd>")
+
+        # ipv6 udp
+        self.dut.send_expect("port stop %s" % self.dut_ports[0], "testpmd>")
+        self.dut.send_expect("flow_director_flex_mask %s flow ipv6-udp (0xff,0xff,0,0,0,0,0,0,0,0,0,0,0,0,0,0) " % self.dut_ports[0], "testpmd>")
+        self.dut.send_expect("port start %s" % self.dut_ports[0], "testpmd>")
+
+	self.dut.send_expect("flow_director_filter %s mode IP  add flow ipv6-udp src FE80:0:0:0:200:1FF:FE00:200 1024 dst 3555:5555:6666:6666:7777:7777:8888:8888 1024  tos 2   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")/UDP(sport=1024,dport=1024)/Raw(load="%s")], iface="%s")' % (self.dut_rx_interface, self.payload, self.dut_rx_interface))
+        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")/UDP(sport=1024,dport=1024)/Raw(load="%s")], iface="%s")' % (self.dut_rx_interface, self.mask_payload1, self.dut_rx_interface))
+        self.send_and_verify(False, '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")/UDP(sport=1024,dport=1024)/Raw(load="%s")], iface="%s")' % (self.dut_rx_interface, self.mask_payload2, self.dut_rx_interface))
+	self.dut.send_expect("flow_director_filter %s mode IP  del flow ipv6-udp src FE80:0:0:0:200:1FF:FE00:200 1024 dst 3555:5555:6666:6666:7777:7777:8888:8888 1024  tos 2   ttl 40 vlan 0 flexbytes (%s) fwd pf queue %d fd_id %d " % (self.dut_ports[0], self.flexbytes, 2, 1), "testpmd>")
+        if (self.nic in ["niantic"]):
+            self.dut.send_expect("flow_director_filter %s mode IP  add flow ipv6-udp src FE80:0:0:0:200:1FF:FE00:200 1024 dst 3555:5555:6666:6666:7777:7777:8888:8888 1024  tos 2 ttl 40 vlan 0 flexbytes (%s) fwd pf queue %d fd_id %d " % (self.dut_ports[0], self.flexbytes, 1, 1), "testpmd>")
+            self.dut.send_expect("flow_director_filter %s mode IP  update flow ipv6-udp src FE80:0:0:0:200:1FF:FE00:200 1024 dst 3555:5555:6666:6666:7777:7777:8888:8888 1024  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")/UDP(sport=1024,dport=1024)/Raw(load="%s")], iface="%s")' % (self.dut_rx_interface, self.payload, self.dut_rx_interface))
+            self.dut.send_expect("flow_director_filter %s mode IP  del flow ipv6-udp src FE80:0:0:0:200:1FF:FE00:200 1024 dst 3555:5555:6666:6666:7777:7777:8888:8888 1024  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>")
+
+        if (self.nic in ["fortpark_TLV"]):
+            # ipv6 udp unicast
+            self.dut.send_expect("port stop %s" % self.dut_ports[0], "testpmd>")
+            self.dut.send_expect("flow_director_flex_mask %s flow ipv6-udp-unicast (0xff,0xff,0,0,0,0,0,0,0,0,0,0,0,0,0,0) " % self.dut_ports[0], "testpmd>")
+            self.dut.send_expect("port start %s" % self.dut_ports[0], "testpmd>")
+        
+	    self.dut.send_expect("flow_director_filter %s mode IP  add flow ipv6-udp-unicast src FE80:0:0:0:200:1FF:FE00:200 1024 dst 3555:5555:6666:6666:7777:7777:8888:8888 1024  tos 2   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")/UDP(sport=1024,dport=1024)/Raw(load="%s")], iface="%s")' % (self.dut_rx_interface, self.payload, self.dut_rx_interface))
+            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")/UDP(sport=1024,dport=1024)/Raw(load="%s")], iface="%s")' % (self.dut_rx_interface, self.mask_payload1, self.dut_rx_interface))
+            self.send_and_verify(False, '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")/UDP(sport=1024,dport=1024)/Raw(load="%s")], iface="%s")' % (self.dut_rx_interface, self.mask_payload2, self.dut_rx_interface))
+	    self.dut.send_expect("flow_director_filter %s mode IP  del flow ipv6-udp-unicast src FE80:0:0:0:200:1FF:FE00:200 1024 dst 3555:5555:6666:6666:7777:7777:8888:8888 1024  tos 2   ttl 40 vlan 0 flexbytes (%s) fwd pf queue %d fd_id %d " % (self.dut_ports[0], self.flexbytes, 2, 1), "testpmd>")
+            # ipv6 udp multicast
+            self.dut.send_expect("port stop %s" % self.dut_ports[0], "testpmd>")
+            self.dut.send_expect("flow_director_flex_mask %s flow ipv6-udp-multicast (0xff,0xff,0,0,0,0,0,0,0,0,0,0,0,0,0,0) " % self.dut_ports[0], "testpmd>")
+            self.dut.send_expect("port start %s" % self.dut_ports[0], "testpmd>")
+
+	    self.dut.send_expect("flow_director_filter %s mode IP  add flow ipv6-udp-multicast src FE80:0:0:0:200:1FF:FE00:200 1024 dst FF1E:5555:6666:6666:7777:7777:8888:8888 1024  tos 2   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="33:33:88:88:88:88")/IPv6(src="FE80:0:0:0:200:1FF:FE00:200", dst="FF1E:5555:6666:6666:7777:7777:8888:8888")/UDP(sport=1024,dport=1024)/Raw(load="%s")], iface="%s")' % (self.dut_rx_interface, self.payload, self.dut_rx_interface))
+            self.send_and_verify(True, 'sendp([Ether(src=get_if_hwaddr("%s"), dst="33:33:88:88:88:88")/IPv6(src="FE80:0:0:0:200:1FF:FE00:200", dst="FF1E:5555:6666:6666:7777:7777:8888:8888")/UDP(sport=1024,dport=1024)/Raw(load="%s")], iface="%s")' % (self.dut_rx_interface, self.mask_payload1, self.dut_rx_interface))
+            self.send_and_verify(False, 'sendp([Ether(src=get_if_hwaddr("%s"), dst="33:33:88:88:88:88")/IPv6(src="FE80:0:0:0:200:1FF:FE00:200", dst="FF1E:5555:6666:6666:7777:7777:8888:8888")/UDP(sport=1024,dport=1024)/Raw(load="%s")], iface="%s")' % (self.dut_rx_interface, self.mask_payload2, self.dut_rx_interface))
+            self.dut.send_expect("flow_director_filter %s mode IP  del flow ipv6-udp-multicast src FE80:0:0:0:200:1FF:FE00:200 1024 dst FF1E:5555:6666:6666:7777:7777:8888:8888 1024  tos 2   ttl 40 vlan 0 flexbytes (%s) fwd pf queue %d fd_id %d " % (self.dut_ports[0], self.flexbytes, 2, 1), "testpmd>")
+
+        # ipv6 tcp
+        self.dut.send_expect("port stop %s" % self.dut_ports[0], "testpmd>")
+        self.dut.send_expect("flow_director_flex_mask %s flow ipv6-tcp (0xff,0xff,0,0,0,0,0,0,0,0,0,0,0,0,0,0) " % self.dut_ports[0], "testpmd>")
+        self.dut.send_expect("port start %s" % self.dut_ports[0], "testpmd>")
+
+        self.dut.send_expect("flow_director_filter %s mode IP  add flow ipv6-tcp src FE80:0:0:0:200:1FF:FE00:200 32 dst 3555:5555:6666:6666:7777:7777:8888:8888 32  tos 2   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")/TCP(sport=32,dport=32)/Raw(load="%s")], iface="%s")' % (self.dut_rx_interface, self.payload, self.dut_rx_interface))
+        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")/TCP(sport=32,dport=32)/Raw(load="%s")], iface="%s")' % (self.dut_rx_interface, self.mask_payload1, self.dut_rx_interface))
+        self.send_and_verify(False, '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")/TCP(sport=32,dport=32)/Raw(load="%s")], iface="%s")' % (self.dut_rx_interface, self.mask_payload2, self.dut_rx_interface))
+        self.dut.send_expect("flow_director_filter %s mode IP  del flow ipv6-tcp src FE80:0:0:0:200:1FF:FE00:200 32 dst 3555:5555:6666:6666:7777:7777:8888:8888 32  tos 2   ttl 40 vlan 0 flexbytes (%s) fwd pf queue %d fd_id %d " % (self.dut_ports[0], self.flexbytes, 2, 1), "testpmd>")
+        if (self.nic in ["niantic"]):
+            self.dut.send_expect("flow_director_filter %s mode IP  add flow ipv6-tcp src FE80:0:0:0:200:1FF:FE00:200 32 dst 3555:5555:6666:6666:7777:7777:8888:8888 32  tos 2  proto 20 ttl 40 vlan 0 flexbytes (%s) fwd pf queue %d fd_id %d " % (self.dut_ports[0], self.flexbytes, 1, 1), "testpmd>")
+            self.dut.send_expect("flow_director_filter %s mode IP  update flow ipv6-tcp src FE80:0:0:0:200:1FF:FE00:200 32 dst 3555:5555:6666:6666:7777:7777:8888:8888 32  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")/TCP(sport=32,dport=32)/Raw(load="%s")], iface="%s")' % (self.dut_rx_interface, self.payload, self.dut_rx_interface))
+            self.dut.send_expect("flow_director_filter %s mode IP  del flow ipv6-tcp src FE80:0:0:0:200:1FF:FE00:200 32 dst 3555:5555:6666:6666:7777:7777:8888:8888 32  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>")
+        if (self.nic in ["fortpark_TLV"]):
+            # ipv6 tcp syn no ack
+            self.dut.send_expect("port stop %s" % self.dut_ports[0], "testpmd>")
+            self.dut.send_expect("flow_director_flex_mask %s flow ipv6-tcp-syn-no-ack (0xff,0xff,0,0,0,0,0,0,0,0,0,0,0,0,0,0) " % self.dut_ports[0], "testpmd>")
+            self.dut.send_expect("port start %s" % self.dut_ports[0], "testpmd>")
+
+            self.dut.send_expect("flow_director_filter %s mode IP  add flow ipv6-tcp-syn-no-ack src FE80:0:0:0:200:1FF:FE00:200 32 dst 3555:5555:6666:6666:7777:7777:8888:8888 32  tos 2   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")/TCP(sport=32,dport=32)/Raw(load="%s")], iface="%s")' % (self.dut_rx_interface, self.payload, self.dut_rx_interface))
+            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")/TCP(sport=32,dport=32)/Raw(load="%s")], iface="%s")' % (self.dut_rx_interface, self.mask_payload1, self.dut_rx_interface))
+	    self.send_and_verify(False, '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")/TCP(sport=32,dport=32)/Raw(load="%s")], iface="%s")' % (self.dut_rx_interface, self.mask_payload2, self.dut_rx_interface))
+	    self.dut.send_expect("flow_director_filter %s mode IP  del flow ipv6-tcp-syn-no-ack src FE80:0:0:0:200:1FF:FE00:200 32 dst 3555:5555:6666:6666:7777:7777:8888:8888 32  tos 2   ttl 40 vlan 0 flexbytes (%s) fwd pf queue %d fd_id %d " % (self.dut_ports[0], self.flexbytes, 2, 1), "testpmd>")
+
+        #ipv6 sctp
+        self.fdir_set_rule_for_sctp(sctp=True)
+        self.dut.send_expect("port stop %s" % self.dut_ports[0], "testpmd>")
+        self.dut.send_expect("flow_director_flex_mask %s flow ipv6-sctp (0xff,0xff,0,0,0,0,0,0,0,0,0,0,0,0,0,0) " % self.dut_ports[0], "testpmd>")
+        self.dut.send_expect("port start %s" % self.dut_ports[0], "testpmd>")
+
+        self.dut.send_expect("flow_director_filter %s mode IP  add flow ipv6-sctp src FE80:0:0:0:200:1FF:FE00:200 32 dst 3555:5555:6666:6666:7777:7777:8888:8888 32 verify_tag 1  tos 2   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=132)/SCTP(sport=32, dport=32, tag=1)/SCTPChunkData(data="%s")], iface="%s")' % (self.dut_rx_interface, self.payload, self.dut_rx_interface))
+        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=132)/SCTP(sport=32, dport=32, tag=1)/SCTPChunkData(data="%s")], iface="%s")' % (self.dut_rx_interface, self.mask_payload1, self.dut_rx_interface))
+        self.send_and_verify(False, '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=132)/SCTP(sport=32, dport=32, tag=1)/SCTPChunkData(data="%s")], iface="%s")' % (self.dut_rx_interface, self.mask_payload2, self.dut_rx_interface))
+	self.dut.send_expect("flow_director_filter %s mode IP  del flow ipv6-sctp src FE80:0:0:0:200:1FF:FE00:200 32 dst 3555:5555:6666:6666:7777:7777:8888:8888 32 verify_tag 1  tos 2  ttl 40 vlan 0 flexbytes (%s) fwd pf queue %d fd_id %d "%(self.dut_ports[0],self.flexbytes,2,1), "testpmd>")
+        if (self.nic in ["niantic"]):
+            self.dut.send_expect("flow_director_filter %s mode IP  add flow ipv6-sctp src FE80:0:0:0:200:1FF:FE00:200 32 dst 3555:5555:6666:6666:7777:7777:8888:8888 32 verify_tag 1  tos 2  proto 20 ttl 40 vlan 0 flexbytes (%s) fwd pf queue %d fd_id %d "%(self.dut_ports[0],self.flexbytes,1,1), "testpmd>")
+            self.dut.send_expect("flow_director_filter %s mode IP  update flow ipv6-sctp src FE80:0:0:0:200:1FF:FE00:200 32 dst 3555:5555:6666:6666:7777:7777:8888:8888 32 verify_tag 1  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=132)/SCTP(sport=32, dport=32, tag=1)/SCTPChunkData(data="%s")], iface="%s")' % (self.dut_rx_interface, self.payload, self.dut_rx_interface))
+            self.dut.send_expect("flow_director_filter %s mode IP  del flow ipv6-sctp src FE80:0:0:0:200:1FF:FE00:200 32 dst 3555:5555:6666:6666:7777:7777:8888:8888 32 verify_tag 1  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.fdir_set_rule_for_sctp()
+
+        # ipv6 frag
+        # ip-frag only support fortville
+        if (self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV"]):
+            self.dut.send_expect("port stop %s" % self.dut_ports[0], "testpmd>")
+            self.dut.send_expect("flow_director_flex_mask %s flow ipv6-frag (0xff,0xff,0,0,0,0,0,0,0,0,0,0,0,0,0,0) " % self.dut_ports[0], "testpmd>")
+            self.dut.send_expect("port start %s" % self.dut_ports[0], "testpmd>")
+
+	    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))
+            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.mask_payload1, self.dut_rx_interface))
+            self.send_and_verify(False, '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.mask_payload2, self.dut_rx_interface))
+	    self.dut.send_expect("flow_director_filter %s mode IP  del 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  del 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.dut.send_expect("quit", "# ", 30)
+
+
     def failed_test_fdir_flush(self):
         """
         FDir flush in Fortville.
-- 
2.5.0

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-09-12  6:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-12  6:51 [dts] [PATCH] tests fdir: add flow_director_flex_mask check Peng yuan

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).