Improvement in fabric.p4 and bng.p4

- fabric.p4 now supports double tagged hosts
- bng.p4 now only manages PPPoE termination
- bng_ingress moved at the end of the fabric pipeline

Change-Id: Iff62238fde9ec6ddf7311312a98c041e3ab3aa8d
diff --git a/pipelines/fabric/src/main/resources/p4c-out/fabric-bng/bmv2/default/p4info.txt b/pipelines/fabric/src/main/resources/p4c-out/fabric-bng/bmv2/default/p4info.txt
index e6f3866..98b6cac 100644
--- a/pipelines/fabric/src/main/resources/p4c-out/fabric-bng/bmv2/default/p4info.txt
+++ b/pipelines/fabric/src/main/resources/p4c-out/fabric-bng/bmv2/default/p4info.txt
@@ -3,35 +3,6 @@
 }
 tables {
   preamble {
-    id: 33584710
-    name: "FabricIngress.bng_ingress.upstream.t_line_map"
-    alias: "t_line_map"
-  }
-  match_fields {
-    id: 1
-    name: "s_tag"
-    bitwidth: 12
-    match_type: EXACT
-  }
-  match_fields {
-    id: 2
-    name: "c_tag"
-    bitwidth: 12
-    match_type: EXACT
-  }
-  action_refs {
-    id: 16819938
-    annotations: "@defaultonly"
-    scope: DEFAULT_ONLY
-  }
-  action_refs {
-    id: 16829434
-  }
-  const_default_action_id: 16819938
-  size: 8192
-}
-tables {
-  preamble {
     id: 33603300
     name: "FabricIngress.bng_ingress.upstream.t_pppoe_cp"
     alias: "t_pppoe_cp"
@@ -96,13 +67,13 @@
 }
 tables {
   preamble {
-    id: 33555367
-    name: "FabricIngress.bng_ingress.downstream.t_line_map_v4"
-    alias: "t_line_map_v4"
+    id: 33594775
+    name: "FabricIngress.bng_ingress.downstream.t_line_session_map"
+    alias: "t_line_session_map"
   }
   match_fields {
     id: 1
-    name: "ipv4_dst"
+    name: "line_id"
     bitwidth: 32
     match_type: EXACT
   }
@@ -112,13 +83,13 @@
     scope: DEFAULT_ONLY
   }
   action_refs {
-    id: 16798636
+    id: 16795395
   }
   action_refs {
-    id: 16842299
+    id: 16822844
   }
   const_default_action_id: 16819938
-  size: 32768
+  size: 8192
 }
 tables {
   preamble {
@@ -161,6 +132,35 @@
 }
 tables {
   preamble {
+    id: 33592041
+    name: "FabricIngress.bng_ingress.t_line_map"
+    alias: "t_line_map"
+  }
+  match_fields {
+    id: 1
+    name: "s_tag"
+    bitwidth: 12
+    match_type: EXACT
+  }
+  match_fields {
+    id: 2
+    name: "c_tag"
+    bitwidth: 12
+    match_type: EXACT
+  }
+  action_refs {
+    id: 16819938
+    annotations: "@defaultonly"
+    scope: DEFAULT_ONLY
+  }
+  action_refs {
+    id: 16829385
+  }
+  const_default_action_id: 16819938
+  size: 8192
+}
+tables {
+  preamble {
     id: 33611649
     name: "FabricIngress.filtering.ingress_port_vlan"
     alias: "ingress_port_vlan"
@@ -183,6 +183,12 @@
     bitwidth: 12
     match_type: TERNARY
   }
+  match_fields {
+    id: 4
+    name: "inner_vlan_id"
+    bitwidth: 12
+    match_type: TERNARY
+  }
   action_refs {
     id: 16836487
   }
@@ -194,7 +200,7 @@
   }
   const_default_action_id: 16836487
   direct_resource_ids: 318815501
-  size: 1024
+  size: 8192
 }
 tables {
   preamble {
@@ -216,8 +222,20 @@
   }
   match_fields {
     id: 3
-    name: "eth_type"
-    bitwidth: 16
+    name: "is_ipv4"
+    bitwidth: 1
+    match_type: EXACT
+  }
+  match_fields {
+    id: 4
+    name: "is_ipv6"
+    bitwidth: 1
+    match_type: EXACT
+  }
+  match_fields {
+    id: 5
+    name: "is_mpls"
+    bitwidth: 1
     match_type: EXACT
   }
   action_refs {
@@ -421,6 +439,9 @@
     id: 16790685
   }
   action_refs {
+    id: 16803337
+  }
+  action_refs {
     id: 16819938
     annotations: "@defaultonly"
     scope: DEFAULT_ONLY
@@ -431,39 +452,6 @@
 }
 tables {
   preamble {
-    id: 33596977
-    name: "FabricIngress.next.xconnect"
-    alias: "xconnect"
-  }
-  match_fields {
-    id: 1
-    name: "ig_port"
-    bitwidth: 9
-    match_type: EXACT
-  }
-  match_fields {
-    id: 2
-    name: "next_id"
-    bitwidth: 32
-    match_type: EXACT
-  }
-  action_refs {
-    id: 16842190
-  }
-  action_refs {
-    id: 16837052
-  }
-  action_refs {
-    id: 16819938
-    annotations: "@defaultonly"
-    scope: DEFAULT_ONLY
-  }
-  const_default_action_id: 16819938
-  direct_resource_ids: 318778156
-  size: 1024
-}
-tables {
-  preamble {
     id: 33608588
     name: "FabricIngress.next.hashed"
     alias: "hashed"
@@ -519,29 +507,6 @@
 }
 tables {
   preamble {
-    id: 33576241
-    name: "FabricEgress.bng_egress.downstream.t_session_encap"
-    alias: "t_session_encap"
-  }
-  match_fields {
-    id: 1
-    name: "line_id"
-    bitwidth: 32
-    match_type: EXACT
-  }
-  action_refs {
-    id: 16819938
-    annotations: "@defaultonly"
-    scope: DEFAULT_ONLY
-  }
-  action_refs {
-    id: 16784000
-  }
-  const_default_action_id: 16819938
-  size: 8192
-}
-tables {
-  preamble {
     id: 33599342
     name: "FabricEgress.egress_next.egress_vlan"
     alias: "egress_vlan"
@@ -579,18 +544,6 @@
 }
 actions {
   preamble {
-    id: 16829434
-    name: "FabricIngress.bng_ingress.upstream.set_line"
-    alias: "set_line"
-  }
-  params {
-    id: 1
-    name: "line_id"
-    bitwidth: 32
-  }
-}
-actions {
-  preamble {
     id: 16830893
     name: "FabricIngress.bng_ingress.upstream.punt_to_cpu"
     alias: "upstream.punt_to_cpu"
@@ -612,31 +565,21 @@
 }
 actions {
   preamble {
-    id: 16798636
-    name: "FabricIngress.bng_ingress.downstream.set_line_next"
-    alias: "set_line_next"
+    id: 16795395
+    name: "FabricIngress.bng_ingress.downstream.set_session"
+    alias: "set_session"
   }
   params {
     id: 1
-    name: "line_id"
-    bitwidth: 32
-  }
-  params {
-    id: 2
-    name: "next_id"
-    bitwidth: 32
+    name: "pppoe_session_id"
+    bitwidth: 16
   }
 }
 actions {
   preamble {
-    id: 16842299
-    name: "FabricIngress.bng_ingress.downstream.set_line_drop"
-    alias: "set_line_drop"
-  }
-  params {
-    id: 1
-    name: "line_id"
-    bitwidth: 32
+    id: 16822844
+    name: "FabricIngress.bng_ingress.downstream.drop"
+    alias: "downstream.drop"
   }
 }
 actions {
@@ -655,6 +598,18 @@
 }
 actions {
   preamble {
+    id: 16829385
+    name: "FabricIngress.bng_ingress.set_line"
+    alias: "set_line"
+  }
+  params {
+    id: 1
+    name: "line_id"
+    bitwidth: 32
+  }
+}
+actions {
+  preamble {
     id: 16836487
     name: "FabricIngress.filtering.deny"
     alias: "deny"
@@ -769,7 +724,7 @@
   preamble {
     id: 16820765
     name: "FabricIngress.acl.drop"
-    alias: "drop"
+    alias: "acl.drop"
   }
 }
 actions {
@@ -793,26 +748,19 @@
 }
 actions {
   preamble {
-    id: 16842190
-    name: "FabricIngress.next.output_xconnect"
-    alias: "output_xconnect"
+    id: 16803337
+    name: "FabricIngress.next.set_double_vlan"
+    alias: "set_double_vlan"
   }
   params {
     id: 1
-    name: "port_num"
-    bitwidth: 9
-  }
-}
-actions {
-  preamble {
-    id: 16837052
-    name: "FabricIngress.next.set_next_id_xconnect"
-    alias: "set_next_id_xconnect"
+    name: "outer_vlan_id"
+    bitwidth: 12
   }
   params {
-    id: 1
-    name: "next_id"
-    bitwidth: 32
+    id: 2
+    name: "inner_vlan_id"
+    bitwidth: 12
   }
 }
 actions {
@@ -894,16 +842,6 @@
     name: "FabricEgress.bng_egress.downstream.encap_v4"
     alias: "encap_v4"
   }
-  params {
-    id: 1
-    name: "c_tag"
-    bitwidth: 12
-  }
-  params {
-    id: 2
-    name: "pppoe_session_id"
-    bitwidth: 16
-  }
 }
 actions {
   preamble {
@@ -1079,17 +1017,6 @@
 }
 direct_counters {
   preamble {
-    id: 318778156
-    name: "FabricIngress.next.xconnect_counter"
-    alias: "xconnect_counter"
-  }
-  spec {
-    unit: BOTH
-  }
-  direct_table_id: 33596977
-}
-direct_counters {
-  preamble {
     id: 318800532
     name: "FabricIngress.next.hashed_counter"
     alias: "hashed_counter"