Rewrite the SPGW P4 pipeline.

This commit makes two changes to the fabric.p4 source files:
1. Routing is now done on a metadata field instead of the ipv4 header.
Routing on the ipv4 header is incorrect if the packet is encapsulated
with an outer IPV4 header. The metadata field is updated each time the
ipv4 destination changes, or an outer header is added or removed. These
changes require no control plane modifications due to @name annotations.
2. The spgw control blocks have been rewritten to support the logical UP4
pipeline. Its location in the pipeline is unchanged, and its
interactions with other control blocks is unchanged.

These changes compile for both bmv2 and tofino, and There is currently a
PR for the fabric-p4test repo which updates the SPGW PTF tests to
account for these changes.

Change-Id: I80ccf30e136a2bb24a83029e22413af351e6eed6
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 87c94f3..e0a3285 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
@@ -30,12 +30,20 @@
         ["fabric_metadata_t._ip_proto12", 8, false],
         ["fabric_metadata_t._l4_sport13", 16, false],
         ["fabric_metadata_t._l4_dport14", 16, false],
-        ["fabric_metadata_t._spgw_direction15", 2, false],
-        ["fabric_metadata_t._spgw_ipv4_len16", 16, false],
-        ["fabric_metadata_t._spgw_teid17", 32, false],
-        ["fabric_metadata_t._spgw_s1u_enb_addr18", 32, false],
-        ["fabric_metadata_t._spgw_s1u_sgw_addr19", 32, false],
-        ["_padding_0", 2, false]
+        ["fabric_metadata_t._ipv4_src_addr15", 32, false],
+        ["fabric_metadata_t._ipv4_dst_addr16", 32, false],
+        ["fabric_metadata_t._spgw_direction17", 2, false],
+        ["fabric_metadata_t._spgw_ipv4_len18", 16, false],
+        ["fabric_metadata_t._spgw_teid19", 32, false],
+        ["fabric_metadata_t._spgw_tunnel_src_addr20", 32, false],
+        ["fabric_metadata_t._spgw_tunnel_dst_addr21", 32, false],
+        ["fabric_metadata_t._spgw_ctr_id22", 32, false],
+        ["fabric_metadata_t._spgw_far_id23", 32, false],
+        ["fabric_metadata_t._spgw_pdr_hit24", 1, false],
+        ["fabric_metadata_t._spgw_far_dropped25", 1, false],
+        ["fabric_metadata_t._spgw_notify_cp26", 1, false],
+        ["fabric_metadata_t._spgw_outer_header_creation27", 1, false],
+        ["_padding_0", 6, false]
       ]
     },
     {
@@ -698,6 +706,32 @@
                 }
               ],
               "op" : "set"
+            },
+            {
+              "parameters" : [
+                {
+                  "type" : "field",
+                  "value" : ["scalars", "fabric_metadata_t._ipv4_src_addr15"]
+                },
+                {
+                  "type" : "field",
+                  "value" : ["ipv4", "src_addr"]
+                }
+              ],
+              "op" : "set"
+            },
+            {
+              "parameters" : [
+                {
+                  "type" : "field",
+                  "value" : ["scalars", "fabric_metadata_t._ipv4_dst_addr16"]
+                },
+                {
+                  "type" : "field",
+                  "value" : ["ipv4", "dst_addr"]
+                }
+              ],
+              "op" : "set"
             }
           ],
           "transitions" : [
@@ -1049,7 +1083,7 @@
       "id" : 0,
       "source_info" : {
         "filename" : "include/parser.p4",
-        "line" : 269,
+        "line" : 267,
         "column" : 8,
         "source_fragment" : "FabricDeparser"
       },
@@ -1059,16 +1093,16 @@
   "meter_arrays" : [],
   "counter_arrays" : [
     {
-      "name" : "FabricIngress.spgw_ingress.ue_counter",
+      "name" : "FabricIngress.spgw_ingress.pdr_counter",
       "id" : 0,
-      "is_direct" : true,
-      "binding" : "FabricIngress.spgw_ingress.dl_sess_lookup",
       "source_info" : {
         "filename" : "include/spgw.p4",
-        "line" : 52,
-        "column" : 50,
-        "source_fragment" : "ue_counter"
-      }
+        "line" : 56,
+        "column" : 49,
+        "source_fragment" : "pdr_counter"
+      },
+      "size" : 1024,
+      "is_direct" : false
     },
     {
       "name" : "FabricIngress.filtering.ingress_port_vlan_counter",
@@ -1203,8 +1237,20 @@
       "is_direct" : false
     },
     {
-      "name" : "FabricEgress.egress_next.egress_vlan_counter",
+      "name" : "FabricEgress.spgw_egress.pdr_counter",
       "id" : 12,
+      "source_info" : {
+        "filename" : "include/spgw.p4",
+        "line" : 246,
+        "column" : 49,
+        "source_fragment" : "pdr_counter"
+      },
+      "size" : 1024,
+      "is_direct" : false
+    },
+    {
+      "name" : "FabricEgress.egress_next.egress_vlan_counter",
+      "id" : 13,
       "is_direct" : true,
       "binding" : "FabricEgress.egress_next.egress_vlan",
       "source_info" : {
@@ -1283,7 +1329,7 @@
       "id" : 1,
       "source_info" : {
         "filename" : "include/spgw.p4",
-        "line" : 243,
+        "line" : 306,
         "column" : 8,
         "source_fragment" : "update_checksum(gtpu_ipv4.isValid(), ..."
       },
@@ -1458,11 +1504,99 @@
       "primitives" : []
     },
     {
-      "name" : "FabricIngress.spgw_ingress.gtpu_decap",
+      "name" : "NoAction",
       "id" : 9,
       "runtime_data" : [],
+      "primitives" : []
+    },
+    {
+      "name" : "NoAction",
+      "id" : 10,
+      "runtime_data" : [],
+      "primitives" : []
+    },
+    {
+      "name" : "FabricIngress.spgw_ingress.gtpu_decap",
+      "id" : 11,
+      "runtime_data" : [],
       "primitives" : [
         {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["scalars", "fabric_metadata_t._spgw_teid19"]
+            },
+            {
+              "type" : "field",
+              "value" : ["gtpu", "teid"]
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/spgw.p4",
+            "line" : 61,
+            "column" : 30,
+            "source_fragment" : "= gtpu.teid; ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["scalars", "fabric_metadata_t._spgw_tunnel_dst_addr21"]
+            },
+            {
+              "type" : "field",
+              "value" : ["gtpu_ipv4", "dst_addr"]
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/spgw.p4",
+            "line" : 62,
+            "column" : 41,
+            "source_fragment" : "= gtpu_ipv4.dst_addr; ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["scalars", "fabric_metadata_t._ipv4_src_addr15"]
+            },
+            {
+              "type" : "field",
+              "value" : ["ipv4", "src_addr"]
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/spgw.p4",
+            "line" : 64,
+            "column" : 34,
+            "source_fragment" : "= ipv4.src_addr; ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["scalars", "fabric_metadata_t._ipv4_dst_addr16"]
+            },
+            {
+              "type" : "field",
+              "value" : ["ipv4", "dst_addr"]
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/spgw.p4",
+            "line" : 65,
+            "column" : 34,
+            "source_fragment" : "= ipv4.dst_addr; ..."
+          }
+        },
+        {
           "op" : "remove_header",
           "parameters" : [
             {
@@ -1472,7 +1606,7 @@
           ],
           "source_info" : {
             "filename" : "include/spgw.p4",
-            "line" : 56,
+            "line" : 67,
             "column" : 8,
             "source_fragment" : "gtpu_ipv4.setInvalid()"
           }
@@ -1487,7 +1621,7 @@
           ],
           "source_info" : {
             "filename" : "include/spgw.p4",
-            "line" : 57,
+            "line" : 68,
             "column" : 8,
             "source_fragment" : "gtpu_udp.setInvalid()"
           }
@@ -1502,7 +1636,7 @@
           ],
           "source_info" : {
             "filename" : "include/spgw.p4",
-            "line" : 58,
+            "line" : 69,
             "column" : 8,
             "source_fragment" : "gtpu.setInvalid()"
           }
@@ -1510,19 +1644,15 @@
       ]
     },
     {
-      "name" : "FabricIngress.spgw_ingress.set_dl_sess_info",
-      "id" : 10,
+      "name" : "FabricIngress.spgw_ingress.set_pdr_attributes",
+      "id" : 12,
       "runtime_data" : [
         {
-          "name" : "teid",
+          "name" : "ctr_id",
           "bitwidth" : 32
         },
         {
-          "name" : "s1u_enb_addr",
-          "bitwidth" : 32
-        },
-        {
-          "name" : "s1u_sgw_addr",
+          "name" : "far_id",
           "bitwidth" : 32
         }
       ],
@@ -1532,7 +1662,36 @@
           "parameters" : [
             {
               "type" : "field",
-              "value" : ["scalars", "fabric_metadata_t._spgw_teid17"]
+              "value" : ["scalars", "fabric_metadata_t._spgw_pdr_hit24"]
+            },
+            {
+              "type" : "expression",
+              "value" : {
+                "type" : "expression",
+                "value" : {
+                  "op" : "b2d",
+                  "left" : null,
+                  "right" : {
+                    "type" : "bool",
+                    "value" : true
+                  }
+                }
+              }
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/spgw.p4",
+            "line" : 97,
+            "column" : 33,
+            "source_fragment" : "= true; ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["scalars", "fabric_metadata_t._spgw_ctr_id22"]
             },
             {
               "type" : "runtime_data",
@@ -1541,7 +1700,440 @@
           ],
           "source_info" : {
             "filename" : "include/spgw.p4",
-            "line" : 64,
+            "line" : 98,
+            "column" : 32,
+            "source_fragment" : "= ctr_id; ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["scalars", "fabric_metadata_t._spgw_far_id23"]
+            },
+            {
+              "type" : "runtime_data",
+              "value" : 1
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/spgw.p4",
+            "line" : 99,
+            "column" : 32,
+            "source_fragment" : "= far_id; ..."
+          }
+        }
+      ]
+    },
+    {
+      "name" : "FabricIngress.spgw_ingress.set_pdr_attributes",
+      "id" : 13,
+      "runtime_data" : [
+        {
+          "name" : "ctr_id",
+          "bitwidth" : 32
+        },
+        {
+          "name" : "far_id",
+          "bitwidth" : 32
+        }
+      ],
+      "primitives" : [
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["scalars", "fabric_metadata_t._spgw_pdr_hit24"]
+            },
+            {
+              "type" : "expression",
+              "value" : {
+                "type" : "expression",
+                "value" : {
+                  "op" : "b2d",
+                  "left" : null,
+                  "right" : {
+                    "type" : "bool",
+                    "value" : true
+                  }
+                }
+              }
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/spgw.p4",
+            "line" : 97,
+            "column" : 33,
+            "source_fragment" : "= true; ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["scalars", "fabric_metadata_t._spgw_ctr_id22"]
+            },
+            {
+              "type" : "runtime_data",
+              "value" : 0
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/spgw.p4",
+            "line" : 98,
+            "column" : 32,
+            "source_fragment" : "= ctr_id; ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["scalars", "fabric_metadata_t._spgw_far_id23"]
+            },
+            {
+              "type" : "runtime_data",
+              "value" : 1
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/spgw.p4",
+            "line" : 99,
+            "column" : 32,
+            "source_fragment" : "= far_id; ..."
+          }
+        }
+      ]
+    },
+    {
+      "name" : "FabricIngress.spgw_ingress.set_pdr_attributes",
+      "id" : 14,
+      "runtime_data" : [
+        {
+          "name" : "ctr_id",
+          "bitwidth" : 32
+        },
+        {
+          "name" : "far_id",
+          "bitwidth" : 32
+        }
+      ],
+      "primitives" : [
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["scalars", "fabric_metadata_t._spgw_pdr_hit24"]
+            },
+            {
+              "type" : "expression",
+              "value" : {
+                "type" : "expression",
+                "value" : {
+                  "op" : "b2d",
+                  "left" : null,
+                  "right" : {
+                    "type" : "bool",
+                    "value" : true
+                  }
+                }
+              }
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/spgw.p4",
+            "line" : 97,
+            "column" : 33,
+            "source_fragment" : "= true; ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["scalars", "fabric_metadata_t._spgw_ctr_id22"]
+            },
+            {
+              "type" : "runtime_data",
+              "value" : 0
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/spgw.p4",
+            "line" : 98,
+            "column" : 32,
+            "source_fragment" : "= ctr_id; ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["scalars", "fabric_metadata_t._spgw_far_id23"]
+            },
+            {
+              "type" : "runtime_data",
+              "value" : 1
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/spgw.p4",
+            "line" : 99,
+            "column" : 32,
+            "source_fragment" : "= far_id; ..."
+          }
+        }
+      ]
+    },
+    {
+      "name" : "FabricIngress.spgw_ingress.load_normal_far_attributes",
+      "id" : 15,
+      "runtime_data" : [
+        {
+          "name" : "drop",
+          "bitwidth" : 1
+        },
+        {
+          "name" : "notify_cp",
+          "bitwidth" : 1
+        }
+      ],
+      "primitives" : [
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["scalars", "fabric_metadata_t._spgw_far_dropped25"]
+            },
+            {
+              "type" : "expression",
+              "value" : {
+                "type" : "expression",
+                "value" : {
+                  "op" : "b2d",
+                  "left" : null,
+                  "right" : {
+                    "type" : "expression",
+                    "value" : {
+                      "op" : "!=",
+                      "left" : {
+                        "type" : "local",
+                        "value" : 0
+                      },
+                      "right" : {
+                        "type" : "hexstr",
+                        "value" : "0x00"
+                      }
+                    }
+                  }
+                }
+              }
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/spgw.p4",
+            "line" : 146,
+            "column" : 37,
+            "source_fragment" : "= (bool)drop; ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["scalars", "fabric_metadata_t._spgw_notify_cp26"]
+            },
+            {
+              "type" : "expression",
+              "value" : {
+                "type" : "expression",
+                "value" : {
+                  "op" : "b2d",
+                  "left" : null,
+                  "right" : {
+                    "type" : "expression",
+                    "value" : {
+                      "op" : "!=",
+                      "left" : {
+                        "type" : "local",
+                        "value" : 1
+                      },
+                      "right" : {
+                        "type" : "hexstr",
+                        "value" : "0x00"
+                      }
+                    }
+                  }
+                }
+              }
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/spgw.p4",
+            "line" : 147,
+            "column" : 35,
+            "source_fragment" : "= (bool)notify_cp; ..."
+          }
+        }
+      ]
+    },
+    {
+      "name" : "FabricIngress.spgw_ingress.load_tunnel_far_attributes",
+      "id" : 16,
+      "runtime_data" : [
+        {
+          "name" : "drop",
+          "bitwidth" : 1
+        },
+        {
+          "name" : "notify_cp",
+          "bitwidth" : 1
+        },
+        {
+          "name" : "tunnel_src_addr",
+          "bitwidth" : 32
+        },
+        {
+          "name" : "tunnel_dst_addr",
+          "bitwidth" : 32
+        },
+        {
+          "name" : "teid",
+          "bitwidth" : 32
+        }
+      ],
+      "primitives" : [
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["scalars", "fabric_metadata_t._spgw_far_dropped25"]
+            },
+            {
+              "type" : "expression",
+              "value" : {
+                "type" : "expression",
+                "value" : {
+                  "op" : "b2d",
+                  "left" : null,
+                  "right" : {
+                    "type" : "expression",
+                    "value" : {
+                      "op" : "!=",
+                      "left" : {
+                        "type" : "local",
+                        "value" : 0
+                      },
+                      "right" : {
+                        "type" : "hexstr",
+                        "value" : "0x00"
+                      }
+                    }
+                  }
+                }
+              }
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/spgw.p4",
+            "line" : 155,
+            "column" : 37,
+            "source_fragment" : "= (bool)drop; ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["scalars", "fabric_metadata_t._spgw_notify_cp26"]
+            },
+            {
+              "type" : "expression",
+              "value" : {
+                "type" : "expression",
+                "value" : {
+                  "op" : "b2d",
+                  "left" : null,
+                  "right" : {
+                    "type" : "expression",
+                    "value" : {
+                      "op" : "!=",
+                      "left" : {
+                        "type" : "local",
+                        "value" : 1
+                      },
+                      "right" : {
+                        "type" : "hexstr",
+                        "value" : "0x00"
+                      }
+                    }
+                  }
+                }
+              }
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/spgw.p4",
+            "line" : 156,
+            "column" : 35,
+            "source_fragment" : "= (bool)notify_cp; ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["scalars", "fabric_metadata_t._spgw_outer_header_creation27"]
+            },
+            {
+              "type" : "expression",
+              "value" : {
+                "type" : "expression",
+                "value" : {
+                  "op" : "b2d",
+                  "left" : null,
+                  "right" : {
+                    "type" : "bool",
+                    "value" : true
+                  }
+                }
+              }
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/spgw.p4",
+            "line" : 158,
+            "column" : 47,
+            "source_fragment" : "= true; ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["scalars", "fabric_metadata_t._spgw_teid19"]
+            },
+            {
+              "type" : "runtime_data",
+              "value" : 4
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/spgw.p4",
+            "line" : 159,
             "column" : 30,
             "source_fragment" : "= teid; ..."
           }
@@ -1551,26 +2143,7 @@
           "parameters" : [
             {
               "type" : "field",
-              "value" : ["scalars", "fabric_metadata_t._spgw_s1u_enb_addr18"]
-            },
-            {
-              "type" : "runtime_data",
-              "value" : 1
-            }
-          ],
-          "source_info" : {
-            "filename" : "include/spgw.p4",
-            "line" : 65,
-            "column" : 38,
-            "source_fragment" : "= s1u_enb_addr; ..."
-          }
-        },
-        {
-          "op" : "assign",
-          "parameters" : [
-            {
-              "type" : "field",
-              "value" : ["scalars", "fabric_metadata_t._spgw_s1u_sgw_addr19"]
+              "value" : ["scalars", "fabric_metadata_t._spgw_tunnel_src_addr20"]
             },
             {
               "type" : "runtime_data",
@@ -1579,16 +2152,73 @@
           ],
           "source_info" : {
             "filename" : "include/spgw.p4",
-            "line" : 66,
-            "column" : 38,
-            "source_fragment" : "= s1u_sgw_addr; ..."
+            "line" : 160,
+            "column" : 41,
+            "source_fragment" : "= tunnel_src_addr; ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["scalars", "fabric_metadata_t._spgw_tunnel_dst_addr21"]
+            },
+            {
+              "type" : "runtime_data",
+              "value" : 3
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/spgw.p4",
+            "line" : 161,
+            "column" : 41,
+            "source_fragment" : "= tunnel_dst_addr; ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["scalars", "fabric_metadata_t._ipv4_src_addr15"]
+            },
+            {
+              "type" : "runtime_data",
+              "value" : 2
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/spgw.p4",
+            "line" : 163,
+            "column" : 34,
+            "source_fragment" : "= tunnel_src_addr; ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["scalars", "fabric_metadata_t._ipv4_dst_addr16"]
+            },
+            {
+              "type" : "runtime_data",
+              "value" : 3
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/spgw.p4",
+            "line" : 164,
+            "column" : 34,
+            "source_fragment" : "= tunnel_dst_addr; ..."
           }
         }
       ]
     },
     {
       "name" : "FabricIngress.filtering.deny",
-      "id" : 11,
+      "id" : 17,
       "runtime_data" : [],
       "primitives" : [
         {
@@ -1653,13 +2283,13 @@
     },
     {
       "name" : "FabricIngress.filtering.permit",
-      "id" : 12,
+      "id" : 18,
       "runtime_data" : [],
       "primitives" : []
     },
     {
       "name" : "FabricIngress.filtering.permit_with_internal_vlan",
-      "id" : 13,
+      "id" : 19,
       "runtime_data" : [
         {
           "name" : "vlan_id",
@@ -1690,7 +2320,7 @@
     },
     {
       "name" : "FabricIngress.filtering.set_forwarding_type",
-      "id" : 14,
+      "id" : 20,
       "runtime_data" : [
         {
           "name" : "fwd_type",
@@ -1721,7 +2351,7 @@
     },
     {
       "name" : "FabricIngress.forwarding.set_next_id_bridging",
-      "id" : 15,
+      "id" : 21,
       "runtime_data" : [
         {
           "name" : "next_id",
@@ -1752,7 +2382,7 @@
     },
     {
       "name" : "FabricIngress.forwarding.pop_mpls_and_next",
-      "id" : 16,
+      "id" : 22,
       "runtime_data" : [
         {
           "name" : "next_id",
@@ -1802,7 +2432,7 @@
     },
     {
       "name" : "FabricIngress.forwarding.set_next_id_routing_v4",
-      "id" : 17,
+      "id" : 23,
       "runtime_data" : [
         {
           "name" : "next_id",
@@ -1833,13 +2463,13 @@
     },
     {
       "name" : "FabricIngress.forwarding.nop_routing_v4",
-      "id" : 18,
+      "id" : 24,
       "runtime_data" : [],
       "primitives" : []
     },
     {
       "name" : "FabricIngress.acl.set_next_id_acl",
-      "id" : 19,
+      "id" : 25,
       "runtime_data" : [
         {
           "name" : "next_id",
@@ -1870,7 +2500,7 @@
     },
     {
       "name" : "FabricIngress.acl.punt_to_cpu",
-      "id" : 20,
+      "id" : 26,
       "runtime_data" : [],
       "primitives" : [
         {
@@ -1925,7 +2555,7 @@
     },
     {
       "name" : "FabricIngress.acl.set_clone_session_id",
-      "id" : 21,
+      "id" : 27,
       "runtime_data" : [
         {
           "name" : "clone_id",
@@ -1956,7 +2586,7 @@
     },
     {
       "name" : "FabricIngress.acl.drop",
-      "id" : 22,
+      "id" : 28,
       "runtime_data" : [],
       "primitives" : [
         {
@@ -2007,13 +2637,13 @@
     },
     {
       "name" : "FabricIngress.acl.nop_acl",
-      "id" : 23,
+      "id" : 29,
       "runtime_data" : [],
       "primitives" : []
     },
     {
       "name" : "FabricIngress.next.set_vlan",
-      "id" : 24,
+      "id" : 30,
       "runtime_data" : [
         {
           "name" : "vlan_id",
@@ -2044,7 +2674,7 @@
     },
     {
       "name" : "FabricIngress.next.output_xconnect",
-      "id" : 25,
+      "id" : 31,
       "runtime_data" : [
         {
           "name" : "port_num",
@@ -2075,7 +2705,7 @@
     },
     {
       "name" : "FabricIngress.next.set_next_id_xconnect",
-      "id" : 26,
+      "id" : 32,
       "runtime_data" : [
         {
           "name" : "next_id",
@@ -2106,7 +2736,7 @@
     },
     {
       "name" : "FabricIngress.next.output_hashed",
-      "id" : 27,
+      "id" : 33,
       "runtime_data" : [
         {
           "name" : "port_num",
@@ -2137,7 +2767,7 @@
     },
     {
       "name" : "FabricIngress.next.routing_hashed",
-      "id" : 28,
+      "id" : 34,
       "runtime_data" : [
         {
           "name" : "port_num",
@@ -2214,7 +2844,7 @@
     },
     {
       "name" : "FabricIngress.next.mpls_routing_hashed",
-      "id" : 29,
+      "id" : 35,
       "runtime_data" : [
         {
           "name" : "port_num",
@@ -2314,7 +2944,7 @@
     },
     {
       "name" : "FabricIngress.next.set_mcast_group_id",
-      "id" : 30,
+      "id" : 36,
       "runtime_data" : [
         {
           "name" : "group_id",
@@ -2374,7 +3004,7 @@
     },
     {
       "name" : "act",
-      "id" : 31,
+      "id" : 37,
       "runtime_data" : [],
       "primitives" : [
         {
@@ -2401,7 +3031,7 @@
           ],
           "source_info" : {
             "filename" : "include/spgw.p4",
-            "line" : 30,
+            "line" : 34,
             "column" : 32,
             "source_fragment" : "return"
           }
@@ -2410,7 +3040,7 @@
     },
     {
       "name" : "act_0",
-      "id" : 32,
+      "id" : 38,
       "runtime_data" : [],
       "primitives" : [
         {
@@ -2470,7 +3100,7 @@
     },
     {
       "name" : "act_1",
-      "id" : 33,
+      "id" : 39,
       "runtime_data" : [],
       "primitives" : [
         {
@@ -2487,7 +3117,7 @@
           ],
           "source_info" : {
             "filename" : "include/spgw.p4",
-            "line" : 35,
+            "line" : 39,
             "column" : 16,
             "source_fragment" : "= inner_udp; ..."
           }
@@ -2496,7 +3126,7 @@
     },
     {
       "name" : "act_2",
-      "id" : 34,
+      "id" : 40,
       "runtime_data" : [],
       "primitives" : [
         {
@@ -2509,7 +3139,7 @@
           ],
           "source_info" : {
             "filename" : "include/spgw.p4",
-            "line" : 37,
+            "line" : 41,
             "column" : 12,
             "source_fragment" : "udp.setInvalid()"
           }
@@ -2518,7 +3148,7 @@
     },
     {
       "name" : "act_3",
-      "id" : 35,
+      "id" : 41,
       "runtime_data" : [],
       "primitives" : [
         {
@@ -2535,7 +3165,7 @@
           ],
           "source_info" : {
             "filename" : "include/spgw.p4",
-            "line" : 31,
+            "line" : 35,
             "column" : 18,
             "source_fragment" : "= ipv4; ..."
           }
@@ -2554,7 +3184,7 @@
           ],
           "source_info" : {
             "filename" : "include/spgw.p4",
-            "line" : 32,
+            "line" : 36,
             "column" : 13,
             "source_fragment" : "= inner_ipv4; ..."
           }
@@ -2573,7 +3203,7 @@
           ],
           "source_info" : {
             "filename" : "include/spgw.p4",
-            "line" : 33,
+            "line" : 37,
             "column" : 17,
             "source_fragment" : "= udp; ..."
           }
@@ -2582,7 +3212,7 @@
     },
     {
       "name" : "act_4",
-      "id" : 36,
+      "id" : 42,
       "runtime_data" : [],
       "primitives" : [
         {
@@ -2662,7 +3292,7 @@
     },
     {
       "name" : "act_5",
-      "id" : 37,
+      "id" : 43,
       "runtime_data" : [],
       "primitives" : [
         {
@@ -2726,7 +3356,7 @@
     },
     {
       "name" : "act_6",
-      "id" : 38,
+      "id" : 44,
       "runtime_data" : [],
       "primitives" : [
         {
@@ -2752,7 +3382,7 @@
     },
     {
       "name" : "act_7",
-      "id" : 39,
+      "id" : 45,
       "runtime_data" : [],
       "primitives" : [
         {
@@ -2782,7 +3412,7 @@
     },
     {
       "name" : "act_8",
-      "id" : 40,
+      "id" : 46,
       "runtime_data" : [],
       "primitives" : [
         {
@@ -2812,7 +3442,7 @@
     },
     {
       "name" : "act_9",
-      "id" : 41,
+      "id" : 47,
       "runtime_data" : [],
       "primitives" : [
         {
@@ -2825,7 +3455,7 @@
           ],
           "source_info" : {
             "filename" : "include/spgw.p4",
-            "line" : 149,
+            "line" : 187,
             "column" : 16,
             "source_fragment" : "mark_to_drop(standard_metadata)"
           }
@@ -2834,7 +3464,7 @@
     },
     {
       "name" : "act_10",
-      "id" : 42,
+      "id" : 48,
       "runtime_data" : [],
       "primitives" : [
         {
@@ -2842,7 +3472,7 @@
           "parameters" : [
             {
               "type" : "field",
-              "value" : ["scalars", "fabric_metadata_t._spgw_direction15"]
+              "value" : ["scalars", "fabric_metadata_t._spgw_direction17"]
             },
             {
               "type" : "hexstr",
@@ -2851,7 +3481,7 @@
           ],
           "source_info" : {
             "filename" : "include/control/../define.p4",
-            "line" : 147,
+            "line" : 150,
             "column" : 36,
             "source_fragment" : "2w1; ..."
           }
@@ -2860,7 +3490,7 @@
     },
     {
       "name" : "act_11",
-      "id" : 43,
+      "id" : 49,
       "runtime_data" : [],
       "primitives" : [
         {
@@ -2890,7 +3520,7 @@
     },
     {
       "name" : "act_12",
-      "id" : 44,
+      "id" : 50,
       "runtime_data" : [],
       "primitives" : [
         {
@@ -2920,7 +3550,7 @@
     },
     {
       "name" : "act_13",
-      "id" : 45,
+      "id" : 51,
       "runtime_data" : [],
       "primitives" : [
         {
@@ -2928,7 +3558,7 @@
           "parameters" : [
             {
               "type" : "field",
-              "value" : ["scalars", "fabric_metadata_t._spgw_direction15"]
+              "value" : ["scalars", "fabric_metadata_t._spgw_direction17"]
             },
             {
               "type" : "hexstr",
@@ -2937,7 +3567,7 @@
           ],
           "source_info" : {
             "filename" : "include/control/../define.p4",
-            "line" : 148,
+            "line" : 151,
             "column" : 38,
             "source_fragment" : "2w2; ..."
           }
@@ -2946,7 +3576,7 @@
     },
     {
       "name" : "act_14",
-      "id" : 46,
+      "id" : 52,
       "runtime_data" : [],
       "primitives" : [
         {
@@ -2954,7 +3584,7 @@
           "parameters" : [
             {
               "type" : "field",
-              "value" : ["scalars", "fabric_metadata_t._spgw_direction15"]
+              "value" : ["scalars", "fabric_metadata_t._spgw_direction17"]
             },
             {
               "type" : "hexstr",
@@ -2963,7 +3593,7 @@
           ],
           "source_info" : {
             "filename" : "include/control/../define.p4",
-            "line" : 146,
+            "line" : 149,
             "column" : 37,
             "source_fragment" : "2w0; ..."
           }
@@ -2992,7 +3622,7 @@
           ],
           "source_info" : {
             "filename" : "include/spgw.p4",
-            "line" : 158,
+            "line" : 196,
             "column" : 12,
             "source_fragment" : "return"
           }
@@ -3001,7 +3631,7 @@
     },
     {
       "name" : "act_15",
-      "id" : 47,
+      "id" : 53,
       "runtime_data" : [],
       "primitives" : [
         {
@@ -3031,7 +3661,7 @@
     },
     {
       "name" : "act_16",
-      "id" : 48,
+      "id" : 54,
       "runtime_data" : [],
       "primitives" : [
         {
@@ -3039,7 +3669,134 @@
           "parameters" : [
             {
               "type" : "field",
-              "value" : ["scalars", "fabric_metadata_t._spgw_ipv4_len16"]
+              "value" : ["scalars", "spgw_ingress_hasReturned"]
+            },
+            {
+              "type" : "expression",
+              "value" : {
+                "type" : "expression",
+                "value" : {
+                  "op" : "b2d",
+                  "left" : null,
+                  "right" : {
+                    "type" : "bool",
+                    "value" : true
+                  }
+                }
+              }
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/spgw.p4",
+            "line" : 206,
+            "column" : 12,
+            "source_fragment" : "return"
+          }
+        }
+      ]
+    },
+    {
+      "name" : "act_17",
+      "id" : 55,
+      "runtime_data" : [],
+      "primitives" : [
+        {
+          "op" : "count",
+          "parameters" : [
+            {
+              "type" : "counter_array",
+              "value" : "FabricIngress.spgw_ingress.pdr_counter"
+            },
+            {
+              "type" : "field",
+              "value" : ["scalars", "fabric_metadata_t._spgw_ctr_id22"]
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/spgw.p4",
+            "line" : 213,
+            "column" : 8,
+            "source_fragment" : "pdr_counter.count(fabric_meta.spgw.ctr_id)"
+          }
+        }
+      ]
+    },
+    {
+      "name" : "act_18",
+      "id" : 56,
+      "runtime_data" : [],
+      "primitives" : [
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["scalars", "fabric_metadata_t._skip_forwarding6"]
+            },
+            {
+              "type" : "expression",
+              "value" : {
+                "type" : "expression",
+                "value" : {
+                  "op" : "b2d",
+                  "left" : null,
+                  "right" : {
+                    "type" : "bool",
+                    "value" : true
+                  }
+                }
+              }
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/spgw.p4",
+            "line" : 223,
+            "column" : 40,
+            "source_fragment" : "= true; ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["scalars", "fabric_metadata_t._skip_next7"]
+            },
+            {
+              "type" : "expression",
+              "value" : {
+                "type" : "expression",
+                "value" : {
+                  "op" : "b2d",
+                  "left" : null,
+                  "right" : {
+                    "type" : "bool",
+                    "value" : true
+                  }
+                }
+              }
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/spgw.p4",
+            "line" : 224,
+            "column" : 34,
+            "source_fragment" : "= true; ..."
+          }
+        }
+      ]
+    },
+    {
+      "name" : "act_19",
+      "id" : 57,
+      "runtime_data" : [],
+      "primitives" : [
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["scalars", "fabric_metadata_t._spgw_ipv4_len18"]
             },
             {
               "type" : "field",
@@ -3048,7 +3805,7 @@
           ],
           "source_info" : {
             "filename" : "include/spgw.p4",
-            "line" : 175,
+            "line" : 232,
             "column" : 34,
             "source_fragment" : "= ipv4.total_len; ..."
           }
@@ -3056,8 +3813,8 @@
       ]
     },
     {
-      "name" : "act_17",
-      "id" : 49,
+      "name" : "act_20",
+      "id" : 58,
       "runtime_data" : [],
       "primitives" : [
         {
@@ -3114,8 +3871,8 @@
       ]
     },
     {
-      "name" : "act_18",
-      "id" : 50,
+      "name" : "act_21",
+      "id" : 59,
       "runtime_data" : [],
       "primitives" : [
         {
@@ -3173,13 +3930,13 @@
     },
     {
       "name" : "nop",
-      "id" : 51,
+      "id" : 60,
       "runtime_data" : [],
       "primitives" : []
     },
     {
       "name" : "FabricEgress.spgw_egress.gtpu_encap",
-      "id" : 52,
+      "id" : 61,
       "runtime_data" : [],
       "primitives" : [
         {
@@ -3192,7 +3949,7 @@
           ],
           "source_info" : {
             "filename" : "include/spgw.p4",
-            "line" : 191,
+            "line" : 251,
             "column" : 8,
             "source_fragment" : "gtpu_ipv4.setValid()"
           }
@@ -3211,7 +3968,7 @@
           ],
           "source_info" : {
             "filename" : "include/spgw.p4",
-            "line" : 192,
+            "line" : 252,
             "column" : 8,
             "source_fragment" : "gtpu_ipv4.version = 4"
           }
@@ -3230,7 +3987,7 @@
           ],
           "source_info" : {
             "filename" : "include/control/../define.p4",
-            "line" : 129,
+            "line" : 132,
             "column" : 28,
             "source_fragment" : "5; ..."
           }
@@ -3249,7 +4006,7 @@
           ],
           "source_info" : {
             "filename" : "include/spgw.p4",
-            "line" : 194,
+            "line" : 254,
             "column" : 8,
             "source_fragment" : "gtpu_ipv4.dscp = 0"
           }
@@ -3268,7 +4025,7 @@
           ],
           "source_info" : {
             "filename" : "include/spgw.p4",
-            "line" : 195,
+            "line" : 255,
             "column" : 8,
             "source_fragment" : "gtpu_ipv4.ecn = 0"
           }
@@ -3310,7 +4067,7 @@
           ],
           "source_info" : {
             "filename" : "include/spgw.p4",
-            "line" : 196,
+            "line" : 256,
             "column" : 8,
             "source_fragment" : "gtpu_ipv4.total_len = ipv4.total_len ..."
           }
@@ -3329,7 +4086,7 @@
           ],
           "source_info" : {
             "filename" : "include/spgw.p4",
-            "line" : 198,
+            "line" : 258,
             "column" : 8,
             "source_fragment" : "gtpu_ipv4.identification = 0x1513"
           }
@@ -3348,7 +4105,7 @@
           ],
           "source_info" : {
             "filename" : "include/spgw.p4",
-            "line" : 199,
+            "line" : 259,
             "column" : 8,
             "source_fragment" : "gtpu_ipv4.flags = 0"
           }
@@ -3367,7 +4124,7 @@
           ],
           "source_info" : {
             "filename" : "include/spgw.p4",
-            "line" : 200,
+            "line" : 260,
             "column" : 8,
             "source_fragment" : "gtpu_ipv4.frag_offset = 0"
           }
@@ -3386,7 +4143,7 @@
           ],
           "source_info" : {
             "filename" : "include/control/../define.p4",
-            "line" : 142,
+            "line" : 145,
             "column" : 32,
             "source_fragment" : "64; ..."
           }
@@ -3405,7 +4162,7 @@
           ],
           "source_info" : {
             "filename" : "include/control/../define.p4",
-            "line" : 126,
+            "line" : 129,
             "column" : 25,
             "source_fragment" : "17; ..."
           }
@@ -3415,37 +4172,37 @@
           "parameters" : [
             {
               "type" : "field",
-              "value" : ["gtpu_ipv4", "dst_addr"]
-            },
-            {
-              "type" : "field",
-              "value" : ["scalars", "fabric_metadata_t._spgw_s1u_enb_addr18"]
-            }
-          ],
-          "source_info" : {
-            "filename" : "include/spgw.p4",
-            "line" : 203,
-            "column" : 8,
-            "source_fragment" : "gtpu_ipv4.dst_addr = fabric_meta.spgw.s1u_enb_addr; ..."
-          }
-        },
-        {
-          "op" : "assign",
-          "parameters" : [
-            {
-              "type" : "field",
               "value" : ["gtpu_ipv4", "src_addr"]
             },
             {
               "type" : "field",
-              "value" : ["scalars", "fabric_metadata_t._spgw_s1u_sgw_addr19"]
+              "value" : ["scalars", "fabric_metadata_t._spgw_tunnel_src_addr20"]
             }
           ],
           "source_info" : {
             "filename" : "include/spgw.p4",
-            "line" : 204,
+            "line" : 263,
             "column" : 8,
-            "source_fragment" : "gtpu_ipv4.src_addr = fabric_meta.spgw.s1u_sgw_addr; ..."
+            "source_fragment" : "gtpu_ipv4.src_addr = fabric_meta.spgw.tunnel_src_addr; ..."
+          }
+        },
+        {
+          "op" : "assign",
+          "parameters" : [
+            {
+              "type" : "field",
+              "value" : ["gtpu_ipv4", "dst_addr"]
+            },
+            {
+              "type" : "field",
+              "value" : ["scalars", "fabric_metadata_t._spgw_tunnel_dst_addr21"]
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/spgw.p4",
+            "line" : 264,
+            "column" : 8,
+            "source_fragment" : "gtpu_ipv4.dst_addr = fabric_meta.spgw.tunnel_dst_addr; ..."
           }
         },
         {
@@ -3462,7 +4219,7 @@
           ],
           "source_info" : {
             "filename" : "include/spgw.p4",
-            "line" : 205,
+            "line" : 265,
             "column" : 8,
             "source_fragment" : "gtpu_ipv4.hdr_checksum = 0"
           }
@@ -3477,7 +4234,7 @@
           ],
           "source_info" : {
             "filename" : "include/spgw.p4",
-            "line" : 207,
+            "line" : 267,
             "column" : 8,
             "source_fragment" : "gtpu_udp.setValid()"
           }
@@ -3496,7 +4253,7 @@
           ],
           "source_info" : {
             "filename" : "include/spgw.p4",
-            "line" : 208,
+            "line" : 268,
             "column" : 8,
             "source_fragment" : "gtpu_udp.sport = 2152"
           }
@@ -3515,7 +4272,7 @@
           ],
           "source_info" : {
             "filename" : "include/spgw.p4",
-            "line" : 209,
+            "line" : 269,
             "column" : 8,
             "source_fragment" : "gtpu_udp.dport = 2152"
           }
@@ -3539,7 +4296,7 @@
                       "op" : "+",
                       "left" : {
                         "type" : "field",
-                        "value" : ["scalars", "fabric_metadata_t._spgw_ipv4_len16"]
+                        "value" : ["scalars", "fabric_metadata_t._spgw_ipv4_len18"]
                       },
                       "right" : {
                         "type" : "hexstr",
@@ -3557,7 +4314,7 @@
           ],
           "source_info" : {
             "filename" : "include/spgw.p4",
-            "line" : 210,
+            "line" : 270,
             "column" : 8,
             "source_fragment" : "gtpu_udp.len = fabric_meta.spgw.ipv4_len ..."
           }
@@ -3576,7 +4333,7 @@
           ],
           "source_info" : {
             "filename" : "include/spgw.p4",
-            "line" : 212,
+            "line" : 272,
             "column" : 8,
             "source_fragment" : "gtpu_udp.checksum = 0"
           }
@@ -3591,7 +4348,7 @@
           ],
           "source_info" : {
             "filename" : "include/spgw.p4",
-            "line" : 214,
+            "line" : 275,
             "column" : 8,
             "source_fragment" : "gtpu.setValid()"
           }
@@ -3610,7 +4367,7 @@
           ],
           "source_info" : {
             "filename" : "include/spgw.p4",
-            "line" : 215,
+            "line" : 276,
             "column" : 8,
             "source_fragment" : "gtpu.version = 0x01"
           }
@@ -3629,7 +4386,7 @@
           ],
           "source_info" : {
             "filename" : "include/spgw.p4",
-            "line" : 216,
+            "line" : 277,
             "column" : 8,
             "source_fragment" : "gtpu.pt = 0x01"
           }
@@ -3648,7 +4405,7 @@
           ],
           "source_info" : {
             "filename" : "include/spgw.p4",
-            "line" : 217,
+            "line" : 278,
             "column" : 8,
             "source_fragment" : "gtpu.spare = 0"
           }
@@ -3667,7 +4424,7 @@
           ],
           "source_info" : {
             "filename" : "include/spgw.p4",
-            "line" : 218,
+            "line" : 279,
             "column" : 8,
             "source_fragment" : "gtpu.ex_flag = 0"
           }
@@ -3686,7 +4443,7 @@
           ],
           "source_info" : {
             "filename" : "include/spgw.p4",
-            "line" : 219,
+            "line" : 280,
             "column" : 8,
             "source_fragment" : "gtpu.seq_flag = 0"
           }
@@ -3705,7 +4462,7 @@
           ],
           "source_info" : {
             "filename" : "include/spgw.p4",
-            "line" : 220,
+            "line" : 281,
             "column" : 8,
             "source_fragment" : "gtpu.npdu_flag = 0"
           }
@@ -3724,7 +4481,7 @@
           ],
           "source_info" : {
             "filename" : "include/spgw.p4",
-            "line" : 221,
+            "line" : 282,
             "column" : 8,
             "source_fragment" : "gtpu.msgtype = 0xff"
           }
@@ -3738,12 +4495,12 @@
             },
             {
               "type" : "field",
-              "value" : ["scalars", "fabric_metadata_t._spgw_ipv4_len16"]
+              "value" : ["scalars", "fabric_metadata_t._spgw_ipv4_len18"]
             }
           ],
           "source_info" : {
             "filename" : "include/spgw.p4",
-            "line" : 222,
+            "line" : 283,
             "column" : 8,
             "source_fragment" : "gtpu.msglen = fabric_meta.spgw.ipv4_len; ..."
           }
@@ -3757,12 +4514,12 @@
             },
             {
               "type" : "field",
-              "value" : ["scalars", "fabric_metadata_t._spgw_teid17"]
+              "value" : ["scalars", "fabric_metadata_t._spgw_teid19"]
             }
           ],
           "source_info" : {
             "filename" : "include/spgw.p4",
-            "line" : 223,
+            "line" : 284,
             "column" : 8,
             "source_fragment" : "gtpu.teid = fabric_meta.spgw.teid; ..."
           }
@@ -3771,7 +4528,7 @@
     },
     {
       "name" : "FabricEgress.egress_next.pop_mpls_if_present",
-      "id" : 53,
+      "id" : 62,
       "runtime_data" : [],
       "primitives" : [
         {
@@ -3812,7 +4569,7 @@
     },
     {
       "name" : "FabricEgress.egress_next.set_mpls",
-      "id" : 54,
+      "id" : 63,
       "runtime_data" : [],
       "primitives" : [
         {
@@ -3920,7 +4677,7 @@
           ],
           "source_info" : {
             "filename" : "include/control/../define.p4",
-            "line" : 112,
+            "line" : 115,
             "column" : 31,
             "source_fragment" : "0x8847; ..."
           }
@@ -3929,7 +4686,7 @@
     },
     {
       "name" : "FabricEgress.egress_next.push_vlan",
-      "id" : 55,
+      "id" : 64,
       "runtime_data" : [],
       "primitives" : [
         {
@@ -3999,7 +4756,7 @@
           ],
           "source_info" : {
             "filename" : "include/control/../define.p4",
-            "line" : 111,
+            "line" : 114,
             "column" : 31,
             "source_fragment" : "0x8100; ..."
           }
@@ -4027,7 +4784,7 @@
     },
     {
       "name" : "FabricEgress.egress_next.pop_vlan",
-      "id" : 56,
+      "id" : 65,
       "runtime_data" : [],
       "primitives" : [
         {
@@ -4048,8 +4805,8 @@
       ]
     },
     {
-      "name" : "act_19",
-      "id" : 57,
+      "name" : "act_22",
+      "id" : 66,
       "runtime_data" : [],
       "primitives" : [
         {
@@ -4065,8 +4822,8 @@
       ]
     },
     {
-      "name" : "act_20",
-      "id" : 58,
+      "name" : "act_23",
+      "id" : 67,
       "runtime_data" : [],
       "primitives" : [
         {
@@ -4116,8 +4873,8 @@
       ]
     },
     {
-      "name" : "act_21",
-      "id" : 59,
+      "name" : "act_24",
+      "id" : 68,
       "runtime_data" : [],
       "primitives" : [
         {
@@ -4138,8 +4895,8 @@
       ]
     },
     {
-      "name" : "act_22",
-      "id" : 60,
+      "name" : "act_25",
+      "id" : 69,
       "runtime_data" : [],
       "primitives" : [
         {
@@ -4168,8 +4925,8 @@
       ]
     },
     {
-      "name" : "act_23",
-      "id" : 61,
+      "name" : "act_26",
+      "id" : 70,
       "runtime_data" : [],
       "primitives" : [
         {
@@ -4198,8 +4955,8 @@
       ]
     },
     {
-      "name" : "act_24",
-      "id" : 62,
+      "name" : "act_27",
+      "id" : 71,
       "runtime_data" : [],
       "primitives" : [
         {
@@ -4220,8 +4977,8 @@
       ]
     },
     {
-      "name" : "act_25",
-      "id" : 63,
+      "name" : "act_28",
+      "id" : 72,
       "runtime_data" : [],
       "primitives" : [
         {
@@ -4269,8 +5026,8 @@
       ]
     },
     {
-      "name" : "act_26",
-      "id" : 64,
+      "name" : "act_29",
+      "id" : 73,
       "runtime_data" : [],
       "primitives" : [
         {
@@ -4291,8 +5048,8 @@
       ]
     },
     {
-      "name" : "act_27",
-      "id" : 65,
+      "name" : "act_30",
+      "id" : 74,
       "runtime_data" : [],
       "primitives" : [
         {
@@ -4338,6 +5095,32 @@
           }
         }
       ]
+    },
+    {
+      "name" : "act_31",
+      "id" : 75,
+      "runtime_data" : [],
+      "primitives" : [
+        {
+          "op" : "count",
+          "parameters" : [
+            {
+              "type" : "counter_array",
+              "value" : "FabricEgress.spgw_egress.pdr_counter"
+            },
+            {
+              "type" : "field",
+              "value" : ["scalars", "fabric_metadata_t._spgw_ctr_id22"]
+            }
+          ],
+          "source_info" : {
+            "filename" : "include/spgw.p4",
+            "line" : 288,
+            "column" : 8,
+            "source_fragment" : "pdr_counter.count(fabric_meta.spgw.ctr_id)"
+          }
+        }
+      ]
     }
   ],
   "pipelines" : [
@@ -4368,14 +5151,14 @@
           "with_counters" : false,
           "support_timeout" : false,
           "direct_meters" : null,
-          "action_ids" : [32],
+          "action_ids" : [38],
           "actions" : ["act_0"],
           "base_default_next" : "node_3",
           "next_tables" : {
             "act_0" : "node_3"
           },
           "default_entry" : {
-            "action_id" : 32,
+            "action_id" : 38,
             "action_const" : true,
             "action_data" : [],
             "action_entry_const" : true
@@ -4386,7 +5169,7 @@
           "id" : 1,
           "source_info" : {
             "filename" : "include/spgw.p4",
-            "line" : 30,
+            "line" : 34,
             "column" : 32,
             "source_fragment" : "return"
           },
@@ -4397,14 +5180,14 @@
           "with_counters" : false,
           "support_timeout" : false,
           "direct_meters" : null,
-          "action_ids" : [31],
+          "action_ids" : [37],
           "actions" : ["act"],
           "base_default_next" : "node_5",
           "next_tables" : {
             "act" : "node_5"
           },
           "default_entry" : {
-            "action_id" : 31,
+            "action_id" : 37,
             "action_const" : true,
             "action_data" : [],
             "action_entry_const" : true
@@ -4415,7 +5198,7 @@
           "id" : 2,
           "source_info" : {
             "filename" : "include/spgw.p4",
-            "line" : 31,
+            "line" : 35,
             "column" : 18,
             "source_fragment" : "= ipv4; ..."
           },
@@ -4426,14 +5209,14 @@
           "with_counters" : false,
           "support_timeout" : false,
           "direct_meters" : null,
-          "action_ids" : [35],
+          "action_ids" : [41],
           "actions" : ["act_3"],
           "base_default_next" : "node_7",
           "next_tables" : {
             "act_3" : "node_7"
           },
           "default_entry" : {
-            "action_id" : 35,
+            "action_id" : 41,
             "action_const" : true,
             "action_data" : [],
             "action_entry_const" : true
@@ -4444,7 +5227,7 @@
           "id" : 3,
           "source_info" : {
             "filename" : "include/spgw.p4",
-            "line" : 35,
+            "line" : 39,
             "column" : 16,
             "source_fragment" : "="
           },
@@ -4455,14 +5238,14 @@
           "with_counters" : false,
           "support_timeout" : false,
           "direct_meters" : null,
-          "action_ids" : [33],
+          "action_ids" : [39],
           "actions" : ["act_1"],
           "base_default_next" : "node_10",
           "next_tables" : {
             "act_1" : "node_10"
           },
           "default_entry" : {
-            "action_id" : 33,
+            "action_id" : 39,
             "action_const" : true,
             "action_data" : [],
             "action_entry_const" : true
@@ -4473,7 +5256,7 @@
           "id" : 4,
           "source_info" : {
             "filename" : "include/spgw.p4",
-            "line" : 37,
+            "line" : 41,
             "column" : 12,
             "source_fragment" : "udp.setInvalid()"
           },
@@ -4484,14 +5267,14 @@
           "with_counters" : false,
           "support_timeout" : false,
           "direct_meters" : null,
-          "action_ids" : [34],
+          "action_ids" : [40],
           "actions" : ["act_2"],
           "base_default_next" : "node_10",
           "next_tables" : {
             "act_2" : "node_10"
           },
           "default_entry" : {
-            "action_id" : 34,
+            "action_id" : 40,
             "action_const" : true,
             "action_data" : [],
             "action_entry_const" : true
@@ -4513,14 +5296,14 @@
           "with_counters" : false,
           "support_timeout" : false,
           "direct_meters" : null,
-          "action_ids" : [36],
+          "action_ids" : [42],
           "actions" : ["act_4"],
           "base_default_next" : "node_12",
           "next_tables" : {
             "act_4" : "node_12"
           },
           "default_entry" : {
-            "action_id" : 36,
+            "action_id" : 42,
             "action_const" : true,
             "action_data" : [],
             "action_entry_const" : true
@@ -4542,14 +5325,14 @@
           "with_counters" : false,
           "support_timeout" : false,
           "direct_meters" : null,
-          "action_ids" : [37],
+          "action_ids" : [43],
           "actions" : ["act_5"],
           "base_default_next" : "node_14",
           "next_tables" : {
             "act_5" : "node_14"
           },
           "default_entry" : {
-            "action_id" : 37,
+            "action_id" : 43,
             "action_const" : true,
             "action_data" : [],
             "action_entry_const" : true
@@ -4571,14 +5354,14 @@
           "with_counters" : false,
           "support_timeout" : false,
           "direct_meters" : null,
-          "action_ids" : [38],
+          "action_ids" : [44],
           "actions" : ["act_6"],
           "base_default_next" : "FabricIngress.filtering.ingress_port_vlan",
           "next_tables" : {
             "act_6" : "FabricIngress.filtering.ingress_port_vlan"
           },
           "default_entry" : {
-            "action_id" : 38,
+            "action_id" : 44,
             "action_const" : true,
             "action_data" : [],
             "action_entry_const" : true
@@ -4619,7 +5402,7 @@
           "with_counters" : true,
           "support_timeout" : false,
           "direct_meters" : null,
-          "action_ids" : [11, 12, 13],
+          "action_ids" : [17, 18, 19],
           "actions" : ["FabricIngress.filtering.deny", "FabricIngress.filtering.permit", "FabricIngress.filtering.permit_with_internal_vlan"],
           "base_default_next" : "FabricIngress.filtering.fwd_classifier",
           "next_tables" : {
@@ -4628,7 +5411,7 @@
             "FabricIngress.filtering.permit_with_internal_vlan" : "FabricIngress.filtering.fwd_classifier"
           },
           "default_entry" : {
-            "action_id" : 11,
+            "action_id" : 17,
             "action_const" : true,
             "action_data" : [],
             "action_entry_const" : true
@@ -4675,14 +5458,14 @@
           "with_counters" : true,
           "support_timeout" : false,
           "direct_meters" : null,
-          "action_ids" : [14],
+          "action_ids" : [20],
           "actions" : ["FabricIngress.filtering.set_forwarding_type"],
           "base_default_next" : "tbl_act_7",
           "next_tables" : {
             "FabricIngress.filtering.set_forwarding_type" : "tbl_act_7"
           },
           "default_entry" : {
-            "action_id" : 14,
+            "action_id" : 20,
             "action_const" : true,
             "action_data" : ["0x0"],
             "action_entry_const" : true
@@ -4698,27 +5481,27 @@
           "with_counters" : false,
           "support_timeout" : false,
           "direct_meters" : null,
-          "action_ids" : [47],
+          "action_ids" : [53],
           "actions" : ["act_15"],
           "base_default_next" : "node_19",
           "next_tables" : {
             "act_15" : "node_19"
           },
           "default_entry" : {
-            "action_id" : 47,
+            "action_id" : 53,
             "action_const" : true,
             "action_data" : [],
             "action_entry_const" : true
           }
         },
         {
-          "name" : "FabricIngress.spgw_ingress.s1u_filter_table",
+          "name" : "FabricIngress.spgw_ingress.uplink_filter_table",
           "id" : 11,
           "source_info" : {
             "filename" : "include/spgw.p4",
-            "line" : 83,
+            "line" : 84,
             "column" : 10,
-            "source_fragment" : "s1u_filter_table"
+            "source_fragment" : "uplink_filter_table"
           },
           "key" : [
             {
@@ -4758,14 +5541,14 @@
           "with_counters" : false,
           "support_timeout" : false,
           "direct_meters" : null,
-          "action_ids" : [39],
+          "action_ids" : [45],
           "actions" : ["act_7"],
           "base_default_next" : "node_23",
           "next_tables" : {
             "act_7" : "node_23"
           },
           "default_entry" : {
-            "action_id" : 39,
+            "action_id" : 45,
             "action_const" : true,
             "action_data" : [],
             "action_entry_const" : true
@@ -4781,14 +5564,14 @@
           "with_counters" : false,
           "support_timeout" : false,
           "direct_meters" : null,
-          "action_ids" : [40],
+          "action_ids" : [46],
           "actions" : ["act_8"],
           "base_default_next" : "node_23",
           "next_tables" : {
             "act_8" : "node_23"
           },
           "default_entry" : {
-            "action_id" : 40,
+            "action_id" : 46,
             "action_const" : true,
             "action_data" : [],
             "action_entry_const" : true
@@ -4799,7 +5582,7 @@
           "id" : 14,
           "source_info" : {
             "filename" : "include/spgw.p4",
-            "line" : 149,
+            "line" : 187,
             "column" : 16,
             "source_fragment" : "mark_to_drop(standard_metadata)"
           },
@@ -4810,14 +5593,14 @@
           "with_counters" : false,
           "support_timeout" : false,
           "direct_meters" : null,
-          "action_ids" : [41],
+          "action_ids" : [47],
           "actions" : ["act_9"],
           "base_default_next" : "tbl_act_11",
           "next_tables" : {
             "act_9" : "tbl_act_11"
           },
           "default_entry" : {
-            "action_id" : 41,
+            "action_id" : 47,
             "action_const" : true,
             "action_data" : [],
             "action_entry_const" : true
@@ -4828,7 +5611,7 @@
           "id" : 15,
           "source_info" : {
             "filename" : "include/spgw.p4",
-            "line" : 151,
+            "line" : 189,
             "column" : 39,
             "source_fragment" : "="
           },
@@ -4839,14 +5622,14 @@
           "with_counters" : false,
           "support_timeout" : false,
           "direct_meters" : null,
-          "action_ids" : [42],
+          "action_ids" : [48],
           "actions" : ["act_10"],
           "base_default_next" : "tbl_spgw_ingress_gtpu_decap",
           "next_tables" : {
             "act_10" : "tbl_spgw_ingress_gtpu_decap"
           },
           "default_entry" : {
-            "action_id" : 42,
+            "action_id" : 48,
             "action_const" : true,
             "action_data" : [],
             "action_entry_const" : true
@@ -4857,7 +5640,7 @@
           "id" : 16,
           "source_info" : {
             "filename" : "include/spgw.p4",
-            "line" : 152,
+            "line" : 190,
             "column" : 12,
             "source_fragment" : "gtpu_decap()"
           },
@@ -4868,44 +5651,44 @@
           "with_counters" : false,
           "support_timeout" : false,
           "direct_meters" : null,
-          "action_ids" : [9],
+          "action_ids" : [11],
           "actions" : ["FabricIngress.spgw_ingress.gtpu_decap"],
           "base_default_next" : "node_33",
           "next_tables" : {
             "FabricIngress.spgw_ingress.gtpu_decap" : "node_33"
           },
           "default_entry" : {
-            "action_id" : 9,
+            "action_id" : 11,
             "action_const" : true,
             "action_data" : [],
             "action_entry_const" : true
           }
         },
         {
-          "name" : "FabricIngress.spgw_ingress.dl_sess_lookup",
+          "name" : "FabricIngress.spgw_ingress.downlink_filter_table",
           "id" : 17,
           "source_info" : {
             "filename" : "include/spgw.p4",
-            "line" : 70,
+            "line" : 73,
             "column" : 10,
-            "source_fragment" : "dl_sess_lookup"
+            "source_fragment" : "downlink_filter_table"
           },
           "key" : [
             {
-              "match_type" : "exact",
-              "name" : "ipv4_dst",
+              "match_type" : "lpm",
+              "name" : "ipv4_prefix",
               "target" : ["ipv4", "dst_addr"],
               "mask" : null
             }
           ],
-          "match_type" : "exact",
+          "match_type" : "lpm",
           "type" : "simple",
           "max_size" : 1024,
-          "with_counters" : true,
+          "with_counters" : false,
           "support_timeout" : false,
           "direct_meters" : null,
-          "action_ids" : [10, 0],
-          "actions" : ["FabricIngress.spgw_ingress.set_dl_sess_info", "nop"],
+          "action_ids" : [0],
+          "actions" : ["nop"],
           "base_default_next" : null,
           "next_tables" : {
             "__HIT__" : "tbl_act_12",
@@ -4928,14 +5711,14 @@
           "with_counters" : false,
           "support_timeout" : false,
           "direct_meters" : null,
-          "action_ids" : [43],
+          "action_ids" : [49],
           "actions" : ["act_11"],
           "base_default_next" : "node_30",
           "next_tables" : {
             "act_11" : "node_30"
           },
           "default_entry" : {
-            "action_id" : 43,
+            "action_id" : 49,
             "action_const" : true,
             "action_data" : [],
             "action_entry_const" : true
@@ -4951,14 +5734,14 @@
           "with_counters" : false,
           "support_timeout" : false,
           "direct_meters" : null,
-          "action_ids" : [44],
+          "action_ids" : [50],
           "actions" : ["act_12"],
           "base_default_next" : "node_30",
           "next_tables" : {
             "act_12" : "node_30"
           },
           "default_entry" : {
-            "action_id" : 44,
+            "action_id" : 50,
             "action_const" : true,
             "action_data" : [],
             "action_entry_const" : true
@@ -4969,7 +5752,7 @@
           "id" : 20,
           "source_info" : {
             "filename" : "include/spgw.p4",
-            "line" : 154,
+            "line" : 192,
             "column" : 39,
             "source_fragment" : "="
           },
@@ -4980,14 +5763,14 @@
           "with_counters" : false,
           "support_timeout" : false,
           "direct_meters" : null,
-          "action_ids" : [45],
+          "action_ids" : [51],
           "actions" : ["act_13"],
           "base_default_next" : "node_33",
           "next_tables" : {
             "act_13" : "node_33"
           },
           "default_entry" : {
-            "action_id" : 45,
+            "action_id" : 51,
             "action_const" : true,
             "action_data" : [],
             "action_entry_const" : true
@@ -4998,7 +5781,7 @@
           "id" : 21,
           "source_info" : {
             "filename" : "include/spgw.p4",
-            "line" : 156,
+            "line" : 194,
             "column" : 39,
             "source_fragment" : "= SPGW_DIR_UNKNOWN; ..."
           },
@@ -5009,25 +5792,313 @@
           "with_counters" : false,
           "support_timeout" : false,
           "direct_meters" : null,
-          "action_ids" : [46],
+          "action_ids" : [52],
           "actions" : ["act_14"],
           "base_default_next" : "node_33",
           "next_tables" : {
             "act_14" : "node_33"
           },
           "default_entry" : {
-            "action_id" : 46,
+            "action_id" : 52,
             "action_const" : true,
             "action_data" : [],
             "action_entry_const" : true
           }
         },
         {
-          "name" : "tbl_act_16",
+          "name" : "FabricIngress.spgw_ingress.uplink_pdr_lookup",
           "id" : 22,
           "source_info" : {
             "filename" : "include/spgw.p4",
-            "line" : 175,
+            "line" : 111,
+            "column" : 10,
+            "source_fragment" : "uplink_pdr_lookup"
+          },
+          "key" : [
+            {
+              "match_type" : "exact",
+              "name" : "tunnel_ipv4_dst",
+              "target" : ["scalars", "fabric_metadata_t._spgw_tunnel_dst_addr21"],
+              "mask" : null
+            },
+            {
+              "match_type" : "exact",
+              "name" : "teid",
+              "target" : ["scalars", "fabric_metadata_t._spgw_teid19"],
+              "mask" : null
+            },
+            {
+              "match_type" : "exact",
+              "name" : "ue_addr",
+              "target" : ["ipv4", "src_addr"],
+              "mask" : null
+            }
+          ],
+          "match_type" : "exact",
+          "type" : "simple",
+          "max_size" : 1024,
+          "with_counters" : false,
+          "support_timeout" : false,
+          "direct_meters" : null,
+          "action_ids" : [13, 10],
+          "actions" : ["FabricIngress.spgw_ingress.set_pdr_attributes", "NoAction"],
+          "base_default_next" : "node_39",
+          "next_tables" : {
+            "FabricIngress.spgw_ingress.set_pdr_attributes" : "node_39",
+            "NoAction" : "node_39"
+          },
+          "default_entry" : {
+            "action_id" : 10,
+            "action_const" : false,
+            "action_data" : [],
+            "action_entry_const" : false
+          }
+        },
+        {
+          "name" : "FabricIngress.spgw_ingress.downlink_pdr_lookup",
+          "id" : 23,
+          "source_info" : {
+            "filename" : "include/spgw.p4",
+            "line" : 103,
+            "column" : 10,
+            "source_fragment" : "downlink_pdr_lookup"
+          },
+          "key" : [
+            {
+              "match_type" : "exact",
+              "name" : "ue_addr",
+              "target" : ["ipv4", "dst_addr"],
+              "mask" : null
+            }
+          ],
+          "match_type" : "exact",
+          "type" : "simple",
+          "max_size" : 1024,
+          "with_counters" : false,
+          "support_timeout" : false,
+          "direct_meters" : null,
+          "action_ids" : [12, 9],
+          "actions" : ["FabricIngress.spgw_ingress.set_pdr_attributes", "NoAction"],
+          "base_default_next" : "node_39",
+          "next_tables" : {
+            "FabricIngress.spgw_ingress.set_pdr_attributes" : "node_39",
+            "NoAction" : "node_39"
+          },
+          "default_entry" : {
+            "action_id" : 9,
+            "action_const" : false,
+            "action_data" : [],
+            "action_entry_const" : false
+          }
+        },
+        {
+          "name" : "tbl_act_16",
+          "id" : 24,
+          "source_info" : {
+            "filename" : "include/spgw.p4",
+            "line" : 206,
+            "column" : 12,
+            "source_fragment" : "return"
+          },
+          "key" : [],
+          "match_type" : "exact",
+          "type" : "simple",
+          "max_size" : 1024,
+          "with_counters" : false,
+          "support_timeout" : false,
+          "direct_meters" : null,
+          "action_ids" : [54],
+          "actions" : ["act_16"],
+          "base_default_next" : "node_39",
+          "next_tables" : {
+            "act_16" : "node_39"
+          },
+          "default_entry" : {
+            "action_id" : 54,
+            "action_const" : true,
+            "action_data" : [],
+            "action_entry_const" : true
+          }
+        },
+        {
+          "name" : "FabricIngress.spgw_ingress.flexible_pdr_lookup",
+          "id" : 25,
+          "source_info" : {
+            "filename" : "include/spgw.p4",
+            "line" : 123,
+            "column" : 10,
+            "source_fragment" : "flexible_pdr_lookup"
+          },
+          "key" : [
+            {
+              "match_type" : "ternary",
+              "name" : "spgw_direction",
+              "target" : ["scalars", "fabric_metadata_t._spgw_direction17"],
+              "mask" : null
+            },
+            {
+              "match_type" : "ternary",
+              "name" : "tunnel_ipv4_dst",
+              "target" : ["scalars", "fabric_metadata_t._spgw_tunnel_dst_addr21"],
+              "mask" : null
+            },
+            {
+              "match_type" : "ternary",
+              "name" : "teid",
+              "target" : ["scalars", "fabric_metadata_t._spgw_teid19"],
+              "mask" : null
+            },
+            {
+              "match_type" : "ternary",
+              "name" : "ipv4_src",
+              "target" : ["ipv4", "src_addr"],
+              "mask" : null
+            },
+            {
+              "match_type" : "ternary",
+              "name" : "ipv4_dst",
+              "target" : ["ipv4", "dst_addr"],
+              "mask" : null
+            },
+            {
+              "match_type" : "ternary",
+              "name" : "ip_proto",
+              "target" : ["ipv4", "protocol"],
+              "mask" : null
+            },
+            {
+              "match_type" : "ternary",
+              "name" : "l4_sport",
+              "target" : ["scalars", "fabric_metadata_t._l4_sport13"],
+              "mask" : null
+            },
+            {
+              "match_type" : "ternary",
+              "name" : "l4_dport",
+              "target" : ["scalars", "fabric_metadata_t._l4_dport14"],
+              "mask" : null
+            }
+          ],
+          "match_type" : "ternary",
+          "type" : "simple",
+          "max_size" : 1024,
+          "with_counters" : false,
+          "support_timeout" : false,
+          "direct_meters" : null,
+          "action_ids" : [14],
+          "actions" : ["FabricIngress.spgw_ingress.set_pdr_attributes"],
+          "base_default_next" : "tbl_act_17",
+          "next_tables" : {
+            "FabricIngress.spgw_ingress.set_pdr_attributes" : "tbl_act_17"
+          },
+          "default_entry" : {
+            "action_id" : 14,
+            "action_const" : true,
+            "action_data" : ["0x0", "0x0"],
+            "action_entry_const" : true
+          }
+        },
+        {
+          "name" : "tbl_act_17",
+          "id" : 26,
+          "source_info" : {
+            "filename" : "include/spgw.p4",
+            "line" : 213,
+            "column" : 8,
+            "source_fragment" : "pdr_counter.count(fabric_meta.spgw.ctr_id)"
+          },
+          "key" : [],
+          "match_type" : "exact",
+          "type" : "simple",
+          "max_size" : 1024,
+          "with_counters" : false,
+          "support_timeout" : false,
+          "direct_meters" : null,
+          "action_ids" : [55],
+          "actions" : ["act_17"],
+          "base_default_next" : "FabricIngress.spgw_ingress.far_lookup",
+          "next_tables" : {
+            "act_17" : "FabricIngress.spgw_ingress.far_lookup"
+          },
+          "default_entry" : {
+            "action_id" : 55,
+            "action_const" : true,
+            "action_data" : [],
+            "action_entry_const" : true
+          }
+        },
+        {
+          "name" : "FabricIngress.spgw_ingress.far_lookup",
+          "id" : 27,
+          "source_info" : {
+            "filename" : "include/spgw.p4",
+            "line" : 168,
+            "column" : 10,
+            "source_fragment" : "far_lookup"
+          },
+          "key" : [
+            {
+              "match_type" : "exact",
+              "name" : "far_id",
+              "target" : ["scalars", "fabric_metadata_t._spgw_far_id23"],
+              "mask" : null
+            }
+          ],
+          "match_type" : "exact",
+          "type" : "simple",
+          "max_size" : 1024,
+          "with_counters" : false,
+          "support_timeout" : false,
+          "direct_meters" : null,
+          "action_ids" : [15, 16],
+          "actions" : ["FabricIngress.spgw_ingress.load_normal_far_attributes", "FabricIngress.spgw_ingress.load_tunnel_far_attributes"],
+          "base_default_next" : "node_44",
+          "next_tables" : {
+            "FabricIngress.spgw_ingress.load_normal_far_attributes" : "node_44",
+            "FabricIngress.spgw_ingress.load_tunnel_far_attributes" : "node_44"
+          },
+          "default_entry" : {
+            "action_id" : 15,
+            "action_const" : true,
+            "action_data" : ["0x1", "0x0"],
+            "action_entry_const" : true
+          }
+        },
+        {
+          "name" : "tbl_act_18",
+          "id" : 28,
+          "source_info" : {
+            "filename" : "include/spgw.p4",
+            "line" : 223,
+            "column" : 40,
+            "source_fragment" : "= true; ..."
+          },
+          "key" : [],
+          "match_type" : "exact",
+          "type" : "simple",
+          "max_size" : 1024,
+          "with_counters" : false,
+          "support_timeout" : false,
+          "direct_meters" : null,
+          "action_ids" : [56],
+          "actions" : ["act_18"],
+          "base_default_next" : "tbl_act_19",
+          "next_tables" : {
+            "act_18" : "tbl_act_19"
+          },
+          "default_entry" : {
+            "action_id" : 56,
+            "action_const" : true,
+            "action_data" : [],
+            "action_entry_const" : true
+          }
+        },
+        {
+          "name" : "tbl_act_19",
+          "id" : 29,
+          "source_info" : {
+            "filename" : "include/spgw.p4",
+            "line" : 232,
             "column" : 34,
             "source_fragment" : "="
           },
@@ -5038,14 +6109,14 @@
           "with_counters" : false,
           "support_timeout" : false,
           "direct_meters" : null,
-          "action_ids" : [48],
-          "actions" : ["act_16"],
-          "base_default_next" : "node_35",
+          "action_ids" : [57],
+          "actions" : ["act_19"],
+          "base_default_next" : "node_47",
           "next_tables" : {
-            "act_16" : "node_35"
+            "act_19" : "node_47"
           },
           "default_entry" : {
-            "action_id" : 48,
+            "action_id" : 57,
             "action_const" : true,
             "action_data" : [],
             "action_entry_const" : true
@@ -5053,7 +6124,7 @@
         },
         {
           "name" : "FabricIngress.forwarding.bridging",
-          "id" : 23,
+          "id" : 30,
           "source_info" : {
             "filename" : "include/control/forwarding.p4",
             "line" : 46,
@@ -5080,7 +6151,7 @@
           "with_counters" : true,
           "support_timeout" : false,
           "direct_meters" : null,
-          "action_ids" : [15, 2],
+          "action_ids" : [21, 2],
           "actions" : ["FabricIngress.forwarding.set_next_id_bridging", "nop"],
           "base_default_next" : "FabricIngress.acl.acl",
           "next_tables" : {
@@ -5096,7 +6167,7 @@
         },
         {
           "name" : "FabricIngress.forwarding.mpls",
-          "id" : 24,
+          "id" : 31,
           "source_info" : {
             "filename" : "include/control/forwarding.p4",
             "line" : 71,
@@ -5117,7 +6188,7 @@
           "with_counters" : true,
           "support_timeout" : false,
           "direct_meters" : null,
-          "action_ids" : [16, 3],
+          "action_ids" : [22, 3],
           "actions" : ["FabricIngress.forwarding.pop_mpls_and_next", "nop"],
           "base_default_next" : "FabricIngress.acl.acl",
           "next_tables" : {
@@ -5133,7 +6204,7 @@
         },
         {
           "name" : "FabricIngress.forwarding.routing_v4",
-          "id" : 25,
+          "id" : 32,
           "source_info" : {
             "filename" : "include/control/forwarding.p4",
             "line" : 108,
@@ -5144,7 +6215,7 @@
             {
               "match_type" : "lpm",
               "name" : "ipv4_dst",
-              "target" : ["ipv4", "dst_addr"],
+              "target" : ["scalars", "fabric_metadata_t._ipv4_dst_addr16"],
               "mask" : null
             }
           ],
@@ -5154,7 +6225,7 @@
           "with_counters" : false,
           "support_timeout" : false,
           "direct_meters" : null,
-          "action_ids" : [17, 18, 4],
+          "action_ids" : [23, 24, 4],
           "actions" : ["FabricIngress.forwarding.set_next_id_routing_v4", "FabricIngress.forwarding.nop_routing_v4", "nop"],
           "base_default_next" : "FabricIngress.acl.acl",
           "next_tables" : {
@@ -5171,7 +6242,7 @@
         },
         {
           "name" : "FabricIngress.acl.acl",
-          "id" : 26,
+          "id" : 33,
           "source_info" : {
             "filename" : "include/control/acl.p4",
             "line" : 60,
@@ -5258,18 +6329,18 @@
           "with_counters" : true,
           "support_timeout" : false,
           "direct_meters" : null,
-          "action_ids" : [19, 20, 21, 22, 23],
+          "action_ids" : [25, 26, 27, 28, 29],
           "actions" : ["FabricIngress.acl.set_next_id_acl", "FabricIngress.acl.punt_to_cpu", "FabricIngress.acl.set_clone_session_id", "FabricIngress.acl.drop", "FabricIngress.acl.nop_acl"],
-          "base_default_next" : "node_43",
+          "base_default_next" : "node_55",
           "next_tables" : {
-            "FabricIngress.acl.set_next_id_acl" : "node_43",
-            "FabricIngress.acl.punt_to_cpu" : "node_43",
-            "FabricIngress.acl.set_clone_session_id" : "node_43",
-            "FabricIngress.acl.drop" : "node_43",
-            "FabricIngress.acl.nop_acl" : "node_43"
+            "FabricIngress.acl.set_next_id_acl" : "node_55",
+            "FabricIngress.acl.punt_to_cpu" : "node_55",
+            "FabricIngress.acl.set_clone_session_id" : "node_55",
+            "FabricIngress.acl.drop" : "node_55",
+            "FabricIngress.acl.nop_acl" : "node_55"
           },
           "default_entry" : {
-            "action_id" : 23,
+            "action_id" : 29,
             "action_const" : true,
             "action_data" : [],
             "action_entry_const" : true
@@ -5277,7 +6348,7 @@
         },
         {
           "name" : "FabricIngress.next.xconnect",
-          "id" : 27,
+          "id" : 34,
           "source_info" : {
             "filename" : "include/control/next.p4",
             "line" : 119,
@@ -5304,7 +6375,7 @@
           "with_counters" : true,
           "support_timeout" : false,
           "direct_meters" : null,
-          "action_ids" : [25, 26, 6],
+          "action_ids" : [31, 32, 6],
           "actions" : ["FabricIngress.next.output_xconnect", "FabricIngress.next.set_next_id_xconnect", "nop"],
           "base_default_next" : "FabricIngress.next.hashed",
           "next_tables" : {
@@ -5321,7 +6392,7 @@
         },
         {
           "name" : "FabricIngress.next.hashed",
-          "id" : 28,
+          "id" : 35,
           "source_info" : {
             "filename" : "include/control/next.p4",
             "line" : 202,
@@ -5343,7 +6414,7 @@
           "with_counters" : true,
           "support_timeout" : false,
           "direct_meters" : null,
-          "action_ids" : [27, 28, 29, 7],
+          "action_ids" : [33, 34, 35, 7],
           "actions" : ["FabricIngress.next.output_hashed", "FabricIngress.next.routing_hashed", "FabricIngress.next.mpls_routing_hashed", "nop"],
           "base_default_next" : "FabricIngress.next.multicast",
           "next_tables" : {
@@ -5355,7 +6426,7 @@
         },
         {
           "name" : "FabricIngress.next.multicast",
-          "id" : 29,
+          "id" : 36,
           "source_info" : {
             "filename" : "include/control/next.p4",
             "line" : 236,
@@ -5376,7 +6447,7 @@
           "with_counters" : true,
           "support_timeout" : false,
           "direct_meters" : null,
-          "action_ids" : [30, 8],
+          "action_ids" : [36, 8],
           "actions" : ["FabricIngress.next.set_mcast_group_id", "nop"],
           "base_default_next" : "FabricIngress.next.next_vlan",
           "next_tables" : {
@@ -5392,7 +6463,7 @@
         },
         {
           "name" : "FabricIngress.next.next_vlan",
-          "id" : 30,
+          "id" : 37,
           "source_info" : {
             "filename" : "include/control/next.p4",
             "line" : 86,
@@ -5413,12 +6484,12 @@
           "with_counters" : true,
           "support_timeout" : false,
           "direct_meters" : null,
-          "action_ids" : [24, 5],
+          "action_ids" : [30, 5],
           "actions" : ["FabricIngress.next.set_vlan", "nop"],
-          "base_default_next" : "node_48",
+          "base_default_next" : "node_60",
           "next_tables" : {
-            "FabricIngress.next.set_vlan" : "node_48",
-            "nop" : "node_48"
+            "FabricIngress.next.set_vlan" : "node_60",
+            "nop" : "node_60"
           },
           "default_entry" : {
             "action_id" : 5,
@@ -5428,8 +6499,8 @@
           }
         },
         {
-          "name" : "tbl_act_17",
-          "id" : 31,
+          "name" : "tbl_act_20",
+          "id" : 38,
           "source_info" : {
             "filename" : "include/control/port_counter.p4",
             "line" : 31,
@@ -5443,22 +6514,22 @@
           "with_counters" : false,
           "support_timeout" : false,
           "direct_meters" : null,
-          "action_ids" : [49],
-          "actions" : ["act_17"],
-          "base_default_next" : "node_50",
+          "action_ids" : [58],
+          "actions" : ["act_20"],
+          "base_default_next" : "node_62",
           "next_tables" : {
-            "act_17" : "node_50"
+            "act_20" : "node_62"
           },
           "default_entry" : {
-            "action_id" : 49,
+            "action_id" : 58,
             "action_const" : true,
             "action_data" : [],
             "action_entry_const" : true
           }
         },
         {
-          "name" : "tbl_act_18",
-          "id" : 32,
+          "name" : "tbl_act_21",
+          "id" : 39,
           "source_info" : {
             "filename" : "include/control/port_counter.p4",
             "line" : 34,
@@ -5472,14 +6543,14 @@
           "with_counters" : false,
           "support_timeout" : false,
           "direct_meters" : null,
-          "action_ids" : [50],
-          "actions" : ["act_18"],
+          "action_ids" : [59],
+          "actions" : ["act_21"],
           "base_default_next" : null,
           "next_tables" : {
-            "act_18" : null
+            "act_21" : null
           },
           "default_entry" : {
-            "action_id" : 50,
+            "action_id" : 59,
             "action_const" : true,
             "action_data" : [],
             "action_entry_const" : true
@@ -5502,11 +6573,11 @@
             "input" : [
               {
                 "type" : "field",
-                "value" : ["ipv4", "dst_addr"]
+                "value" : ["scalars", "fabric_metadata_t._ipv4_src_addr15"]
               },
               {
                 "type" : "field",
-                "value" : ["ipv4", "src_addr"]
+                "value" : ["scalars", "fabric_metadata_t._ipv4_dst_addr16"]
               },
               {
                 "type" : "field",
@@ -5530,7 +6601,7 @@
           "id" : 0,
           "source_info" : {
             "filename" : "include/spgw.p4",
-            "line" : 30,
+            "line" : 34,
             "column" : 12,
             "source_fragment" : "! is_gtpu_encapped"
           },
@@ -5584,7 +6655,7 @@
           "id" : 2,
           "source_info" : {
             "filename" : "include/spgw.p4",
-            "line" : 34,
+            "line" : 38,
             "column" : 12,
             "source_fragment" : "inner_udp.isValid()"
           },
@@ -5683,7 +6754,7 @@
           "id" : 6,
           "source_info" : {
             "filename" : "include/spgw.p4",
-            "line" : 144,
+            "line" : 181,
             "column" : 12,
             "source_fragment" : "gtpu.isValid()"
           },
@@ -5698,17 +6769,17 @@
               }
             }
           },
-          "true_next" : "FabricIngress.spgw_ingress.s1u_filter_table",
-          "false_next" : "FabricIngress.spgw_ingress.dl_sess_lookup"
+          "true_next" : "FabricIngress.spgw_ingress.uplink_filter_table",
+          "false_next" : "FabricIngress.spgw_ingress.downlink_filter_table"
         },
         {
           "name" : "node_23",
           "id" : 7,
           "source_info" : {
             "filename" : "include/spgw.p4",
-            "line" : 148,
+            "line" : 185,
             "column" : 16,
-            "source_fragment" : "!s1u_filter_table.apply().hit"
+            "source_fragment" : "!uplink_filter_table.apply().hit"
           },
           "expression" : {
             "type" : "expression",
@@ -5769,13 +6840,155 @@
               }
             }
           },
-          "true_next" : "tbl_act_16",
-          "false_next" : "node_35"
+          "true_next" : "node_34",
+          "false_next" : "node_39"
         },
         {
-          "name" : "node_35",
+          "name" : "node_34",
           "id" : 10,
           "source_info" : {
+            "filename" : "include/spgw.p4",
+            "line" : 201,
+            "column" : 12,
+            "source_fragment" : "fabric_meta.spgw.direction == SPGW_DIR_UPLINK"
+          },
+          "expression" : {
+            "type" : "expression",
+            "value" : {
+              "op" : "==",
+              "left" : {
+                "type" : "field",
+                "value" : ["scalars", "fabric_metadata_t._spgw_direction17"]
+              },
+              "right" : {
+                "type" : "hexstr",
+                "value" : "0x01"
+              }
+            }
+          },
+          "true_next" : "FabricIngress.spgw_ingress.uplink_pdr_lookup",
+          "false_next" : "node_36"
+        },
+        {
+          "name" : "node_36",
+          "id" : 11,
+          "source_info" : {
+            "filename" : "include/spgw.p4",
+            "line" : 203,
+            "column" : 19,
+            "source_fragment" : "fabric_meta.spgw.direction == SPGW_DIR_DOWNLINK"
+          },
+          "expression" : {
+            "type" : "expression",
+            "value" : {
+              "op" : "==",
+              "left" : {
+                "type" : "field",
+                "value" : ["scalars", "fabric_metadata_t._spgw_direction17"]
+              },
+              "right" : {
+                "type" : "hexstr",
+                "value" : "0x02"
+              }
+            }
+          },
+          "true_next" : "FabricIngress.spgw_ingress.downlink_pdr_lookup",
+          "false_next" : "tbl_act_16"
+        },
+        {
+          "name" : "node_39",
+          "id" : 12,
+          "expression" : {
+            "type" : "expression",
+            "value" : {
+              "op" : "not",
+              "left" : null,
+              "right" : {
+                "type" : "expression",
+                "value" : {
+                  "op" : "d2b",
+                  "left" : null,
+                  "right" : {
+                    "type" : "field",
+                    "value" : ["scalars", "spgw_ingress_hasReturned"]
+                  }
+                }
+              }
+            }
+          },
+          "true_next" : "node_40",
+          "false_next" : "node_47"
+        },
+        {
+          "name" : "node_40",
+          "id" : 13,
+          "source_info" : {
+            "filename" : "include/spgw.p4",
+            "line" : 209,
+            "column" : 12,
+            "source_fragment" : "fabric_meta.spgw.pdr_hit == false"
+          },
+          "expression" : {
+            "type" : "expression",
+            "value" : {
+              "op" : "==",
+              "left" : {
+                "type" : "expression",
+                "value" : {
+                  "op" : "d2b",
+                  "left" : null,
+                  "right" : {
+                    "type" : "field",
+                    "value" : ["scalars", "fabric_metadata_t._spgw_pdr_hit24"]
+                  }
+                }
+              },
+              "right" : {
+                "type" : "bool",
+                "value" : false
+              }
+            }
+          },
+          "true_next" : "FabricIngress.spgw_ingress.flexible_pdr_lookup",
+          "false_next" : "tbl_act_17"
+        },
+        {
+          "name" : "node_44",
+          "id" : 14,
+          "source_info" : {
+            "filename" : "include/spgw.p4",
+            "line" : 220,
+            "column" : 12,
+            "source_fragment" : "fabric_meta.spgw.far_dropped == true"
+          },
+          "expression" : {
+            "type" : "expression",
+            "value" : {
+              "op" : "==",
+              "left" : {
+                "type" : "expression",
+                "value" : {
+                  "op" : "d2b",
+                  "left" : null,
+                  "right" : {
+                    "type" : "field",
+                    "value" : ["scalars", "fabric_metadata_t._spgw_far_dropped25"]
+                  }
+                }
+              },
+              "right" : {
+                "type" : "bool",
+                "value" : true
+              }
+            }
+          },
+          "true_next" : "tbl_act_18",
+          "false_next" : "tbl_act_19"
+        },
+        {
+          "name" : "node_47",
+          "id" : 15,
+          "source_info" : {
             "filename" : "fabric.p4",
             "line" : 71,
             "column" : 12,
@@ -5802,12 +7015,12 @@
               }
             }
           },
-          "true_next" : "node_36",
+          "true_next" : "node_48",
           "false_next" : "FabricIngress.acl.acl"
         },
         {
-          "name" : "node_36",
-          "id" : 11,
+          "name" : "node_48",
+          "id" : 16,
           "source_info" : {
             "filename" : "include/control/forwarding.p4",
             "line" : 150,
@@ -5829,11 +7042,11 @@
             }
           },
           "true_next" : "FabricIngress.forwarding.bridging",
-          "false_next" : "node_38"
+          "false_next" : "node_50"
         },
         {
-          "name" : "node_38",
-          "id" : 12,
+          "name" : "node_50",
+          "id" : 17,
           "source_info" : {
             "filename" : "include/control/forwarding.p4",
             "line" : 151,
@@ -5855,11 +7068,11 @@
             }
           },
           "true_next" : "FabricIngress.forwarding.mpls",
-          "false_next" : "node_40"
+          "false_next" : "node_52"
         },
         {
-          "name" : "node_40",
-          "id" : 13,
+          "name" : "node_52",
+          "id" : 18,
           "source_info" : {
             "filename" : "include/control/forwarding.p4",
             "line" : 152,
@@ -5884,8 +7097,8 @@
           "false_next" : "FabricIngress.acl.acl"
         },
         {
-          "name" : "node_43",
-          "id" : 14,
+          "name" : "node_55",
+          "id" : 19,
           "source_info" : {
             "filename" : "fabric.p4",
             "line" : 75,
@@ -5917,8 +7130,8 @@
           "true_next" : "FabricIngress.next.xconnect"
         },
         {
-          "name" : "node_48",
-          "id" : 15,
+          "name" : "node_60",
+          "id" : 20,
           "source_info" : {
             "filename" : "include/control/port_counter.p4",
             "line" : 30,
@@ -5939,12 +7152,12 @@
               }
             }
           },
-          "true_next" : "tbl_act_17",
-          "false_next" : "node_50"
+          "true_next" : "tbl_act_20",
+          "false_next" : "node_62"
         },
         {
-          "name" : "node_50",
-          "id" : 16,
+          "name" : "node_62",
+          "id" : 21,
           "source_info" : {
             "filename" : "include/control/port_counter.p4",
             "line" : 33,
@@ -5966,7 +7179,7 @@
             }
           },
           "false_next" : null,
-          "true_next" : "tbl_act_18"
+          "true_next" : "tbl_act_21"
         }
       ]
     },
@@ -5979,11 +7192,11 @@
         "column" : 8,
         "source_fragment" : "FabricEgress"
       },
-      "init_table" : "node_54",
+      "init_table" : "node_66",
       "tables" : [
         {
-          "name" : "tbl_act_19",
-          "id" : 33,
+          "name" : "tbl_act_22",
+          "id" : 40,
           "source_info" : {
             "filename" : "include/control/packetio.p4",
             "line" : 41,
@@ -5997,22 +7210,22 @@
           "with_counters" : false,
           "support_timeout" : false,
           "direct_meters" : null,
-          "action_ids" : [57],
-          "actions" : ["act_19"],
-          "base_default_next" : "node_56",
+          "action_ids" : [66],
+          "actions" : ["act_22"],
+          "base_default_next" : "node_68",
           "next_tables" : {
-            "act_19" : "node_56"
+            "act_22" : "node_68"
           },
           "default_entry" : {
-            "action_id" : 57,
+            "action_id" : 66,
             "action_const" : true,
             "action_data" : [],
             "action_entry_const" : true
           }
         },
         {
-          "name" : "tbl_act_20",
-          "id" : 34,
+          "name" : "tbl_act_23",
+          "id" : 41,
           "source_info" : {
             "filename" : "include/control/packetio.p4",
             "line" : 44,
@@ -6026,22 +7239,22 @@
           "with_counters" : false,
           "support_timeout" : false,
           "direct_meters" : null,
-          "action_ids" : [58],
-          "actions" : ["act_20"],
-          "base_default_next" : "node_58",
+          "action_ids" : [67],
+          "actions" : ["act_23"],
+          "base_default_next" : "node_70",
           "next_tables" : {
-            "act_20" : "node_58"
+            "act_23" : "node_70"
           },
           "default_entry" : {
-            "action_id" : 58,
+            "action_id" : 67,
             "action_const" : true,
             "action_data" : [],
             "action_entry_const" : true
           }
         },
         {
-          "name" : "tbl_act_21",
-          "id" : 35,
+          "name" : "tbl_act_24",
+          "id" : 42,
           "source_info" : {
             "filename" : "include/control/next.p4",
             "line" : 337,
@@ -6055,14 +7268,14 @@
           "with_counters" : false,
           "support_timeout" : false,
           "direct_meters" : null,
-          "action_ids" : [59],
-          "actions" : ["act_21"],
-          "base_default_next" : "node_60",
+          "action_ids" : [68],
+          "actions" : ["act_24"],
+          "base_default_next" : "node_72",
           "next_tables" : {
-            "act_21" : "node_60"
+            "act_24" : "node_72"
           },
           "default_entry" : {
-            "action_id" : 59,
+            "action_id" : 68,
             "action_const" : true,
             "action_data" : [],
             "action_entry_const" : true
@@ -6070,7 +7283,7 @@
         },
         {
           "name" : "tbl_egress_next_pop_mpls_if_present",
-          "id" : 36,
+          "id" : 43,
           "source_info" : {
             "filename" : "include/control/next.p4",
             "line" : 341,
@@ -6084,14 +7297,14 @@
           "with_counters" : false,
           "support_timeout" : false,
           "direct_meters" : null,
-          "action_ids" : [53],
+          "action_ids" : [62],
           "actions" : ["FabricEgress.egress_next.pop_mpls_if_present"],
           "base_default_next" : "FabricEgress.egress_next.egress_vlan",
           "next_tables" : {
             "FabricEgress.egress_next.pop_mpls_if_present" : "FabricEgress.egress_next.egress_vlan"
           },
           "default_entry" : {
-            "action_id" : 53,
+            "action_id" : 62,
             "action_const" : true,
             "action_data" : [],
             "action_entry_const" : true
@@ -6099,7 +7312,7 @@
         },
         {
           "name" : "tbl_egress_next_set_mpls",
-          "id" : 37,
+          "id" : 44,
           "source_info" : {
             "filename" : "include/control/next.p4",
             "line" : 343,
@@ -6113,14 +7326,14 @@
           "with_counters" : false,
           "support_timeout" : false,
           "direct_meters" : null,
-          "action_ids" : [54],
+          "action_ids" : [63],
           "actions" : ["FabricEgress.egress_next.set_mpls"],
           "base_default_next" : "FabricEgress.egress_next.egress_vlan",
           "next_tables" : {
             "FabricEgress.egress_next.set_mpls" : "FabricEgress.egress_next.egress_vlan"
           },
           "default_entry" : {
-            "action_id" : 54,
+            "action_id" : 63,
             "action_const" : true,
             "action_data" : [],
             "action_entry_const" : true
@@ -6128,7 +7341,7 @@
         },
         {
           "name" : "FabricEgress.egress_next.egress_vlan",
-          "id" : 38,
+          "id" : 45,
           "source_info" : {
             "filename" : "include/control/next.p4",
             "line" : 320,
@@ -6155,35 +7368,12 @@
           "with_counters" : true,
           "support_timeout" : false,
           "direct_meters" : null,
-          "action_ids" : [56, 51],
+          "action_ids" : [65, 60],
           "actions" : ["FabricEgress.egress_next.pop_vlan", "nop"],
           "base_default_next" : null,
           "next_tables" : {
-            "__HIT__" : "tbl_act_22",
-            "__MISS__" : "tbl_act_23"
-          },
-          "default_entry" : {
-            "action_id" : 51,
-            "action_const" : true,
-            "action_data" : [],
-            "action_entry_const" : true
-          }
-        },
-        {
-          "name" : "tbl_act_22",
-          "id" : 39,
-          "key" : [],
-          "match_type" : "exact",
-          "type" : "simple",
-          "max_size" : 1024,
-          "with_counters" : false,
-          "support_timeout" : false,
-          "direct_meters" : null,
-          "action_ids" : [60],
-          "actions" : ["act_22"],
-          "base_default_next" : "node_67",
-          "next_tables" : {
-            "act_22" : "node_67"
+            "__HIT__" : "tbl_act_25",
+            "__MISS__" : "tbl_act_26"
           },
           "default_entry" : {
             "action_id" : 60,
@@ -6193,8 +7383,8 @@
           }
         },
         {
-          "name" : "tbl_act_23",
-          "id" : 40,
+          "name" : "tbl_act_25",
+          "id" : 46,
           "key" : [],
           "match_type" : "exact",
           "type" : "simple",
@@ -6202,14 +7392,37 @@
           "with_counters" : false,
           "support_timeout" : false,
           "direct_meters" : null,
-          "action_ids" : [61],
-          "actions" : ["act_23"],
-          "base_default_next" : "node_67",
+          "action_ids" : [69],
+          "actions" : ["act_25"],
+          "base_default_next" : "node_79",
           "next_tables" : {
-            "act_23" : "node_67"
+            "act_25" : "node_79"
           },
           "default_entry" : {
-            "action_id" : 61,
+            "action_id" : 69,
+            "action_const" : true,
+            "action_data" : [],
+            "action_entry_const" : true
+          }
+        },
+        {
+          "name" : "tbl_act_26",
+          "id" : 47,
+          "key" : [],
+          "match_type" : "exact",
+          "type" : "simple",
+          "max_size" : 1024,
+          "with_counters" : false,
+          "support_timeout" : false,
+          "direct_meters" : null,
+          "action_ids" : [70],
+          "actions" : ["act_26"],
+          "base_default_next" : "node_79",
+          "next_tables" : {
+            "act_26" : "node_79"
+          },
+          "default_entry" : {
+            "action_id" : 70,
             "action_const" : true,
             "action_data" : [],
             "action_entry_const" : true
@@ -6217,7 +7430,7 @@
         },
         {
           "name" : "tbl_egress_next_push_vlan",
-          "id" : 41,
+          "id" : 48,
           "source_info" : {
             "filename" : "include/control/next.p4",
             "line" : 360,
@@ -6231,22 +7444,22 @@
           "with_counters" : false,
           "support_timeout" : false,
           "direct_meters" : null,
-          "action_ids" : [55],
+          "action_ids" : [64],
           "actions" : ["FabricEgress.egress_next.push_vlan"],
-          "base_default_next" : "node_70",
+          "base_default_next" : "node_82",
           "next_tables" : {
-            "FabricEgress.egress_next.push_vlan" : "node_70"
+            "FabricEgress.egress_next.push_vlan" : "node_82"
           },
           "default_entry" : {
-            "action_id" : 55,
+            "action_id" : 64,
             "action_const" : true,
             "action_data" : [],
             "action_entry_const" : true
           }
         },
         {
-          "name" : "tbl_act_24",
-          "id" : 42,
+          "name" : "tbl_act_27",
+          "id" : 49,
           "source_info" : {
             "filename" : "include/control/next.p4",
             "line" : 369,
@@ -6260,22 +7473,22 @@
           "with_counters" : false,
           "support_timeout" : false,
           "direct_meters" : null,
-          "action_ids" : [63],
-          "actions" : ["act_25"],
-          "base_default_next" : "node_72",
+          "action_ids" : [72],
+          "actions" : ["act_28"],
+          "base_default_next" : "node_84",
           "next_tables" : {
-            "act_25" : "node_72"
+            "act_28" : "node_84"
           },
           "default_entry" : {
-            "action_id" : 63,
+            "action_id" : 72,
             "action_const" : true,
             "action_data" : [],
             "action_entry_const" : true
           }
         },
         {
-          "name" : "tbl_act_25",
-          "id" : 43,
+          "name" : "tbl_act_28",
+          "id" : 50,
           "source_info" : {
             "filename" : "include/control/next.p4",
             "line" : 370,
@@ -6289,22 +7502,22 @@
           "with_counters" : false,
           "support_timeout" : false,
           "direct_meters" : null,
-          "action_ids" : [62],
-          "actions" : ["act_24"],
-          "base_default_next" : "node_78",
+          "action_ids" : [71],
+          "actions" : ["act_27"],
+          "base_default_next" : "tbl_act_31",
           "next_tables" : {
-            "act_24" : "node_78"
+            "act_27" : "tbl_act_31"
           },
           "default_entry" : {
-            "action_id" : 62,
+            "action_id" : 71,
             "action_const" : true,
             "action_data" : [],
             "action_entry_const" : true
           }
         },
         {
-          "name" : "tbl_act_26",
-          "id" : 44,
+          "name" : "tbl_act_29",
+          "id" : 51,
           "source_info" : {
             "filename" : "include/control/next.p4",
             "line" : 373,
@@ -6318,22 +7531,22 @@
           "with_counters" : false,
           "support_timeout" : false,
           "direct_meters" : null,
-          "action_ids" : [65],
-          "actions" : ["act_27"],
-          "base_default_next" : "node_76",
+          "action_ids" : [74],
+          "actions" : ["act_30"],
+          "base_default_next" : "node_88",
           "next_tables" : {
-            "act_27" : "node_76"
+            "act_30" : "node_88"
           },
           "default_entry" : {
-            "action_id" : 65,
+            "action_id" : 74,
             "action_const" : true,
             "action_data" : [],
             "action_entry_const" : true
           }
         },
         {
-          "name" : "tbl_act_27",
-          "id" : 45,
+          "name" : "tbl_act_30",
+          "id" : 52,
           "source_info" : {
             "filename" : "include/control/next.p4",
             "line" : 374,
@@ -6347,14 +7560,43 @@
           "with_counters" : false,
           "support_timeout" : false,
           "direct_meters" : null,
-          "action_ids" : [64],
-          "actions" : ["act_26"],
-          "base_default_next" : "node_78",
+          "action_ids" : [73],
+          "actions" : ["act_29"],
+          "base_default_next" : "tbl_act_31",
           "next_tables" : {
-            "act_26" : "node_78"
+            "act_29" : "tbl_act_31"
           },
           "default_entry" : {
-            "action_id" : 64,
+            "action_id" : 73,
+            "action_const" : true,
+            "action_data" : [],
+            "action_entry_const" : true
+          }
+        },
+        {
+          "name" : "tbl_act_31",
+          "id" : 53,
+          "source_info" : {
+            "filename" : "include/spgw.p4",
+            "line" : 288,
+            "column" : 8,
+            "source_fragment" : "pdr_counter.count(fabric_meta.spgw.ctr_id)"
+          },
+          "key" : [],
+          "match_type" : "exact",
+          "type" : "simple",
+          "max_size" : 1024,
+          "with_counters" : false,
+          "support_timeout" : false,
+          "direct_meters" : null,
+          "action_ids" : [75],
+          "actions" : ["act_31"],
+          "base_default_next" : "node_91",
+          "next_tables" : {
+            "act_31" : "node_91"
+          },
+          "default_entry" : {
+            "action_id" : 75,
             "action_const" : true,
             "action_data" : [],
             "action_entry_const" : true
@@ -6362,10 +7604,10 @@
         },
         {
           "name" : "tbl_spgw_egress_gtpu_encap",
-          "id" : 46,
+          "id" : 54,
           "source_info" : {
             "filename" : "include/spgw.p4",
-            "line" : 228,
+            "line" : 291,
             "column" : 12,
             "source_fragment" : "gtpu_encap()"
           },
@@ -6376,14 +7618,14 @@
           "with_counters" : false,
           "support_timeout" : false,
           "direct_meters" : null,
-          "action_ids" : [52],
+          "action_ids" : [61],
           "actions" : ["FabricEgress.spgw_egress.gtpu_encap"],
           "base_default_next" : null,
           "next_tables" : {
             "FabricEgress.spgw_egress.gtpu_encap" : null
           },
           "default_entry" : {
-            "action_id" : 52,
+            "action_id" : 61,
             "action_const" : true,
             "action_data" : [],
             "action_entry_const" : true
@@ -6393,8 +7635,8 @@
       "action_profiles" : [],
       "conditionals" : [
         {
-          "name" : "node_54",
-          "id" : 17,
+          "name" : "node_66",
+          "id" : 22,
           "source_info" : {
             "filename" : "include/control/packetio.p4",
             "line" : 39,
@@ -6422,12 +7664,12 @@
               }
             }
           },
-          "true_next" : "tbl_act_19",
-          "false_next" : "node_56"
+          "true_next" : "tbl_act_22",
+          "false_next" : "node_68"
         },
         {
-          "name" : "node_56",
-          "id" : 18,
+          "name" : "node_68",
+          "id" : 23,
           "source_info" : {
             "filename" : "include/control/packetio.p4",
             "line" : 43,
@@ -6448,12 +7690,12 @@
               }
             }
           },
-          "true_next" : "tbl_act_20",
-          "false_next" : "node_58"
+          "true_next" : "tbl_act_23",
+          "false_next" : "node_70"
         },
         {
-          "name" : "node_58",
-          "id" : 19,
+          "name" : "node_70",
+          "id" : 24,
           "source_info" : {
             "filename" : "include/control/next.p4",
             "line" : 335,
@@ -6501,12 +7743,12 @@
               }
             }
           },
-          "true_next" : "tbl_act_21",
-          "false_next" : "node_60"
+          "true_next" : "tbl_act_24",
+          "false_next" : "node_72"
         },
         {
-          "name" : "node_60",
-          "id" : 20,
+          "name" : "node_72",
+          "id" : 25,
           "source_info" : {
             "filename" : "include/control/next.p4",
             "line" : 340,
@@ -6527,12 +7769,12 @@
               }
             }
           },
-          "true_next" : "node_61",
+          "true_next" : "node_73",
           "false_next" : "tbl_egress_next_set_mpls"
         },
         {
-          "name" : "node_61",
-          "id" : 21,
+          "name" : "node_73",
+          "id" : 26,
           "source_info" : {
             "filename" : "include/control/next.p4",
             "line" : 341,
@@ -6554,8 +7796,8 @@
           "false_next" : "FabricEgress.egress_next.egress_vlan"
         },
         {
-          "name" : "node_67",
-          "id" : 22,
+          "name" : "node_79",
+          "id" : 27,
           "source_info" : {
             "filename" : "include/control/next.p4",
             "line" : 357,
@@ -6580,12 +7822,12 @@
               }
             }
           },
-          "true_next" : "node_68",
-          "false_next" : "node_70"
+          "true_next" : "node_80",
+          "false_next" : "node_82"
         },
         {
-          "name" : "node_68",
-          "id" : 23,
+          "name" : "node_80",
+          "id" : 28,
           "source_info" : {
             "filename" : "include/control/next.p4",
             "line" : 359,
@@ -6607,11 +7849,11 @@
             }
           },
           "true_next" : "tbl_egress_next_push_vlan",
-          "false_next" : "node_70"
+          "false_next" : "node_82"
         },
         {
-          "name" : "node_70",
-          "id" : 24,
+          "name" : "node_82",
+          "id" : 29,
           "source_info" : {
             "filename" : "include/control/next.p4",
             "line" : 368,
@@ -6629,12 +7871,12 @@
               }
             }
           },
-          "true_next" : "tbl_act_24",
-          "false_next" : "node_74"
+          "true_next" : "tbl_act_27",
+          "false_next" : "node_86"
         },
         {
-          "name" : "node_72",
-          "id" : 25,
+          "name" : "node_84",
+          "id" : 30,
           "source_info" : {
             "filename" : "include/control/next.p4",
             "line" : 370,
@@ -6655,12 +7897,12 @@
               }
             }
           },
-          "true_next" : "tbl_act_25",
-          "false_next" : "node_78"
+          "true_next" : "tbl_act_28",
+          "false_next" : "tbl_act_31"
         },
         {
-          "name" : "node_74",
-          "id" : 26,
+          "name" : "node_86",
+          "id" : 31,
           "source_info" : {
             "filename" : "include/control/next.p4",
             "line" : 372,
@@ -6678,12 +7920,12 @@
               }
             }
           },
-          "true_next" : "tbl_act_26",
-          "false_next" : "node_78"
+          "true_next" : "tbl_act_29",
+          "false_next" : "tbl_act_31"
         },
         {
-          "name" : "node_76",
-          "id" : 27,
+          "name" : "node_88",
+          "id" : 32,
           "source_info" : {
             "filename" : "include/control/next.p4",
             "line" : 374,
@@ -6704,29 +7946,36 @@
               }
             }
           },
-          "true_next" : "tbl_act_27",
-          "false_next" : "node_78"
+          "true_next" : "tbl_act_30",
+          "false_next" : "tbl_act_31"
         },
         {
-          "name" : "node_78",
-          "id" : 28,
+          "name" : "node_91",
+          "id" : 33,
           "source_info" : {
             "filename" : "include/spgw.p4",
-            "line" : 227,
+            "line" : 290,
             "column" : 12,
-            "source_fragment" : "fabric_meta.spgw.direction == SPGW_DIR_DOWNLINK"
+            "source_fragment" : "fabric_meta.spgw.outer_header_creation == true"
           },
           "expression" : {
             "type" : "expression",
             "value" : {
               "op" : "==",
               "left" : {
-                "type" : "field",
-                "value" : ["scalars", "fabric_metadata_t._spgw_direction15"]
+                "type" : "expression",
+                "value" : {
+                  "op" : "d2b",
+                  "left" : null,
+                  "right" : {
+                    "type" : "field",
+                    "value" : ["scalars", "fabric_metadata_t._spgw_outer_header_creation27"]
+                  }
+                }
               },
               "right" : {
-                "type" : "hexstr",
-                "value" : "0x02"
+                "type" : "bool",
+                "value" : true
               }
             }
           },
@@ -6768,7 +8017,7 @@
       "id" : 1,
       "source_info" : {
         "filename" : "include/spgw.p4",
-        "line" : 243,
+        "line" : 306,
         "column" : 8,
         "source_fragment" : "update_checksum(gtpu_ipv4.isValid(), ..."
       },