test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH] Enable fdir sctp testing and fix flow director flex bytes with sctp packet
@ 2015-07-08  5:02 Yong Liu
  0 siblings, 0 replies; only message in thread
From: Yong Liu @ 2015-07-08  5:02 UTC (permalink / raw)
  To: dts

From: Marvin Liu <yong.liu@intel.com>

Signed-off-by: Marvin Liu <yong.liu@intel.com>

diff --git a/tests/TestSuite_fdir.py b/tests/TestSuite_fdir.py
index 3db41c9..5e1196d 100644
--- a/tests/TestSuite_fdir.py
+++ b/tests/TestSuite_fdir.py
@@ -237,14 +237,17 @@ class TestFdir(TestCase, IxiaPacketGenerator):
             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_get_flexbytes(self):
+    def fdir_get_flexbytes(self, sctp=False):
 
         """
         Fdir get flexbytes and payload according NIC
         """
 
         if(self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single"]):
-            self.flexbytes = "0x11,0x11,0x22,0x22,0x33,0x33,0x44,0x44,0x55,0x55,0x66,0x66,0x77,0x77,0x88,0x88"
+            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.payload = "\\x11\\x11\\x22\\x22\\x33\\x33\\x44\\x44\\x55\\x55\\x66\\x66\\x77\\x77\\x88\\x88"
             self.flexlength = 16
         elif (self.nic in ["niantic"]):
@@ -302,6 +305,7 @@ class TestFdir(TestCase, IxiaPacketGenerator):
             self.dut.send_expect("flow_director_filter %s del flow ipv4-tcp src 192.168.0.1 32 dst 192.168.0.2 32 vlan 0 flexbytes () fwd queue %d fd_id %d " % (self.dut_ports[0], 2, 1), "testpmd>")
 
         # ipv4 sctp
+        self.fdir_get_flexbytes(sctp=True)
         self.dut.send_expect("flow_director_filter %s add flow ipv4-sctp src 192.168.0.1 32 dst 192.168.0.2 32 verify_tag 1 vlan 0 flexbytes () fwd 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 del flow ipv4-sctp src 192.168.0.1 32 dst 192.168.0.2 32 verify_tag 1 vlan 0 flexbytes () fwd queue %d fd_id %d " % (self.dut_ports[0], 2, 1), "testpmd>")
@@ -311,6 +315,7 @@ class TestFdir(TestCase, IxiaPacketGenerator):
             self.dut.send_expect("flow_director_filter %s update flow ipv4-sctp src 192.168.0.1 32 dst 192.168.0.2 32 vlan 0 flexbytes () fwd 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 del flow ipv4-sctp src 192.168.0.1 32 dst 192.168.0.2 32 verify_tag 1 vlan 0 flexbytes () fwd queue %d fd_id %d " % (self.dut_ports[0], 2, 1), "testpmd>")
+        self.fdir_get_flexbytes()
 
         # ipv4 frag
         # ip-frag only support in fortville
@@ -375,18 +380,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")/TCP(sport=32,dport=32)], iface="%s")' % (self.dut_rx_interface, self.dut_rx_interface))
             self.dut.send_expect("flow_director_filter %s del flow ipv6-tcp src FE80:0:0:0:200:1FF:FE00:200 32 dst 3555:5555:6666:6666:7777:7777:8888:8888 32 vlan 0 flexbytes () fwd queue %d fd_id %d " % (self.dut_ports[0], 2, 1), "testpmd>")
 
-        """
         #ipv6 sctp
+        self.fdir_get_flexbytes(sctp=True)
         self.dut.send_expect("flow_director_filter 0 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 vlan 0 flexbytes () fwd 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")/SCTP(sport=32, dport=32, tag=1)/SCTPChunkData(data="X"*46)], iface="%s")' % (self.dut_rx_interface, 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="X"*46)], iface="%s")' % (self.dut_rx_interface, self.dut_rx_interface))
         self.dut.send_expect("flow_director_filter 0 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 vlan 0 flexbytes () fwd queue %d fd_id %d "%(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")/SCTP(sport=32, dport=32, tag=1)/SCTPChunkData(data="X"*46)], iface="%s")' % (self.dut_rx_interface, 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="X"*46)], iface="%s")' % (self.dut_rx_interface, self.dut_rx_interface))
         if (self.nic in ["niantic"]):
             self.dut.send_expect("flow_director_filter 0 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 vlan 0 flexbytes () fwd queue %d fd_id %d "%(1,1), "testpmd>")
             self.dut.send_expect("flow_director_filter 0 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 vlan 0 flexbytes () fwd 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")/SCTP(sport=32, dport=32, tag=1)/SCTPChunkData(data="X"*46)], iface="%s")' % (self.dut_rx_interface, 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="X"*46)], iface="%s")' % (self.dut_rx_interface, self.dut_rx_interface))
             self.dut.send_expect("flow_director_filter 0 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 vlan 0 flexbytes () fwd queue %d fd_id %d "%(2,1), "testpmd>")
-        """
+        self.fdir_get_flexbytes()
 
         # ipv6 frag
         # ip-frag only support in fortville
@@ -444,6 +449,7 @@ class TestFdir(TestCase, IxiaPacketGenerator):
             self.dut.send_expect("flow_director_filter %s del flow ipv4-tcp src 192.168.0.1 32 dst 192.168.0.2 32 vlan 0 flexbytes () drop queue %d fd_id %d " % (self.dut_ports[0], 2, 1), "testpmd>")
 
         # ipv4 sctp
+        self.fdir_get_flexbytes(sctp=True)
         self.dut.send_expect("flow_director_filter %s add flow ipv4-sctp src 192.168.0.1 32 dst 192.168.0.2 32 verify_tag 1 vlan 0 flexbytes () drop 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 del flow ipv4-sctp src 192.168.0.1 32 dst 192.168.0.2 32 verify_tag 1 vlan 0 flexbytes () drop queue %d fd_id %d " % (self.dut_ports[0], 2, 1), "testpmd>")
@@ -453,6 +459,7 @@ class TestFdir(TestCase, IxiaPacketGenerator):
             self.dut.send_expect("flow_director_filter %s update flow ipv4-sctp src 192.168.0.1 32 dst 192.168.0.2 32 verify_tag 1 vlan 0 flexbytes () drop 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 del flow ipv4-sctp src 192.168.0.1 32 dst 192.168.0.2 32 verify_tag 1 vlan 0 flexbytes () drop queue %d fd_id %d " % (self.dut_ports[0], 2, 1), "testpmd>")
+        self.fdir_get_flexbytes()
 
         # ipv4 frag
         # ip-frag only support in fortville
@@ -499,17 +506,17 @@ 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))
 
             # ipv6 sctp
-            """
+            self.fdir_get_flexbytes(sctp=True)
             self.dut.send_expect("flow_director_filter %s 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 vlan 0 flexbytes () drop 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")/SCTP(sport=32, dport=32, tag=1)/SCTPChunkData(data="X"*46)], iface="%s")' % (self.dut_rx_interface, 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="X"*46)], iface="%s")' % (self.dut_rx_interface, self.dut_rx_interface))
             self.dut.send_expect("flow_director_filter %s 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 vlan 0 flexbytes () drop 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")/SCTP(sport=32, dport=32, tag=1)/SCTPChunkData(data="X"*46)], iface="%s")' % (self.dut_rx_interface, 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="X"*46)], iface="%s")' % (self.dut_rx_interface, self.dut_rx_interface))
             if (self.nic in ["niantic"]):
                 self.dut.send_expect("flow_director_filter %s 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 vlan 0 flexbytes () drop queue %d fd_id %d "%(self.dut_ports[0],1,1), "testpmd>")
                 self.dut.send_expect("flow_director_filter %s 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 vlan 0 flexbytes () drop 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")/SCTP(sport=32, dport=32, tag=1)/SCTPChunkData(data="X"*46)], iface="%s")' % (self.dut_rx_interface, 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="X"*46)], iface="%s")' % (self.dut_rx_interface, self.dut_rx_interface))
                 self.dut.send_expect("flow_director_filter %s 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 vlan 0 flexbytes () drop 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 add flow ipv6-other src FE80:0:0:0:200:1FF:FE00:200 dst 3555:5555:6666:6666:7777:7777:8888:8888 vlan 0 flexbytes () drop queue %d fd_id %d " % (self.dut_ports[0], 3, 1), "testpmd>")
@@ -581,7 +588,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.dut.send_expect("flow_director_filter %s add flow ipv4-sctp src 192.168.0.1 32 dst 192.168.0.2 32 verify_tag 1 vlan 0 flexbytes (%s) fwd 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 del flow ipv4-sctp src 192.168.0.1 32 dst 192.168.0.2 32 verify_tag 1 vlan 0 flexbytes (%s) fwd queue %d fd_id %d "%(self.dut_ports[0],self.flexbytes, 2, 1), "testpmd>")
@@ -591,7 +598,7 @@ class TestFdir(TestCase, IxiaPacketGenerator):
             self.dut.send_expect("flow_director_filter %s update flow ipv4-sctp src 192.168.0.1 32 dst 192.168.0.2 32 verify_tag 1 vlan 0 flexbytes (%s) fwd 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 0 del flow ipv4-sctp src 192.168.0.1 32 dst 192.168.0.2 32 verify_tag 1 vlan 0 flexbytes (%s) fwd queue %d fd_id %d "%(self.dut_ports[0],self.flexbytes, 2, 1), "testpmd>")
-        """
+        self.fdir_get_flexbytes()
 
         self.dut.send_expect("quit", "# ", 30)
 
@@ -648,18 +655,18 @@ class TestFdir(TestCase, IxiaPacketGenerator):
             self.dut.send_expect("flow_director_filter %s update flow ipv6-tcp src FE80:0:0:0:200:1FF:FE00:200 32 dst 3555:5555:6666:6666:7777:7777:8888:8888 32 vlan 0 flexbytes (%s) fwd 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 del flow ipv6-tcp src FE80:0:0:0:200:1FF:FE00:200 32 dst 3555:5555:6666:6666:7777:7777:8888:8888 32 vlan 0 flexbytes (%s) fwd queue %d fd_id %d " % (self.dut_ports[0], self.flexbytes, 2, 1), "testpmd>")
-        """
         #ipv6 sctp
+        self.fdir_get_flexbytes(sctp=True)
         self.dut.send_expect("flow_director_filter %s 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 vlan 0 flexbytes (%s) fwd 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")/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.payload, self.dut_rx_interface))
         self.dut.send_expect("flow_director_filter %s 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 vlan 0 flexbytes (%s) fwd 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")/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(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.payload, self.dut_rx_interface))
         if (self.nic in ["niantic"]):
             self.dut.send_expect("flow_director_filter %s 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 vlan 0 flexbytes (%s) fwd queue %d fd_id %d "%(self.dut_ports[0],self.flexbytes,1,1), "testpmd>")
             self.dut.send_expect("flow_director_filter %s 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 vlan 0 flexbytes (%s) fwd 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")/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.payload, self.dut_rx_interface))
             self.dut.send_expect("flow_director_filter %s 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 vlan 0 flexbytes (%s) fwd queue %d fd_id %d "%(self.dut_ports[0],self.flexbytes,2,1), "testpmd>")
-        """
+        self.fdir_get_flexbytes()
 
         # ipv6 frag
         # ip-frag only support fortville
@@ -704,12 +711,12 @@ 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))
 
         # ipv4 sctp
-        """
+        self.fdir_get_flexbytes(sctp=True)
         self.dut.send_expect("flow_director_filter %s add flow ipv4-sctp src 192.168.0.1 32 dst 192.168.0.2 32 verify_tag 1 vlan 0 flexbytes (%s) drop 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 del flow ipv4-sctp src 192.168.0.1 32 dst 192.168.0.2 32 verify_tag 1 vlan 0 flexbytes (%s) drop 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()
 
         # ipv4 frag
         # ip-frag only support fortville
-- 
1.9.3

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

only message in thread, other threads:[~2015-07-08  5:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-08  5:02 [dts] [PATCH] Enable fdir sctp testing and fix flow director flex bytes with sctp packet Yong Liu

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