Fixes to fabric.p4 pipeline

- Fix ethernet matching fields in ACL (dst and src were inverted)
- When doing punt_to_cpu after setting a multicast group clear the mcast_grp metadata field

Change-Id: I456566929b118188a1b2a40ff3f4de4c6c63d5bb
(cherry picked from commit 0cecfe14e0e2fa8ca03973577a4e967202fd0daa)
diff --git a/pipelines/fabric/impl/src/main/resources/include/bng.p4 b/pipelines/fabric/impl/src/main/resources/include/bng.p4
index 5deb8ee..29537bf 100644
--- a/pipelines/fabric/impl/src/main/resources/include/bng.p4
+++ b/pipelines/fabric/impl/src/main/resources/include/bng.p4
@@ -42,6 +42,9 @@
 
     action punt_to_cpu() {
         smeta.egress_spec = CPU_PORT;
+        // Clean the multicast group, otherwise multicast decision
+        //  will override the punting to CPU action
+        smeta.mcast_grp = 0;
         c_control.count(fmeta.bng.line_id);
     }
 
diff --git a/pipelines/fabric/impl/src/main/resources/include/control/acl.p4 b/pipelines/fabric/impl/src/main/resources/include/control/acl.p4
index 26267e9..80efa8f 100644
--- a/pipelines/fabric/impl/src/main/resources/include/control/acl.p4
+++ b/pipelines/fabric/impl/src/main/resources/include/control/acl.p4
@@ -63,8 +63,8 @@
             fabric_metadata.ip_proto: ternary @name("ip_proto"); // 8
             fabric_metadata.l4_sport: ternary @name("l4_sport"); // 16
             fabric_metadata.l4_dport: ternary @name("l4_dport"); // 16
-            hdr.ethernet.dst_addr: ternary @name("eth_src"); // 48
-            hdr.ethernet.src_addr: ternary @name("eth_dst"); // 48
+            hdr.ethernet.dst_addr: ternary @name("eth_dst"); // 48
+            hdr.ethernet.src_addr: ternary @name("eth_src"); // 48
             hdr.vlan_tag.vlan_id: ternary @name("vlan_id"); // 12
             hdr.eth_type.value: ternary @name("eth_type"); //16
             hdr.ipv4.src_addr: ternary @name("ipv4_src"); // 32
diff --git a/pipelines/fabric/impl/src/main/resources/p4c-out/fabric-bng/bmv2/default/bmv2.json b/pipelines/fabric/impl/src/main/resources/p4c-out/fabric-bng/bmv2/default/bmv2.json
index 84ec0fe..7620adc 100644
--- a/pipelines/fabric/impl/src/main/resources/p4c-out/fabric-bng/bmv2/default/bmv2.json
+++ b/pipelines/fabric/impl/src/main/resources/p4c-out/fabric-bng/bmv2/default/bmv2.json
@@ -333,7 +333,34 @@
         {
           "name" : "start",
           "id" : 0,
-          "parser_ops" : [],
+          "parser_ops" : [
+            {
+              "parameters" : [
+                {
+                  "type" : "field",
+                  "value" : ["scalars", "fabric_metadata_t._bng_s_tag23"]
+                },
+                {
+                  "type" : "hexstr",
+                  "value" : "0x0000"
+                }
+              ],
+              "op" : "set"
+            },
+            {
+              "parameters" : [
+                {
+                  "type" : "field",
+                  "value" : ["scalars", "fabric_metadata_t._bng_c_tag24"]
+                },
+                {
+                  "type" : "hexstr",
+                  "value" : "0x0000"
+                }
+              ],
+              "op" : "set"
+            }
+          ],
           "transitions" : [
             {
               "type" : "hexstr",
@@ -918,7 +945,7 @@
       "id" : 0,
       "source_info" : {
         "filename" : "include/parser.p4",
-        "line" : 265,
+        "line" : 269,
         "column" : 8,
         "source_fragment" : "FabricDeparser"
       },
@@ -931,7 +958,7 @@
       "id" : 0,
       "source_info" : {
         "filename" : "include/bng.p4",
-        "line" : 151,
+        "line" : 154,
         "column" : 33,
         "source_fragment" : "m_besteff"
       },
@@ -945,7 +972,7 @@
       "id" : 1,
       "source_info" : {
         "filename" : "include/bng.p4",
-        "line" : 152,
+        "line" : 155,
         "column" : 33,
         "source_fragment" : "m_prio"
       },
@@ -997,7 +1024,7 @@
       "id" : 3,
       "source_info" : {
         "filename" : "include/bng.p4",
-        "line" : 149,
+        "line" : 152,
         "column" : 37,
         "source_fragment" : "c_line_rx"
       },
@@ -1129,7 +1156,7 @@
       "id" : 14,
       "source_info" : {
         "filename" : "include/bng.p4",
-        "line" : 264,
+        "line" : 267,
         "column" : 37,
         "source_fragment" : "c_line_tx"
       },
@@ -1349,6 +1376,25 @@
           }
         },
         {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["standard_metadata", "mcast_grp"]
+            },
+            {
+              "type" : "hexstr",
+              "value" : "0x0000"
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/bng.p4",
+            "line" : 47,
+            "column" : 8,
+            "source_fragment" : "smeta.mcast_grp = 0"
+          }
+        },
+        {
           "op" : "count",
           "parameters" : [
             {
@@ -1362,7 +1408,7 @@
           ],
           "source_info" : {
             "filename" : "include/bng.p4",
-            "line" : 45,
+            "line" : 48,
             "column" : 8,
             "source_fragment" : "c_control.count(fmeta.bng.line_id)"
           }
@@ -1403,7 +1449,7 @@
           ],
           "source_info" : {
             "filename" : "include/bng.p4",
-            "line" : 74,
+            "line" : 77,
             "column" : 8,
             "source_fragment" : "mark_to_drop(smeta)"
           }
@@ -1444,7 +1490,7 @@
           ],
           "source_info" : {
             "filename" : "include/bng.p4",
-            "line" : 68,
+            "line" : 71,
             "column" : 8,
             "source_fragment" : "hdr.pppoe.setInvalid()"
           }
@@ -1463,7 +1509,7 @@
           ],
           "source_info" : {
             "filename" : "include/bng.p4",
-            "line" : 69,
+            "line" : 72,
             "column" : 8,
             "source_fragment" : "c_terminated.count(fmeta.bng.line_id)"
           }
@@ -1513,7 +1559,7 @@
           ],
           "source_info" : {
             "filename" : "include/bng.p4",
-            "line" : 156,
+            "line" : 159,
             "column" : 35,
             "source_fragment" : "= pppoe_session_id; ..."
           }
@@ -1532,7 +1578,7 @@
           ],
           "source_info" : {
             "filename" : "include/bng.p4",
-            "line" : 157,
+            "line" : 160,
             "column" : 8,
             "source_fragment" : "c_line_rx.count(fmeta.bng.line_id)"
           }
@@ -1577,7 +1623,7 @@
           ],
           "source_info" : {
             "filename" : "include/bng.p4",
-            "line" : 162,
+            "line" : 165,
             "column" : 8,
             "source_fragment" : "c_line_rx.count(fmeta.bng.line_id)"
           }
@@ -1592,7 +1638,7 @@
           ],
           "source_info" : {
             "filename" : "include/bng.p4",
-            "line" : 163,
+            "line" : 166,
             "column" : 8,
             "source_fragment" : "mark_to_drop(smeta)"
           }
@@ -1635,7 +1681,7 @@
           ],
           "source_info" : {
             "filename" : "include/bng.p4",
-            "line" : 317,
+            "line" : 320,
             "column" : 30,
             "source_fragment" : "= line_id; ..."
           }
@@ -2975,7 +3021,7 @@
           ],
           "source_info" : {
             "filename" : "include/bng.p4",
-            "line" : 123,
+            "line" : 126,
             "column" : 12,
             "source_fragment" : "return"
           }
@@ -3001,7 +3047,7 @@
           ],
           "source_info" : {
             "filename" : "include/bng.p4",
-            "line" : 128,
+            "line" : 131,
             "column" : 20,
             "source_fragment" : "c_dropped.count(fmeta.bng.line_id)"
           }
@@ -3091,7 +3137,7 @@
           ],
           "source_info" : {
             "filename" : "include/bng.p4",
-            "line" : 235,
+            "line" : 238,
             "column" : 24,
             "source_fragment" : "m_prio.execute_meter(fmeta.bng.line_id, fmeta.bng.ds_meter_result)"
           }
@@ -3121,7 +3167,7 @@
           ],
           "source_info" : {
             "filename" : "include/bng.p4",
-            "line" : 238,
+            "line" : 241,
             "column" : 24,
             "source_fragment" : "m_besteff.execute_meter(fmeta.bng.line_id, fmeta.bng.ds_meter_result)"
           }
@@ -3168,7 +3214,7 @@
           ],
           "source_info" : {
             "filename" : "include/bng.p4",
-            "line" : 270,
+            "line" : 273,
             "column" : 8,
             "source_fragment" : "hdr.pppoe.setValid()"
           }
@@ -3187,7 +3233,7 @@
           ],
           "source_info" : {
             "filename" : "include/bng.p4",
-            "line" : 271,
+            "line" : 274,
             "column" : 8,
             "source_fragment" : "hdr.pppoe.version = 4w1"
           }
@@ -3206,7 +3252,7 @@
           ],
           "source_info" : {
             "filename" : "include/bng.p4",
-            "line" : 272,
+            "line" : 275,
             "column" : 8,
             "source_fragment" : "hdr.pppoe.type_id = 4w1"
           }
@@ -3225,7 +3271,7 @@
           ],
           "source_info" : {
             "filename" : "include/bng.p4",
-            "line" : 273,
+            "line" : 276,
             "column" : 8,
             "source_fragment" : "hdr.pppoe.code = 8w0"
           }
@@ -3244,7 +3290,7 @@
           ],
           "source_info" : {
             "filename" : "include/bng.p4",
-            "line" : 274,
+            "line" : 277,
             "column" : 8,
             "source_fragment" : "hdr.pppoe.session_id = fmeta.bng.pppoe_session_id; ..."
           }
@@ -3263,7 +3309,7 @@
           ],
           "source_info" : {
             "filename" : "include/bng.p4",
-            "line" : 275,
+            "line" : 278,
             "column" : 8,
             "source_fragment" : "c_line_tx.count(fmeta.bng.line_id)"
           }
@@ -3305,7 +3351,7 @@
           ],
           "source_info" : {
             "filename" : "include/bng.p4",
-            "line" : 280,
+            "line" : 283,
             "column" : 8,
             "source_fragment" : "hdr.pppoe.length = hdr.ipv4.total_len + 16w2"
           }
@@ -4531,13 +4577,13 @@
             },
             {
               "match_type" : "ternary",
-              "name" : "eth_src",
+              "name" : "eth_dst",
               "target" : ["ethernet", "dst_addr"],
               "mask" : null
             },
             {
               "match_type" : "ternary",
-              "name" : "eth_dst",
+              "name" : "eth_src",
               "target" : ["ethernet", "src_addr"],
               "mask" : null
             },
@@ -4773,7 +4819,7 @@
           "id" : 15,
           "source_info" : {
             "filename" : "include/bng.p4",
-            "line" : 320,
+            "line" : 323,
             "column" : 14,
             "source_fragment" : "t_line_map"
           },
@@ -4815,7 +4861,7 @@
           "id" : 16,
           "source_info" : {
             "filename" : "include/bng.p4",
-            "line" : 339,
+            "line" : 342,
             "column" : 31,
             "source_fragment" : "="
           },
@@ -4844,7 +4890,7 @@
           "id" : 17,
           "source_info" : {
             "filename" : "include/bng.p4",
-            "line" : 48,
+            "line" : 51,
             "column" : 10,
             "source_fragment" : "t_pppoe_cp"
           },
@@ -4933,7 +4979,7 @@
           "id" : 20,
           "source_info" : {
             "filename" : "include/bng.p4",
-            "line" : 123,
+            "line" : 126,
             "column" : 12,
             "source_fragment" : "return"
           },
@@ -4962,7 +5008,7 @@
           "id" : 21,
           "source_info" : {
             "filename" : "include/bng.p4",
-            "line" : 84,
+            "line" : 87,
             "column" : 10,
             "source_fragment" : "t_pppoe_term_v4"
           },
@@ -5011,7 +5057,7 @@
           "id" : 22,
           "source_info" : {
             "filename" : "include/bng.p4",
-            "line" : 128,
+            "line" : 131,
             "column" : 20,
             "source_fragment" : "c_dropped.count(fmeta.bng.line_id)"
           },
@@ -5040,7 +5086,7 @@
           "id" : 23,
           "source_info" : {
             "filename" : "include/bng.p4",
-            "line" : 166,
+            "line" : 169,
             "column" : 10,
             "source_fragment" : "t_line_session_map"
           },
@@ -5123,7 +5169,7 @@
           "id" : 26,
           "source_info" : {
             "filename" : "include/bng.p4",
-            "line" : 191,
+            "line" : 194,
             "column" : 10,
             "source_fragment" : "t_qos_v4"
           },
@@ -5178,7 +5224,7 @@
           "id" : 27,
           "source_info" : {
             "filename" : "include/bng.p4",
-            "line" : 235,
+            "line" : 238,
             "column" : 24,
             "source_fragment" : "m_prio.execute_meter(fmeta.bng.line_id, fmeta.bng.ds_meter_result)"
           },
@@ -5207,7 +5253,7 @@
           "id" : 28,
           "source_info" : {
             "filename" : "include/bng.p4",
-            "line" : 238,
+            "line" : 241,
             "column" : 24,
             "source_fragment" : "m_besteff.execute_meter(fmeta.bng.line_id, fmeta.bng.ds_meter_result)"
           },
@@ -5571,7 +5617,7 @@
           "id" : 11,
           "source_info" : {
             "filename" : "include/bng.p4",
-            "line" : 338,
+            "line" : 341,
             "column" : 16,
             "source_fragment" : "hdr.pppoe.isValid()"
           },
@@ -5635,7 +5681,7 @@
           "id" : 14,
           "source_info" : {
             "filename" : "include/bng.p4",
-            "line" : 125,
+            "line" : 128,
             "column" : 12,
             "source_fragment" : "hdr.ipv4.isValid()"
           },
@@ -5675,7 +5721,7 @@
           "id" : 16,
           "source_info" : {
             "filename" : "include/bng.p4",
-            "line" : 232,
+            "line" : 235,
             "column" : 16,
             "source_fragment" : "hdr.ipv4.isValid()"
           },
@@ -6177,7 +6223,7 @@
           "id" : 45,
           "source_info" : {
             "filename" : "include/bng.p4",
-            "line" : 294,
+            "line" : 297,
             "column" : 12,
             "source_fragment" : "encap_v4()"
           },
@@ -6557,7 +6603,7 @@
           "id" : 29,
           "source_info" : {
             "filename" : "include/bng.p4",
-            "line" : 355,
+            "line" : 358,
             "column" : 12,
             "source_fragment" : "fmeta.bng.type == BNG_TYPE_DOWNSTREAM"
           },
@@ -6583,7 +6629,7 @@
           "id" : 30,
           "source_info" : {
             "filename" : "include/bng.p4",
-            "line" : 293,
+            "line" : 296,
             "column" : 12,
             "source_fragment" : "hdr.ipv4.isValid()"
           },
diff --git a/pipelines/fabric/impl/src/main/resources/p4c-out/fabric-bng/bmv2/default/p4info.txt b/pipelines/fabric/impl/src/main/resources/p4c-out/fabric-bng/bmv2/default/p4info.txt
index 9f6001e..d95b294 100644
--- a/pipelines/fabric/impl/src/main/resources/p4c-out/fabric-bng/bmv2/default/p4info.txt
+++ b/pipelines/fabric/impl/src/main/resources/p4c-out/fabric-bng/bmv2/default/p4info.txt
@@ -345,13 +345,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/pipelines/fabric/impl/src/main/resources/p4c-out/fabric-full/bmv2/default/bmv2.json b/pipelines/fabric/impl/src/main/resources/p4c-out/fabric-full/bmv2/default/bmv2.json
index 4e69bae..4295526 100644
--- a/pipelines/fabric/impl/src/main/resources/p4c-out/fabric-full/bmv2/default/bmv2.json
+++ b/pipelines/fabric/impl/src/main/resources/p4c-out/fabric-full/bmv2/default/bmv2.json
@@ -684,6 +684,32 @@
                 }
               ],
               "op" : "set"
+            },
+            {
+              "parameters" : [
+                {
+                  "type" : "field",
+                  "value" : ["scalars", "fabric_metadata_t._bng_s_tag28"]
+                },
+                {
+                  "type" : "hexstr",
+                  "value" : "0x0000"
+                }
+              ],
+              "op" : "set"
+            },
+            {
+              "parameters" : [
+                {
+                  "type" : "field",
+                  "value" : ["scalars", "fabric_metadata_t._bng_c_tag29"]
+                },
+                {
+                  "type" : "hexstr",
+                  "value" : "0x0000"
+                }
+              ],
+              "op" : "set"
             }
           ],
           "transitions" : [
@@ -1753,7 +1779,7 @@
       "id" : 0,
       "source_info" : {
         "filename" : "include/parser.p4",
-        "line" : 265,
+        "line" : 269,
         "column" : 8,
         "source_fragment" : "FabricDeparser"
       },
@@ -1766,7 +1792,7 @@
       "id" : 0,
       "source_info" : {
         "filename" : "include/bng.p4",
-        "line" : 151,
+        "line" : 154,
         "column" : 33,
         "source_fragment" : "m_besteff"
       },
@@ -1780,7 +1806,7 @@
       "id" : 1,
       "source_info" : {
         "filename" : "include/bng.p4",
-        "line" : 152,
+        "line" : 155,
         "column" : 33,
         "source_fragment" : "m_prio"
       },
@@ -1868,7 +1894,7 @@
       "id" : 6,
       "source_info" : {
         "filename" : "include/bng.p4",
-        "line" : 149,
+        "line" : 152,
         "column" : 37,
         "source_fragment" : "c_line_rx"
       },
@@ -2036,7 +2062,7 @@
       "id" : 20,
       "source_info" : {
         "filename" : "include/bng.p4",
-        "line" : 264,
+        "line" : 267,
         "column" : 37,
         "source_fragment" : "c_line_tx"
       },
@@ -2572,6 +2598,25 @@
           }
         },
         {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["standard_metadata", "mcast_grp"]
+            },
+            {
+              "type" : "hexstr",
+              "value" : "0x0000"
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/bng.p4",
+            "line" : 47,
+            "column" : 8,
+            "source_fragment" : "smeta.mcast_grp = 0"
+          }
+        },
+        {
           "op" : "count",
           "parameters" : [
             {
@@ -2585,7 +2630,7 @@
           ],
           "source_info" : {
             "filename" : "include/bng.p4",
-            "line" : 45,
+            "line" : 48,
             "column" : 8,
             "source_fragment" : "c_control.count(fmeta.bng.line_id)"
           }
@@ -2626,7 +2671,7 @@
           ],
           "source_info" : {
             "filename" : "include/bng.p4",
-            "line" : 74,
+            "line" : 77,
             "column" : 8,
             "source_fragment" : "mark_to_drop(smeta)"
           }
@@ -2667,7 +2712,7 @@
           ],
           "source_info" : {
             "filename" : "include/bng.p4",
-            "line" : 74,
+            "line" : 77,
             "column" : 8,
             "source_fragment" : "mark_to_drop(smeta)"
           }
@@ -2708,7 +2753,7 @@
           ],
           "source_info" : {
             "filename" : "include/bng.p4",
-            "line" : 68,
+            "line" : 71,
             "column" : 8,
             "source_fragment" : "hdr.pppoe.setInvalid()"
           }
@@ -2727,7 +2772,7 @@
           ],
           "source_info" : {
             "filename" : "include/bng.p4",
-            "line" : 69,
+            "line" : 72,
             "column" : 8,
             "source_fragment" : "c_terminated.count(fmeta.bng.line_id)"
           }
@@ -2768,7 +2813,7 @@
           ],
           "source_info" : {
             "filename" : "include/bng.p4",
-            "line" : 68,
+            "line" : 71,
             "column" : 8,
             "source_fragment" : "hdr.pppoe.setInvalid()"
           }
@@ -2787,7 +2832,7 @@
           ],
           "source_info" : {
             "filename" : "include/bng.p4",
-            "line" : 69,
+            "line" : 72,
             "column" : 8,
             "source_fragment" : "c_terminated.count(fmeta.bng.line_id)"
           }
@@ -2837,7 +2882,7 @@
           ],
           "source_info" : {
             "filename" : "include/bng.p4",
-            "line" : 156,
+            "line" : 159,
             "column" : 35,
             "source_fragment" : "= pppoe_session_id; ..."
           }
@@ -2856,7 +2901,7 @@
           ],
           "source_info" : {
             "filename" : "include/bng.p4",
-            "line" : 157,
+            "line" : 160,
             "column" : 8,
             "source_fragment" : "c_line_rx.count(fmeta.bng.line_id)"
           }
@@ -2901,7 +2946,7 @@
           ],
           "source_info" : {
             "filename" : "include/bng.p4",
-            "line" : 162,
+            "line" : 165,
             "column" : 8,
             "source_fragment" : "c_line_rx.count(fmeta.bng.line_id)"
           }
@@ -2916,7 +2961,7 @@
           ],
           "source_info" : {
             "filename" : "include/bng.p4",
-            "line" : 163,
+            "line" : 166,
             "column" : 8,
             "source_fragment" : "mark_to_drop(smeta)"
           }
@@ -2971,7 +3016,7 @@
           ],
           "source_info" : {
             "filename" : "include/bng.p4",
-            "line" : 317,
+            "line" : 320,
             "column" : 30,
             "source_fragment" : "= line_id; ..."
           }
@@ -5151,7 +5196,7 @@
           ],
           "source_info" : {
             "filename" : "include/bng.p4",
-            "line" : 123,
+            "line" : 126,
             "column" : 12,
             "source_fragment" : "return"
           }
@@ -5177,7 +5222,7 @@
           ],
           "source_info" : {
             "filename" : "include/bng.p4",
-            "line" : 128,
+            "line" : 131,
             "column" : 20,
             "source_fragment" : "c_dropped.count(fmeta.bng.line_id)"
           }
@@ -5203,7 +5248,7 @@
           ],
           "source_info" : {
             "filename" : "include/bng.p4",
-            "line" : 136,
+            "line" : 139,
             "column" : 19,
             "source_fragment" : "c_dropped.count(fmeta.bng.line_id)"
           }
@@ -5262,7 +5307,7 @@
           ],
           "source_info" : {
             "filename" : "include/bng.p4",
-            "line" : 109,
+            "line" : 112,
             "column" : 12,
             "source_fragment" : "hdr.ipv6.src_addr[127:64]"
           }
@@ -5352,7 +5397,7 @@
           ],
           "source_info" : {
             "filename" : "include/bng.p4",
-            "line" : 235,
+            "line" : 238,
             "column" : 24,
             "source_fragment" : "m_prio.execute_meter(fmeta.bng.line_id, fmeta.bng.ds_meter_result)"
           }
@@ -5382,7 +5427,7 @@
           ],
           "source_info" : {
             "filename" : "include/bng.p4",
-            "line" : 238,
+            "line" : 241,
             "column" : 24,
             "source_fragment" : "m_besteff.execute_meter(fmeta.bng.line_id, fmeta.bng.ds_meter_result)"
           }
@@ -5412,7 +5457,7 @@
           ],
           "source_info" : {
             "filename" : "include/bng.p4",
-            "line" : 247,
+            "line" : 250,
             "column" : 24,
             "source_fragment" : "m_prio.execute_meter(fmeta.bng.line_id, fmeta.bng.ds_meter_result)"
           }
@@ -5442,7 +5487,7 @@
           ],
           "source_info" : {
             "filename" : "include/bng.p4",
-            "line" : 250,
+            "line" : 253,
             "column" : 24,
             "source_fragment" : "m_besteff.execute_meter(fmeta.bng.line_id, fmeta.bng.ds_meter_result)"
           }
@@ -6111,7 +6156,7 @@
           ],
           "source_info" : {
             "filename" : "include/bng.p4",
-            "line" : 270,
+            "line" : 273,
             "column" : 8,
             "source_fragment" : "hdr.pppoe.setValid()"
           }
@@ -6130,7 +6175,7 @@
           ],
           "source_info" : {
             "filename" : "include/bng.p4",
-            "line" : 271,
+            "line" : 274,
             "column" : 8,
             "source_fragment" : "hdr.pppoe.version = 4w1"
           }
@@ -6149,7 +6194,7 @@
           ],
           "source_info" : {
             "filename" : "include/bng.p4",
-            "line" : 272,
+            "line" : 275,
             "column" : 8,
             "source_fragment" : "hdr.pppoe.type_id = 4w1"
           }
@@ -6168,7 +6213,7 @@
           ],
           "source_info" : {
             "filename" : "include/bng.p4",
-            "line" : 273,
+            "line" : 276,
             "column" : 8,
             "source_fragment" : "hdr.pppoe.code = 8w0"
           }
@@ -6187,7 +6232,7 @@
           ],
           "source_info" : {
             "filename" : "include/bng.p4",
-            "line" : 274,
+            "line" : 277,
             "column" : 8,
             "source_fragment" : "hdr.pppoe.session_id = fmeta.bng.pppoe_session_id; ..."
           }
@@ -6206,7 +6251,7 @@
           ],
           "source_info" : {
             "filename" : "include/bng.p4",
-            "line" : 275,
+            "line" : 278,
             "column" : 8,
             "source_fragment" : "c_line_tx.count(fmeta.bng.line_id)"
           }
@@ -6248,7 +6293,7 @@
           ],
           "source_info" : {
             "filename" : "include/bng.p4",
-            "line" : 280,
+            "line" : 283,
             "column" : 8,
             "source_fragment" : "hdr.pppoe.length = hdr.ipv4.total_len + 16w2"
           }
@@ -6308,7 +6353,7 @@
           ],
           "source_info" : {
             "filename" : "include/bng.p4",
-            "line" : 270,
+            "line" : 273,
             "column" : 8,
             "source_fragment" : "hdr.pppoe.setValid()"
           }
@@ -6327,7 +6372,7 @@
           ],
           "source_info" : {
             "filename" : "include/bng.p4",
-            "line" : 271,
+            "line" : 274,
             "column" : 8,
             "source_fragment" : "hdr.pppoe.version = 4w1"
           }
@@ -6346,7 +6391,7 @@
           ],
           "source_info" : {
             "filename" : "include/bng.p4",
-            "line" : 272,
+            "line" : 275,
             "column" : 8,
             "source_fragment" : "hdr.pppoe.type_id = 4w1"
           }
@@ -6365,7 +6410,7 @@
           ],
           "source_info" : {
             "filename" : "include/bng.p4",
-            "line" : 273,
+            "line" : 276,
             "column" : 8,
             "source_fragment" : "hdr.pppoe.code = 8w0"
           }
@@ -6384,7 +6429,7 @@
           ],
           "source_info" : {
             "filename" : "include/bng.p4",
-            "line" : 274,
+            "line" : 277,
             "column" : 8,
             "source_fragment" : "hdr.pppoe.session_id = fmeta.bng.pppoe_session_id; ..."
           }
@@ -6403,7 +6448,7 @@
           ],
           "source_info" : {
             "filename" : "include/bng.p4",
-            "line" : 275,
+            "line" : 278,
             "column" : 8,
             "source_fragment" : "c_line_tx.count(fmeta.bng.line_id)"
           }
@@ -6445,7 +6490,7 @@
           ],
           "source_info" : {
             "filename" : "include/bng.p4",
-            "line" : 287,
+            "line" : 290,
             "column" : 8,
             "source_fragment" : "hdr.pppoe.length = hdr.ipv6.payload_len + 16w42"
           }
@@ -15997,13 +16042,13 @@
             },
             {
               "match_type" : "ternary",
-              "name" : "eth_src",
+              "name" : "eth_dst",
               "target" : ["ethernet", "dst_addr"],
               "mask" : null
             },
             {
               "match_type" : "ternary",
-              "name" : "eth_dst",
+              "name" : "eth_src",
               "target" : ["ethernet", "src_addr"],
               "mask" : null
             },
@@ -16425,7 +16470,7 @@
           "id" : 39,
           "source_info" : {
             "filename" : "include/bng.p4",
-            "line" : 320,
+            "line" : 323,
             "column" : 14,
             "source_fragment" : "t_line_map"
           },
@@ -16467,7 +16512,7 @@
           "id" : 40,
           "source_info" : {
             "filename" : "include/bng.p4",
-            "line" : 339,
+            "line" : 342,
             "column" : 31,
             "source_fragment" : "="
           },
@@ -16496,7 +16541,7 @@
           "id" : 41,
           "source_info" : {
             "filename" : "include/bng.p4",
-            "line" : 48,
+            "line" : 51,
             "column" : 10,
             "source_fragment" : "t_pppoe_cp"
           },
@@ -16585,7 +16630,7 @@
           "id" : 44,
           "source_info" : {
             "filename" : "include/bng.p4",
-            "line" : 123,
+            "line" : 126,
             "column" : 12,
             "source_fragment" : "return"
           },
@@ -16614,7 +16659,7 @@
           "id" : 45,
           "source_info" : {
             "filename" : "include/bng.p4",
-            "line" : 84,
+            "line" : 87,
             "column" : 10,
             "source_fragment" : "t_pppoe_term_v4"
           },
@@ -16663,7 +16708,7 @@
           "id" : 46,
           "source_info" : {
             "filename" : "include/bng.p4",
-            "line" : 128,
+            "line" : 131,
             "column" : 20,
             "source_fragment" : "c_dropped.count(fmeta.bng.line_id)"
           },
@@ -16692,7 +16737,7 @@
           "id" : 47,
           "source_info" : {
             "filename" : "include/bng.p4",
-            "line" : 109,
+            "line" : 112,
             "column" : 12,
             "source_fragment" : "hdr.ipv6.src_addr[127:64]"
           },
@@ -16721,7 +16766,7 @@
           "id" : 48,
           "source_info" : {
             "filename" : "include/bng.p4",
-            "line" : 106,
+            "line" : 109,
             "column" : 10,
             "source_fragment" : "t_pppoe_term_v6"
           },
@@ -16770,7 +16815,7 @@
           "id" : 49,
           "source_info" : {
             "filename" : "include/bng.p4",
-            "line" : 136,
+            "line" : 139,
             "column" : 19,
             "source_fragment" : "c_dropped.count(fmeta.bng.line_id)"
           },
@@ -16799,7 +16844,7 @@
           "id" : 50,
           "source_info" : {
             "filename" : "include/bng.p4",
-            "line" : 166,
+            "line" : 169,
             "column" : 10,
             "source_fragment" : "t_line_session_map"
           },
@@ -16882,7 +16927,7 @@
           "id" : 53,
           "source_info" : {
             "filename" : "include/bng.p4",
-            "line" : 191,
+            "line" : 194,
             "column" : 10,
             "source_fragment" : "t_qos_v4"
           },
@@ -16937,7 +16982,7 @@
           "id" : 54,
           "source_info" : {
             "filename" : "include/bng.p4",
-            "line" : 235,
+            "line" : 238,
             "column" : 24,
             "source_fragment" : "m_prio.execute_meter(fmeta.bng.line_id, fmeta.bng.ds_meter_result)"
           },
@@ -16966,7 +17011,7 @@
           "id" : 55,
           "source_info" : {
             "filename" : "include/bng.p4",
-            "line" : 238,
+            "line" : 241,
             "column" : 24,
             "source_fragment" : "m_besteff.execute_meter(fmeta.bng.line_id, fmeta.bng.ds_meter_result)"
           },
@@ -16995,7 +17040,7 @@
           "id" : 56,
           "source_info" : {
             "filename" : "include/bng.p4",
-            "line" : 207,
+            "line" : 210,
             "column" : 10,
             "source_fragment" : "t_qos_v6"
           },
@@ -17044,7 +17089,7 @@
           "id" : 57,
           "source_info" : {
             "filename" : "include/bng.p4",
-            "line" : 247,
+            "line" : 250,
             "column" : 24,
             "source_fragment" : "m_prio.execute_meter(fmeta.bng.line_id, fmeta.bng.ds_meter_result)"
           },
@@ -17073,7 +17118,7 @@
           "id" : 58,
           "source_info" : {
             "filename" : "include/bng.p4",
-            "line" : 250,
+            "line" : 253,
             "column" : 24,
             "source_fragment" : "m_besteff.execute_meter(fmeta.bng.line_id, fmeta.bng.ds_meter_result)"
           },
@@ -17667,7 +17712,7 @@
           "id" : 20,
           "source_info" : {
             "filename" : "include/bng.p4",
-            "line" : 338,
+            "line" : 341,
             "column" : 16,
             "source_fragment" : "hdr.pppoe.isValid()"
           },
@@ -17731,7 +17776,7 @@
           "id" : 23,
           "source_info" : {
             "filename" : "include/bng.p4",
-            "line" : 125,
+            "line" : 128,
             "column" : 12,
             "source_fragment" : "hdr.ipv4.isValid()"
           },
@@ -17754,7 +17799,7 @@
           "id" : 24,
           "source_info" : {
             "filename" : "include/bng.p4",
-            "line" : 133,
+            "line" : 136,
             "column" : 17,
             "source_fragment" : "hdr.ipv6.isValid()"
           },
@@ -17794,7 +17839,7 @@
           "id" : 26,
           "source_info" : {
             "filename" : "include/bng.p4",
-            "line" : 232,
+            "line" : 235,
             "column" : 16,
             "source_fragment" : "hdr.ipv4.isValid()"
           },
@@ -17817,7 +17862,7 @@
           "id" : 27,
           "source_info" : {
             "filename" : "include/bng.p4",
-            "line" : 244,
+            "line" : 247,
             "column" : 21,
             "source_fragment" : "hdr.ipv6.isValid()"
           },
@@ -18406,7 +18451,7 @@
           "id" : 78,
           "source_info" : {
             "filename" : "include/bng.p4",
-            "line" : 294,
+            "line" : 297,
             "column" : 12,
             "source_fragment" : "encap_v4()"
           },
@@ -18435,7 +18480,7 @@
           "id" : 79,
           "source_info" : {
             "filename" : "include/bng.p4",
-            "line" : 299,
+            "line" : 302,
             "column" : 12,
             "source_fragment" : "encap_v6()"
           },
@@ -19954,7 +19999,7 @@
           "id" : 43,
           "source_info" : {
             "filename" : "include/bng.p4",
-            "line" : 355,
+            "line" : 358,
             "column" : 12,
             "source_fragment" : "fmeta.bng.type == BNG_TYPE_DOWNSTREAM"
           },
@@ -19980,7 +20025,7 @@
           "id" : 44,
           "source_info" : {
             "filename" : "include/bng.p4",
-            "line" : 293,
+            "line" : 296,
             "column" : 12,
             "source_fragment" : "hdr.ipv4.isValid()"
           },
@@ -20003,7 +20048,7 @@
           "id" : 45,
           "source_info" : {
             "filename" : "include/bng.p4",
-            "line" : 298,
+            "line" : 301,
             "column" : 17,
             "source_fragment" : "hdr.ipv6.isValid()"
           },
diff --git a/pipelines/fabric/impl/src/main/resources/p4c-out/fabric-full/bmv2/default/p4info.txt b/pipelines/fabric/impl/src/main/resources/p4c-out/fabric-full/bmv2/default/p4info.txt
index 33ed7da..43f5be1 100644
--- a/pipelines/fabric/impl/src/main/resources/p4c-out/fabric-full/bmv2/default/p4info.txt
+++ b/pipelines/fabric/impl/src/main/resources/p4c-out/fabric-full/bmv2/default/p4info.txt
@@ -527,13 +527,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/pipelines/fabric/impl/src/main/resources/p4c-out/fabric-int/bmv2/default/bmv2.json b/pipelines/fabric/impl/src/main/resources/p4c-out/fabric-int/bmv2/default/bmv2.json
index 0d0ce6a..8bf0be7 100644
--- a/pipelines/fabric/impl/src/main/resources/p4c-out/fabric-int/bmv2/default/bmv2.json
+++ b/pipelines/fabric/impl/src/main/resources/p4c-out/fabric-int/bmv2/default/bmv2.json
@@ -1109,7 +1109,7 @@
       "id" : 0,
       "source_info" : {
         "filename" : "include/parser.p4",
-        "line" : 265,
+        "line" : 269,
         "column" : 8,
         "source_fragment" : "FabricDeparser"
       },
@@ -10215,13 +10215,13 @@
             },
             {
               "match_type" : "ternary",
-              "name" : "eth_src",
+              "name" : "eth_dst",
               "target" : ["ethernet", "dst_addr"],
               "mask" : null
             },
             {
               "match_type" : "ternary",
-              "name" : "eth_dst",
+              "name" : "eth_src",
               "target" : ["ethernet", "src_addr"],
               "mask" : null
             },
diff --git a/pipelines/fabric/impl/src/main/resources/p4c-out/fabric-int/bmv2/default/p4info.txt b/pipelines/fabric/impl/src/main/resources/p4c-out/fabric-int/bmv2/default/p4info.txt
index 6a64bd1..a661e7a 100644
--- a/pipelines/fabric/impl/src/main/resources/p4c-out/fabric-int/bmv2/default/p4info.txt
+++ b/pipelines/fabric/impl/src/main/resources/p4c-out/fabric-int/bmv2/default/p4info.txt
@@ -210,13 +210,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/pipelines/fabric/impl/src/main/resources/p4c-out/fabric-spgw-int/bmv2/default/bmv2.json b/pipelines/fabric/impl/src/main/resources/p4c-out/fabric-spgw-int/bmv2/default/bmv2.json
index a3e31ff..cb56bf0 100644
--- a/pipelines/fabric/impl/src/main/resources/p4c-out/fabric-spgw-int/bmv2/default/bmv2.json
+++ b/pipelines/fabric/impl/src/main/resources/p4c-out/fabric-spgw-int/bmv2/default/bmv2.json
@@ -1362,7 +1362,7 @@
       "id" : 0,
       "source_info" : {
         "filename" : "include/parser.p4",
-        "line" : 265,
+        "line" : 269,
         "column" : 8,
         "source_fragment" : "FabricDeparser"
       },
@@ -12295,13 +12295,13 @@
             },
             {
               "match_type" : "ternary",
-              "name" : "eth_src",
+              "name" : "eth_dst",
               "target" : ["ethernet", "dst_addr"],
               "mask" : null
             },
             {
               "match_type" : "ternary",
-              "name" : "eth_dst",
+              "name" : "eth_src",
               "target" : ["ethernet", "src_addr"],
               "mask" : null
             },
diff --git a/pipelines/fabric/impl/src/main/resources/p4c-out/fabric-spgw-int/bmv2/default/p4info.txt b/pipelines/fabric/impl/src/main/resources/p4c-out/fabric-spgw-int/bmv2/default/p4info.txt
index a41f4f9..e99b94e 100644
--- a/pipelines/fabric/impl/src/main/resources/p4c-out/fabric-spgw-int/bmv2/default/p4info.txt
+++ b/pipelines/fabric/impl/src/main/resources/p4c-out/fabric-spgw-int/bmv2/default/p4info.txt
@@ -252,13 +252,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/pipelines/fabric/impl/src/main/resources/p4c-out/fabric-spgw/bmv2/default/bmv2.json b/pipelines/fabric/impl/src/main/resources/p4c-out/fabric-spgw/bmv2/default/bmv2.json
index 47759c7..87c94f3 100644
--- a/pipelines/fabric/impl/src/main/resources/p4c-out/fabric-spgw/bmv2/default/bmv2.json
+++ b/pipelines/fabric/impl/src/main/resources/p4c-out/fabric-spgw/bmv2/default/bmv2.json
@@ -1049,7 +1049,7 @@
       "id" : 0,
       "source_info" : {
         "filename" : "include/parser.p4",
-        "line" : 265,
+        "line" : 269,
         "column" : 8,
         "source_fragment" : "FabricDeparser"
       },
@@ -5205,13 +5205,13 @@
             },
             {
               "match_type" : "ternary",
-              "name" : "eth_src",
+              "name" : "eth_dst",
               "target" : ["ethernet", "dst_addr"],
               "mask" : null
             },
             {
               "match_type" : "ternary",
-              "name" : "eth_dst",
+              "name" : "eth_src",
               "target" : ["ethernet", "src_addr"],
               "mask" : null
             },
diff --git a/pipelines/fabric/impl/src/main/resources/p4c-out/fabric-spgw/bmv2/default/p4info.txt b/pipelines/fabric/impl/src/main/resources/p4c-out/fabric-spgw/bmv2/default/p4info.txt
index 1ec23e4..aa87ff9 100644
--- a/pipelines/fabric/impl/src/main/resources/p4c-out/fabric-spgw/bmv2/default/p4info.txt
+++ b/pipelines/fabric/impl/src/main/resources/p4c-out/fabric-spgw/bmv2/default/p4info.txt
@@ -228,13 +228,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/pipelines/fabric/impl/src/main/resources/p4c-out/fabric/bmv2/default/bmv2.json b/pipelines/fabric/impl/src/main/resources/p4c-out/fabric/bmv2/default/bmv2.json
index aeae27b..1ff415c 100644
--- a/pipelines/fabric/impl/src/main/resources/p4c-out/fabric/bmv2/default/bmv2.json
+++ b/pipelines/fabric/impl/src/main/resources/p4c-out/fabric/bmv2/default/bmv2.json
@@ -807,7 +807,7 @@
       "id" : 0,
       "source_info" : {
         "filename" : "include/parser.p4",
-        "line" : 265,
+        "line" : 269,
         "column" : 8,
         "source_fragment" : "FabricDeparser"
       },
@@ -3136,13 +3136,13 @@
             },
             {
               "match_type" : "ternary",
-              "name" : "eth_src",
+              "name" : "eth_dst",
               "target" : ["ethernet", "dst_addr"],
               "mask" : null
             },
             {
               "match_type" : "ternary",
-              "name" : "eth_dst",
+              "name" : "eth_src",
               "target" : ["ethernet", "src_addr"],
               "mask" : null
             },
diff --git a/pipelines/fabric/impl/src/main/resources/p4c-out/fabric/bmv2/default/p4info.txt b/pipelines/fabric/impl/src/main/resources/p4c-out/fabric/bmv2/default/p4info.txt
index 0419d36..d036bed 100644
--- a/pipelines/fabric/impl/src/main/resources/p4c-out/fabric/bmv2/default/p4info.txt
+++ b/pipelines/fabric/impl/src/main/resources/p4c-out/fabric/bmv2/default/p4info.txt
@@ -186,13 +186,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
   }