Merge "Remove redundant exception declarations"
[openflowplugin.git] / extension / openflowjava-extension-nicira / src / main / java / org / opendaylight / openflowjava / nx / NiciraExtensionsRegistrator.java
index 36ed7c23e4140acf04c278d323a932ad2d157a64..e42df116520b0c7d1afd6aa35363ddac65adfd07 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015 Cisco Systems, Inc. and others.  All rights reserved.
+ * Copyright (c) 2014, 2017 Cisco Systems, Inc. and others.  All rights reserved.
  *
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
@@ -8,39 +8,50 @@
 
 package org.opendaylight.openflowjava.nx;
 
+import com.google.common.base.Preconditions;
 import org.opendaylight.openflowjava.nx.api.NiciraExtensionCodecRegistrator;
 import org.opendaylight.openflowjava.nx.codec.action.ConntrackCodec;
+import org.opendaylight.openflowjava.nx.codec.action.CtClearCodec;
+import org.opendaylight.openflowjava.nx.codec.action.DecNshTtlCodec;
+import org.opendaylight.openflowjava.nx.codec.action.DecapCodec;
+import org.opendaylight.openflowjava.nx.codec.action.EncapCodec;
+import org.opendaylight.openflowjava.nx.codec.action.FinTimeoutCodec;
 import org.opendaylight.openflowjava.nx.codec.action.LearnCodec;
 import org.opendaylight.openflowjava.nx.codec.action.MultipathCodec;
 import org.opendaylight.openflowjava.nx.codec.action.NiciraActionCodecs;
+import org.opendaylight.openflowjava.nx.codec.action.OutputReg2Codec;
 import org.opendaylight.openflowjava.nx.codec.action.OutputRegCodec;
+import org.opendaylight.openflowjava.nx.codec.action.RegLoad2Codec;
 import org.opendaylight.openflowjava.nx.codec.action.RegLoadCodec;
 import org.opendaylight.openflowjava.nx.codec.action.RegMoveCodec;
 import org.opendaylight.openflowjava.nx.codec.action.ResubmitCodec;
-import org.opendaylight.openflowjava.nx.codec.action.PushNshCodec;
-import org.opendaylight.openflowjava.nx.codec.action.PopNshCodec;
 import org.opendaylight.openflowjava.nx.codec.match.ArpOpCodec;
 import org.opendaylight.openflowjava.nx.codec.match.ArpShaCodec;
 import org.opendaylight.openflowjava.nx.codec.match.ArpSpaCodec;
 import org.opendaylight.openflowjava.nx.codec.match.ArpThaCodec;
 import org.opendaylight.openflowjava.nx.codec.match.ArpTpaCodec;
+import org.opendaylight.openflowjava.nx.codec.match.CtMarkCodec;
 import org.opendaylight.openflowjava.nx.codec.match.CtStateCodec;
+import org.opendaylight.openflowjava.nx.codec.match.CtTpDstCodec;
+import org.opendaylight.openflowjava.nx.codec.match.CtTpSrcCodec;
 import org.opendaylight.openflowjava.nx.codec.match.CtZoneCodec;
 import org.opendaylight.openflowjava.nx.codec.match.EthDstCodec;
 import org.opendaylight.openflowjava.nx.codec.match.EthSrcCodec;
 import org.opendaylight.openflowjava.nx.codec.match.EthTypeCodec;
+import org.opendaylight.openflowjava.nx.codec.match.InPortCodec;
+import org.opendaylight.openflowjava.nx.codec.match.MplsLabelCodec;
+import org.opendaylight.openflowjava.nx.codec.match.NiciraMatchCodecs;
+import org.opendaylight.openflowjava.nx.codec.match.NshFlagsCodec;
+import org.opendaylight.openflowjava.nx.codec.match.NshMdtypeCodec;
+import org.opendaylight.openflowjava.nx.codec.match.NshNpCodec;
+import org.opendaylight.openflowjava.nx.codec.match.NshTtlCodec;
 import org.opendaylight.openflowjava.nx.codec.match.Nshc1Codec;
 import org.opendaylight.openflowjava.nx.codec.match.Nshc2Codec;
 import org.opendaylight.openflowjava.nx.codec.match.Nshc3Codec;
 import org.opendaylight.openflowjava.nx.codec.match.Nshc4Codec;
 import org.opendaylight.openflowjava.nx.codec.match.NsiCodec;
 import org.opendaylight.openflowjava.nx.codec.match.NspCodec;
-import org.opendaylight.openflowjava.nx.codec.match.EncapEthTypeCodec;
-import org.opendaylight.openflowjava.nx.codec.match.EncapEthSrcCodec;
-import org.opendaylight.openflowjava.nx.codec.match.EncapEthDstCodec;
-import org.opendaylight.openflowjava.nx.codec.match.NshMdtypeCodec;
-import org.opendaylight.openflowjava.nx.codec.match.NshNpCodec;
-import org.opendaylight.openflowjava.nx.codec.match.TunGpeNpCodec;
+import org.opendaylight.openflowjava.nx.codec.match.PktMarkCodec;
 import org.opendaylight.openflowjava.nx.codec.match.Reg0Codec;
 import org.opendaylight.openflowjava.nx.codec.match.Reg1Codec;
 import org.opendaylight.openflowjava.nx.codec.match.Reg2Codec;
@@ -57,42 +68,43 @@ import org.opendaylight.openflowjava.nx.codec.match.TunIpv4SrcCodec;
 import org.opendaylight.openflowjava.nx.codec.match.UdpDstCodec;
 import org.opendaylight.openflowjava.nx.codec.match.UdpSrcCodec;
 
-import com.google.common.base.Preconditions;
-
 public class NiciraExtensionsRegistrator implements AutoCloseable {
-
     private final NiciraExtensionCodecRegistrator registrator;
 
-    /**
-     * @param registrator cannot be null
-     */
     public NiciraExtensionsRegistrator(NiciraExtensionCodecRegistrator registrator) {
         this.registrator = Preconditions.checkNotNull(registrator);
-    }
 
-    public void registerNiciraExtensions() {
         registrator.registerActionDeserializer(RegLoadCodec.DESERIALIZER_KEY, NiciraActionCodecs.REG_LOAD_CODEC);
         registrator.registerActionSerializer(RegLoadCodec.SERIALIZER_KEY, NiciraActionCodecs.REG_LOAD_CODEC);
+        registrator.registerActionDeserializer(RegLoad2Codec.DESERIALIZER_KEY, NiciraActionCodecs.REG_LOAD2_CODEC);
+        registrator.registerActionSerializer(RegLoad2Codec.SERIALIZER_KEY, NiciraActionCodecs.REG_LOAD2_CODEC);
         registrator.registerActionDeserializer(RegMoveCodec.DESERIALIZER_KEY, NiciraActionCodecs.REG_MOVE_CODEC);
         registrator.registerActionSerializer(RegMoveCodec.SERIALIZER_KEY, NiciraActionCodecs.REG_MOVE_CODEC);
         registrator.registerActionDeserializer(OutputRegCodec.DESERIALIZER_KEY, NiciraActionCodecs.OUTPUT_REG_CODEC);
         registrator.registerActionSerializer(OutputRegCodec.SERIALIZER_KEY, NiciraActionCodecs.OUTPUT_REG_CODEC);
+        registrator.registerActionDeserializer(OutputReg2Codec.DESERIALIZER_KEY, NiciraActionCodecs.OUTPUT_REG2_CODEC);
+        registrator.registerActionSerializer(OutputReg2Codec.SERIALIZER_KEY, NiciraActionCodecs.OUTPUT_REG2_CODEC);
         registrator.registerActionSerializer(ResubmitCodec.SERIALIZER_KEY, NiciraActionCodecs.RESUBMIT_CODEC);
         registrator.registerActionDeserializer(ResubmitCodec.DESERIALIZER_KEY, NiciraActionCodecs.RESUBMIT_CODEC);
         registrator.registerActionDeserializer(ResubmitCodec.TABLE_DESERIALIZER_KEY, NiciraActionCodecs.RESUBMIT_CODEC);
+        registrator.registerActionSerializer(FinTimeoutCodec.SERIALIZER_KEY, NiciraActionCodecs.FIN_TIMEOUT_CODEC);
+        registrator.registerActionDeserializer(FinTimeoutCodec.DESERIALIZER_KEY, NiciraActionCodecs.FIN_TIMEOUT_CODEC);
         registrator.registerActionSerializer(MultipathCodec.SERIALIZER_KEY, NiciraActionCodecs.MULTIPATH_CODEC);
         registrator.registerActionDeserializer(MultipathCodec.DESERIALIZER_KEY, NiciraActionCodecs.MULTIPATH_CODEC);
-        registrator.registerActionDeserializer(PushNshCodec.DESERIALIZER_KEY, NiciraActionCodecs.PUSH_NSH_CODEC);
-        registrator.registerActionSerializer(PushNshCodec.SERIALIZER_KEY, NiciraActionCodecs.PUSH_NSH_CODEC);
-        registrator.registerActionDeserializer(PopNshCodec.DESERIALIZER_KEY, NiciraActionCodecs.POP_NSH_CODEC);
-        registrator.registerActionSerializer(PopNshCodec.SERIALIZER_KEY, NiciraActionCodecs.POP_NSH_CODEC);
 
         registrator.registerActionSerializer(ConntrackCodec.SERIALIZER_KEY, NiciraActionCodecs.CONNTRACK_CODEC);
         registrator.registerActionDeserializer(ConntrackCodec.DESERIALIZER_KEY, NiciraActionCodecs.CONNTRACK_CODEC);
+        registrator.registerActionSerializer(CtClearCodec.SERIALIZER_KEY, NiciraActionCodecs.CT_CLEAR_CODEC);
+        registrator.registerActionDeserializer(CtClearCodec.DESERIALIZER_KEY, NiciraActionCodecs.CT_CLEAR_CODEC);
         registrator.registerActionSerializer(LearnCodec.SERIALIZER_KEY, NiciraActionCodecs.LEARN_CODEC);
         registrator.registerActionDeserializer(LearnCodec.DESERIALIZER_KEY, NiciraActionCodecs.LEARN_CODEC);
-        //Continue
-
+        registrator.registerActionDeserializer(EncapCodec.DESERIALIZER_KEY, NiciraActionCodecs.ENCAP_CODEC);
+        registrator.registerActionSerializer(EncapCodec.SERIALIZER_KEY, NiciraActionCodecs.ENCAP_CODEC);
+        registrator.registerActionDeserializer(DecapCodec.DESERIALIZER_KEY, NiciraActionCodecs.DECAP_CODEC);
+        registrator.registerActionSerializer(DecapCodec.SERIALIZER_KEY, NiciraActionCodecs.DECAP_CODEC);
+        registrator.registerActionDeserializer(DecNshTtlCodec.DESERIALIZER_KEY, NiciraActionCodecs.DEC_NSH_TTL_CODEC);
+        registrator.registerActionSerializer(DecNshTtlCodec.SERIALIZER_KEY, NiciraActionCodecs.DEC_NSH_TTL_CODEC);
+        // Continue
 
         registrator.registerMatchEntrySerializer(Reg0Codec.SERIALIZER_KEY, NiciraMatchCodecs.REG0_CODEC);
         registrator.registerMatchEntryDeserializer(Reg0Codec.DESERIALIZER_KEY, NiciraMatchCodecs.REG0_CODEC);
@@ -122,6 +134,12 @@ public class NiciraExtensionsRegistrator implements AutoCloseable {
         registrator.registerMatchEntryDeserializer(ArpThaCodec.DESERIALIZER_KEY, NiciraMatchCodecs.ARP_THA_CODEC);
         registrator.registerMatchEntrySerializer(ArpTpaCodec.SERIALIZER_KEY, NiciraMatchCodecs.ARP_TPA_CODEC);
         registrator.registerMatchEntryDeserializer(ArpTpaCodec.DESERIALIZER_KEY, NiciraMatchCodecs.ARP_TPA_CODEC);
+        registrator.registerMatchEntrySerializer(InPortCodec.SERIALIZER_KEY, NiciraMatchCodecs.NXM_OF_IN_PORT_CODEC);
+        registrator.registerMatchEntryDeserializer(InPortCodec.DESERIALIZER_KEY,
+                NiciraMatchCodecs.NXM_OF_IN_PORT_CODEC);
+        registrator.registerMatchEntrySerializer(MplsLabelCodec.SERIALIZER_KEY, NiciraMatchCodecs.OXM_OF_MPLS_LABEL);
+        registrator.registerMatchEntryDeserializer(MplsLabelCodec.DESERIALIZER_KEY,
+                NiciraMatchCodecs.OXM_OF_MPLS_LABEL);
         registrator.registerMatchEntrySerializer(EthDstCodec.SERIALIZER_KEY, NiciraMatchCodecs.ETH_DST_CODEC);
         registrator.registerMatchEntryDeserializer(EthDstCodec.DESERIALIZER_KEY, NiciraMatchCodecs.ETH_DST_CODEC);
         registrator.registerMatchEntrySerializer(EthSrcCodec.SERIALIZER_KEY, NiciraMatchCodecs.ETH_SRC_CODEC);
@@ -140,22 +158,20 @@ public class NiciraExtensionsRegistrator implements AutoCloseable {
         registrator.registerMatchEntryDeserializer(Nshc4Codec.DESERIALIZER_KEY, NiciraMatchCodecs.NSC4_CODEC);
         registrator.registerMatchEntrySerializer(NsiCodec.SERIALIZER_KEY, NiciraMatchCodecs.NSI_CODEC);
         registrator.registerMatchEntryDeserializer(NsiCodec.DESERIALIZER_KEY, NiciraMatchCodecs.NSI_CODEC);
+        registrator.registerMatchEntrySerializer(NshFlagsCodec.SERIALIZER_KEY, NiciraMatchCodecs.NSH_FLAGS_CODEC);
+        registrator.registerMatchEntryDeserializer(NshFlagsCodec.DESERIALIZER_KEY, NiciraMatchCodecs.NSH_FLAGS_CODEC);
+        registrator.registerMatchEntrySerializer(NshTtlCodec.SERIALIZER_KEY, NiciraMatchCodecs.NSH_TTL_CODEC);
+        registrator.registerMatchEntryDeserializer(NshTtlCodec.DESERIALIZER_KEY, NiciraMatchCodecs.NSH_TTL_CODEC);
         registrator.registerMatchEntrySerializer(TunIpv4DstCodec.SERIALIZER_KEY, NiciraMatchCodecs.TUN_IPV4_DST_CODEC);
-        registrator.registerMatchEntryDeserializer(TunIpv4DstCodec.DESERIALIZER_KEY, NiciraMatchCodecs.TUN_IPV4_DST_CODEC);
+        registrator.registerMatchEntryDeserializer(TunIpv4DstCodec.DESERIALIZER_KEY,
+                NiciraMatchCodecs.TUN_IPV4_DST_CODEC);
         registrator.registerMatchEntrySerializer(TunIpv4SrcCodec.SERIALIZER_KEY, NiciraMatchCodecs.TUN_IPV4_SRC_CODEC);
-        registrator.registerMatchEntryDeserializer(TunIpv4SrcCodec.DESERIALIZER_KEY, NiciraMatchCodecs.TUN_IPV4_SRC_CODEC);
-        registrator.registerMatchEntrySerializer(EncapEthTypeCodec.SERIALIZER_KEY, NiciraMatchCodecs.ENCAP_ETH_TYPE_CODEC);
-        registrator.registerMatchEntryDeserializer(EncapEthTypeCodec.DESERIALIZER_KEY, NiciraMatchCodecs.ENCAP_ETH_TYPE_CODEC);
-        registrator.registerMatchEntrySerializer(EncapEthSrcCodec.SERIALIZER_KEY, NiciraMatchCodecs.ENCAP_ETH_SRC_CODEC);
-        registrator.registerMatchEntryDeserializer(EncapEthSrcCodec.DESERIALIZER_KEY, NiciraMatchCodecs.ENCAP_ETH_SRC_CODEC);
-        registrator.registerMatchEntrySerializer(EncapEthDstCodec.SERIALIZER_KEY, NiciraMatchCodecs.ENCAP_ETH_DST_CODEC);
-        registrator.registerMatchEntryDeserializer(EncapEthDstCodec.DESERIALIZER_KEY, NiciraMatchCodecs.ENCAP_ETH_DST_CODEC);
+        registrator.registerMatchEntryDeserializer(TunIpv4SrcCodec.DESERIALIZER_KEY,
+                NiciraMatchCodecs.TUN_IPV4_SRC_CODEC);
         registrator.registerMatchEntrySerializer(NshMdtypeCodec.SERIALIZER_KEY, NiciraMatchCodecs.NSH_MDTYPE_CODEC);
         registrator.registerMatchEntryDeserializer(NshMdtypeCodec.DESERIALIZER_KEY, NiciraMatchCodecs.NSH_MDTYPE_CODEC);
         registrator.registerMatchEntrySerializer(NshNpCodec.SERIALIZER_KEY, NiciraMatchCodecs.NSH_NP_CODEC);
         registrator.registerMatchEntryDeserializer(NshNpCodec.DESERIALIZER_KEY, NiciraMatchCodecs.NSH_NP_CODEC);
-        registrator.registerMatchEntrySerializer(TunGpeNpCodec.SERIALIZER_KEY, NiciraMatchCodecs.TUN_GPE_NP_CODEC);
-        registrator.registerMatchEntryDeserializer(TunGpeNpCodec.DESERIALIZER_KEY, NiciraMatchCodecs.TUN_GPE_NP_CODEC);
         registrator.registerMatchEntrySerializer(TcpSrcCodec.SERIALIZER_KEY, NiciraMatchCodecs.TCP_SRC_CODEC);
         registrator.registerMatchEntryDeserializer(TcpSrcCodec.DESERIALIZER_KEY, NiciraMatchCodecs.TCP_SRC_CODEC);
         registrator.registerMatchEntrySerializer(TcpDstCodec.SERIALIZER_KEY, NiciraMatchCodecs.TCP_DST_CODEC);
@@ -168,29 +184,48 @@ public class NiciraExtensionsRegistrator implements AutoCloseable {
         registrator.registerMatchEntryDeserializer(CtStateCodec.DESERIALIZER_KEY, NiciraMatchCodecs.CT_ST_CODEC);
         registrator.registerMatchEntrySerializer(CtZoneCodec.SERIALIZER_KEY, NiciraMatchCodecs.CT_ZONE_CODEC);
         registrator.registerMatchEntryDeserializer(CtZoneCodec.DESERIALIZER_KEY, NiciraMatchCodecs.CT_ZONE_CODEC);
+        registrator.registerMatchEntrySerializer(CtMarkCodec.SERIALIZER_KEY, NiciraMatchCodecs.CT_MARK_CODEC);
+        registrator.registerMatchEntryDeserializer(CtMarkCodec.DESERIALIZER_KEY, NiciraMatchCodecs.CT_MARK_CODEC);
+        registrator.registerMatchEntrySerializer(CtTpSrcCodec.SERIALIZER_KEY, NiciraMatchCodecs.CT_TP_SRC_CODEC);
+        registrator.registerMatchEntryDeserializer(CtTpSrcCodec.DESERIALIZER_KEY, NiciraMatchCodecs.CT_TP_SRC_CODEC);
+        registrator.registerMatchEntrySerializer(CtTpDstCodec.SERIALIZER_KEY, NiciraMatchCodecs.CT_TP_DST_CODEC);
+        registrator.registerMatchEntryDeserializer(CtTpDstCodec.DESERIALIZER_KEY, NiciraMatchCodecs.CT_TP_DST_CODEC);
+        registrator.registerMatchEntrySerializer(PktMarkCodec.SERIALIZER_KEY, NiciraMatchCodecs.PKT_MARK_CODEC);
+        registrator.registerMatchEntryDeserializer(PktMarkCodec.DESERIALIZER_KEY, NiciraMatchCodecs.PKT_MARK_CODEC);
     }
 
-    public void unregisterExtensions() {
+    @Override
+    public void close() {
         registrator.unregisterActionDeserializer(RegLoadCodec.DESERIALIZER_KEY);
         registrator.unregisterActionSerializer(RegLoadCodec.SERIALIZER_KEY);
+        registrator.unregisterActionDeserializer(RegLoad2Codec.DESERIALIZER_KEY);
+        registrator.unregisterActionSerializer(RegLoad2Codec.SERIALIZER_KEY);
         registrator.unregisterActionDeserializer(RegMoveCodec.DESERIALIZER_KEY);
         registrator.unregisterActionSerializer(RegMoveCodec.SERIALIZER_KEY);
         registrator.unregisterActionDeserializer(OutputRegCodec.DESERIALIZER_KEY);
         registrator.unregisterActionSerializer(OutputRegCodec.SERIALIZER_KEY);
+        registrator.unregisterActionDeserializer(OutputReg2Codec.DESERIALIZER_KEY);
+        registrator.unregisterActionSerializer(OutputReg2Codec.SERIALIZER_KEY);
         registrator.unregisterActionSerializer(ResubmitCodec.SERIALIZER_KEY);
         registrator.unregisterActionDeserializer(ResubmitCodec.TABLE_DESERIALIZER_KEY);
         registrator.unregisterActionDeserializer(ResubmitCodec.DESERIALIZER_KEY);
+        registrator.unregisterActionSerializer(FinTimeoutCodec.SERIALIZER_KEY);
+        registrator.unregisterActionDeserializer(FinTimeoutCodec.DESERIALIZER_KEY);
         registrator.unregisterActionSerializer(MultipathCodec.SERIALIZER_KEY);
         registrator.unregisterActionDeserializer(MultipathCodec.DESERIALIZER_KEY);
-        registrator.unregisterActionDeserializer(PushNshCodec.DESERIALIZER_KEY);
-        registrator.unregisterActionSerializer(PushNshCodec.SERIALIZER_KEY);
-        registrator.unregisterActionDeserializer(PopNshCodec.DESERIALIZER_KEY);
-        registrator.unregisterActionSerializer(PopNshCodec.SERIALIZER_KEY);
         registrator.unregisterActionSerializer(ConntrackCodec.SERIALIZER_KEY);
         registrator.unregisterActionDeserializer(ConntrackCodec.DESERIALIZER_KEY);
+        registrator.unregisterActionSerializer(CtClearCodec.SERIALIZER_KEY);
+        registrator.unregisterActionDeserializer(CtClearCodec.DESERIALIZER_KEY);
         registrator.unregisterActionSerializer(LearnCodec.SERIALIZER_KEY);
         registrator.unregisterActionDeserializer(LearnCodec.DESERIALIZER_KEY);
-        //CONTINUE
+        registrator.unregisterActionSerializer(EncapCodec.SERIALIZER_KEY);
+        registrator.unregisterActionDeserializer(EncapCodec.DESERIALIZER_KEY);
+        registrator.unregisterActionSerializer(DecapCodec.SERIALIZER_KEY);
+        registrator.unregisterActionDeserializer(DecapCodec.DESERIALIZER_KEY);
+        registrator.unregisterActionDeserializer(DecNshTtlCodec.DESERIALIZER_KEY);
+        registrator.unregisterActionSerializer(DecNshTtlCodec.SERIALIZER_KEY);
+        // CONTINUE
         registrator.unregisterMatchEntrySerializer(Reg0Codec.SERIALIZER_KEY);
         registrator.unregisterMatchEntryDeserializer(Reg0Codec.DESERIALIZER_KEY);
         registrator.unregisterMatchEntrySerializer(Reg1Codec.SERIALIZER_KEY);
@@ -219,6 +254,10 @@ public class NiciraExtensionsRegistrator implements AutoCloseable {
         registrator.unregisterMatchEntryDeserializer(ArpThaCodec.DESERIALIZER_KEY);
         registrator.unregisterMatchEntrySerializer(ArpTpaCodec.SERIALIZER_KEY);
         registrator.unregisterMatchEntryDeserializer(ArpTpaCodec.DESERIALIZER_KEY);
+        registrator.unregisterMatchEntrySerializer(InPortCodec.SERIALIZER_KEY);
+        registrator.unregisterMatchEntryDeserializer(InPortCodec.DESERIALIZER_KEY);
+        registrator.unregisterMatchEntrySerializer(MplsLabelCodec.SERIALIZER_KEY);
+        registrator.unregisterMatchEntryDeserializer(MplsLabelCodec.DESERIALIZER_KEY);
         registrator.unregisterMatchEntrySerializer(EthDstCodec.SERIALIZER_KEY);
         registrator.unregisterMatchEntryDeserializer(EthDstCodec.DESERIALIZER_KEY);
         registrator.unregisterMatchEntrySerializer(EthSrcCodec.SERIALIZER_KEY);
@@ -237,22 +276,18 @@ public class NiciraExtensionsRegistrator implements AutoCloseable {
         registrator.unregisterMatchEntryDeserializer(Nshc3Codec.DESERIALIZER_KEY);
         registrator.unregisterMatchEntrySerializer(Nshc4Codec.SERIALIZER_KEY);
         registrator.unregisterMatchEntryDeserializer(Nshc4Codec.DESERIALIZER_KEY);
+        registrator.unregisterMatchEntrySerializer(NshFlagsCodec.SERIALIZER_KEY);
+        registrator.unregisterMatchEntryDeserializer(NshFlagsCodec.DESERIALIZER_KEY);
+        registrator.unregisterMatchEntrySerializer(NshTtlCodec.SERIALIZER_KEY);
+        registrator.unregisterMatchEntryDeserializer(NshTtlCodec.DESERIALIZER_KEY);
         registrator.unregisterMatchEntrySerializer(TunIpv4DstCodec.SERIALIZER_KEY);
         registrator.unregisterMatchEntryDeserializer(TunIpv4DstCodec.DESERIALIZER_KEY);
         registrator.unregisterMatchEntrySerializer(TunIpv4SrcCodec.SERIALIZER_KEY);
         registrator.unregisterMatchEntryDeserializer(TunIpv4SrcCodec.DESERIALIZER_KEY);
-        registrator.unregisterMatchEntrySerializer(EncapEthTypeCodec.SERIALIZER_KEY);
-        registrator.unregisterMatchEntryDeserializer(EncapEthTypeCodec.DESERIALIZER_KEY);
-        registrator.unregisterMatchEntrySerializer(EncapEthSrcCodec.SERIALIZER_KEY);
-        registrator.unregisterMatchEntryDeserializer(EncapEthSrcCodec.DESERIALIZER_KEY);
-        registrator.unregisterMatchEntrySerializer(EncapEthDstCodec.SERIALIZER_KEY);
-        registrator.unregisterMatchEntryDeserializer(EncapEthDstCodec.DESERIALIZER_KEY);
         registrator.unregisterMatchEntrySerializer(NshMdtypeCodec.SERIALIZER_KEY);
         registrator.unregisterMatchEntryDeserializer(NshMdtypeCodec.DESERIALIZER_KEY);
         registrator.unregisterMatchEntrySerializer(NshNpCodec.SERIALIZER_KEY);
         registrator.unregisterMatchEntryDeserializer(NshNpCodec.DESERIALIZER_KEY);
-        registrator.unregisterMatchEntrySerializer(TunGpeNpCodec.SERIALIZER_KEY);
-        registrator.unregisterMatchEntryDeserializer(TunGpeNpCodec.DESERIALIZER_KEY);
         registrator.unregisterMatchEntrySerializer(TcpSrcCodec.SERIALIZER_KEY);
         registrator.unregisterMatchEntryDeserializer(TcpSrcCodec.DESERIALIZER_KEY);
         registrator.unregisterMatchEntrySerializer(TcpDstCodec.SERIALIZER_KEY);
@@ -265,11 +300,13 @@ public class NiciraExtensionsRegistrator implements AutoCloseable {
         registrator.unregisterMatchEntryDeserializer(CtStateCodec.DESERIALIZER_KEY);
         registrator.unregisterMatchEntrySerializer(CtZoneCodec.SERIALIZER_KEY);
         registrator.unregisterMatchEntryDeserializer(CtZoneCodec.DESERIALIZER_KEY);
+        registrator.unregisterMatchEntrySerializer(CtMarkCodec.SERIALIZER_KEY);
+        registrator.unregisterMatchEntryDeserializer(CtMarkCodec.DESERIALIZER_KEY);
+        registrator.unregisterMatchEntrySerializer(CtTpSrcCodec.SERIALIZER_KEY);
+        registrator.unregisterMatchEntryDeserializer(CtTpSrcCodec.DESERIALIZER_KEY);
+        registrator.unregisterMatchEntrySerializer(CtTpDstCodec.SERIALIZER_KEY);
+        registrator.unregisterMatchEntryDeserializer(CtTpDstCodec.DESERIALIZER_KEY);
+        registrator.unregisterMatchEntrySerializer(PktMarkCodec.SERIALIZER_KEY);
+        registrator.unregisterMatchEntryDeserializer(PktMarkCodec.DESERIALIZER_KEY);
     }
-
-    @Override
-    public void close() throws Exception {
-        unregisterExtensions();
-    }
-
 }