Loxi extensions for Egress Tables.

- Support for programming the action "set allow vlan translation"
  which is used in l2 unfiltered ofdpa groups.

- Support for matching on "actset output" and "allow vlan translation"
  fields which are used in egress vlan table and egress tpid table.

- Support for action copy_field for ofdpa which is used in egress tpid table.

Change-Id: I3cea6ed2234147c8dbe440ae1701856a60706e7c
diff --git a/java_gen/java_type.py b/java_gen/java_type.py
index d50094f..d7d4540 100644
--- a/java_gen/java_type.py
+++ b/java_gen/java_type.py
@@ -642,7 +642,7 @@
         'of_bitmap_512_t': port_bitmap_512,
         'of_checksum_128_t': u128,
         'of_bsn_vport_t': bsn_vport,
-        'of_app_code_t': app_code,  
+        'of_app_code_t': app_code,
         'of_sig_id_t': sig_id,
         'of_table_desc_t': table_desc,
         'of_odu_sig_id_t': odu_sig_id,
@@ -948,11 +948,16 @@
         'of_oxm_ofdpa_qos_index': { 'value': u8obj },
 
         'of_oxm_ofdpa_mpls_l2_port': { 'value': u32obj },
+
         'of_oxm_ofdpa_mpls_l2_port_masked': { 'value': u32obj, 'value_mask': u32obj },
 
         'of_oxm_ofdpa_ovid': { 'value': u16obj },
 
-        'of_flow_lightweight_stats_request' : { 'out_group' : of_group }
+        'of_oxm_ofdpa_actset_output': { 'value': u32obj },
+
+        'of_oxm_ofdpa_allow_vlan_translation': { 'value': u8obj },
+
+        'of_flow_lightweight_stats_request' : { 'out_group' : of_group },
 }
 
 
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/match/MatchField.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/match/MatchField.java
index 3868482..ff978d9 100644
--- a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/match/MatchField.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/match/MatchField.java
@@ -437,6 +437,12 @@
             new MatchField<U16>("ofdpa_ovid", MatchFields.OFDPA_OVID,
                 new Prerequisite<OFVlanVidMatch>(MatchField.VLAN_VID));
 
+    public final static MatchField<U32> OFDPA_ACTSET_OUTPUT =
+            new MatchField<U32>("ofdpa_actset_output", MatchFields.OFDPA_ACTSET_OUTPUT);
+
+    public final static MatchField<U8> OFDPA_ALLOW_VLAN_TRANSLATION =
+            new MatchField<U8>("ofdpa_allow_vlan_translation", MatchFields.OFDPA_ALLOW_VLAN_TRANSLATION);
+
     public final static MatchField<VFI> BSN_VFI =
             new MatchField<VFI>("bsn_vfi", MatchFields.BSN_VFI);
 
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/match/MatchFields.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/match/MatchFields.java
index 195cb7f..98bade7 100644
--- a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/match/MatchFields.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/match/MatchFields.java
@@ -119,5 +119,7 @@
     OFDPA_MPLS_TYPE,
     OFDPA_MPLS_L2_PORT,
     OFDPA_OVID,
+    OFDPA_ACTSET_OUTPUT,
+    OFDPA_ALLOW_VLAN_TRANSLATION,
     BSN_IP_FRAGMENTATION
 }
diff --git a/openflow_input/ofdpa b/openflow_input/ofdpa
index c11aa89..e07d888 100644
--- a/openflow_input/ofdpa
+++ b/openflow_input/ofdpa
@@ -12,3 +12,11 @@
     pad(6);
 };
 
+struct of_action_onf : of_action_experimenter {
+    uint16_t type == 65535;
+    uint16_t len;
+    uint32_t experimenter == 0x4f4e4600;
+    uint16_t exp_type == ?;
+    pad(6);
+};
+
diff --git a/openflow_input/ofdpa_actions b/openflow_input/ofdpa_actions
index c24cc92..77c4e73 100644
--- a/openflow_input/ofdpa_actions
+++ b/openflow_input/ofdpa_actions
@@ -39,4 +39,29 @@
     uint32_t experimenter == 0x1018;
     uint16_t exp_type == 4;
     pad(6);
-};
\ No newline at end of file
+};
+
+// Sets the allow vlan translation in l2 unfiltered group
+// Used in configuring groups that use the egress vlan tables
+struct of_action_ofdpa_set_vlan_translation : of_action_ofdpa {
+    uint16_t type == 65535;
+    uint16_t len;
+    uint32_t experimenter == 0x04EA;
+    uint16_t exp_type == 24;
+    pad(6);
+};
+
+// utilizes the copy_field action which is used in
+// the egress tpid table for change the tpid of outgoing packets
+struct of_action_onf_copy_field : of_action_onf {
+    uint16_t type == 65535;
+    uint16_t len;
+    uint32_t experimenter == 0x4f4e4600;
+    uint16_t exp_type == 3200;
+    uint16_t n_bits;
+    uint16_t src_offset;
+    uint16_t dst_offset;
+    uint32_t src;
+    uint32_t dst;
+};
+
diff --git a/openflow_input/ofdpa_match_fields b/openflow_input/ofdpa_match_fields
index 5ebd19b..1818b61 100644
--- a/openflow_input/ofdpa_match_fields
+++ b/openflow_input/ofdpa_match_fields
@@ -38,3 +38,17 @@
     uint16_t value;
 };
 
+// This struct defines the ACTSET_OUTPUT
+struct of_oxm_ofdpa_actset_output : of_oxm {
+    uint32_t type_len == 0xFFFF5608;
+    uint32_t experimenter_id == 0x4F4E4600;
+    uint32_t value;
+};
+
+// This struct defines the ALLOW_VLAN_TRANSLATION
+struct of_oxm_ofdpa_allow_vlan_translation : of_oxm {
+    uint32_t type_len == 0xFFFF3005;
+    uint32_t experimenter_id == 0x1018;
+    uint8_t value;
+};
+