Fix to metadata copied to egress
Now only the metadata really needed in egress are copied during the clone action
Change-Id: I793b61b6094894444ce71d478648032d39627bdf
diff --git a/pipelines/fabric/src/main/resources/include/control/acl.p4 b/pipelines/fabric/src/main/resources/include/control/acl.p4
index 0ab57b5..bf70f15 100644
--- a/pipelines/fabric/src/main/resources/include/control/acl.p4
+++ b/pipelines/fabric/src/main/resources/include/control/acl.p4
@@ -43,7 +43,7 @@
// Set clone session id for a I2E clone session
action set_clone_session_id(bit<32> clone_id) {
- clone3<standard_metadata_t>(CloneType.I2E, clone_id, standard_metadata);
+ clone3(CloneType.I2E, clone_id, {standard_metadata.ingress_port});
acl_counter.count();
}
diff --git a/pipelines/fabric/src/main/resources/p4c-out/fabric-full/bmv2/default/bmv2.json b/pipelines/fabric/src/main/resources/p4c-out/fabric-full/bmv2/default/bmv2.json
index fae668a..43700f8 100644
--- a/pipelines/fabric/src/main/resources/p4c-out/fabric-full/bmv2/default/bmv2.json
+++ b/pipelines/fabric/src/main/resources/p4c-out/fabric-full/bmv2/default/bmv2.json
@@ -608,99 +608,15 @@
"id" : 1,
"name" : "fl",
"source_info" : {
- "filename" : "fabric.p4",
- "line" : 77,
+ "filename" : "include/control/acl.p4",
+ "line" : 46,
"column" : 40,
- "source_fragment" : "standard_metadata"
+ "source_fragment" : "{standard_metadata.ingress_port}"
},
"elements" : [
{
"type" : "field",
"value" : ["standard_metadata", "ingress_port"]
- },
- {
- "type" : "field",
- "value" : ["standard_metadata", "egress_spec"]
- },
- {
- "type" : "field",
- "value" : ["standard_metadata", "egress_port"]
- },
- {
- "type" : "field",
- "value" : ["standard_metadata", "clone_spec"]
- },
- {
- "type" : "field",
- "value" : ["standard_metadata", "instance_type"]
- },
- {
- "type" : "field",
- "value" : ["standard_metadata", "drop"]
- },
- {
- "type" : "field",
- "value" : ["standard_metadata", "recirculate_port"]
- },
- {
- "type" : "field",
- "value" : ["standard_metadata", "packet_length"]
- },
- {
- "type" : "field",
- "value" : ["standard_metadata", "enq_timestamp"]
- },
- {
- "type" : "field",
- "value" : ["standard_metadata", "enq_qdepth"]
- },
- {
- "type" : "field",
- "value" : ["standard_metadata", "deq_timedelta"]
- },
- {
- "type" : "field",
- "value" : ["standard_metadata", "deq_qdepth"]
- },
- {
- "type" : "field",
- "value" : ["standard_metadata", "ingress_global_timestamp"]
- },
- {
- "type" : "field",
- "value" : ["standard_metadata", "egress_global_timestamp"]
- },
- {
- "type" : "field",
- "value" : ["standard_metadata", "lf_field_list"]
- },
- {
- "type" : "field",
- "value" : ["standard_metadata", "mcast_grp"]
- },
- {
- "type" : "field",
- "value" : ["standard_metadata", "resubmit_flag"]
- },
- {
- "type" : "field",
- "value" : ["standard_metadata", "egress_rid"]
- },
- {
- "type" : "field",
- "value" : ["standard_metadata", "recirculate_flag"]
- },
- {
- "type" : "field",
- "value" : ["standard_metadata", "checksum_error"]
- },
- {
- "type" : "field",
- "value" : ["standard_metadata", "parser_error"]
- },
- {
- "type" : "field",
- "value" : ["standard_metadata", "priority"]
}
]
},
@@ -4213,7 +4129,7 @@
"filename" : "include/control/acl.p4",
"line" : 46,
"column" : 8,
- "source_fragment" : "clone3<standard_metadata_t>(CloneType.I2E, clone_id, standard_metadata)"
+ "source_fragment" : "clone3(CloneType.I2E, clone_id, {standard_metadata.ingress_port})"
}
}
]
diff --git a/pipelines/fabric/src/main/resources/p4c-out/fabric-int/bmv2/default/bmv2.json b/pipelines/fabric/src/main/resources/p4c-out/fabric-int/bmv2/default/bmv2.json
index e736f5d..43e8218 100644
--- a/pipelines/fabric/src/main/resources/p4c-out/fabric-int/bmv2/default/bmv2.json
+++ b/pipelines/fabric/src/main/resources/p4c-out/fabric-int/bmv2/default/bmv2.json
@@ -440,99 +440,15 @@
"id" : 1,
"name" : "fl",
"source_info" : {
- "filename" : "fabric.p4",
- "line" : 77,
+ "filename" : "include/control/acl.p4",
+ "line" : 46,
"column" : 40,
- "source_fragment" : "standard_metadata"
+ "source_fragment" : "{standard_metadata.ingress_port}"
},
"elements" : [
{
"type" : "field",
"value" : ["standard_metadata", "ingress_port"]
- },
- {
- "type" : "field",
- "value" : ["standard_metadata", "egress_spec"]
- },
- {
- "type" : "field",
- "value" : ["standard_metadata", "egress_port"]
- },
- {
- "type" : "field",
- "value" : ["standard_metadata", "clone_spec"]
- },
- {
- "type" : "field",
- "value" : ["standard_metadata", "instance_type"]
- },
- {
- "type" : "field",
- "value" : ["standard_metadata", "drop"]
- },
- {
- "type" : "field",
- "value" : ["standard_metadata", "recirculate_port"]
- },
- {
- "type" : "field",
- "value" : ["standard_metadata", "packet_length"]
- },
- {
- "type" : "field",
- "value" : ["standard_metadata", "enq_timestamp"]
- },
- {
- "type" : "field",
- "value" : ["standard_metadata", "enq_qdepth"]
- },
- {
- "type" : "field",
- "value" : ["standard_metadata", "deq_timedelta"]
- },
- {
- "type" : "field",
- "value" : ["standard_metadata", "deq_qdepth"]
- },
- {
- "type" : "field",
- "value" : ["standard_metadata", "ingress_global_timestamp"]
- },
- {
- "type" : "field",
- "value" : ["standard_metadata", "egress_global_timestamp"]
- },
- {
- "type" : "field",
- "value" : ["standard_metadata", "lf_field_list"]
- },
- {
- "type" : "field",
- "value" : ["standard_metadata", "mcast_grp"]
- },
- {
- "type" : "field",
- "value" : ["standard_metadata", "resubmit_flag"]
- },
- {
- "type" : "field",
- "value" : ["standard_metadata", "egress_rid"]
- },
- {
- "type" : "field",
- "value" : ["standard_metadata", "recirculate_flag"]
- },
- {
- "type" : "field",
- "value" : ["standard_metadata", "checksum_error"]
- },
- {
- "type" : "field",
- "value" : ["standard_metadata", "parser_error"]
- },
- {
- "type" : "field",
- "value" : ["standard_metadata", "priority"]
}
]
}
@@ -1919,7 +1835,7 @@
"filename" : "include/control/acl.p4",
"line" : 46,
"column" : 8,
- "source_fragment" : "clone3<standard_metadata_t>(CloneType.I2E, clone_id, standard_metadata)"
+ "source_fragment" : "clone3(CloneType.I2E, clone_id, {standard_metadata.ingress_port})"
}
}
]
diff --git a/pipelines/fabric/src/main/resources/p4c-out/fabric-spgw-int/bmv2/default/bmv2.json b/pipelines/fabric/src/main/resources/p4c-out/fabric-spgw-int/bmv2/default/bmv2.json
index bbd7d07..2311b11 100644
--- a/pipelines/fabric/src/main/resources/p4c-out/fabric-spgw-int/bmv2/default/bmv2.json
+++ b/pipelines/fabric/src/main/resources/p4c-out/fabric-spgw-int/bmv2/default/bmv2.json
@@ -499,99 +499,15 @@
"id" : 1,
"name" : "fl",
"source_info" : {
- "filename" : "fabric.p4",
- "line" : 77,
+ "filename" : "include/control/acl.p4",
+ "line" : 46,
"column" : 40,
- "source_fragment" : "standard_metadata"
+ "source_fragment" : "{standard_metadata.ingress_port}"
},
"elements" : [
{
"type" : "field",
"value" : ["standard_metadata", "ingress_port"]
- },
- {
- "type" : "field",
- "value" : ["standard_metadata", "egress_spec"]
- },
- {
- "type" : "field",
- "value" : ["standard_metadata", "egress_port"]
- },
- {
- "type" : "field",
- "value" : ["standard_metadata", "clone_spec"]
- },
- {
- "type" : "field",
- "value" : ["standard_metadata", "instance_type"]
- },
- {
- "type" : "field",
- "value" : ["standard_metadata", "drop"]
- },
- {
- "type" : "field",
- "value" : ["standard_metadata", "recirculate_port"]
- },
- {
- "type" : "field",
- "value" : ["standard_metadata", "packet_length"]
- },
- {
- "type" : "field",
- "value" : ["standard_metadata", "enq_timestamp"]
- },
- {
- "type" : "field",
- "value" : ["standard_metadata", "enq_qdepth"]
- },
- {
- "type" : "field",
- "value" : ["standard_metadata", "deq_timedelta"]
- },
- {
- "type" : "field",
- "value" : ["standard_metadata", "deq_qdepth"]
- },
- {
- "type" : "field",
- "value" : ["standard_metadata", "ingress_global_timestamp"]
- },
- {
- "type" : "field",
- "value" : ["standard_metadata", "egress_global_timestamp"]
- },
- {
- "type" : "field",
- "value" : ["standard_metadata", "lf_field_list"]
- },
- {
- "type" : "field",
- "value" : ["standard_metadata", "mcast_grp"]
- },
- {
- "type" : "field",
- "value" : ["standard_metadata", "resubmit_flag"]
- },
- {
- "type" : "field",
- "value" : ["standard_metadata", "egress_rid"]
- },
- {
- "type" : "field",
- "value" : ["standard_metadata", "recirculate_flag"]
- },
- {
- "type" : "field",
- "value" : ["standard_metadata", "checksum_error"]
- },
- {
- "type" : "field",
- "value" : ["standard_metadata", "parser_error"]
- },
- {
- "type" : "field",
- "value" : ["standard_metadata", "priority"]
}
]
}
@@ -2386,7 +2302,7 @@
"filename" : "include/control/acl.p4",
"line" : 46,
"column" : 8,
- "source_fragment" : "clone3<standard_metadata_t>(CloneType.I2E, clone_id, standard_metadata)"
+ "source_fragment" : "clone3(CloneType.I2E, clone_id, {standard_metadata.ingress_port})"
}
}
]
diff --git a/pipelines/fabric/src/main/resources/p4c-out/fabric-spgw/bmv2/default/bmv2.json b/pipelines/fabric/src/main/resources/p4c-out/fabric-spgw/bmv2/default/bmv2.json
index b1d3a47..9221d30 100644
--- a/pipelines/fabric/src/main/resources/p4c-out/fabric-spgw/bmv2/default/bmv2.json
+++ b/pipelines/fabric/src/main/resources/p4c-out/fabric-spgw/bmv2/default/bmv2.json
@@ -315,99 +315,15 @@
"id" : 1,
"name" : "fl",
"source_info" : {
- "filename" : "fabric.p4",
- "line" : 77,
+ "filename" : "include/control/acl.p4",
+ "line" : 46,
"column" : 40,
- "source_fragment" : "standard_metadata"
+ "source_fragment" : "{standard_metadata.ingress_port}"
},
"elements" : [
{
"type" : "field",
"value" : ["standard_metadata", "ingress_port"]
- },
- {
- "type" : "field",
- "value" : ["standard_metadata", "egress_spec"]
- },
- {
- "type" : "field",
- "value" : ["standard_metadata", "egress_port"]
- },
- {
- "type" : "field",
- "value" : ["standard_metadata", "clone_spec"]
- },
- {
- "type" : "field",
- "value" : ["standard_metadata", "instance_type"]
- },
- {
- "type" : "field",
- "value" : ["standard_metadata", "drop"]
- },
- {
- "type" : "field",
- "value" : ["standard_metadata", "recirculate_port"]
- },
- {
- "type" : "field",
- "value" : ["standard_metadata", "packet_length"]
- },
- {
- "type" : "field",
- "value" : ["standard_metadata", "enq_timestamp"]
- },
- {
- "type" : "field",
- "value" : ["standard_metadata", "enq_qdepth"]
- },
- {
- "type" : "field",
- "value" : ["standard_metadata", "deq_timedelta"]
- },
- {
- "type" : "field",
- "value" : ["standard_metadata", "deq_qdepth"]
- },
- {
- "type" : "field",
- "value" : ["standard_metadata", "ingress_global_timestamp"]
- },
- {
- "type" : "field",
- "value" : ["standard_metadata", "egress_global_timestamp"]
- },
- {
- "type" : "field",
- "value" : ["standard_metadata", "lf_field_list"]
- },
- {
- "type" : "field",
- "value" : ["standard_metadata", "mcast_grp"]
- },
- {
- "type" : "field",
- "value" : ["standard_metadata", "resubmit_flag"]
- },
- {
- "type" : "field",
- "value" : ["standard_metadata", "egress_rid"]
- },
- {
- "type" : "field",
- "value" : ["standard_metadata", "recirculate_flag"]
- },
- {
- "type" : "field",
- "value" : ["standard_metadata", "checksum_error"]
- },
- {
- "type" : "field",
- "value" : ["standard_metadata", "parser_error"]
- },
- {
- "type" : "field",
- "value" : ["standard_metadata", "priority"]
}
]
}
@@ -2007,7 +1923,7 @@
"filename" : "include/control/acl.p4",
"line" : 46,
"column" : 8,
- "source_fragment" : "clone3<standard_metadata_t>(CloneType.I2E, clone_id, standard_metadata)"
+ "source_fragment" : "clone3(CloneType.I2E, clone_id, {standard_metadata.ingress_port})"
}
}
]
diff --git a/pipelines/fabric/src/main/resources/p4c-out/fabric/bmv2/default/bmv2.json b/pipelines/fabric/src/main/resources/p4c-out/fabric/bmv2/default/bmv2.json
index 74580ff..5e77188 100644
--- a/pipelines/fabric/src/main/resources/p4c-out/fabric/bmv2/default/bmv2.json
+++ b/pipelines/fabric/src/main/resources/p4c-out/fabric/bmv2/default/bmv2.json
@@ -254,99 +254,15 @@
"id" : 1,
"name" : "fl",
"source_info" : {
- "filename" : "fabric.p4",
- "line" : 77,
+ "filename" : "include/control/acl.p4",
+ "line" : 46,
"column" : 40,
- "source_fragment" : "standard_metadata"
+ "source_fragment" : "{standard_metadata.ingress_port}"
},
"elements" : [
{
"type" : "field",
"value" : ["standard_metadata", "ingress_port"]
- },
- {
- "type" : "field",
- "value" : ["standard_metadata", "egress_spec"]
- },
- {
- "type" : "field",
- "value" : ["standard_metadata", "egress_port"]
- },
- {
- "type" : "field",
- "value" : ["standard_metadata", "clone_spec"]
- },
- {
- "type" : "field",
- "value" : ["standard_metadata", "instance_type"]
- },
- {
- "type" : "field",
- "value" : ["standard_metadata", "drop"]
- },
- {
- "type" : "field",
- "value" : ["standard_metadata", "recirculate_port"]
- },
- {
- "type" : "field",
- "value" : ["standard_metadata", "packet_length"]
- },
- {
- "type" : "field",
- "value" : ["standard_metadata", "enq_timestamp"]
- },
- {
- "type" : "field",
- "value" : ["standard_metadata", "enq_qdepth"]
- },
- {
- "type" : "field",
- "value" : ["standard_metadata", "deq_timedelta"]
- },
- {
- "type" : "field",
- "value" : ["standard_metadata", "deq_qdepth"]
- },
- {
- "type" : "field",
- "value" : ["standard_metadata", "ingress_global_timestamp"]
- },
- {
- "type" : "field",
- "value" : ["standard_metadata", "egress_global_timestamp"]
- },
- {
- "type" : "field",
- "value" : ["standard_metadata", "lf_field_list"]
- },
- {
- "type" : "field",
- "value" : ["standard_metadata", "mcast_grp"]
- },
- {
- "type" : "field",
- "value" : ["standard_metadata", "resubmit_flag"]
- },
- {
- "type" : "field",
- "value" : ["standard_metadata", "egress_rid"]
- },
- {
- "type" : "field",
- "value" : ["standard_metadata", "recirculate_flag"]
- },
- {
- "type" : "field",
- "value" : ["standard_metadata", "checksum_error"]
- },
- {
- "type" : "field",
- "value" : ["standard_metadata", "parser_error"]
- },
- {
- "type" : "field",
- "value" : ["standard_metadata", "priority"]
}
]
}
@@ -1551,7 +1467,7 @@
"filename" : "include/control/acl.p4",
"line" : 46,
"column" : 8,
- "source_fragment" : "clone3<standard_metadata_t>(CloneType.I2E, clone_id, standard_metadata)"
+ "source_fragment" : "clone3(CloneType.I2E, clone_id, {standard_metadata.ingress_port})"
}
}
]