Minor refactor fabric.p4

Remove origin_ether_type from fabric.p4
We can use ether_type from VLAN header since ingress_port_vlan table
always push a VLAN header to the packet if there is no VLAN header.

For configured interface, there exists flow rules to push VLAN.
For ports which not configured (infrastructure ports), the segment routing
application installs a rule which pushed internal VLAN to the packet (4094)

Change-Id: Ifae0b79a9d92b73a2a22cb33864e5bd5b6c95bfb
diff --git a/pipelines/fabric/src/main/resources/p4c-out/fabric-spgw/bmv2/default/bmv2.json b/pipelines/fabric/src/main/resources/p4c-out/fabric-spgw/bmv2/default/bmv2.json
index 14fa6ca..f0f4ba3 100644
--- a/pipelines/fabric/src/main/resources/p4c-out/fabric-spgw/bmv2/default/bmv2.json
+++ b/pipelines/fabric/src/main/resources/p4c-out/fabric-spgw/bmv2/default/bmv2.json
@@ -23,7 +23,6 @@
         ["fabric_metadata_t.ip_proto", 8, false],
         ["fabric_metadata_t.l4_src_port", 16, false],
         ["fabric_metadata_t.l4_dst_port", 16, false],
-        ["fabric_metadata_t.original_ether_type", 16, false],
         ["_padding_1", 6, false]
       ]
     },
@@ -382,19 +381,6 @@
                 }
               ],
               "op" : "extract"
-            },
-            {
-              "parameters" : [
-                {
-                  "type" : "field",
-                  "value" : ["scalars", "fabric_metadata_t.original_ether_type"]
-                },
-                {
-                  "type" : "field",
-                  "value" : ["ethernet", "ether_type"]
-                }
-              ],
-              "op" : "set"
             }
           ],
           "transitions" : [
@@ -447,19 +433,6 @@
                 }
               ],
               "op" : "extract"
-            },
-            {
-              "parameters" : [
-                {
-                  "type" : "field",
-                  "value" : ["scalars", "fabric_metadata_t.original_ether_type"]
-                },
-                {
-                  "type" : "field",
-                  "value" : ["vlan_tag", "ether_type"]
-                }
-              ],
-              "op" : "set"
             }
           ],
           "transitions" : [
@@ -869,7 +842,7 @@
       "id" : 0,
       "source_info" : {
         "filename" : "include/parser.p4",
-        "line" : 165,
+        "line" : 163,
         "column" : 8,
         "source_fragment" : "FabricDeparser"
       },
@@ -3601,25 +3574,6 @@
             "column" : 31,
             "source_fragment" : "0x0800; ..."
           }
-        },
-        {
-          "op" : "assign",
-          "parameters" : [
-            {
-              "type" : "field",
-              "value" : ["scalars", "fabric_metadata_t.original_ether_type"]
-            },
-            {
-              "type" : "hexstr",
-              "value" : "0x0800"
-            }
-          ],
-          "source_info" : {
-            "filename" : "include/control/../define.p4",
-            "line" : 69,
-            "column" : 31,
-            "source_fragment" : "0x0800; ..."
-          }
         }
       ]
     },
@@ -5423,8 +5377,8 @@
             },
             {
               "match_type" : "exact",
-              "name" : "fabric_metadata.original_ether_type",
-              "target" : ["scalars", "fabric_metadata_t.original_ether_type"],
+              "name" : "hdr.vlan_tag.ether_type",
+              "target" : ["vlan_tag", "ether_type"],
               "mask" : null
             }
           ],
@@ -5623,12 +5577,6 @@
             },
             {
               "match_type" : "ternary",
-              "name" : "fabric_metadata.original_ether_type",
-              "target" : ["scalars", "fabric_metadata_t.original_ether_type"],
-              "mask" : null
-            },
-            {
-              "match_type" : "ternary",
               "name" : "hdr.ethernet.dst_addr",
               "target" : ["ethernet", "dst_addr"],
               "mask" : null
@@ -5647,6 +5595,12 @@
             },
             {
               "match_type" : "ternary",
+              "name" : "hdr.vlan_tag.ether_type",
+              "target" : ["vlan_tag", "ether_type"],
+              "mask" : null
+            },
+            {
+              "match_type" : "ternary",
               "name" : "hdr.ipv4.src_addr",
               "target" : ["ipv4", "src_addr"],
               "mask" : null
@@ -5672,7 +5626,7 @@
           ],
           "match_type" : "ternary",
           "type" : "simple",
-          "max_size" : 256,
+          "max_size" : 128,
           "with_counters" : true,
           "support_timeout" : false,
           "direct_meters" : null,
@@ -6399,7 +6353,7 @@
           "id" : 11,
           "source_info" : {
             "filename" : "include/control/forwarding.p4",
-            "line" : 247,
+            "line" : 246,
             "column" : 17,
             "source_fragment" : "fabric_metadata.fwd_type == FWD_IPV4_UNICAST"
           },