Update bf-p4c output with most recent fabric.p4 changes from onos-2.2

Also, adds a changelog file to keep track of the fabric.p4 changes
included at a given point in time.

Change-Id: Ia6933ddb392ff5c93d7822a3fd962f609224eba1
diff --git a/Makefile b/Makefile
index a786dac..aa6cf13 100755
--- a/Makefile
+++ b/Makefile
@@ -12,13 +12,12 @@
 onos_curl := curl --fail -sSL --user onos:rocks --noproxy localhost
 
 pipeconf_app_name := org.opencord.fabric-tofino
-pipeconf_app_version := 2.2.1-SNAPSHOT
 
 p4-build := ./src/main/p4/build.sh
 
 .PHONY: pipeconf
 
-build: clean $(PROFILES) pipeconf
+build: clean $(PROFILES) pipeconf p4-changelog
 
 all: fabric fabric-bng fabric-spgw fabric-int fabric-spgw-int
 
@@ -40,6 +39,9 @@
 fabric-spgw-int:
 	@${p4-build} fabric-spgw-int "-DWITH_SPGW -DWITH_INT_SOURCE -DWITH_INT_TRANSIT"
 
+p4-changelog:
+	./src/main/p4/gen_changelog.sh > P4_CHANGELOG
+
 # Reuse the same container to persist mvn repo cache.
 _create_mvn_container:
 	@if ! docker container ls -a --format '{{.Names}}' | grep -q ${mvn_container} ; then \
@@ -59,7 +61,7 @@
 	$(info *** Installing and activating pipeconf app in ONOS at ${ONOS_HOST}...)
 	${onos_curl} -X POST -HContent-Type:application/octet-stream \
 		'${onos_url}/v1/applications?activate=true' \
-		--data-binary @target/fabric-tofino-${pipeconf_app_version}.oar
+		--data-binary @target/fabric-tofino-*.oar
 	@echo
 
 pipeconf-uninstall:
diff --git a/P4_CHANGELOG b/P4_CHANGELOG
new file mode 100644
index 0000000..2a1065a
--- /dev/null
+++ b/P4_CHANGELOG
@@ -0,0 +1,56 @@
+# fabric.p4 changes included in this release (from ONOS repository)
+
+6085585ef7 Fixes to fabric.p4 pipeline
+dd0568b367 Small fixes and improvements on fabric.p4 - setting s_tag and c_tag for BNG as early as possible in the pipeline - ingress_port_vlan was matching on inner_vlan_tag but that field could be not present
+f4d1bc6eec Added bytes in BNG upstream counters
+39b808bdd8 [ONOS-7808] Support P4Runtime default table entries
+693d76f189 eth_type moved outside ethernet header in fabric.p4
+36d5e7a233 Support creation of vendor-specific versions of the fabric pipeconf
+77654f9e5c Added ethertype QinQ when double VLAN tagged packets
+7c3a002000 Improvement in fabric.p4 and bng.p4
+e22b574275 Improve fabric.p4 with BNG support
+3b7a21b6c2 Fix to metadata copied to egress
+01ca2ab27d Added support for clone session on fabric.p4
+4d8785b5b1 First stab at BNG support in fabric.p4
+9b607dab1c Update P4 programs to compile with most recent p4c
+3032b87e07 Fix missing IPv6 table size in fabric.p4
+70e816b05a Support compiling fabric.p4 with arbitrary table sizes
+b5324e7168 Improve fabric.p4 to reduce pipeline resources and refactor pipeconf impl
+8e5818dc65 In fabric.p4 do not parse int_data if sink is not enabled
+fa42158937 Refactored INT service impl to support multi-instance ONOS and fabric.p4
+79a3a31aec Refactor fabric.p4 INT support to allow compilation on more P4 targets
+0c8d73ea08 Use P4 port counters only for BMv2 pipeconf in fabric.p4
+cd03f07fb7 Implement NOP in routing v4 table
+8d2d1b2cb1 Avoid egress processing for controller packet-in/out in fabric.p4
+384aea29c6 Support IPv4 multicast in P4 fabric pipeline
+8a715f84c5 Add default VLAN 4094 tag to all untagged traffic in fabric.p4
+cf696e55d3 NoAction in ACL should be mapped to NOP
+9b0171bc34 Fixed spgw.p4 decapping GTP packets not meant to be decapped
+ed478dc4bd Integrating INT into fabric pipeline
+8235a1a6b0 Minor refactor fabric.p4
+1e8843f8e3 ONOS-7251 ONOS-7264 Support for clone to CPU action in fabric.p4
+a5400afad6 ONOS-7744 ONOS-7742 Don't send pkt on ingress port and always decrement TTL in fabric.p4
+47eac89eb0 Refactor fabric.p4
+971fb7fd1f ONOS-7251 - Initial implementation of fabric.p4 L2 broadcast feature.
+8a51743927 Removed fabric.p4 data plane test files
+34af3168f4 Fix incorrect defined boolean value for fabric.p4
+35d9b333f8 Support compiling fabric.p4 with non-standard bool declarations
+20f9e7b406 [ONOS-7285][ONOS-7263] VLAN support by fabric.p4
+274daef03e Minor bugfix to spgw.p4
+a106140b9c Made multicast support optional in fabric.p4
+33e85c04bc Made GTP UPD checksum update optinal in SPGW
+3d3956d167 Fix bugs from fabric.p4
+b531b6889c Minor clean-up of fabric pipeline
+f87dc2ebe0 Test P4 program and data for SPGW
+b757dbc4eb Fixed double-extraction issue in spgw parser
+ed88f2b6fe Do not compile with IPv6 support in fabric.p4 by default
+14cde40599 Fixed downlink processing of spgw.p4
+b81f4be168 Initial integration of SPGW in fabric.p4
+bd46d05410 Fix VLAN and MPLS problem for fabric.p4
+3a5731e32d Minor refactoring for fabric.p4
+c6844f56ce Refactor fabric.p4 and pipeliner
+1d84267c5b Minor refactoring for fabric.p4
+f55eaa8112 [ONOS-7255] Remove next id mapping table from fabric.p4
+1b154bd81c [ONOS-7242] Support MPLS by fabric.p4 pipeliner
+f73a553a04 [ONOS-7238] fix ICMP checksum error of fabric.p4
+be3420529a [ONOS-7128] Initial commit of fabric.p4
diff --git a/pom.xml b/pom.xml
index d377ec6..c943722 100644
--- a/pom.xml
+++ b/pom.xml
@@ -27,10 +27,12 @@
 
     <groupId>org.opencord</groupId>
     <artifactId>fabric-tofino</artifactId>
-    <version>2.2.1-SNAPSHOT</version>
+    <version>1.0.0-SNAPSHOT</version>
     <packaging>bundle</packaging>
 
-    <description>Pipeconf to use Trellis with Tofino-based targets</description>
+    <description>
+        Pipeconf to use Trellis with Barefoot Tofino-based devices
+    </description>
     <url>http://www.opencord.org</url>
 
     <properties>
@@ -41,7 +43,7 @@
         <onos.app.url>http://www.opencord.org</onos.app.url>
         <onos.app.readme>
             Provides pipeconfs based on fabric.p4 to use Trellis with Barefoot
-            Tofino-based switches.
+            Tofino-based devices.
         </onos.app.readme>
         <onos.app.requires>
             org.onosproject.pipelines.fabric
diff --git a/src/main/p4/gen_changelog.sh b/src/main/p4/gen_changelog.sh
new file mode 100755
index 0000000..cff84b6
--- /dev/null
+++ b/src/main/p4/gen_changelog.sh
@@ -0,0 +1,25 @@
+#!/usr/bin/env bash
+# Copyright 2019-present Open Networking Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+if [ -z "$ONOS_ROOT" ]; then
+  echo "Error: ONOS_ROOT is not set"
+  exit 1
+fi
+
+FABRIC_DIR=${ONOS_ROOT}/pipelines/fabric
+
+echo "# fabric.p4 changes included in this release (from ONOS repository)"
+echo ""
+cd "$FABRIC_DIR" && git --no-pager log --no-color --oneline -- **/*.p4
\ No newline at end of file
diff --git a/src/main/resources/p4c-out/fabric-bng/tofino/mavericks_sde_9_0_0/p4info.txt b/src/main/resources/p4c-out/fabric-bng/tofino/mavericks_sde_9_0_0/p4info.txt
index 40221f6..b11f2c9 100644
--- a/src/main/resources/p4c-out/fabric-bng/tofino/mavericks_sde_9_0_0/p4info.txt
+++ b/src/main/resources/p4c-out/fabric-bng/tofino/mavericks_sde_9_0_0/p4info.txt
@@ -346,13 +346,13 @@
   }
   match_fields {
     id: 5
-    name: "eth_src"
+    name: "eth_dst"
     bitwidth: 48
     match_type: TERNARY
   }
   match_fields {
     id: 6
-    name: "eth_dst"
+    name: "eth_src"
     bitwidth: 48
     match_type: TERNARY
   }
diff --git a/src/main/resources/p4c-out/fabric-bng/tofino/mavericks_sde_9_0_0/pipe/context.json b/src/main/resources/p4c-out/fabric-bng/tofino/mavericks_sde_9_0_0/pipe/context.json
index 09cf76a..f084ebe 100644
--- a/src/main/resources/p4c-out/fabric-bng/tofino/mavericks_sde_9_0_0/pipe/context.json
+++ b/src/main/resources/p4c-out/fabric-bng/tofino/mavericks_sde_9_0_0/pipe/context.json
@@ -1,5 +1,5 @@
 {
-  "build_date": "Tue Dec 17 02:25:46 2019",
+  "build_date": "Wed Dec 18 02:55:48 2019",
   "schema_version": "1.8.4",
   "compiler_version": "9.0.0",
   "target": "tofino",
@@ -75959,7 +75959,7 @@
                         "field_width": 2
                       },
                       {
-                        "field_name": "eth_dst",
+                        "field_name": "eth_src",
                         "lsb_mem_word_offset": 1,
                         "lsb_mem_word_idx": 5,
                         "msb_mem_word_idx": 5,
@@ -75968,7 +75968,7 @@
                         "field_width": 16
                       },
                       {
-                        "field_name": "eth_src",
+                        "field_name": "eth_dst",
                         "lsb_mem_word_offset": 17,
                         "lsb_mem_word_idx": 5,
                         "msb_mem_word_idx": 5,
@@ -75986,7 +75986,7 @@
                         "field_width": 8
                       },
                       {
-                        "field_name": "eth_dst",
+                        "field_name": "eth_src",
                         "lsb_mem_word_offset": 1,
                         "lsb_mem_word_idx": 4,
                         "msb_mem_word_idx": 4,
@@ -76049,7 +76049,7 @@
                         "field_width": 8
                       },
                       {
-                        "field_name": "eth_src",
+                        "field_name": "eth_dst",
                         "lsb_mem_word_offset": 9,
                         "lsb_mem_word_idx": 2,
                         "msb_mem_word_idx": 2,
@@ -76067,7 +76067,7 @@
                         "field_width": 8
                       },
                       {
-                        "field_name": "eth_dst",
+                        "field_name": "eth_src",
                         "lsb_mem_word_offset": 33,
                         "lsb_mem_word_idx": 2,
                         "msb_mem_word_idx": 2,
@@ -76076,7 +76076,7 @@
                         "field_width": 8
                       },
                       {
-                        "field_name": "eth_dst",
+                        "field_name": "eth_src",
                         "lsb_mem_word_offset": 1,
                         "lsb_mem_word_idx": 1,
                         "msb_mem_word_idx": 1,
@@ -76166,7 +76166,7 @@
                         "field_width": 4
                       },
                       {
-                        "field_name": "eth_src",
+                        "field_name": "eth_dst",
                         "lsb_mem_word_offset": 41,
                         "lsb_mem_word_idx": 5,
                         "msb_mem_word_idx": 5,
@@ -76175,7 +76175,7 @@
                         "field_width": 4
                       },
                       {
-                        "field_name": "eth_src",
+                        "field_name": "eth_dst",
                         "lsb_mem_word_offset": 41,
                         "lsb_mem_word_idx": 4,
                         "msb_mem_word_idx": 4,
@@ -76184,7 +76184,7 @@
                         "field_width": 4
                       },
                       {
-                        "field_name": "eth_src",
+                        "field_name": "eth_dst",
                         "lsb_mem_word_offset": 41,
                         "lsb_mem_word_idx": 3,
                         "msb_mem_word_idx": 3,
@@ -76193,7 +76193,7 @@
                         "field_width": 4
                       },
                       {
-                        "field_name": "eth_src",
+                        "field_name": "eth_dst",
                         "lsb_mem_word_offset": 41,
                         "lsb_mem_word_idx": 2,
                         "msb_mem_word_idx": 2,
@@ -76707,7 +76707,7 @@
           "field_name": "l4_dport"
         },
         {
-          "name": "eth_src",
+          "name": "eth_dst",
           "global_name": "hdr.ethernet.dst_addr",
           "start_bit": 0,
           "bit_width": 48,
@@ -76719,7 +76719,7 @@
           "field_name": "dst_addr"
         },
         {
-          "name": "eth_dst",
+          "name": "eth_src",
           "global_name": "hdr.ethernet.src_addr",
           "start_bit": 0,
           "bit_width": 48,
@@ -93696,6 +93696,13 @@
               "dst": { "type": "phv", "name": "ig_intr_md_for_tm.ucast_egress_port" },
               "dst_mask": { "type": "immediate", "name": "511" },
               "src1": { "type": "immediate", "name": "320" }
+            },
+            {
+              "name": "ModifyFieldPrimitive",
+              "operation": "set",
+              "dst": { "type": "phv", "name": "ig_intr_md_for_tm.mcast_grp_a" },
+              "dst_mask": { "type": "immediate", "name": "65535" },
+              "src1": { "type": "immediate", "name": "0" }
             }
           ],
           "indirect_resources": [],
@@ -111245,6 +111252,6 @@
       ]
     }
   ],
-  "run_id": "851e8acf575ce4b6",
+  "run_id": "aa3f0a59bf54060a",
   "driver_options": { "hash_parity_enabled": false, "high_availability_enabled": true }
 }
\ No newline at end of file
diff --git a/src/main/resources/p4c-out/fabric-bng/tofino/mavericks_sde_9_0_0/pipe/tofino.bin b/src/main/resources/p4c-out/fabric-bng/tofino/mavericks_sde_9_0_0/pipe/tofino.bin
index 946a28d..ed273da 100644
--- a/src/main/resources/p4c-out/fabric-bng/tofino/mavericks_sde_9_0_0/pipe/tofino.bin
+++ b/src/main/resources/p4c-out/fabric-bng/tofino/mavericks_sde_9_0_0/pipe/tofino.bin
Binary files differ
diff --git a/src/main/resources/p4c-out/fabric-bng/tofino/montara_sde_9_0_0/p4info.txt b/src/main/resources/p4c-out/fabric-bng/tofino/montara_sde_9_0_0/p4info.txt
index 40221f6..b11f2c9 100644
--- a/src/main/resources/p4c-out/fabric-bng/tofino/montara_sde_9_0_0/p4info.txt
+++ b/src/main/resources/p4c-out/fabric-bng/tofino/montara_sde_9_0_0/p4info.txt
@@ -346,13 +346,13 @@
   }
   match_fields {
     id: 5
-    name: "eth_src"
+    name: "eth_dst"
     bitwidth: 48
     match_type: TERNARY
   }
   match_fields {
     id: 6
-    name: "eth_dst"
+    name: "eth_src"
     bitwidth: 48
     match_type: TERNARY
   }
diff --git a/src/main/resources/p4c-out/fabric-bng/tofino/montara_sde_9_0_0/pipe/context.json b/src/main/resources/p4c-out/fabric-bng/tofino/montara_sde_9_0_0/pipe/context.json
index b09276e..fbce844 100644
--- a/src/main/resources/p4c-out/fabric-bng/tofino/montara_sde_9_0_0/pipe/context.json
+++ b/src/main/resources/p4c-out/fabric-bng/tofino/montara_sde_9_0_0/pipe/context.json
@@ -1,5 +1,5 @@
 {
-  "build_date": "Tue Dec 17 02:26:16 2019",
+  "build_date": "Wed Dec 18 02:56:20 2019",
   "schema_version": "1.8.4",
   "compiler_version": "9.0.0",
   "target": "tofino",
@@ -75959,7 +75959,7 @@
                         "field_width": 2
                       },
                       {
-                        "field_name": "eth_dst",
+                        "field_name": "eth_src",
                         "lsb_mem_word_offset": 1,
                         "lsb_mem_word_idx": 5,
                         "msb_mem_word_idx": 5,
@@ -75968,7 +75968,7 @@
                         "field_width": 16
                       },
                       {
-                        "field_name": "eth_src",
+                        "field_name": "eth_dst",
                         "lsb_mem_word_offset": 17,
                         "lsb_mem_word_idx": 5,
                         "msb_mem_word_idx": 5,
@@ -75986,7 +75986,7 @@
                         "field_width": 8
                       },
                       {
-                        "field_name": "eth_dst",
+                        "field_name": "eth_src",
                         "lsb_mem_word_offset": 1,
                         "lsb_mem_word_idx": 4,
                         "msb_mem_word_idx": 4,
@@ -76049,7 +76049,7 @@
                         "field_width": 8
                       },
                       {
-                        "field_name": "eth_src",
+                        "field_name": "eth_dst",
                         "lsb_mem_word_offset": 9,
                         "lsb_mem_word_idx": 2,
                         "msb_mem_word_idx": 2,
@@ -76067,7 +76067,7 @@
                         "field_width": 8
                       },
                       {
-                        "field_name": "eth_dst",
+                        "field_name": "eth_src",
                         "lsb_mem_word_offset": 33,
                         "lsb_mem_word_idx": 2,
                         "msb_mem_word_idx": 2,
@@ -76076,7 +76076,7 @@
                         "field_width": 8
                       },
                       {
-                        "field_name": "eth_dst",
+                        "field_name": "eth_src",
                         "lsb_mem_word_offset": 1,
                         "lsb_mem_word_idx": 1,
                         "msb_mem_word_idx": 1,
@@ -76166,7 +76166,7 @@
                         "field_width": 4
                       },
                       {
-                        "field_name": "eth_src",
+                        "field_name": "eth_dst",
                         "lsb_mem_word_offset": 41,
                         "lsb_mem_word_idx": 5,
                         "msb_mem_word_idx": 5,
@@ -76175,7 +76175,7 @@
                         "field_width": 4
                       },
                       {
-                        "field_name": "eth_src",
+                        "field_name": "eth_dst",
                         "lsb_mem_word_offset": 41,
                         "lsb_mem_word_idx": 4,
                         "msb_mem_word_idx": 4,
@@ -76184,7 +76184,7 @@
                         "field_width": 4
                       },
                       {
-                        "field_name": "eth_src",
+                        "field_name": "eth_dst",
                         "lsb_mem_word_offset": 41,
                         "lsb_mem_word_idx": 3,
                         "msb_mem_word_idx": 3,
@@ -76193,7 +76193,7 @@
                         "field_width": 4
                       },
                       {
-                        "field_name": "eth_src",
+                        "field_name": "eth_dst",
                         "lsb_mem_word_offset": 41,
                         "lsb_mem_word_idx": 2,
                         "msb_mem_word_idx": 2,
@@ -76707,7 +76707,7 @@
           "field_name": "l4_dport"
         },
         {
-          "name": "eth_src",
+          "name": "eth_dst",
           "global_name": "hdr.ethernet.dst_addr",
           "start_bit": 0,
           "bit_width": 48,
@@ -76719,7 +76719,7 @@
           "field_name": "dst_addr"
         },
         {
-          "name": "eth_dst",
+          "name": "eth_src",
           "global_name": "hdr.ethernet.src_addr",
           "start_bit": 0,
           "bit_width": 48,
@@ -93696,6 +93696,13 @@
               "dst": { "type": "phv", "name": "ig_intr_md_for_tm.ucast_egress_port" },
               "dst_mask": { "type": "immediate", "name": "511" },
               "src1": { "type": "immediate", "name": "192" }
+            },
+            {
+              "name": "ModifyFieldPrimitive",
+              "operation": "set",
+              "dst": { "type": "phv", "name": "ig_intr_md_for_tm.mcast_grp_a" },
+              "dst_mask": { "type": "immediate", "name": "65535" },
+              "src1": { "type": "immediate", "name": "0" }
             }
           ],
           "indirect_resources": [],
@@ -111245,6 +111252,6 @@
       ]
     }
   ],
-  "run_id": "6462cf510d056b7f",
+  "run_id": "64879950bec43805",
   "driver_options": { "hash_parity_enabled": false, "high_availability_enabled": true }
 }
\ No newline at end of file
diff --git a/src/main/resources/p4c-out/fabric-bng/tofino/montara_sde_9_0_0/pipe/tofino.bin b/src/main/resources/p4c-out/fabric-bng/tofino/montara_sde_9_0_0/pipe/tofino.bin
index ba10152..9f6c41b 100644
--- a/src/main/resources/p4c-out/fabric-bng/tofino/montara_sde_9_0_0/pipe/tofino.bin
+++ b/src/main/resources/p4c-out/fabric-bng/tofino/montara_sde_9_0_0/pipe/tofino.bin
Binary files differ
diff --git a/src/main/resources/p4c-out/fabric-int/tofino/mavericks_sde_9_0_0/p4info.txt b/src/main/resources/p4c-out/fabric-int/tofino/mavericks_sde_9_0_0/p4info.txt
index aafb1e5..6de93cf 100644
--- a/src/main/resources/p4c-out/fabric-int/tofino/mavericks_sde_9_0_0/p4info.txt
+++ b/src/main/resources/p4c-out/fabric-int/tofino/mavericks_sde_9_0_0/p4info.txt
@@ -211,13 +211,13 @@
   }
   match_fields {
     id: 5
-    name: "eth_src"
+    name: "eth_dst"
     bitwidth: 48
     match_type: TERNARY
   }
   match_fields {
     id: 6
-    name: "eth_dst"
+    name: "eth_src"
     bitwidth: 48
     match_type: TERNARY
   }
diff --git a/src/main/resources/p4c-out/fabric-int/tofino/mavericks_sde_9_0_0/pipe/context.json b/src/main/resources/p4c-out/fabric-int/tofino/mavericks_sde_9_0_0/pipe/context.json
index ed112b6..3778c53 100644
--- a/src/main/resources/p4c-out/fabric-int/tofino/mavericks_sde_9_0_0/pipe/context.json
+++ b/src/main/resources/p4c-out/fabric-int/tofino/mavericks_sde_9_0_0/pipe/context.json
@@ -1,5 +1,5 @@
 {
-  "build_date": "Tue Dec 17 02:28:15 2019",
+  "build_date": "Wed Dec 18 02:58:08 2019",
   "schema_version": "1.8.4",
   "compiler_version": "9.0.0",
   "target": "tofino",
@@ -85656,7 +85656,7 @@
                         "field_width": 32
                       },
                       {
-                        "field_name": "eth_dst",
+                        "field_name": "eth_src",
                         "lsb_mem_word_offset": 33,
                         "lsb_mem_word_idx": 5,
                         "msb_mem_word_idx": 5,
@@ -85665,7 +85665,7 @@
                         "field_width": 8
                       },
                       {
-                        "field_name": "eth_src",
+                        "field_name": "eth_dst",
                         "lsb_mem_word_offset": 1,
                         "lsb_mem_word_idx": 4,
                         "msb_mem_word_idx": 4,
@@ -85674,7 +85674,7 @@
                         "field_width": 8
                       },
                       {
-                        "field_name": "eth_dst",
+                        "field_name": "eth_src",
                         "lsb_mem_word_offset": 9,
                         "lsb_mem_word_idx": 4,
                         "msb_mem_word_idx": 4,
@@ -85683,7 +85683,7 @@
                         "field_width": 8
                       },
                       {
-                        "field_name": "eth_dst",
+                        "field_name": "eth_src",
                         "lsb_mem_word_offset": 17,
                         "lsb_mem_word_idx": 4,
                         "msb_mem_word_idx": 4,
@@ -85692,7 +85692,7 @@
                         "field_width": 8
                       },
                       {
-                        "field_name": "eth_src",
+                        "field_name": "eth_dst",
                         "lsb_mem_word_offset": 25,
                         "lsb_mem_word_idx": 4,
                         "msb_mem_word_idx": 4,
@@ -85701,7 +85701,7 @@
                         "field_width": 8
                       },
                       {
-                        "field_name": "eth_dst",
+                        "field_name": "eth_src",
                         "lsb_mem_word_offset": 33,
                         "lsb_mem_word_idx": 4,
                         "msb_mem_word_idx": 4,
@@ -85710,7 +85710,7 @@
                         "field_width": 8
                       },
                       {
-                        "field_name": "eth_dst",
+                        "field_name": "eth_src",
                         "lsb_mem_word_offset": 1,
                         "lsb_mem_word_idx": 3,
                         "msb_mem_word_idx": 3,
@@ -85737,7 +85737,7 @@
                         "field_width": 16
                       },
                       {
-                        "field_name": "eth_dst",
+                        "field_name": "eth_src",
                         "lsb_mem_word_offset": 1,
                         "lsb_mem_word_idx": 2,
                         "msb_mem_word_idx": 2,
@@ -85809,7 +85809,7 @@
                         "field_width": 8
                       },
                       {
-                        "field_name": "eth_src",
+                        "field_name": "eth_dst",
                         "lsb_mem_word_offset": 1,
                         "lsb_mem_word_idx": 0,
                         "msb_mem_word_idx": 0,
@@ -85854,7 +85854,7 @@
                         "field_width": 1
                       },
                       {
-                        "field_name": "eth_src",
+                        "field_name": "eth_dst",
                         "lsb_mem_word_offset": 41,
                         "lsb_mem_word_idx": 5,
                         "msb_mem_word_idx": 5,
@@ -85863,7 +85863,7 @@
                         "field_width": 4
                       },
                       {
-                        "field_name": "eth_src",
+                        "field_name": "eth_dst",
                         "lsb_mem_word_offset": 41,
                         "lsb_mem_word_idx": 4,
                         "msb_mem_word_idx": 4,
@@ -85872,7 +85872,7 @@
                         "field_width": 4
                       },
                       {
-                        "field_name": "eth_src",
+                        "field_name": "eth_dst",
                         "lsb_mem_word_offset": 41,
                         "lsb_mem_word_idx": 3,
                         "msb_mem_word_idx": 3,
@@ -85881,7 +85881,7 @@
                         "field_width": 4
                       },
                       {
-                        "field_name": "eth_src",
+                        "field_name": "eth_dst",
                         "lsb_mem_word_offset": 41,
                         "lsb_mem_word_idx": 2,
                         "msb_mem_word_idx": 2,
@@ -86404,7 +86404,7 @@
           "field_name": "l4_dport"
         },
         {
-          "name": "eth_src",
+          "name": "eth_dst",
           "global_name": "hdr.ethernet.dst_addr",
           "start_bit": 0,
           "bit_width": 48,
@@ -86416,7 +86416,7 @@
           "field_name": "dst_addr"
         },
         {
-          "name": "eth_dst",
+          "name": "eth_src",
           "global_name": "hdr.ethernet.src_addr",
           "start_bit": 0,
           "bit_width": 48,
@@ -122257,6 +122257,6 @@
       ]
     }
   ],
-  "run_id": "61945496d32615f9",
+  "run_id": "5a1ab9e114c2cfed",
   "driver_options": { "hash_parity_enabled": false, "high_availability_enabled": true }
 }
\ No newline at end of file
diff --git a/src/main/resources/p4c-out/fabric-int/tofino/mavericks_sde_9_0_0/pipe/tofino.bin b/src/main/resources/p4c-out/fabric-int/tofino/mavericks_sde_9_0_0/pipe/tofino.bin
index bb64fea..df65504 100644
--- a/src/main/resources/p4c-out/fabric-int/tofino/mavericks_sde_9_0_0/pipe/tofino.bin
+++ b/src/main/resources/p4c-out/fabric-int/tofino/mavericks_sde_9_0_0/pipe/tofino.bin
Binary files differ
diff --git a/src/main/resources/p4c-out/fabric-int/tofino/montara_sde_9_0_0/p4info.txt b/src/main/resources/p4c-out/fabric-int/tofino/montara_sde_9_0_0/p4info.txt
index aafb1e5..6de93cf 100644
--- a/src/main/resources/p4c-out/fabric-int/tofino/montara_sde_9_0_0/p4info.txt
+++ b/src/main/resources/p4c-out/fabric-int/tofino/montara_sde_9_0_0/p4info.txt
@@ -211,13 +211,13 @@
   }
   match_fields {
     id: 5
-    name: "eth_src"
+    name: "eth_dst"
     bitwidth: 48
     match_type: TERNARY
   }
   match_fields {
     id: 6
-    name: "eth_dst"
+    name: "eth_src"
     bitwidth: 48
     match_type: TERNARY
   }
diff --git a/src/main/resources/p4c-out/fabric-int/tofino/montara_sde_9_0_0/pipe/context.json b/src/main/resources/p4c-out/fabric-int/tofino/montara_sde_9_0_0/pipe/context.json
index b7d9be8..7ce5471 100644
--- a/src/main/resources/p4c-out/fabric-int/tofino/montara_sde_9_0_0/pipe/context.json
+++ b/src/main/resources/p4c-out/fabric-int/tofino/montara_sde_9_0_0/pipe/context.json
@@ -1,5 +1,5 @@
 {
-  "build_date": "Tue Dec 17 02:28:54 2019",
+  "build_date": "Wed Dec 18 02:58:46 2019",
   "schema_version": "1.8.4",
   "compiler_version": "9.0.0",
   "target": "tofino",
@@ -85656,7 +85656,7 @@
                         "field_width": 32
                       },
                       {
-                        "field_name": "eth_dst",
+                        "field_name": "eth_src",
                         "lsb_mem_word_offset": 33,
                         "lsb_mem_word_idx": 5,
                         "msb_mem_word_idx": 5,
@@ -85665,7 +85665,7 @@
                         "field_width": 8
                       },
                       {
-                        "field_name": "eth_src",
+                        "field_name": "eth_dst",
                         "lsb_mem_word_offset": 1,
                         "lsb_mem_word_idx": 4,
                         "msb_mem_word_idx": 4,
@@ -85674,7 +85674,7 @@
                         "field_width": 8
                       },
                       {
-                        "field_name": "eth_dst",
+                        "field_name": "eth_src",
                         "lsb_mem_word_offset": 9,
                         "lsb_mem_word_idx": 4,
                         "msb_mem_word_idx": 4,
@@ -85683,7 +85683,7 @@
                         "field_width": 8
                       },
                       {
-                        "field_name": "eth_dst",
+                        "field_name": "eth_src",
                         "lsb_mem_word_offset": 17,
                         "lsb_mem_word_idx": 4,
                         "msb_mem_word_idx": 4,
@@ -85692,7 +85692,7 @@
                         "field_width": 8
                       },
                       {
-                        "field_name": "eth_src",
+                        "field_name": "eth_dst",
                         "lsb_mem_word_offset": 25,
                         "lsb_mem_word_idx": 4,
                         "msb_mem_word_idx": 4,
@@ -85701,7 +85701,7 @@
                         "field_width": 8
                       },
                       {
-                        "field_name": "eth_dst",
+                        "field_name": "eth_src",
                         "lsb_mem_word_offset": 33,
                         "lsb_mem_word_idx": 4,
                         "msb_mem_word_idx": 4,
@@ -85710,7 +85710,7 @@
                         "field_width": 8
                       },
                       {
-                        "field_name": "eth_dst",
+                        "field_name": "eth_src",
                         "lsb_mem_word_offset": 1,
                         "lsb_mem_word_idx": 3,
                         "msb_mem_word_idx": 3,
@@ -85737,7 +85737,7 @@
                         "field_width": 16
                       },
                       {
-                        "field_name": "eth_dst",
+                        "field_name": "eth_src",
                         "lsb_mem_word_offset": 1,
                         "lsb_mem_word_idx": 2,
                         "msb_mem_word_idx": 2,
@@ -85809,7 +85809,7 @@
                         "field_width": 8
                       },
                       {
-                        "field_name": "eth_src",
+                        "field_name": "eth_dst",
                         "lsb_mem_word_offset": 1,
                         "lsb_mem_word_idx": 0,
                         "msb_mem_word_idx": 0,
@@ -85854,7 +85854,7 @@
                         "field_width": 1
                       },
                       {
-                        "field_name": "eth_src",
+                        "field_name": "eth_dst",
                         "lsb_mem_word_offset": 41,
                         "lsb_mem_word_idx": 5,
                         "msb_mem_word_idx": 5,
@@ -85863,7 +85863,7 @@
                         "field_width": 4
                       },
                       {
-                        "field_name": "eth_src",
+                        "field_name": "eth_dst",
                         "lsb_mem_word_offset": 41,
                         "lsb_mem_word_idx": 4,
                         "msb_mem_word_idx": 4,
@@ -85872,7 +85872,7 @@
                         "field_width": 4
                       },
                       {
-                        "field_name": "eth_src",
+                        "field_name": "eth_dst",
                         "lsb_mem_word_offset": 41,
                         "lsb_mem_word_idx": 3,
                         "msb_mem_word_idx": 3,
@@ -85881,7 +85881,7 @@
                         "field_width": 4
                       },
                       {
-                        "field_name": "eth_src",
+                        "field_name": "eth_dst",
                         "lsb_mem_word_offset": 41,
                         "lsb_mem_word_idx": 2,
                         "msb_mem_word_idx": 2,
@@ -86404,7 +86404,7 @@
           "field_name": "l4_dport"
         },
         {
-          "name": "eth_src",
+          "name": "eth_dst",
           "global_name": "hdr.ethernet.dst_addr",
           "start_bit": 0,
           "bit_width": 48,
@@ -86416,7 +86416,7 @@
           "field_name": "dst_addr"
         },
         {
-          "name": "eth_dst",
+          "name": "eth_src",
           "global_name": "hdr.ethernet.src_addr",
           "start_bit": 0,
           "bit_width": 48,
@@ -122257,6 +122257,6 @@
       ]
     }
   ],
-  "run_id": "40f3b7595ea33796",
+  "run_id": "41bf3b35353d8b4d",
   "driver_options": { "hash_parity_enabled": false, "high_availability_enabled": true }
 }
\ No newline at end of file
diff --git a/src/main/resources/p4c-out/fabric-int/tofino/montara_sde_9_0_0/pipe/tofino.bin b/src/main/resources/p4c-out/fabric-int/tofino/montara_sde_9_0_0/pipe/tofino.bin
index c30cb53..d11c462 100644
--- a/src/main/resources/p4c-out/fabric-int/tofino/montara_sde_9_0_0/pipe/tofino.bin
+++ b/src/main/resources/p4c-out/fabric-int/tofino/montara_sde_9_0_0/pipe/tofino.bin
Binary files differ
diff --git a/src/main/resources/p4c-out/fabric-spgw-int/tofino/mavericks_sde_9_0_0/p4info.txt b/src/main/resources/p4c-out/fabric-spgw-int/tofino/mavericks_sde_9_0_0/p4info.txt
index 233b3de..6d779d7 100644
--- a/src/main/resources/p4c-out/fabric-spgw-int/tofino/mavericks_sde_9_0_0/p4info.txt
+++ b/src/main/resources/p4c-out/fabric-spgw-int/tofino/mavericks_sde_9_0_0/p4info.txt
@@ -253,13 +253,13 @@
   }
   match_fields {
     id: 5
-    name: "eth_src"
+    name: "eth_dst"
     bitwidth: 48
     match_type: TERNARY
   }
   match_fields {
     id: 6
-    name: "eth_dst"
+    name: "eth_src"
     bitwidth: 48
     match_type: TERNARY
   }
diff --git a/src/main/resources/p4c-out/fabric-spgw-int/tofino/mavericks_sde_9_0_0/pipe/context.json b/src/main/resources/p4c-out/fabric-spgw-int/tofino/mavericks_sde_9_0_0/pipe/context.json
index d688829..375b23d 100644
--- a/src/main/resources/p4c-out/fabric-spgw-int/tofino/mavericks_sde_9_0_0/pipe/context.json
+++ b/src/main/resources/p4c-out/fabric-spgw-int/tofino/mavericks_sde_9_0_0/pipe/context.json
@@ -1,5 +1,5 @@
 {
-  "build_date": "Tue Dec 17 02:29:49 2019",
+  "build_date": "Wed Dec 18 03:00:13 2019",
   "schema_version": "1.8.4",
   "compiler_version": "9.0.0",
   "target": "tofino",
@@ -127966,7 +127966,7 @@
                         "field_width": 2
                       },
                       {
-                        "field_name": "eth_dst",
+                        "field_name": "eth_src",
                         "lsb_mem_word_offset": 1,
                         "lsb_mem_word_idx": 5,
                         "msb_mem_word_idx": 5,
@@ -128083,7 +128083,7 @@
                         "field_width": 8
                       },
                       {
-                        "field_name": "eth_src",
+                        "field_name": "eth_dst",
                         "lsb_mem_word_offset": 9,
                         "lsb_mem_word_idx": 2,
                         "msb_mem_word_idx": 2,
@@ -128092,7 +128092,7 @@
                         "field_width": 16
                       },
                       {
-                        "field_name": "eth_src",
+                        "field_name": "eth_dst",
                         "lsb_mem_word_offset": 25,
                         "lsb_mem_word_idx": 2,
                         "msb_mem_word_idx": 2,
@@ -128110,7 +128110,7 @@
                         "field_width": 8
                       },
                       {
-                        "field_name": "eth_src",
+                        "field_name": "eth_dst",
                         "lsb_mem_word_offset": 9,
                         "lsb_mem_word_idx": 1,
                         "msb_mem_word_idx": 1,
@@ -128119,7 +128119,7 @@
                         "field_width": 8
                       },
                       {
-                        "field_name": "eth_src",
+                        "field_name": "eth_dst",
                         "lsb_mem_word_offset": 17,
                         "lsb_mem_word_idx": 1,
                         "msb_mem_word_idx": 1,
@@ -128128,7 +128128,7 @@
                         "field_width": 8
                       },
                       {
-                        "field_name": "eth_dst",
+                        "field_name": "eth_src",
                         "lsb_mem_word_offset": 25,
                         "lsb_mem_word_idx": 1,
                         "msb_mem_word_idx": 1,
@@ -128137,7 +128137,7 @@
                         "field_width": 8
                       },
                       {
-                        "field_name": "eth_dst",
+                        "field_name": "eth_src",
                         "lsb_mem_word_offset": 33,
                         "lsb_mem_word_idx": 1,
                         "msb_mem_word_idx": 1,
@@ -128776,7 +128776,7 @@
           "field_name": "l4_dport"
         },
         {
-          "name": "eth_src",
+          "name": "eth_dst",
           "global_name": "hdr.ethernet.dst_addr",
           "start_bit": 0,
           "bit_width": 48,
@@ -128788,7 +128788,7 @@
           "field_name": "dst_addr"
         },
         {
-          "name": "eth_dst",
+          "name": "eth_src",
           "global_name": "hdr.ethernet.src_addr",
           "start_bit": 0,
           "bit_width": 48,
@@ -160649,6 +160649,6 @@
       ]
     }
   ],
-  "run_id": "0b6ff7e8b48a04da",
+  "run_id": "f7d715d313091b52",
   "driver_options": { "hash_parity_enabled": false, "high_availability_enabled": true }
 }
\ No newline at end of file
diff --git a/src/main/resources/p4c-out/fabric-spgw-int/tofino/mavericks_sde_9_0_0/pipe/tofino.bin b/src/main/resources/p4c-out/fabric-spgw-int/tofino/mavericks_sde_9_0_0/pipe/tofino.bin
index a4dea00..792f680 100644
--- a/src/main/resources/p4c-out/fabric-spgw-int/tofino/mavericks_sde_9_0_0/pipe/tofino.bin
+++ b/src/main/resources/p4c-out/fabric-spgw-int/tofino/mavericks_sde_9_0_0/pipe/tofino.bin
Binary files differ
diff --git a/src/main/resources/p4c-out/fabric-spgw-int/tofino/montara_sde_9_0_0/p4info.txt b/src/main/resources/p4c-out/fabric-spgw-int/tofino/montara_sde_9_0_0/p4info.txt
index 233b3de..6d779d7 100644
--- a/src/main/resources/p4c-out/fabric-spgw-int/tofino/montara_sde_9_0_0/p4info.txt
+++ b/src/main/resources/p4c-out/fabric-spgw-int/tofino/montara_sde_9_0_0/p4info.txt
@@ -253,13 +253,13 @@
   }
   match_fields {
     id: 5
-    name: "eth_src"
+    name: "eth_dst"
     bitwidth: 48
     match_type: TERNARY
   }
   match_fields {
     id: 6
-    name: "eth_dst"
+    name: "eth_src"
     bitwidth: 48
     match_type: TERNARY
   }
diff --git a/src/main/resources/p4c-out/fabric-spgw-int/tofino/montara_sde_9_0_0/pipe/context.json b/src/main/resources/p4c-out/fabric-spgw-int/tofino/montara_sde_9_0_0/pipe/context.json
index 1acad56..4ae0422 100644
--- a/src/main/resources/p4c-out/fabric-spgw-int/tofino/montara_sde_9_0_0/pipe/context.json
+++ b/src/main/resources/p4c-out/fabric-spgw-int/tofino/montara_sde_9_0_0/pipe/context.json
@@ -1,5 +1,5 @@
 {
-  "build_date": "Tue Dec 17 02:30:43 2019",
+  "build_date": "Wed Dec 18 03:20:58 2019",
   "schema_version": "1.8.4",
   "compiler_version": "9.0.0",
   "target": "tofino",
@@ -127966,7 +127966,7 @@
                         "field_width": 2
                       },
                       {
-                        "field_name": "eth_dst",
+                        "field_name": "eth_src",
                         "lsb_mem_word_offset": 1,
                         "lsb_mem_word_idx": 5,
                         "msb_mem_word_idx": 5,
@@ -128083,7 +128083,7 @@
                         "field_width": 8
                       },
                       {
-                        "field_name": "eth_src",
+                        "field_name": "eth_dst",
                         "lsb_mem_word_offset": 9,
                         "lsb_mem_word_idx": 2,
                         "msb_mem_word_idx": 2,
@@ -128092,7 +128092,7 @@
                         "field_width": 16
                       },
                       {
-                        "field_name": "eth_src",
+                        "field_name": "eth_dst",
                         "lsb_mem_word_offset": 25,
                         "lsb_mem_word_idx": 2,
                         "msb_mem_word_idx": 2,
@@ -128110,7 +128110,7 @@
                         "field_width": 8
                       },
                       {
-                        "field_name": "eth_src",
+                        "field_name": "eth_dst",
                         "lsb_mem_word_offset": 9,
                         "lsb_mem_word_idx": 1,
                         "msb_mem_word_idx": 1,
@@ -128119,7 +128119,7 @@
                         "field_width": 8
                       },
                       {
-                        "field_name": "eth_src",
+                        "field_name": "eth_dst",
                         "lsb_mem_word_offset": 17,
                         "lsb_mem_word_idx": 1,
                         "msb_mem_word_idx": 1,
@@ -128128,7 +128128,7 @@
                         "field_width": 8
                       },
                       {
-                        "field_name": "eth_dst",
+                        "field_name": "eth_src",
                         "lsb_mem_word_offset": 25,
                         "lsb_mem_word_idx": 1,
                         "msb_mem_word_idx": 1,
@@ -128137,7 +128137,7 @@
                         "field_width": 8
                       },
                       {
-                        "field_name": "eth_dst",
+                        "field_name": "eth_src",
                         "lsb_mem_word_offset": 33,
                         "lsb_mem_word_idx": 1,
                         "msb_mem_word_idx": 1,
@@ -128776,7 +128776,7 @@
           "field_name": "l4_dport"
         },
         {
-          "name": "eth_src",
+          "name": "eth_dst",
           "global_name": "hdr.ethernet.dst_addr",
           "start_bit": 0,
           "bit_width": 48,
@@ -128788,7 +128788,7 @@
           "field_name": "dst_addr"
         },
         {
-          "name": "eth_dst",
+          "name": "eth_src",
           "global_name": "hdr.ethernet.src_addr",
           "start_bit": 0,
           "bit_width": 48,
@@ -160649,6 +160649,6 @@
       ]
     }
   ],
-  "run_id": "8396c19d6036f728",
+  "run_id": "274fb0f8d9b7e67b",
   "driver_options": { "hash_parity_enabled": false, "high_availability_enabled": true }
 }
\ No newline at end of file
diff --git a/src/main/resources/p4c-out/fabric-spgw-int/tofino/montara_sde_9_0_0/pipe/tofino.bin b/src/main/resources/p4c-out/fabric-spgw-int/tofino/montara_sde_9_0_0/pipe/tofino.bin
index c77f280..fc57c75 100644
--- a/src/main/resources/p4c-out/fabric-spgw-int/tofino/montara_sde_9_0_0/pipe/tofino.bin
+++ b/src/main/resources/p4c-out/fabric-spgw-int/tofino/montara_sde_9_0_0/pipe/tofino.bin
Binary files differ
diff --git a/src/main/resources/p4c-out/fabric-spgw/tofino/mavericks_sde_9_0_0/p4info.txt b/src/main/resources/p4c-out/fabric-spgw/tofino/mavericks_sde_9_0_0/p4info.txt
index 56a16cd..5bbc2c3 100644
--- a/src/main/resources/p4c-out/fabric-spgw/tofino/mavericks_sde_9_0_0/p4info.txt
+++ b/src/main/resources/p4c-out/fabric-spgw/tofino/mavericks_sde_9_0_0/p4info.txt
@@ -229,13 +229,13 @@
   }
   match_fields {
     id: 5
-    name: "eth_src"
+    name: "eth_dst"
     bitwidth: 48
     match_type: TERNARY
   }
   match_fields {
     id: 6
-    name: "eth_dst"
+    name: "eth_src"
     bitwidth: 48
     match_type: TERNARY
   }
diff --git a/src/main/resources/p4c-out/fabric-spgw/tofino/mavericks_sde_9_0_0/pipe/context.json b/src/main/resources/p4c-out/fabric-spgw/tofino/mavericks_sde_9_0_0/pipe/context.json
index 68b310e..41e9a19 100644
--- a/src/main/resources/p4c-out/fabric-spgw/tofino/mavericks_sde_9_0_0/pipe/context.json
+++ b/src/main/resources/p4c-out/fabric-spgw/tofino/mavericks_sde_9_0_0/pipe/context.json
@@ -1,5 +1,5 @@
 {
-  "build_date": "Tue Dec 17 02:26:58 2019",
+  "build_date": "Wed Dec 18 02:56:58 2019",
   "schema_version": "1.8.4",
   "compiler_version": "9.0.0",
   "target": "tofino",
@@ -103566,7 +103566,7 @@
                         "field_width": 2
                       },
                       {
-                        "field_name": "eth_dst",
+                        "field_name": "eth_src",
                         "lsb_mem_word_offset": 1,
                         "lsb_mem_word_idx": 5,
                         "msb_mem_word_idx": 5,
@@ -103629,7 +103629,7 @@
                         "field_width": 8
                       },
                       {
-                        "field_name": "eth_src",
+                        "field_name": "eth_dst",
                         "lsb_mem_word_offset": 1,
                         "lsb_mem_word_idx": 3,
                         "msb_mem_word_idx": 3,
@@ -103638,7 +103638,7 @@
                         "field_width": 8
                       },
                       {
-                        "field_name": "eth_src",
+                        "field_name": "eth_dst",
                         "lsb_mem_word_offset": 9,
                         "lsb_mem_word_idx": 3,
                         "msb_mem_word_idx": 3,
@@ -103647,7 +103647,7 @@
                         "field_width": 8
                       },
                       {
-                        "field_name": "eth_dst",
+                        "field_name": "eth_src",
                         "lsb_mem_word_offset": 17,
                         "lsb_mem_word_idx": 3,
                         "msb_mem_word_idx": 3,
@@ -103656,7 +103656,7 @@
                         "field_width": 8
                       },
                       {
-                        "field_name": "eth_dst",
+                        "field_name": "eth_src",
                         "lsb_mem_word_offset": 25,
                         "lsb_mem_word_idx": 3,
                         "msb_mem_word_idx": 3,
@@ -103683,7 +103683,7 @@
                         "field_width": 8
                       },
                       {
-                        "field_name": "eth_src",
+                        "field_name": "eth_dst",
                         "lsb_mem_word_offset": 9,
                         "lsb_mem_word_idx": 2,
                         "msb_mem_word_idx": 2,
@@ -103692,7 +103692,7 @@
                         "field_width": 16
                       },
                       {
-                        "field_name": "eth_src",
+                        "field_name": "eth_dst",
                         "lsb_mem_word_offset": 25,
                         "lsb_mem_word_idx": 2,
                         "msb_mem_word_idx": 2,
@@ -104341,7 +104341,7 @@
           "field_name": "l4_dport"
         },
         {
-          "name": "eth_src",
+          "name": "eth_dst",
           "global_name": "hdr.ethernet.dst_addr",
           "start_bit": 0,
           "bit_width": 48,
@@ -104353,7 +104353,7 @@
           "field_name": "dst_addr"
         },
         {
-          "name": "eth_dst",
+          "name": "eth_src",
           "global_name": "hdr.ethernet.src_addr",
           "start_bit": 0,
           "bit_width": 48,
@@ -122717,6 +122717,6 @@
       ]
     }
   ],
-  "run_id": "34860d96e2252aaa",
+  "run_id": "585f49581b99d438",
   "driver_options": { "hash_parity_enabled": false, "high_availability_enabled": true }
 }
\ No newline at end of file
diff --git a/src/main/resources/p4c-out/fabric-spgw/tofino/mavericks_sde_9_0_0/pipe/tofino.bin b/src/main/resources/p4c-out/fabric-spgw/tofino/mavericks_sde_9_0_0/pipe/tofino.bin
index b2f3123..91d8cc8 100644
--- a/src/main/resources/p4c-out/fabric-spgw/tofino/mavericks_sde_9_0_0/pipe/tofino.bin
+++ b/src/main/resources/p4c-out/fabric-spgw/tofino/mavericks_sde_9_0_0/pipe/tofino.bin
Binary files differ
diff --git a/src/main/resources/p4c-out/fabric-spgw/tofino/montara_sde_9_0_0/p4info.txt b/src/main/resources/p4c-out/fabric-spgw/tofino/montara_sde_9_0_0/p4info.txt
index 56a16cd..5bbc2c3 100644
--- a/src/main/resources/p4c-out/fabric-spgw/tofino/montara_sde_9_0_0/p4info.txt
+++ b/src/main/resources/p4c-out/fabric-spgw/tofino/montara_sde_9_0_0/p4info.txt
@@ -229,13 +229,13 @@
   }
   match_fields {
     id: 5
-    name: "eth_src"
+    name: "eth_dst"
     bitwidth: 48
     match_type: TERNARY
   }
   match_fields {
     id: 6
-    name: "eth_dst"
+    name: "eth_src"
     bitwidth: 48
     match_type: TERNARY
   }
diff --git a/src/main/resources/p4c-out/fabric-spgw/tofino/montara_sde_9_0_0/pipe/context.json b/src/main/resources/p4c-out/fabric-spgw/tofino/montara_sde_9_0_0/pipe/context.json
index 5be9635..5a970bc 100644
--- a/src/main/resources/p4c-out/fabric-spgw/tofino/montara_sde_9_0_0/pipe/context.json
+++ b/src/main/resources/p4c-out/fabric-spgw/tofino/montara_sde_9_0_0/pipe/context.json
@@ -1,5 +1,5 @@
 {
-  "build_date": "Tue Dec 17 02:27:39 2019",
+  "build_date": "Wed Dec 18 02:57:32 2019",
   "schema_version": "1.8.4",
   "compiler_version": "9.0.0",
   "target": "tofino",
@@ -103566,7 +103566,7 @@
                         "field_width": 2
                       },
                       {
-                        "field_name": "eth_dst",
+                        "field_name": "eth_src",
                         "lsb_mem_word_offset": 1,
                         "lsb_mem_word_idx": 5,
                         "msb_mem_word_idx": 5,
@@ -103629,7 +103629,7 @@
                         "field_width": 8
                       },
                       {
-                        "field_name": "eth_src",
+                        "field_name": "eth_dst",
                         "lsb_mem_word_offset": 1,
                         "lsb_mem_word_idx": 3,
                         "msb_mem_word_idx": 3,
@@ -103638,7 +103638,7 @@
                         "field_width": 8
                       },
                       {
-                        "field_name": "eth_src",
+                        "field_name": "eth_dst",
                         "lsb_mem_word_offset": 9,
                         "lsb_mem_word_idx": 3,
                         "msb_mem_word_idx": 3,
@@ -103647,7 +103647,7 @@
                         "field_width": 8
                       },
                       {
-                        "field_name": "eth_dst",
+                        "field_name": "eth_src",
                         "lsb_mem_word_offset": 17,
                         "lsb_mem_word_idx": 3,
                         "msb_mem_word_idx": 3,
@@ -103656,7 +103656,7 @@
                         "field_width": 8
                       },
                       {
-                        "field_name": "eth_dst",
+                        "field_name": "eth_src",
                         "lsb_mem_word_offset": 25,
                         "lsb_mem_word_idx": 3,
                         "msb_mem_word_idx": 3,
@@ -103683,7 +103683,7 @@
                         "field_width": 8
                       },
                       {
-                        "field_name": "eth_src",
+                        "field_name": "eth_dst",
                         "lsb_mem_word_offset": 9,
                         "lsb_mem_word_idx": 2,
                         "msb_mem_word_idx": 2,
@@ -103692,7 +103692,7 @@
                         "field_width": 16
                       },
                       {
-                        "field_name": "eth_src",
+                        "field_name": "eth_dst",
                         "lsb_mem_word_offset": 25,
                         "lsb_mem_word_idx": 2,
                         "msb_mem_word_idx": 2,
@@ -104341,7 +104341,7 @@
           "field_name": "l4_dport"
         },
         {
-          "name": "eth_src",
+          "name": "eth_dst",
           "global_name": "hdr.ethernet.dst_addr",
           "start_bit": 0,
           "bit_width": 48,
@@ -104353,7 +104353,7 @@
           "field_name": "dst_addr"
         },
         {
-          "name": "eth_dst",
+          "name": "eth_src",
           "global_name": "hdr.ethernet.src_addr",
           "start_bit": 0,
           "bit_width": 48,
@@ -122717,6 +122717,6 @@
       ]
     }
   ],
-  "run_id": "57a760ad572fbd84",
+  "run_id": "338c1f272149498a",
   "driver_options": { "hash_parity_enabled": false, "high_availability_enabled": true }
 }
\ No newline at end of file
diff --git a/src/main/resources/p4c-out/fabric-spgw/tofino/montara_sde_9_0_0/pipe/tofino.bin b/src/main/resources/p4c-out/fabric-spgw/tofino/montara_sde_9_0_0/pipe/tofino.bin
index c81fb8d..8deaf57 100644
--- a/src/main/resources/p4c-out/fabric-spgw/tofino/montara_sde_9_0_0/pipe/tofino.bin
+++ b/src/main/resources/p4c-out/fabric-spgw/tofino/montara_sde_9_0_0/pipe/tofino.bin
Binary files differ
diff --git a/src/main/resources/p4c-out/fabric/tofino/mavericks_sde_9_0_0/p4info.txt b/src/main/resources/p4c-out/fabric/tofino/mavericks_sde_9_0_0/p4info.txt
index 3e186b4..7e5e9f7 100644
--- a/src/main/resources/p4c-out/fabric/tofino/mavericks_sde_9_0_0/p4info.txt
+++ b/src/main/resources/p4c-out/fabric/tofino/mavericks_sde_9_0_0/p4info.txt
@@ -187,13 +187,13 @@
   }
   match_fields {
     id: 5
-    name: "eth_src"
+    name: "eth_dst"
     bitwidth: 48
     match_type: TERNARY
   }
   match_fields {
     id: 6
-    name: "eth_dst"
+    name: "eth_src"
     bitwidth: 48
     match_type: TERNARY
   }
diff --git a/src/main/resources/p4c-out/fabric/tofino/mavericks_sde_9_0_0/pipe/context.json b/src/main/resources/p4c-out/fabric/tofino/mavericks_sde_9_0_0/pipe/context.json
index a0aab34..1d4b04e 100644
--- a/src/main/resources/p4c-out/fabric/tofino/mavericks_sde_9_0_0/pipe/context.json
+++ b/src/main/resources/p4c-out/fabric/tofino/mavericks_sde_9_0_0/pipe/context.json
@@ -1,5 +1,5 @@
 {
-  "build_date": "Tue Dec 17 02:24:53 2019",
+  "build_date": "Wed Dec 18 02:54:49 2019",
   "schema_version": "1.8.4",
   "compiler_version": "9.0.0",
   "target": "tofino",
@@ -64972,7 +64972,7 @@
                         "field_width": 8
                       },
                       {
-                        "field_name": "eth_src",
+                        "field_name": "eth_dst",
                         "lsb_mem_word_offset": 1,
                         "lsb_mem_word_idx": 4,
                         "msb_mem_word_idx": 4,
@@ -64981,7 +64981,7 @@
                         "field_width": 8
                       },
                       {
-                        "field_name": "eth_dst",
+                        "field_name": "eth_src",
                         "lsb_mem_word_offset": 9,
                         "lsb_mem_word_idx": 4,
                         "msb_mem_word_idx": 4,
@@ -64990,7 +64990,7 @@
                         "field_width": 8
                       },
                       {
-                        "field_name": "eth_dst",
+                        "field_name": "eth_src",
                         "lsb_mem_word_offset": 17,
                         "lsb_mem_word_idx": 4,
                         "msb_mem_word_idx": 4,
@@ -64999,7 +64999,7 @@
                         "field_width": 8
                       },
                       {
-                        "field_name": "eth_src",
+                        "field_name": "eth_dst",
                         "lsb_mem_word_offset": 25,
                         "lsb_mem_word_idx": 4,
                         "msb_mem_word_idx": 4,
@@ -65008,7 +65008,7 @@
                         "field_width": 8
                       },
                       {
-                        "field_name": "eth_dst",
+                        "field_name": "eth_src",
                         "lsb_mem_word_offset": 33,
                         "lsb_mem_word_idx": 4,
                         "msb_mem_word_idx": 4,
@@ -65044,7 +65044,7 @@
                         "field_width": 16
                       },
                       {
-                        "field_name": "eth_dst",
+                        "field_name": "eth_src",
                         "lsb_mem_word_offset": 1,
                         "lsb_mem_word_idx": 2,
                         "msb_mem_word_idx": 2,
@@ -65098,7 +65098,7 @@
                         "field_width": 8
                       },
                       {
-                        "field_name": "eth_src",
+                        "field_name": "eth_dst",
                         "lsb_mem_word_offset": 25,
                         "lsb_mem_word_idx": 1,
                         "msb_mem_word_idx": 1,
@@ -65107,7 +65107,7 @@
                         "field_width": 8
                       },
                       {
-                        "field_name": "eth_src",
+                        "field_name": "eth_dst",
                         "lsb_mem_word_offset": 33,
                         "lsb_mem_word_idx": 1,
                         "msb_mem_word_idx": 1,
@@ -65116,7 +65116,7 @@
                         "field_width": 8
                       },
                       {
-                        "field_name": "eth_dst",
+                        "field_name": "eth_src",
                         "lsb_mem_word_offset": 1,
                         "lsb_mem_word_idx": 0,
                         "msb_mem_word_idx": 0,
@@ -65161,7 +65161,7 @@
                         "field_width": 1
                       },
                       {
-                        "field_name": "eth_src",
+                        "field_name": "eth_dst",
                         "lsb_mem_word_offset": 41,
                         "lsb_mem_word_idx": 5,
                         "msb_mem_word_idx": 5,
@@ -65170,7 +65170,7 @@
                         "field_width": 4
                       },
                       {
-                        "field_name": "eth_src",
+                        "field_name": "eth_dst",
                         "lsb_mem_word_offset": 41,
                         "lsb_mem_word_idx": 4,
                         "msb_mem_word_idx": 4,
@@ -65179,7 +65179,7 @@
                         "field_width": 4
                       },
                       {
-                        "field_name": "eth_src",
+                        "field_name": "eth_dst",
                         "lsb_mem_word_offset": 41,
                         "lsb_mem_word_idx": 3,
                         "msb_mem_word_idx": 3,
@@ -65188,7 +65188,7 @@
                         "field_width": 4
                       },
                       {
-                        "field_name": "eth_src",
+                        "field_name": "eth_dst",
                         "lsb_mem_word_offset": 41,
                         "lsb_mem_word_idx": 2,
                         "msb_mem_word_idx": 2,
@@ -65711,7 +65711,7 @@
           "field_name": "l4_dport"
         },
         {
-          "name": "eth_src",
+          "name": "eth_dst",
           "global_name": "hdr.ethernet.dst_addr",
           "start_bit": 0,
           "bit_width": 48,
@@ -65723,7 +65723,7 @@
           "field_name": "dst_addr"
         },
         {
-          "name": "eth_dst",
+          "name": "eth_src",
           "global_name": "hdr.ethernet.src_addr",
           "start_bit": 0,
           "bit_width": 48,
@@ -83953,6 +83953,6 @@
       ]
     }
   ],
-  "run_id": "e9a6f1bd8eab227c",
+  "run_id": "b48e492498200795",
   "driver_options": { "hash_parity_enabled": false, "high_availability_enabled": true }
 }
\ No newline at end of file
diff --git a/src/main/resources/p4c-out/fabric/tofino/mavericks_sde_9_0_0/pipe/tofino.bin b/src/main/resources/p4c-out/fabric/tofino/mavericks_sde_9_0_0/pipe/tofino.bin
index 567a0b1..128a536 100644
--- a/src/main/resources/p4c-out/fabric/tofino/mavericks_sde_9_0_0/pipe/tofino.bin
+++ b/src/main/resources/p4c-out/fabric/tofino/mavericks_sde_9_0_0/pipe/tofino.bin
Binary files differ
diff --git a/src/main/resources/p4c-out/fabric/tofino/montara_sde_9_0_0/p4info.txt b/src/main/resources/p4c-out/fabric/tofino/montara_sde_9_0_0/p4info.txt
index 3e186b4..7e5e9f7 100644
--- a/src/main/resources/p4c-out/fabric/tofino/montara_sde_9_0_0/p4info.txt
+++ b/src/main/resources/p4c-out/fabric/tofino/montara_sde_9_0_0/p4info.txt
@@ -187,13 +187,13 @@
   }
   match_fields {
     id: 5
-    name: "eth_src"
+    name: "eth_dst"
     bitwidth: 48
     match_type: TERNARY
   }
   match_fields {
     id: 6
-    name: "eth_dst"
+    name: "eth_src"
     bitwidth: 48
     match_type: TERNARY
   }
diff --git a/src/main/resources/p4c-out/fabric/tofino/montara_sde_9_0_0/pipe/context.json b/src/main/resources/p4c-out/fabric/tofino/montara_sde_9_0_0/pipe/context.json
index 9117cf4..6978daa 100644
--- a/src/main/resources/p4c-out/fabric/tofino/montara_sde_9_0_0/pipe/context.json
+++ b/src/main/resources/p4c-out/fabric/tofino/montara_sde_9_0_0/pipe/context.json
@@ -1,5 +1,5 @@
 {
-  "build_date": "Tue Dec 17 02:25:16 2019",
+  "build_date": "Wed Dec 18 02:55:13 2019",
   "schema_version": "1.8.4",
   "compiler_version": "9.0.0",
   "target": "tofino",
@@ -64972,7 +64972,7 @@
                         "field_width": 8
                       },
                       {
-                        "field_name": "eth_src",
+                        "field_name": "eth_dst",
                         "lsb_mem_word_offset": 1,
                         "lsb_mem_word_idx": 4,
                         "msb_mem_word_idx": 4,
@@ -64981,7 +64981,7 @@
                         "field_width": 8
                       },
                       {
-                        "field_name": "eth_dst",
+                        "field_name": "eth_src",
                         "lsb_mem_word_offset": 9,
                         "lsb_mem_word_idx": 4,
                         "msb_mem_word_idx": 4,
@@ -64990,7 +64990,7 @@
                         "field_width": 8
                       },
                       {
-                        "field_name": "eth_dst",
+                        "field_name": "eth_src",
                         "lsb_mem_word_offset": 17,
                         "lsb_mem_word_idx": 4,
                         "msb_mem_word_idx": 4,
@@ -64999,7 +64999,7 @@
                         "field_width": 8
                       },
                       {
-                        "field_name": "eth_src",
+                        "field_name": "eth_dst",
                         "lsb_mem_word_offset": 25,
                         "lsb_mem_word_idx": 4,
                         "msb_mem_word_idx": 4,
@@ -65008,7 +65008,7 @@
                         "field_width": 8
                       },
                       {
-                        "field_name": "eth_dst",
+                        "field_name": "eth_src",
                         "lsb_mem_word_offset": 33,
                         "lsb_mem_word_idx": 4,
                         "msb_mem_word_idx": 4,
@@ -65044,7 +65044,7 @@
                         "field_width": 16
                       },
                       {
-                        "field_name": "eth_dst",
+                        "field_name": "eth_src",
                         "lsb_mem_word_offset": 1,
                         "lsb_mem_word_idx": 2,
                         "msb_mem_word_idx": 2,
@@ -65098,7 +65098,7 @@
                         "field_width": 8
                       },
                       {
-                        "field_name": "eth_src",
+                        "field_name": "eth_dst",
                         "lsb_mem_word_offset": 25,
                         "lsb_mem_word_idx": 1,
                         "msb_mem_word_idx": 1,
@@ -65107,7 +65107,7 @@
                         "field_width": 8
                       },
                       {
-                        "field_name": "eth_src",
+                        "field_name": "eth_dst",
                         "lsb_mem_word_offset": 33,
                         "lsb_mem_word_idx": 1,
                         "msb_mem_word_idx": 1,
@@ -65116,7 +65116,7 @@
                         "field_width": 8
                       },
                       {
-                        "field_name": "eth_dst",
+                        "field_name": "eth_src",
                         "lsb_mem_word_offset": 1,
                         "lsb_mem_word_idx": 0,
                         "msb_mem_word_idx": 0,
@@ -65161,7 +65161,7 @@
                         "field_width": 1
                       },
                       {
-                        "field_name": "eth_src",
+                        "field_name": "eth_dst",
                         "lsb_mem_word_offset": 41,
                         "lsb_mem_word_idx": 5,
                         "msb_mem_word_idx": 5,
@@ -65170,7 +65170,7 @@
                         "field_width": 4
                       },
                       {
-                        "field_name": "eth_src",
+                        "field_name": "eth_dst",
                         "lsb_mem_word_offset": 41,
                         "lsb_mem_word_idx": 4,
                         "msb_mem_word_idx": 4,
@@ -65179,7 +65179,7 @@
                         "field_width": 4
                       },
                       {
-                        "field_name": "eth_src",
+                        "field_name": "eth_dst",
                         "lsb_mem_word_offset": 41,
                         "lsb_mem_word_idx": 3,
                         "msb_mem_word_idx": 3,
@@ -65188,7 +65188,7 @@
                         "field_width": 4
                       },
                       {
-                        "field_name": "eth_src",
+                        "field_name": "eth_dst",
                         "lsb_mem_word_offset": 41,
                         "lsb_mem_word_idx": 2,
                         "msb_mem_word_idx": 2,
@@ -65711,7 +65711,7 @@
           "field_name": "l4_dport"
         },
         {
-          "name": "eth_src",
+          "name": "eth_dst",
           "global_name": "hdr.ethernet.dst_addr",
           "start_bit": 0,
           "bit_width": 48,
@@ -65723,7 +65723,7 @@
           "field_name": "dst_addr"
         },
         {
-          "name": "eth_dst",
+          "name": "eth_src",
           "global_name": "hdr.ethernet.src_addr",
           "start_bit": 0,
           "bit_width": 48,
@@ -83953,6 +83953,6 @@
       ]
     }
   ],
-  "run_id": "d3fffe11efbbca52",
+  "run_id": "6a35c206ff650bb0",
   "driver_options": { "hash_parity_enabled": false, "high_availability_enabled": true }
 }
\ No newline at end of file
diff --git a/src/main/resources/p4c-out/fabric/tofino/montara_sde_9_0_0/pipe/tofino.bin b/src/main/resources/p4c-out/fabric/tofino/montara_sde_9_0_0/pipe/tofino.bin
index 00760b8..50de9d3 100644
--- a/src/main/resources/p4c-out/fabric/tofino/montara_sde_9_0_0/pipe/tofino.bin
+++ b/src/main/resources/p4c-out/fabric/tofino/montara_sde_9_0_0/pipe/tofino.bin
Binary files differ