diff --git a/tests-1.3/actions.py b/tests-1.3/actions.py
index 3361659..e5b1e3a 100644
--- a/tests-1.3/actions.py
+++ b/tests-1.3/actions.py
@@ -130,6 +130,40 @@
         exp_pkt = simple_tcp_packet(dl_vlan_enable=True, pktlen=104)
         self.verify_modify(actions, pkt, exp_pkt)
 
+class PushVlanVid(BaseModifyPacketTest):
+    """
+    Push a vlan tag (vid=2, pcp=0)
+    """
+    def runTest(self):
+        actions = [ofp.action.push_vlan(ethertype=0x8100),
+                   ofp.action.set_field(ofp.oxm.vlan_vid(2))]
+        pkt = simple_tcp_packet()
+        exp_pkt = simple_tcp_packet(dl_vlan_enable=True, vlan_vid=2, pktlen=104)
+        self.verify_modify(actions, pkt, exp_pkt)
+
+class PushVlanVidPcp(BaseModifyPacketTest):
+    """
+    Push a vlan tag (vid=2, pcp=3)
+    """
+    def runTest(self):
+        actions = [ofp.action.push_vlan(ethertype=0x8100),
+                   ofp.action.set_field(ofp.oxm.vlan_vid(2)),
+                   ofp.action.set_field(ofp.oxm.vlan_pcp(3))]
+        pkt = simple_tcp_packet()
+        exp_pkt = simple_tcp_packet(dl_vlan_enable=True, vlan_vid=2, vlan_pcp=3, pktlen=104)
+        self.verify_modify(actions, pkt, exp_pkt)
+
+class PushVlanPcp(BaseModifyPacketTest):
+    """
+    Push a vlan tag (vid=0, pcp=3)
+    """
+    def runTest(self):
+        actions = [ofp.action.push_vlan(ethertype=0x8100),
+                   ofp.action.set_field(ofp.oxm.vlan_pcp(3))]
+        pkt = simple_tcp_packet()
+        exp_pkt = simple_tcp_packet(dl_vlan_enable=True, vlan_vid=0, vlan_pcp=3, pktlen=104)
+        self.verify_modify(actions, pkt, exp_pkt)
+
 class PopVlan(BaseModifyPacketTest):
     """
     Pop a vlan tag
@@ -180,9 +214,9 @@
         exp_pkt = simple_tcp_packet(eth_src="00:A1:CD:53:C6:55")
         self.verify_modify(actions, pkt, exp_pkt)
 
-class SetIpDscp(BaseModifyPacketTest):
+class SetIpv4Dscp(BaseModifyPacketTest):
     """
-    Set IP DSCP 
+    Set IPv4 DSCP 
     """
     def runTest(self):
         actions = [ofp.action.set_field(ofp.oxm.ip_dscp(0x01))]
@@ -190,9 +224,9 @@
         exp_pkt = simple_tcp_packet(ip_tos=0x04)
         self.verify_modify(actions, pkt, exp_pkt)
 
-class SetIpECN(BaseModifyPacketTest):
+class SetIpv4ECN(BaseModifyPacketTest):
     """
-    Set IP ECN
+    Set IPv4 ECN
     """
     def runTest(self):
         actions = [ofp.action.set_field(ofp.oxm.ip_ecn(0x01))]
@@ -200,9 +234,9 @@
         exp_pkt = simple_tcp_packet(ip_tos=0x01)
         self.verify_modify(actions, pkt, exp_pkt)
 
-class SetIpDSCP_NonZeroECN(BaseModifyPacketTest):
+class SetIpv4DSCP_NonZeroECN(BaseModifyPacketTest):
     """
-    Set IP DSCP and make sure ECN is not modified 
+    Set IPv4 DSCP and make sure ECN is not modified 
     """
     def runTest(self):
         actions = [ofp.action.set_field(ofp.oxm.ip_dscp(0x01))]
@@ -210,9 +244,9 @@
         exp_pkt = simple_tcp_packet(ip_tos=0x05)
         self.verify_modify(actions, pkt, exp_pkt)
 
-class SetIpECN_NonZeroDSCP(BaseModifyPacketTest):
+class SetIpv4ECN_NonZeroDSCP(BaseModifyPacketTest):
     """
-    Set IP ECN and make sure DSCP is not modified
+    Set IPv4 ECN and make sure DSCP is not modified
     """
     def runTest(self):
         actions = [ofp.action.set_field(ofp.oxm.ip_ecn(0x02))]
@@ -300,6 +334,26 @@
         exp_pkt = simple_tcpv6_packet(ipv6_dst="2001:abb1:3456:bccb:0000:0000:0370:7336")
         self.verify_modify(actions, pkt, exp_pkt)
 
+class SetIpv6Dscp(BaseModifyPacketTest):
+    """
+    Set IPv6 DSCP 
+    """
+    def runTest(self):
+        actions = [ofp.action.set_field(ofp.oxm.ip_dscp(0x01))]
+        pkt = simple_tcpv6_packet()
+        exp_pkt = simple_tcpv6_packet(ipv6_tc=0x04)
+        self.verify_modify(actions, pkt, exp_pkt)
+
+class SetIpv6ECN(BaseModifyPacketTest):
+    """
+    Set IPv6 ECN
+    """
+    def runTest(self):
+        actions = [ofp.action.set_field(ofp.oxm.ip_ecn(0x01))]
+        pkt = simple_tcpv6_packet()
+        exp_pkt = simple_tcpv6_packet(ipv6_tc=0x01)
+        self.verify_modify(actions, pkt, exp_pkt)
+
 class SetIPv6Flabel(BaseModifyPacketTest):
     """
     Set IPv6 Flabel 
@@ -310,9 +364,39 @@
         exp_pkt = simple_tcpv6_packet(ipv6_fl=10)
         self.verify_modify(actions, pkt, exp_pkt)
 
-class SetNwTTL(BaseModifyPacketTest):
+class SetIpv6DSCP_NonZeroECNandFlabel(BaseModifyPacketTest):
     """
-    Set Nw TTL 
+    Set IPv6 DSCP and make sure ECN is not modified 
+    """
+    def runTest(self):
+        actions = [ofp.action.set_field(ofp.oxm.ip_dscp(0x01))]
+        pkt = simple_tcpv6_packet(ipv6_tc=0x11, ipv6_fl=10)
+        exp_pkt = simple_tcpv6_packet(ipv6_tc=0x05, ipv6_fl=10)
+        self.verify_modify(actions, pkt, exp_pkt)
+
+class SetIpv6ECN_NonZeroDSCPandFlabel(BaseModifyPacketTest):
+    """
+    Set IPv6 ECN and make sure DSCP is not modified
+    """
+    def runTest(self):
+        actions = [ofp.action.set_field(ofp.oxm.ip_ecn(0x02))]
+        pkt = simple_tcpv6_packet(ipv6_tc=0x11, ipv6_fl=10)
+        exp_pkt = simple_tcpv6_packet(ipv6_tc=0x12, ipv6_fl=10)
+        self.verify_modify(actions, pkt, exp_pkt)
+
+class SetIPv6Flabel_NonZeroDSCPandECN(BaseModifyPacketTest):
+    """
+    Set IPv6 Flabel 
+    """
+    def runTest(self):
+        actions = [ofp.action.set_field(ofp.oxm.ipv6_flabel(10))]
+        pkt = simple_tcpv6_packet(ipv6_tc=0x11, ipv6_fl=9)
+        exp_pkt = simple_tcpv6_packet(ipv6_tc=0x11, ipv6_fl=10)
+        self.verify_modify(actions, pkt, exp_pkt)
+
+class SetIpv4TTL(BaseModifyPacketTest):
+    """
+    Set IPv4 TTL 
     """
     def runTest(self):
         actions = [ofp.action.set_nw_ttl(10)]
@@ -320,12 +404,32 @@
         exp_pkt = simple_tcp_packet(ip_ttl=10)
         self.verify_modify(actions, pkt, exp_pkt)
 
-class DecNwTTL(BaseModifyPacketTest):
+class SetIpv6HopLimit(BaseModifyPacketTest):
     """
-    Decrement Nw TTL 
+    Set Ipv6 Hop Limit 
+    """
+    def runTest(self):
+        actions = [ofp.action.set_nw_ttl(10)]
+        pkt = simple_tcpv6_packet()
+        exp_pkt = simple_tcpv6_packet(ipv6_hlim=10)
+        self.verify_modify(actions, pkt, exp_pkt)
+
+class DecIpv4TTL(BaseModifyPacketTest):
+    """
+    Decrement Ipv4 TTL 
     """
     def runTest(self):
         actions = [ofp.action.dec_nw_ttl()]
         pkt = simple_tcp_packet(ip_ttl=10)
         exp_pkt = simple_tcp_packet(ip_ttl=9)
         self.verify_modify(actions, pkt, exp_pkt)
+
+class DecIpv6HopLimit(BaseModifyPacketTest):
+    """
+    Decrement Ipv6 Hop Limit 
+    """
+    def runTest(self):
+        actions = [ofp.action.dec_nw_ttl()]
+        pkt = simple_tcpv6_packet(ipv6_hlim=10)
+        exp_pkt = simple_tcpv6_packet(ipv6_hlim=9)
+        self.verify_modify(actions, pkt, exp_pkt)
