Refactor fabric.p4
minor refactor for coding style
Change-Id: I7b73b9c3f439c66ce435404cb42fdb38323845b3
diff --git a/pipelines/fabric/src/main/resources/p4c-out/fabric/bmv2/default/p4info.txt b/pipelines/fabric/src/main/resources/p4c-out/fabric/bmv2/default/p4info.txt
index ce76fa7..db81d51 100644
--- a/pipelines/fabric/src/main/resources/p4c-out/fabric/bmv2/default/p4info.txt
+++ b/pipelines/fabric/src/main/resources/p4c-out/fabric/bmv2/default/p4info.txt
@@ -30,6 +30,7 @@
}
action_refs {
id: 16819938
+ annotations: "@defaultonly()"
}
action_refs {
id: 16798734
@@ -90,7 +91,7 @@
match_type: TERNARY
}
action_refs {
- id: 16839692
+ id: 16811012
}
action_refs {
id: 16800567
@@ -136,7 +137,7 @@
match_type: LPM
}
action_refs {
- id: 16839692
+ id: 16828976
}
action_refs {
id: 16800567
@@ -225,16 +226,17 @@
match_type: TERNARY
}
action_refs {
- id: 16839692
+ id: 16785374
}
action_refs {
- id: 16801739
+ id: 16810628
}
action_refs {
id: 16833260
}
action_refs {
id: 16819938
+ annotations: "@defaultonly()"
}
const_default_action_id: 16819938
direct_resource_ids: 318772272
@@ -243,6 +245,87 @@
}
tables {
preamble {
+ id: 33578363
+ name: "FabricIngress.forwarding.multicast_v4"
+ alias: "multicast_v4"
+ }
+ match_fields {
+ id: 1
+ name: "hdr.vlan_tag.vlan_id"
+ bitwidth: 12
+ match_type: EXACT
+ }
+ match_fields {
+ id: 2
+ name: "hdr.ipv4.dst_addr"
+ bitwidth: 32
+ match_type: LPM
+ }
+ action_refs {
+ id: 16809157
+ }
+ action_refs {
+ id: 16800567
+ annotations: "@defaultonly()"
+ }
+ direct_resource_ids: 318797896
+ size: 1024
+ idle_timeout_behavior: NO_TIMEOUT
+}
+tables {
+ preamble {
+ id: 33568751
+ name: "FabricIngress.forwarding.unicast_v6"
+ alias: "unicast_v6"
+ }
+ match_fields {
+ id: 1
+ name: "hdr.ipv6.dst_addr"
+ bitwidth: 128
+ match_type: LPM
+ }
+ action_refs {
+ id: 16823773
+ }
+ action_refs {
+ id: 16800567
+ annotations: "@defaultonly()"
+ }
+ direct_resource_ids: 318820865
+ size: 1024
+ idle_timeout_behavior: NO_TIMEOUT
+}
+tables {
+ preamble {
+ id: 33581295
+ name: "FabricIngress.forwarding.multicast_v6"
+ alias: "multicast_v6"
+ }
+ match_fields {
+ id: 1
+ name: "hdr.vlan_tag.vlan_id"
+ bitwidth: 12
+ match_type: EXACT
+ }
+ match_fields {
+ id: 2
+ name: "hdr.ipv6.dst_addr"
+ bitwidth: 128
+ match_type: LPM
+ }
+ action_refs {
+ id: 16819612
+ }
+ action_refs {
+ id: 16800567
+ annotations: "@defaultonly()"
+ }
+ direct_resource_ids: 318815310
+ size: 1024
+ idle_timeout_behavior: NO_TIMEOUT
+}
+tables {
+ preamble {
id: 33562709
name: "FabricIngress.next.vlan_meta"
alias: "vlan_meta"
@@ -258,6 +341,7 @@
}
action_refs {
id: 16819938
+ annotations: "@defaultonly()"
}
direct_resource_ids: 318785328
size: 1024
@@ -276,16 +360,19 @@
match_type: EXACT
}
action_refs {
- id: 16832750
+ id: 16802668
}
action_refs {
id: 16808391
}
action_refs {
- id: 16812135
+ id: 16780007
}
action_refs {
- id: 16780811
+ id: 16806134
+ }
+ action_refs {
+ id: 16795970
}
action_refs {
id: 16791579
@@ -311,13 +398,13 @@
match_type: EXACT
}
action_refs {
- id: 16812135
+ id: 16800211
}
action_refs {
- id: 16780811
+ id: 16779239
}
action_refs {
- id: 16827088
+ id: 16819349
}
action_refs {
id: 16800567
@@ -374,7 +461,9 @@
}
action_refs {
id: 16819938
+ annotations: "@defaultonly()"
}
+ direct_resource_ids: 318827144
size: 1024
idle_timeout_behavior: NO_TIMEOUT
}
@@ -437,16 +526,9 @@
}
actions {
preamble {
- id: 16833260
- name: "FabricIngress.forwarding.drop"
- alias: "forwarding.drop"
- }
-}
-actions {
- preamble {
- id: 16839692
- name: "FabricIngress.forwarding.set_next_id"
- alias: "set_next_id"
+ id: 16811012
+ name: "FabricIngress.forwarding.set_next_id_bridging"
+ alias: "set_next_id_bridging"
}
params {
id: 1
@@ -468,21 +550,76 @@
}
actions {
preamble {
- id: 16801739
- name: "FabricIngress.forwarding.duplicate_to_controller"
- alias: "duplicate_to_controller"
+ id: 16828976
+ name: "FabricIngress.forwarding.set_next_id_unicast_v4"
+ alias: "set_next_id_unicast_v4"
+ }
+ params {
+ id: 1
+ name: "next_id"
+ bitwidth: 32
}
}
actions {
preamble {
- id: 16832750
- name: "FabricIngress.next.output"
- alias: "output"
+ id: 16785374
+ name: "FabricIngress.forwarding.set_next_id_acl"
+ alias: "set_next_id_acl"
}
params {
id: 1
- name: "port_num"
- bitwidth: 9
+ name: "next_id"
+ bitwidth: 32
+ }
+}
+actions {
+ preamble {
+ id: 16810628
+ name: "FabricIngress.forwarding.send_to_controller"
+ alias: "send_to_controller"
+ }
+}
+actions {
+ preamble {
+ id: 16833260
+ name: "FabricIngress.forwarding.drop"
+ alias: "forwarding.drop"
+ }
+}
+actions {
+ preamble {
+ id: 16809157
+ name: "FabricIngress.forwarding.set_next_id_multicast_v4"
+ alias: "set_next_id_multicast_v4"
+ }
+ params {
+ id: 1
+ name: "next_id"
+ bitwidth: 32
+ }
+}
+actions {
+ preamble {
+ id: 16823773
+ name: "FabricIngress.forwarding.set_next_id_unicast_v6"
+ alias: "set_next_id_unicast_v6"
+ }
+ params {
+ id: 1
+ name: "next_id"
+ bitwidth: 32
+ }
+}
+actions {
+ preamble {
+ id: 16819612
+ name: "FabricIngress.forwarding.set_next_id_multicast_v6"
+ alias: "set_next_id_multicast_v6"
+ }
+ params {
+ id: 1
+ name: "next_id"
+ bitwidth: 32
}
}
actions {
@@ -499,6 +636,18 @@
}
actions {
preamble {
+ id: 16802668
+ name: "FabricIngress.next.output_simple"
+ alias: "output_simple"
+ }
+ params {
+ id: 1
+ name: "port_num"
+ bitwidth: 9
+ }
+}
+actions {
+ preamble {
id: 16808391
name: "FabricIngress.next.set_vlan_output"
alias: "set_vlan_output"
@@ -516,9 +665,9 @@
}
actions {
preamble {
- id: 16812135
- name: "FabricIngress.next.l3_routing"
- alias: "l3_routing"
+ id: 16780007
+ name: "FabricIngress.next.l3_routing_simple"
+ alias: "l3_routing_simple"
}
params {
id: 1
@@ -538,6 +687,60 @@
}
actions {
preamble {
+ id: 16806134
+ name: "FabricIngress.next.mpls_routing_v4_simple"
+ alias: "mpls_routing_v4_simple"
+ }
+ params {
+ id: 1
+ name: "port_num"
+ bitwidth: 9
+ }
+ params {
+ id: 2
+ name: "smac"
+ bitwidth: 48
+ }
+ params {
+ id: 3
+ name: "dmac"
+ bitwidth: 48
+ }
+ params {
+ id: 4
+ name: "label"
+ bitwidth: 20
+ }
+}
+actions {
+ preamble {
+ id: 16795970
+ name: "FabricIngress.next.mpls_routing_v6_simple"
+ alias: "mpls_routing_v6_simple"
+ }
+ params {
+ id: 1
+ name: "port_num"
+ bitwidth: 9
+ }
+ params {
+ id: 2
+ name: "smac"
+ bitwidth: 48
+ }
+ params {
+ id: 3
+ name: "dmac"
+ bitwidth: 48
+ }
+ params {
+ id: 4
+ name: "label"
+ bitwidth: 20
+ }
+}
+actions {
+ preamble {
id: 16791579
name: "FabricIngress.next.l3_routing_vlan"
alias: "l3_routing_vlan"
@@ -565,9 +768,31 @@
}
actions {
preamble {
- id: 16780811
- name: "FabricIngress.next.mpls_routing_v4"
- alias: "mpls_routing_v4"
+ id: 16800211
+ name: "FabricIngress.next.l3_routing_hashed"
+ alias: "l3_routing_hashed"
+ }
+ params {
+ id: 1
+ name: "port_num"
+ bitwidth: 9
+ }
+ params {
+ id: 2
+ name: "smac"
+ bitwidth: 48
+ }
+ params {
+ id: 3
+ name: "dmac"
+ bitwidth: 48
+ }
+}
+actions {
+ preamble {
+ id: 16779239
+ name: "FabricIngress.next.mpls_routing_v4_hashed"
+ alias: "mpls_routing_v4_hashed"
}
params {
id: 1
@@ -592,9 +817,9 @@
}
actions {
preamble {
- id: 16827088
- name: "FabricIngress.next.mpls_routing_v6"
- alias: "mpls_routing_v6"
+ id: 16819349
+ name: "FabricIngress.next.mpls_routing_v6_hashed"
+ alias: "mpls_routing_v6_hashed"
}
params {
id: 1
@@ -743,6 +968,39 @@
}
direct_counters {
preamble {
+ id: 318797896
+ name: "FabricIngress.forwarding.multicast_v4_counter"
+ alias: "multicast_v4_counter"
+ }
+ spec {
+ unit: BOTH
+ }
+ direct_table_id: 33578363
+}
+direct_counters {
+ preamble {
+ id: 318820865
+ name: "FabricIngress.forwarding.unicast_v6_counter"
+ alias: "unicast_v6_counter"
+ }
+ spec {
+ unit: BOTH
+ }
+ direct_table_id: 33568751
+}
+direct_counters {
+ preamble {
+ id: 318815310
+ name: "FabricIngress.forwarding.multicast_v6_counter"
+ alias: "multicast_v6_counter"
+ }
+ spec {
+ unit: BOTH
+ }
+ direct_table_id: 33581295
+}
+direct_counters {
+ preamble {
id: 318785328
name: "FabricIngress.next.vlan_meta_counter"
alias: "vlan_meta_counter"
@@ -785,6 +1043,17 @@
}
direct_table_id: 33606828
}
+direct_counters {
+ preamble {
+ id: 318827144
+ name: "FabricEgress.egress_next.egress_vlan_counter"
+ alias: "egress_vlan_counter"
+ }
+ spec {
+ unit: BOTH
+ }
+ direct_table_id: 33599342
+}
controller_packet_metadata {
preamble {
id: 67146229