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/include/header.p4 b/pipelines/fabric/impl/src/main/resources/include/header.p4
index bea9619..decad94 100644
--- a/pipelines/fabric/impl/src/main/resources/include/header.p4
+++ b/pipelines/fabric/impl/src/main/resources/include/header.p4
@@ -135,22 +135,21 @@
     bit<1>  npdu_flag;  /* n-pdn number present ? */
     bit<8>  msgtype;    /* message type */
     bit<16> msglen;     /* message length */
-    bit<32> teid;       /* tunnel endpoint id */
+    teid_t  teid;       /* tunnel endpoint id */
 }
 
 struct spgw_meta_t {
     direction_t       direction;
     bit<16>           ipv4_len;
-    bit<32>           teid;
-    bit<32>           s1u_enb_addr;
-    bit<32>           s1u_sgw_addr;
-#ifdef WITH_SPGW_PCC_GATING
-    bit<16>           l4_sport;
-    bit<16>           l4_dport;
-    pcc_gate_status_t pcc_gate_status;
-    sdf_rule_id_t     sdf_rule_id;
-    pcc_rule_id_t     pcc_rule_id;
-#endif // WITH_SPGW_PCC_GATING
+    teid_t            teid;
+    bit<32>           tunnel_src_addr;
+    bit<32>           tunnel_dst_addr;
+    ctr_id_t          ctr_id;
+    far_id_t          far_id;
+    _BOOL             pdr_hit;
+    _BOOL             far_dropped;
+    _BOOL             notify_cp;
+    _BOOL             outer_header_creation;
 }
 #endif // WITH_SPGW
 
@@ -194,6 +193,8 @@
     bit<8>        ip_proto;
     bit<16>       l4_sport;
     bit<16>       l4_dport;
+    bit<32>       ipv4_src_addr;
+    bit<32>       ipv4_dst_addr;
 #ifdef WITH_SPGW
     spgw_meta_t   spgw;
 #endif // WITH_SPGW