SDFAB-193 Fix routing of GTP End Marker packet-outs on fabric-v1model
This change introduces three fixes:
1) We have observed an issue with p4lang/PI and BMv2 where in presence of
multiple metadata fields, the PI implementation for BMv2 provides an
erroneous serialization of the packet-out header, hence affecting the
parsing/forwarding behavior. As a workaround, since we cannot control
the order of fields in the p4runtime.PacketOut message, we modify the
interpreter to only add one field, egress_port or do_forwarding. Both
fields are treated as mutually exclusive by the P4 pipeline, so the
operation is safe. This is against the P4Runtime spec (all fields should
be provided), but supported by BMv2 (unset fields are initialized to
zero).
2) CPU port was not initialized when calling Pipeliner.init()
3) GTP End Marker were being parsed as GTP-U packets with inner IPv4,
causing a parser error (packet too short).
Change-Id: I406870b4a9aa044b5d0b35a56b0bfde4e601a4f6
diff --git a/pipelines/fabric/impl/src/main/java/org/onosproject/pipelines/fabric/impl/behaviour/FabricInterpreter.java b/pipelines/fabric/impl/src/main/java/org/onosproject/pipelines/fabric/impl/behaviour/FabricInterpreter.java
index 358f86d..4ed412d 100644
--- a/pipelines/fabric/impl/src/main/java/org/onosproject/pipelines/fabric/impl/behaviour/FabricInterpreter.java
+++ b/pipelines/fabric/impl/src/main/java/org/onosproject/pipelines/fabric/impl/behaviour/FabricInterpreter.java
@@ -197,15 +197,31 @@
throws PiInterpreterException {
try {
ImmutableList.Builder<PiPacketMetadata> builder = ImmutableList.builder();
- builder.add(PiPacketMetadata.builder()
- .withId(FabricConstants.EGRESS_PORT)
- .withValue(copyFrom(portNumber)
- .fit(PORT_BITWIDTH))
- .build());
- builder.add(PiPacketMetadata.builder()
- .withId(FabricConstants.DO_FORWARDING)
- .withValue(copyFrom(doForwarding ? ONE : ZERO))
- .build());
+ // We have observed an issue with p4lang/PI and BMv2 where in
+ // presence of multiple metadata fields, the PI implementation for
+ // BMv2 provides an erroneous serialization of the packet-out
+ // header, an hence affects the parsing/forwarding behavior. As a
+ // workaround, since we cannot control the order of fields in the
+ // p4runtime.PacketOut message, we modify the interpreter to only
+ // add one field, egress_port or do_forwarding. Both fields
+ // are treated as mutually exclusive by the P4 pipeline, so the
+ // operation is safe. This is against the P4Runtime spec (all fields
+ // should be provided), but supported by bmv2 (unset fields are
+ // initialized to zero).
+ if (portNumber >= 0) {
+ // 0 is a valid port number.
+ builder.add(PiPacketMetadata.builder()
+ .withId(FabricConstants.EGRESS_PORT)
+ .withValue(copyFrom(portNumber)
+ .fit(PORT_BITWIDTH))
+ .build());
+ }
+ if (doForwarding) {
+ builder.add(PiPacketMetadata.builder()
+ .withId(FabricConstants.DO_FORWARDING)
+ .withValue(copyFrom(ONE))
+ .build());
+ }
return builder.build();
} catch (ImmutableByteSequence.ByteSequenceTrimException e) {
throw new PiInterpreterException(format(
@@ -236,7 +252,7 @@
for (Instructions.OutputInstruction outInst : outInstructions) {
if (outInst.port().equals(TABLE)) {
// Logical port. Forward using the switch tables like a regular packet.
- builder.add(createPiPacketOperation(packet.data(), 0, true));
+ builder.add(createPiPacketOperation(packet.data(), -1, true));
} else if (outInst.port().equals(FLOOD)) {
// Logical port. Create a packet operation for each switch port.
final DeviceService deviceService = handler().get(DeviceService.class);
diff --git a/pipelines/fabric/impl/src/main/java/org/onosproject/pipelines/fabric/impl/behaviour/pipeliner/FabricPipeliner.java b/pipelines/fabric/impl/src/main/java/org/onosproject/pipelines/fabric/impl/behaviour/pipeliner/FabricPipeliner.java
index eda5786..d1e9de2 100644
--- a/pipelines/fabric/impl/src/main/java/org/onosproject/pipelines/fabric/impl/behaviour/pipeliner/FabricPipeliner.java
+++ b/pipelines/fabric/impl/src/main/java/org/onosproject/pipelines/fabric/impl/behaviour/pipeliner/FabricPipeliner.java
@@ -129,6 +129,8 @@
this.nextTranslator = new NextObjectiveTranslator(deviceId, capabilities);
this.coreService = context.directory().get(CoreService.class);
this.appId = coreService.getAppId(FabricPipeconfLoader.PIPELINE_APP_NAME);
+
+ initializePipeline();
}
protected void initializePipeline() {
diff --git a/pipelines/fabric/impl/src/main/resources/include/control/spgw.p4 b/pipelines/fabric/impl/src/main/resources/include/control/spgw.p4
index 2ec4776..adacd9a 100644
--- a/pipelines/fabric/impl/src/main/resources/include/control/spgw.p4
+++ b/pipelines/fabric/impl/src/main/resources/include/control/spgw.p4
@@ -322,7 +322,7 @@
hdr.outer_gtpu.setValid();
- hdr.outer_gtpu.version = GTPU_VERSION;
+ hdr.outer_gtpu.version = GTP_V1;
hdr.outer_gtpu.pt = GTP_PROTOCOL_TYPE_GTP;
hdr.outer_gtpu.spare = 0;
hdr.outer_gtpu.ex_flag = 0;
diff --git a/pipelines/fabric/impl/src/main/resources/include/define.p4 b/pipelines/fabric/impl/src/main/resources/include/define.p4
index 7b46dee..4a30837 100644
--- a/pipelines/fabric/impl/src/main/resources/include/define.p4
+++ b/pipelines/fabric/impl/src/main/resources/include/define.p4
@@ -75,7 +75,7 @@
#define UDP_PORT_GTPU 2152
#define GTP_GPDU 0xff
-#define GTPU_VERSION 0x01
+#define GTP_V1 0x01
#define GTP_PROTOCOL_TYPE_GTP 0x01
#define PKT_INSTANCE_TYPE_NORMAL 0
diff --git a/pipelines/fabric/impl/src/main/resources/include/header.p4 b/pipelines/fabric/impl/src/main/resources/include/header.p4
index ce6fcf8..4b4e315 100644
--- a/pipelines/fabric/impl/src/main/resources/include/header.p4
+++ b/pipelines/fabric/impl/src/main/resources/include/header.p4
@@ -125,7 +125,7 @@
bit<64> timestamp;
}
-#ifdef WITH_SPGW
+
// GTPU v1
header gtpu_t {
bit<3> version; /* version */
@@ -139,6 +139,7 @@
teid_t teid; /* tunnel endpoint id */
}
+#ifdef WITH_SPGW
struct spgw_meta_t {
bit<16> ipv4_len;
teid_t teid;
diff --git a/pipelines/fabric/impl/src/main/resources/include/parser.p4 b/pipelines/fabric/impl/src/main/resources/include/parser.p4
index 21032c7..5e5ee5b 100644
--- a/pipelines/fabric/impl/src/main/resources/include/parser.p4
+++ b/pipelines/fabric/impl/src/main/resources/include/parser.p4
@@ -181,9 +181,11 @@
packet.extract(hdr.udp);
fabric_metadata.l4_sport = hdr.udp.sport;
fabric_metadata.l4_dport = hdr.udp.dport;
- transition select(hdr.udp.dport) {
+ gtpu_t gtpu = packet.lookahead<gtpu_t>();
+ transition select(hdr.udp.dport, gtpu.version, gtpu.msgtype) {
#ifdef WITH_SPGW
- UDP_PORT_GTPU: parse_gtpu;
+ // Treat GTP control traffic as payload.
+ (UDP_PORT_GTPU, GTP_V1, GTP_GPDU): parse_gtpu;
#endif // WITH_SPGW
#ifdef WITH_INT
default: parse_int;
diff --git a/pipelines/fabric/impl/src/main/resources/p4c-out/fabric-bng/bmv2/default/bmv2.json b/pipelines/fabric/impl/src/main/resources/p4c-out/fabric-bng/bmv2/default/bmv2.json
index 19b8530..7e5f3f2 100644
--- a/pipelines/fabric/impl/src/main/resources/p4c-out/fabric-bng/bmv2/default/bmv2.json
+++ b/pipelines/fabric/impl/src/main/resources/p4c-out/fabric-bng/bmv2/default/bmv2.json
@@ -5,12 +5,15 @@
"id" : 0,
"fields" : [
["tmp_0", 1, false],
+ ["tmp_2", 3, false],
+ ["tmp_4", 8, false],
["tmp_1", 16, false],
["tmp_3", 16, false],
["tmp_5", 4, false],
["tmp_6", 16, false],
- ["tmp_2", 32, false],
- ["tmp_4", 32, false],
+ ["tmp_7", 64, false],
+ ["tmp_8", 32, false],
+ ["tmp_9", 32, false],
["bng_ingress_upstream_hasReturned", 1, false],
["userMetadata._ip_eth_type0", 16, false],
["userMetadata._vlan_id1", 12, false],
@@ -39,7 +42,7 @@
["userMetadata._bng_ds_meter_result24", 32, false],
["userMetadata._bng_s_tag25", 12, false],
["userMetadata._bng_c_tag26", 12, false],
- ["_padding_0", 4, false]
+ ["_padding_0", 1, false]
]
},
{
@@ -52,9 +55,24 @@
]
},
{
- "name" : "standard_metadata",
+ "name" : "gtpu_t",
"id" : 2,
"fields" : [
+ ["version", 3, false],
+ ["pt", 1, false],
+ ["spare", 1, false],
+ ["ex_flag", 1, false],
+ ["seq_flag", 1, false],
+ ["npdu_flag", 1, false],
+ ["msgtype", 8, false],
+ ["msglen", 16, false],
+ ["teid", 32, false]
+ ]
+ },
+ {
+ "name" : "standard_metadata",
+ "id" : 3,
+ "fields" : [
["ingress_port", 9, false],
["egress_spec", 9, false],
["egress_port", 9, false],
@@ -76,7 +94,7 @@
},
{
"name" : "ethernet_t",
- "id" : 3,
+ "id" : 4,
"fields" : [
["dst_addr", 48, false],
["src_addr", 48, false]
@@ -84,7 +102,7 @@
},
{
"name" : "vlan_tag_t",
- "id" : 4,
+ "id" : 5,
"fields" : [
["eth_type", 16, false],
["pri", 3, false],
@@ -94,14 +112,14 @@
},
{
"name" : "eth_type_t",
- "id" : 5,
+ "id" : 6,
"fields" : [
["value", 16, false]
]
},
{
"name" : "pppoe_t",
- "id" : 6,
+ "id" : 7,
"fields" : [
["version", 4, false],
["type_id", 4, false],
@@ -113,7 +131,7 @@
},
{
"name" : "mpls_t",
- "id" : 7,
+ "id" : 8,
"fields" : [
["label", 20, false],
["tc", 3, false],
@@ -123,7 +141,7 @@
},
{
"name" : "ipv4_t",
- "id" : 8,
+ "id" : 9,
"fields" : [
["version", 4, false],
["ihl", 4, false],
@@ -142,7 +160,7 @@
},
{
"name" : "tcp_t",
- "id" : 9,
+ "id" : 10,
"fields" : [
["sport", 16, false],
["dport", 16, false],
@@ -159,7 +177,7 @@
},
{
"name" : "udp_t",
- "id" : 10,
+ "id" : 11,
"fields" : [
["sport", 16, false],
["dport", 16, false],
@@ -169,7 +187,7 @@
},
{
"name" : "icmp_t",
- "id" : 11,
+ "id" : 12,
"fields" : [
["icmp_type", 8, false],
["icmp_code", 8, false],
@@ -181,7 +199,7 @@
},
{
"name" : "packet_in_header_t",
- "id" : 12,
+ "id" : 13,
"fields" : [
["ingress_port", 9, false],
["_pad", 7, false]
@@ -197,99 +215,106 @@
"pi_omit" : true
},
{
- "name" : "scalars",
+ "name" : "gtpu_0",
"id" : 1,
+ "header_type" : "gtpu_t",
+ "metadata" : false,
+ "pi_omit" : true
+ },
+ {
+ "name" : "scalars",
+ "id" : 2,
"header_type" : "scalars_0",
"metadata" : true,
"pi_omit" : true
},
{
"name" : "standard_metadata",
- "id" : 2,
+ "id" : 3,
"header_type" : "standard_metadata",
"metadata" : true,
"pi_omit" : true
},
{
"name" : "ethernet",
- "id" : 3,
+ "id" : 4,
"header_type" : "ethernet_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "vlan_tag",
- "id" : 4,
- "header_type" : "vlan_tag_t",
- "metadata" : false,
- "pi_omit" : true
- },
- {
- "name" : "inner_vlan_tag",
"id" : 5,
"header_type" : "vlan_tag_t",
"metadata" : false,
"pi_omit" : true
},
{
- "name" : "eth_type",
+ "name" : "inner_vlan_tag",
"id" : 6,
+ "header_type" : "vlan_tag_t",
+ "metadata" : false,
+ "pi_omit" : true
+ },
+ {
+ "name" : "eth_type",
+ "id" : 7,
"header_type" : "eth_type_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "pppoe",
- "id" : 7,
+ "id" : 8,
"header_type" : "pppoe_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "mpls",
- "id" : 8,
+ "id" : 9,
"header_type" : "mpls_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "ipv4",
- "id" : 9,
+ "id" : 10,
"header_type" : "ipv4_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "tcp",
- "id" : 10,
+ "id" : 11,
"header_type" : "tcp_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "udp",
- "id" : 11,
+ "id" : 12,
"header_type" : "udp_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "icmp",
- "id" : 12,
+ "id" : 13,
"header_type" : "icmp_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "packet_out",
- "id" : 13,
+ "id" : 14,
"header_type" : "packet_out_header_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "packet_in",
- "id" : 14,
+ "id" : 15,
"header_type" : "packet_in_header_t",
"metadata" : false,
"pi_omit" : true
@@ -1149,6 +1174,519 @@
}
],
"op" : "set"
+ },
+ {
+ "parameters" : [
+ {
+ "type" : "field",
+ "value" : ["scalars", "tmp_7"]
+ },
+ {
+ "type" : "lookahead",
+ "value" : [0, 64]
+ }
+ ],
+ "op" : "set"
+ },
+ {
+ "parameters" : [
+ {
+ "parameters" : [
+ {
+ "type" : "header",
+ "value" : "gtpu_0"
+ }
+ ],
+ "op" : "add_header"
+ }
+ ],
+ "op" : "primitive"
+ },
+ {
+ "parameters" : [
+ {
+ "type" : "field",
+ "value" : ["gtpu_0", "version"]
+ },
+ {
+ "type" : "expression",
+ "value" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : ">>",
+ "left" : {
+ "type" : "field",
+ "value" : ["scalars", "tmp_7"]
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0x3d"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0xffffffffffffffff"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0x07"
+ }
+ }
+ }
+ }
+ ],
+ "op" : "set"
+ },
+ {
+ "parameters" : [
+ {
+ "type" : "field",
+ "value" : ["gtpu_0", "pt"]
+ },
+ {
+ "type" : "expression",
+ "value" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : ">>",
+ "left" : {
+ "type" : "field",
+ "value" : ["scalars", "tmp_7"]
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0x3c"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0xffffffffffffffff"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0x01"
+ }
+ }
+ }
+ }
+ ],
+ "op" : "set"
+ },
+ {
+ "parameters" : [
+ {
+ "type" : "field",
+ "value" : ["gtpu_0", "spare"]
+ },
+ {
+ "type" : "expression",
+ "value" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : ">>",
+ "left" : {
+ "type" : "field",
+ "value" : ["scalars", "tmp_7"]
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0x3b"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0xffffffffffffffff"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0x01"
+ }
+ }
+ }
+ }
+ ],
+ "op" : "set"
+ },
+ {
+ "parameters" : [
+ {
+ "type" : "field",
+ "value" : ["gtpu_0", "ex_flag"]
+ },
+ {
+ "type" : "expression",
+ "value" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : ">>",
+ "left" : {
+ "type" : "field",
+ "value" : ["scalars", "tmp_7"]
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0x3a"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0xffffffffffffffff"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0x01"
+ }
+ }
+ }
+ }
+ ],
+ "op" : "set"
+ },
+ {
+ "parameters" : [
+ {
+ "type" : "field",
+ "value" : ["gtpu_0", "seq_flag"]
+ },
+ {
+ "type" : "expression",
+ "value" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : ">>",
+ "left" : {
+ "type" : "field",
+ "value" : ["scalars", "tmp_7"]
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0x39"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0xffffffffffffffff"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0x01"
+ }
+ }
+ }
+ }
+ ],
+ "op" : "set"
+ },
+ {
+ "parameters" : [
+ {
+ "type" : "field",
+ "value" : ["gtpu_0", "npdu_flag"]
+ },
+ {
+ "type" : "expression",
+ "value" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : ">>",
+ "left" : {
+ "type" : "field",
+ "value" : ["scalars", "tmp_7"]
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0x38"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0xffffffffffffffff"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0x01"
+ }
+ }
+ }
+ }
+ ],
+ "op" : "set"
+ },
+ {
+ "parameters" : [
+ {
+ "type" : "field",
+ "value" : ["gtpu_0", "msgtype"]
+ },
+ {
+ "type" : "expression",
+ "value" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : ">>",
+ "left" : {
+ "type" : "field",
+ "value" : ["scalars", "tmp_7"]
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0x30"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0xffffffffffffffff"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0xff"
+ }
+ }
+ }
+ }
+ ],
+ "op" : "set"
+ },
+ {
+ "parameters" : [
+ {
+ "type" : "field",
+ "value" : ["gtpu_0", "msglen"]
+ },
+ {
+ "type" : "expression",
+ "value" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : ">>",
+ "left" : {
+ "type" : "field",
+ "value" : ["scalars", "tmp_7"]
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0x20"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0xffffffffffffffff"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0xffff"
+ }
+ }
+ }
+ }
+ ],
+ "op" : "set"
+ },
+ {
+ "parameters" : [
+ {
+ "type" : "field",
+ "value" : ["gtpu_0", "teid"]
+ },
+ {
+ "type" : "expression",
+ "value" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "field",
+ "value" : ["scalars", "tmp_7"]
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0xffffffff"
+ }
+ }
+ }
+ }
+ ],
+ "op" : "set"
+ },
+ {
+ "parameters" : [
+ {
+ "type" : "field",
+ "value" : ["scalars", "tmp_2"]
+ },
+ {
+ "type" : "expression",
+ "value" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : ">>",
+ "left" : {
+ "type" : "field",
+ "value" : ["scalars", "tmp_7"]
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0x3d"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0xffffffffffffffff"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0x07"
+ }
+ }
+ }
+ }
+ ],
+ "op" : "set"
+ },
+ {
+ "parameters" : [
+ {
+ "type" : "field",
+ "value" : ["scalars", "tmp_4"]
+ },
+ {
+ "type" : "expression",
+ "value" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : ">>",
+ "left" : {
+ "type" : "field",
+ "value" : ["scalars", "tmp_7"]
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0x30"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0xffffffffffffffff"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0xff"
+ }
+ }
+ }
+ }
+ ],
+ "op" : "set"
}
],
"transitions" : [
@@ -1163,6 +1701,14 @@
{
"type" : "field",
"value" : ["udp", "dport"]
+ },
+ {
+ "type" : "field",
+ "value" : ["scalars", "tmp_2"]
+ },
+ {
+ "type" : "field",
+ "value" : ["scalars", "tmp_4"]
}
]
},
@@ -1200,7 +1746,7 @@
"id" : 0,
"source_info" : {
"filename" : "include/parser.p4",
- "line" : 283,
+ "line" : 285,
"column" : 8,
"source_fragment" : "FabricDeparser"
},
@@ -1690,7 +2236,7 @@
],
"source_info" : {
"filename" : "include/control/../header.p4",
- "line" : 162,
+ "line" : 163,
"column" : 36,
"source_fragment" : "2w0x0; ..."
}
@@ -1796,7 +2342,7 @@
],
"source_info" : {
"filename" : "include/control/../header.p4",
- "line" : 164,
+ "line" : 165,
"column" : 39,
"source_fragment" : "2w0x2;; ..."
}
@@ -1860,7 +2406,7 @@
],
"source_info" : {
"filename" : "include/control/../header.p4",
- "line" : 164,
+ "line" : 165,
"column" : 39,
"source_fragment" : "2w0x2;; ..."
}
@@ -3033,7 +3579,7 @@
"parameters" : [
{
"type" : "field",
- "value" : ["scalars", "tmp_2"]
+ "value" : ["scalars", "tmp_8"]
},
{
"type" : "expression",
@@ -3069,7 +3615,7 @@
},
{
"type" : "field",
- "value" : ["scalars", "tmp_2"]
+ "value" : ["scalars", "tmp_8"]
}
],
"source_info" : {
@@ -3091,7 +3637,7 @@
"parameters" : [
{
"type" : "field",
- "value" : ["scalars", "tmp_4"]
+ "value" : ["scalars", "tmp_9"]
},
{
"type" : "expression",
@@ -3127,7 +3673,7 @@
},
{
"type" : "field",
- "value" : ["scalars", "tmp_4"]
+ "value" : ["scalars", "tmp_9"]
}
],
"source_info" : {
@@ -3194,7 +3740,7 @@
],
"source_info" : {
"filename" : "include/control/../header.p4",
- "line" : 163,
+ "line" : 164,
"column" : 37,
"source_fragment" : "2w0x1; ..."
}
diff --git a/pipelines/fabric/impl/src/main/resources/p4c-out/fabric-full/bmv2/default/bmv2.json b/pipelines/fabric/impl/src/main/resources/p4c-out/fabric-full/bmv2/default/bmv2.json
index 1c1b0fe..62424cc 100644
--- a/pipelines/fabric/impl/src/main/resources/p4c-out/fabric-full/bmv2/default/bmv2.json
+++ b/pipelines/fabric/impl/src/main/resources/p4c-out/fabric-full/bmv2/default/bmv2.json
@@ -5,14 +5,17 @@
"id" : 0,
"fields" : [
["tmp_0", 1, false],
- ["tmp_2", 32, false],
+ ["tmp_2", 3, false],
+ ["tmp_4", 8, false],
+ ["tmp_8", 32, false],
["last_ipv4_dscp_0", 6, false],
["tmp_1", 16, false],
["tmp_3", 16, false],
["tmp_5", 4, false],
["tmp_6", 16, false],
- ["tmp_4", 32, false],
- ["tmp_7", 32, false],
+ ["tmp_7", 64, false],
+ ["tmp_9", 32, false],
+ ["tmp_10", 32, false],
["bng_ingress_upstream_hasReturned", 1, false],
["key_0", 64, false],
["process_int_main_process_int_transit_hasReturned", 1, false],
@@ -66,7 +69,7 @@
["userMetadata._int_meta_new_bytes47", 16, false],
["userMetadata._int_meta_ig_tstamp48", 32, false],
["userMetadata._int_meta_eg_tstamp49", 32, false],
- ["_padding_0", 5, false]
+ ["_padding_0", 2, false]
]
},
{
@@ -79,9 +82,24 @@
]
},
{
- "name" : "standard_metadata",
+ "name" : "gtpu_t",
"id" : 2,
"fields" : [
+ ["version", 3, false],
+ ["pt", 1, false],
+ ["spare", 1, false],
+ ["ex_flag", 1, false],
+ ["seq_flag", 1, false],
+ ["npdu_flag", 1, false],
+ ["msgtype", 8, false],
+ ["msglen", 16, false],
+ ["teid", 32, false]
+ ]
+ },
+ {
+ "name" : "standard_metadata",
+ "id" : 3,
+ "fields" : [
["ingress_port", 9, false],
["egress_spec", 9, false],
["egress_port", 9, false],
@@ -103,7 +121,7 @@
},
{
"name" : "ethernet_t",
- "id" : 3,
+ "id" : 4,
"fields" : [
["dst_addr", 48, false],
["src_addr", 48, false]
@@ -111,7 +129,7 @@
},
{
"name" : "vlan_tag_t",
- "id" : 4,
+ "id" : 5,
"fields" : [
["eth_type", 16, false],
["pri", 3, false],
@@ -121,14 +139,14 @@
},
{
"name" : "eth_type_t",
- "id" : 5,
+ "id" : 6,
"fields" : [
["value", 16, false]
]
},
{
"name" : "pppoe_t",
- "id" : 6,
+ "id" : 7,
"fields" : [
["version", 4, false],
["type_id", 4, false],
@@ -140,7 +158,7 @@
},
{
"name" : "mpls_t",
- "id" : 7,
+ "id" : 8,
"fields" : [
["label", 20, false],
["tc", 3, false],
@@ -150,7 +168,7 @@
},
{
"name" : "ipv4_t",
- "id" : 8,
+ "id" : 9,
"fields" : [
["version", 4, false],
["ihl", 4, false],
@@ -169,7 +187,7 @@
},
{
"name" : "udp_t",
- "id" : 9,
+ "id" : 10,
"fields" : [
["sport", 16, false],
["dport", 16, false],
@@ -178,21 +196,6 @@
]
},
{
- "name" : "gtpu_t",
- "id" : 10,
- "fields" : [
- ["version", 3, false],
- ["pt", 1, false],
- ["spare", 1, false],
- ["ex_flag", 1, false],
- ["seq_flag", 1, false],
- ["npdu_flag", 1, false],
- ["msgtype", 8, false],
- ["msglen", 16, false],
- ["teid", 32, false]
- ]
- },
- {
"name" : "tcp_t",
"id" : 11,
"fields" : [
@@ -374,281 +377,288 @@
"pi_omit" : true
},
{
- "name" : "scalars",
+ "name" : "gtpu_0",
"id" : 1,
+ "header_type" : "gtpu_t",
+ "metadata" : false,
+ "pi_omit" : true
+ },
+ {
+ "name" : "scalars",
+ "id" : 2,
"header_type" : "scalars_0",
"metadata" : true,
"pi_omit" : true
},
{
"name" : "standard_metadata",
- "id" : 2,
+ "id" : 3,
"header_type" : "standard_metadata",
"metadata" : true,
"pi_omit" : true
},
{
"name" : "ethernet",
- "id" : 3,
+ "id" : 4,
"header_type" : "ethernet_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "vlan_tag",
- "id" : 4,
- "header_type" : "vlan_tag_t",
- "metadata" : false,
- "pi_omit" : true
- },
- {
- "name" : "inner_vlan_tag",
"id" : 5,
"header_type" : "vlan_tag_t",
"metadata" : false,
"pi_omit" : true
},
{
- "name" : "eth_type",
+ "name" : "inner_vlan_tag",
"id" : 6,
+ "header_type" : "vlan_tag_t",
+ "metadata" : false,
+ "pi_omit" : true
+ },
+ {
+ "name" : "eth_type",
+ "id" : 7,
"header_type" : "eth_type_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "pppoe",
- "id" : 7,
+ "id" : 8,
"header_type" : "pppoe_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "mpls",
- "id" : 8,
+ "id" : 9,
"header_type" : "mpls_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "gtpu_ipv4",
- "id" : 9,
+ "id" : 10,
"header_type" : "ipv4_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "gtpu_udp",
- "id" : 10,
+ "id" : 11,
"header_type" : "udp_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "outer_gtpu",
- "id" : 11,
- "header_type" : "gtpu_t",
- "metadata" : false,
- "pi_omit" : true
- },
- {
- "name" : "gtpu",
"id" : 12,
"header_type" : "gtpu_t",
"metadata" : false,
"pi_omit" : true
},
{
- "name" : "inner_ipv4",
+ "name" : "gtpu",
"id" : 13,
+ "header_type" : "gtpu_t",
+ "metadata" : false,
+ "pi_omit" : true
+ },
+ {
+ "name" : "inner_ipv4",
+ "id" : 14,
"header_type" : "ipv4_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "inner_udp",
- "id" : 14,
+ "id" : 15,
"header_type" : "udp_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "inner_tcp",
- "id" : 15,
+ "id" : 16,
"header_type" : "tcp_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "inner_icmp",
- "id" : 16,
+ "id" : 17,
"header_type" : "icmp_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "ipv4",
- "id" : 17,
+ "id" : 18,
"header_type" : "ipv4_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "ipv6",
- "id" : 18,
+ "id" : 19,
"header_type" : "ipv6_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "tcp",
- "id" : 19,
+ "id" : 20,
"header_type" : "tcp_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "udp",
- "id" : 20,
+ "id" : 21,
"header_type" : "udp_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "icmp",
- "id" : 21,
+ "id" : 22,
"header_type" : "icmp_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "packet_out",
- "id" : 22,
+ "id" : 23,
"header_type" : "packet_out_header_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "packet_in",
- "id" : 23,
+ "id" : 24,
"header_type" : "packet_in_header_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "report_ethernet",
- "id" : 24,
+ "id" : 25,
"header_type" : "ethernet_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "report_eth_type",
- "id" : 25,
+ "id" : 26,
"header_type" : "eth_type_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "report_ipv4",
- "id" : 26,
+ "id" : 27,
"header_type" : "ipv4_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "report_udp",
- "id" : 27,
+ "id" : 28,
"header_type" : "udp_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "report_fixed_header",
- "id" : 28,
+ "id" : 29,
"header_type" : "report_fixed_header_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "intl4_shim",
- "id" : 29,
+ "id" : 30,
"header_type" : "intl4_shim_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "int_header",
- "id" : 30,
+ "id" : 31,
"header_type" : "int_header_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "int_switch_id",
- "id" : 31,
+ "id" : 32,
"header_type" : "int_switch_id_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "int_port_ids",
- "id" : 32,
+ "id" : 33,
"header_type" : "int_port_ids_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "int_hop_latency",
- "id" : 33,
+ "id" : 34,
"header_type" : "int_hop_latency_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "int_q_occupancy",
- "id" : 34,
+ "id" : 35,
"header_type" : "int_q_occupancy_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "int_ingress_tstamp",
- "id" : 35,
+ "id" : 36,
"header_type" : "int_ingress_tstamp_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "int_egress_tstamp",
- "id" : 36,
+ "id" : 37,
"header_type" : "int_egress_tstamp_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "int_q_congestion",
- "id" : 37,
+ "id" : 38,
"header_type" : "int_q_congestion_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "int_egress_tx_util",
- "id" : 38,
+ "id" : 39,
"header_type" : "int_egress_port_tx_util_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "int_data",
- "id" : 39,
+ "id" : 40,
"header_type" : "int_data_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "intl4_tail",
- "id" : 40,
+ "id" : 41,
"header_type" : "intl4_tail_t",
"metadata" : false,
"pi_omit" : true
@@ -1642,12 +1652,525 @@
}
],
"op" : "set"
+ },
+ {
+ "parameters" : [
+ {
+ "type" : "field",
+ "value" : ["scalars", "tmp_7"]
+ },
+ {
+ "type" : "lookahead",
+ "value" : [0, 64]
+ }
+ ],
+ "op" : "set"
+ },
+ {
+ "parameters" : [
+ {
+ "parameters" : [
+ {
+ "type" : "header",
+ "value" : "gtpu_0"
+ }
+ ],
+ "op" : "add_header"
+ }
+ ],
+ "op" : "primitive"
+ },
+ {
+ "parameters" : [
+ {
+ "type" : "field",
+ "value" : ["gtpu_0", "version"]
+ },
+ {
+ "type" : "expression",
+ "value" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : ">>",
+ "left" : {
+ "type" : "field",
+ "value" : ["scalars", "tmp_7"]
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0x3d"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0xffffffffffffffff"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0x07"
+ }
+ }
+ }
+ }
+ ],
+ "op" : "set"
+ },
+ {
+ "parameters" : [
+ {
+ "type" : "field",
+ "value" : ["gtpu_0", "pt"]
+ },
+ {
+ "type" : "expression",
+ "value" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : ">>",
+ "left" : {
+ "type" : "field",
+ "value" : ["scalars", "tmp_7"]
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0x3c"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0xffffffffffffffff"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0x01"
+ }
+ }
+ }
+ }
+ ],
+ "op" : "set"
+ },
+ {
+ "parameters" : [
+ {
+ "type" : "field",
+ "value" : ["gtpu_0", "spare"]
+ },
+ {
+ "type" : "expression",
+ "value" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : ">>",
+ "left" : {
+ "type" : "field",
+ "value" : ["scalars", "tmp_7"]
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0x3b"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0xffffffffffffffff"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0x01"
+ }
+ }
+ }
+ }
+ ],
+ "op" : "set"
+ },
+ {
+ "parameters" : [
+ {
+ "type" : "field",
+ "value" : ["gtpu_0", "ex_flag"]
+ },
+ {
+ "type" : "expression",
+ "value" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : ">>",
+ "left" : {
+ "type" : "field",
+ "value" : ["scalars", "tmp_7"]
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0x3a"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0xffffffffffffffff"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0x01"
+ }
+ }
+ }
+ }
+ ],
+ "op" : "set"
+ },
+ {
+ "parameters" : [
+ {
+ "type" : "field",
+ "value" : ["gtpu_0", "seq_flag"]
+ },
+ {
+ "type" : "expression",
+ "value" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : ">>",
+ "left" : {
+ "type" : "field",
+ "value" : ["scalars", "tmp_7"]
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0x39"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0xffffffffffffffff"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0x01"
+ }
+ }
+ }
+ }
+ ],
+ "op" : "set"
+ },
+ {
+ "parameters" : [
+ {
+ "type" : "field",
+ "value" : ["gtpu_0", "npdu_flag"]
+ },
+ {
+ "type" : "expression",
+ "value" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : ">>",
+ "left" : {
+ "type" : "field",
+ "value" : ["scalars", "tmp_7"]
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0x38"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0xffffffffffffffff"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0x01"
+ }
+ }
+ }
+ }
+ ],
+ "op" : "set"
+ },
+ {
+ "parameters" : [
+ {
+ "type" : "field",
+ "value" : ["gtpu_0", "msgtype"]
+ },
+ {
+ "type" : "expression",
+ "value" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : ">>",
+ "left" : {
+ "type" : "field",
+ "value" : ["scalars", "tmp_7"]
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0x30"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0xffffffffffffffff"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0xff"
+ }
+ }
+ }
+ }
+ ],
+ "op" : "set"
+ },
+ {
+ "parameters" : [
+ {
+ "type" : "field",
+ "value" : ["gtpu_0", "msglen"]
+ },
+ {
+ "type" : "expression",
+ "value" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : ">>",
+ "left" : {
+ "type" : "field",
+ "value" : ["scalars", "tmp_7"]
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0x20"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0xffffffffffffffff"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0xffff"
+ }
+ }
+ }
+ }
+ ],
+ "op" : "set"
+ },
+ {
+ "parameters" : [
+ {
+ "type" : "field",
+ "value" : ["gtpu_0", "teid"]
+ },
+ {
+ "type" : "expression",
+ "value" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "field",
+ "value" : ["scalars", "tmp_7"]
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0xffffffff"
+ }
+ }
+ }
+ }
+ ],
+ "op" : "set"
+ },
+ {
+ "parameters" : [
+ {
+ "type" : "field",
+ "value" : ["scalars", "tmp_2"]
+ },
+ {
+ "type" : "expression",
+ "value" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : ">>",
+ "left" : {
+ "type" : "field",
+ "value" : ["scalars", "tmp_7"]
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0x3d"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0xffffffffffffffff"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0x07"
+ }
+ }
+ }
+ }
+ ],
+ "op" : "set"
+ },
+ {
+ "parameters" : [
+ {
+ "type" : "field",
+ "value" : ["scalars", "tmp_4"]
+ },
+ {
+ "type" : "expression",
+ "value" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : ">>",
+ "left" : {
+ "type" : "field",
+ "value" : ["scalars", "tmp_7"]
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0x30"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0xffffffffffffffff"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0xff"
+ }
+ }
+ }
+ }
+ ],
+ "op" : "set"
}
],
"transitions" : [
{
"type" : "hexstr",
- "value" : "0x0868",
+ "value" : "0x086801ff",
"mask" : null,
"next_state" : "parse_gtpu"
},
@@ -1662,6 +2185,14 @@
{
"type" : "field",
"value" : ["udp", "dport"]
+ },
+ {
+ "type" : "field",
+ "value" : ["scalars", "tmp_2"]
+ },
+ {
+ "type" : "field",
+ "value" : ["scalars", "tmp_4"]
}
]
},
@@ -1885,7 +2416,7 @@
"parameters" : [
{
"type" : "field",
- "value" : ["scalars", "tmp_2"]
+ "value" : ["scalars", "tmp_8"]
},
{
"type" : "expression",
@@ -1957,7 +2488,7 @@
"type" : "expression",
"value" : {
"type" : "field",
- "value" : ["scalars", "tmp_2"]
+ "value" : ["scalars", "tmp_8"]
}
}
],
@@ -2008,7 +2539,7 @@
"id" : 0,
"source_info" : {
"filename" : "include/parser.p4",
- "line" : 283,
+ "line" : 285,
"column" : 8,
"source_fragment" : "FabricDeparser"
},
@@ -2769,7 +3300,7 @@
],
"source_info" : {
"filename" : "include/control/../header.p4",
- "line" : 162,
+ "line" : 163,
"column" : 36,
"source_fragment" : "2w0x0; ..."
}
@@ -2810,7 +3341,7 @@
],
"source_info" : {
"filename" : "include/control/../header.p4",
- "line" : 162,
+ "line" : 163,
"column" : 36,
"source_fragment" : "2w0x0; ..."
}
@@ -2976,7 +3507,7 @@
],
"source_info" : {
"filename" : "include/control/../header.p4",
- "line" : 164,
+ "line" : 165,
"column" : 39,
"source_fragment" : "2w0x2;; ..."
}
@@ -3040,7 +3571,7 @@
],
"source_info" : {
"filename" : "include/control/../header.p4",
- "line" : 164,
+ "line" : 165,
"column" : 39,
"source_fragment" : "2w0x2;; ..."
}
@@ -7565,7 +8096,7 @@
"parameters" : [
{
"type" : "field",
- "value" : ["scalars", "tmp_4"]
+ "value" : ["scalars", "tmp_9"]
},
{
"type" : "expression",
@@ -7601,7 +8132,7 @@
},
{
"type" : "field",
- "value" : ["scalars", "tmp_4"]
+ "value" : ["scalars", "tmp_9"]
}
],
"source_info" : {
@@ -7623,7 +8154,7 @@
"parameters" : [
{
"type" : "field",
- "value" : ["scalars", "tmp_7"]
+ "value" : ["scalars", "tmp_10"]
},
{
"type" : "expression",
@@ -7659,7 +8190,7 @@
},
{
"type" : "field",
- "value" : ["scalars", "tmp_7"]
+ "value" : ["scalars", "tmp_10"]
}
],
"source_info" : {
@@ -7752,7 +8283,7 @@
],
"source_info" : {
"filename" : "include/control/../header.p4",
- "line" : 163,
+ "line" : 164,
"column" : 37,
"source_fragment" : "2w0x1; ..."
}
diff --git a/pipelines/fabric/impl/src/main/resources/p4c-out/fabric-int/bmv2/default/bmv2.json b/pipelines/fabric/impl/src/main/resources/p4c-out/fabric-int/bmv2/default/bmv2.json
index 6b7a209..3017ba0 100644
--- a/pipelines/fabric/impl/src/main/resources/p4c-out/fabric-int/bmv2/default/bmv2.json
+++ b/pipelines/fabric/impl/src/main/resources/p4c-out/fabric-int/bmv2/default/bmv2.json
@@ -5,13 +5,16 @@
"id" : 0,
"fields" : [
["tmp_0", 1, false],
+ ["tmp_2", 3, false],
+ ["tmp_4", 8, false],
["last_ipv4_dscp_0", 6, false],
["tmp_1", 16, false],
["tmp_3", 16, false],
["tmp_5", 4, false],
["tmp_6", 16, false],
- ["tmp_2", 32, false],
- ["tmp_4", 32, false],
+ ["tmp_7", 64, false],
+ ["tmp_8", 32, false],
+ ["tmp_9", 32, false],
["process_int_main_process_int_transit_hasReturned", 1, false],
["userMetadata._ip_eth_type0", 16, false],
["userMetadata._vlan_id1", 12, false],
@@ -38,7 +41,7 @@
["userMetadata._int_meta_new_bytes22", 16, false],
["userMetadata._int_meta_ig_tstamp23", 32, false],
["userMetadata._int_meta_eg_tstamp24", 32, false],
- ["_padding_0", 6, false]
+ ["_padding_0", 3, false]
]
},
{
@@ -51,9 +54,24 @@
]
},
{
- "name" : "standard_metadata",
+ "name" : "gtpu_t",
"id" : 2,
"fields" : [
+ ["version", 3, false],
+ ["pt", 1, false],
+ ["spare", 1, false],
+ ["ex_flag", 1, false],
+ ["seq_flag", 1, false],
+ ["npdu_flag", 1, false],
+ ["msgtype", 8, false],
+ ["msglen", 16, false],
+ ["teid", 32, false]
+ ]
+ },
+ {
+ "name" : "standard_metadata",
+ "id" : 3,
+ "fields" : [
["ingress_port", 9, false],
["egress_spec", 9, false],
["egress_port", 9, false],
@@ -75,7 +93,7 @@
},
{
"name" : "ethernet_t",
- "id" : 3,
+ "id" : 4,
"fields" : [
["dst_addr", 48, false],
["src_addr", 48, false]
@@ -83,7 +101,7 @@
},
{
"name" : "vlan_tag_t",
- "id" : 4,
+ "id" : 5,
"fields" : [
["eth_type", 16, false],
["pri", 3, false],
@@ -93,14 +111,14 @@
},
{
"name" : "eth_type_t",
- "id" : 5,
+ "id" : 6,
"fields" : [
["value", 16, false]
]
},
{
"name" : "mpls_t",
- "id" : 6,
+ "id" : 7,
"fields" : [
["label", 20, false],
["tc", 3, false],
@@ -110,7 +128,7 @@
},
{
"name" : "ipv4_t",
- "id" : 7,
+ "id" : 8,
"fields" : [
["version", 4, false],
["ihl", 4, false],
@@ -129,7 +147,7 @@
},
{
"name" : "tcp_t",
- "id" : 8,
+ "id" : 9,
"fields" : [
["sport", 16, false],
["dport", 16, false],
@@ -146,7 +164,7 @@
},
{
"name" : "udp_t",
- "id" : 9,
+ "id" : 10,
"fields" : [
["sport", 16, false],
["dport", 16, false],
@@ -156,7 +174,7 @@
},
{
"name" : "icmp_t",
- "id" : 10,
+ "id" : 11,
"fields" : [
["icmp_type", 8, false],
["icmp_code", 8, false],
@@ -168,7 +186,7 @@
},
{
"name" : "packet_in_header_t",
- "id" : 11,
+ "id" : 12,
"fields" : [
["ingress_port", 9, false],
["_pad", 7, false]
@@ -176,7 +194,7 @@
},
{
"name" : "intl4_shim_t",
- "id" : 12,
+ "id" : 13,
"fields" : [
["int_type", 8, false],
["rsvd1", 8, false],
@@ -186,7 +204,7 @@
},
{
"name" : "int_header_t",
- "id" : 13,
+ "id" : 14,
"fields" : [
["ver", 2, false],
["rep", 2, false],
@@ -205,14 +223,14 @@
},
{
"name" : "int_switch_id_t",
- "id" : 14,
+ "id" : 15,
"fields" : [
["switch_id", 32, false]
]
},
{
"name" : "int_port_ids_t",
- "id" : 15,
+ "id" : 16,
"fields" : [
["ingress_port_id", 16, false],
["egress_port_id", 16, false]
@@ -220,14 +238,14 @@
},
{
"name" : "int_hop_latency_t",
- "id" : 16,
+ "id" : 17,
"fields" : [
["hop_latency", 32, false]
]
},
{
"name" : "int_q_occupancy_t",
- "id" : 17,
+ "id" : 18,
"fields" : [
["q_id", 8, false],
["q_occupancy", 24, false]
@@ -235,21 +253,21 @@
},
{
"name" : "int_ingress_tstamp_t",
- "id" : 18,
+ "id" : 19,
"fields" : [
["ingress_tstamp", 32, false]
]
},
{
"name" : "int_egress_tstamp_t",
- "id" : 19,
+ "id" : 20,
"fields" : [
["egress_tstamp", 32, false]
]
},
{
"name" : "int_q_congestion_t",
- "id" : 20,
+ "id" : 21,
"fields" : [
["q_id", 8, false],
["q_congestion", 24, false]
@@ -257,14 +275,14 @@
},
{
"name" : "int_egress_port_tx_util_t",
- "id" : 21,
+ "id" : 22,
"fields" : [
["egress_port_tx_util", 32, false]
]
},
{
"name" : "intl4_tail_t",
- "id" : 22,
+ "id" : 23,
"fields" : [
["next_proto", 8, false],
["dest_port", 16, false],
@@ -282,169 +300,176 @@
"pi_omit" : true
},
{
- "name" : "scalars",
+ "name" : "gtpu_0",
"id" : 1,
+ "header_type" : "gtpu_t",
+ "metadata" : false,
+ "pi_omit" : true
+ },
+ {
+ "name" : "scalars",
+ "id" : 2,
"header_type" : "scalars_0",
"metadata" : true,
"pi_omit" : true
},
{
"name" : "standard_metadata",
- "id" : 2,
+ "id" : 3,
"header_type" : "standard_metadata",
"metadata" : true,
"pi_omit" : true
},
{
"name" : "ethernet",
- "id" : 3,
+ "id" : 4,
"header_type" : "ethernet_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "vlan_tag",
- "id" : 4,
- "header_type" : "vlan_tag_t",
- "metadata" : false,
- "pi_omit" : true
- },
- {
- "name" : "inner_vlan_tag",
"id" : 5,
"header_type" : "vlan_tag_t",
"metadata" : false,
"pi_omit" : true
},
{
- "name" : "eth_type",
+ "name" : "inner_vlan_tag",
"id" : 6,
+ "header_type" : "vlan_tag_t",
+ "metadata" : false,
+ "pi_omit" : true
+ },
+ {
+ "name" : "eth_type",
+ "id" : 7,
"header_type" : "eth_type_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "mpls",
- "id" : 7,
+ "id" : 8,
"header_type" : "mpls_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "ipv4",
- "id" : 8,
+ "id" : 9,
"header_type" : "ipv4_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "tcp",
- "id" : 9,
+ "id" : 10,
"header_type" : "tcp_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "udp",
- "id" : 10,
+ "id" : 11,
"header_type" : "udp_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "icmp",
- "id" : 11,
+ "id" : 12,
"header_type" : "icmp_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "packet_out",
- "id" : 12,
+ "id" : 13,
"header_type" : "packet_out_header_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "packet_in",
- "id" : 13,
+ "id" : 14,
"header_type" : "packet_in_header_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "intl4_shim",
- "id" : 14,
+ "id" : 15,
"header_type" : "intl4_shim_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "int_header",
- "id" : 15,
+ "id" : 16,
"header_type" : "int_header_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "int_switch_id",
- "id" : 16,
+ "id" : 17,
"header_type" : "int_switch_id_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "int_port_ids",
- "id" : 17,
+ "id" : 18,
"header_type" : "int_port_ids_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "int_hop_latency",
- "id" : 18,
+ "id" : 19,
"header_type" : "int_hop_latency_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "int_q_occupancy",
- "id" : 19,
+ "id" : 20,
"header_type" : "int_q_occupancy_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "int_ingress_tstamp",
- "id" : 20,
+ "id" : 21,
"header_type" : "int_ingress_tstamp_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "int_egress_tstamp",
- "id" : 21,
+ "id" : 22,
"header_type" : "int_egress_tstamp_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "int_q_congestion",
- "id" : 22,
+ "id" : 23,
"header_type" : "int_q_congestion_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "int_egress_tx_util",
- "id" : 23,
+ "id" : 24,
"header_type" : "int_egress_port_tx_util_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "intl4_tail",
- "id" : 24,
+ "id" : 25,
"header_type" : "intl4_tail_t",
"metadata" : false,
"pi_omit" : true
@@ -1238,6 +1263,519 @@
}
],
"op" : "set"
+ },
+ {
+ "parameters" : [
+ {
+ "type" : "field",
+ "value" : ["scalars", "tmp_7"]
+ },
+ {
+ "type" : "lookahead",
+ "value" : [0, 64]
+ }
+ ],
+ "op" : "set"
+ },
+ {
+ "parameters" : [
+ {
+ "parameters" : [
+ {
+ "type" : "header",
+ "value" : "gtpu_0"
+ }
+ ],
+ "op" : "add_header"
+ }
+ ],
+ "op" : "primitive"
+ },
+ {
+ "parameters" : [
+ {
+ "type" : "field",
+ "value" : ["gtpu_0", "version"]
+ },
+ {
+ "type" : "expression",
+ "value" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : ">>",
+ "left" : {
+ "type" : "field",
+ "value" : ["scalars", "tmp_7"]
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0x3d"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0xffffffffffffffff"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0x07"
+ }
+ }
+ }
+ }
+ ],
+ "op" : "set"
+ },
+ {
+ "parameters" : [
+ {
+ "type" : "field",
+ "value" : ["gtpu_0", "pt"]
+ },
+ {
+ "type" : "expression",
+ "value" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : ">>",
+ "left" : {
+ "type" : "field",
+ "value" : ["scalars", "tmp_7"]
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0x3c"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0xffffffffffffffff"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0x01"
+ }
+ }
+ }
+ }
+ ],
+ "op" : "set"
+ },
+ {
+ "parameters" : [
+ {
+ "type" : "field",
+ "value" : ["gtpu_0", "spare"]
+ },
+ {
+ "type" : "expression",
+ "value" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : ">>",
+ "left" : {
+ "type" : "field",
+ "value" : ["scalars", "tmp_7"]
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0x3b"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0xffffffffffffffff"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0x01"
+ }
+ }
+ }
+ }
+ ],
+ "op" : "set"
+ },
+ {
+ "parameters" : [
+ {
+ "type" : "field",
+ "value" : ["gtpu_0", "ex_flag"]
+ },
+ {
+ "type" : "expression",
+ "value" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : ">>",
+ "left" : {
+ "type" : "field",
+ "value" : ["scalars", "tmp_7"]
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0x3a"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0xffffffffffffffff"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0x01"
+ }
+ }
+ }
+ }
+ ],
+ "op" : "set"
+ },
+ {
+ "parameters" : [
+ {
+ "type" : "field",
+ "value" : ["gtpu_0", "seq_flag"]
+ },
+ {
+ "type" : "expression",
+ "value" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : ">>",
+ "left" : {
+ "type" : "field",
+ "value" : ["scalars", "tmp_7"]
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0x39"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0xffffffffffffffff"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0x01"
+ }
+ }
+ }
+ }
+ ],
+ "op" : "set"
+ },
+ {
+ "parameters" : [
+ {
+ "type" : "field",
+ "value" : ["gtpu_0", "npdu_flag"]
+ },
+ {
+ "type" : "expression",
+ "value" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : ">>",
+ "left" : {
+ "type" : "field",
+ "value" : ["scalars", "tmp_7"]
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0x38"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0xffffffffffffffff"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0x01"
+ }
+ }
+ }
+ }
+ ],
+ "op" : "set"
+ },
+ {
+ "parameters" : [
+ {
+ "type" : "field",
+ "value" : ["gtpu_0", "msgtype"]
+ },
+ {
+ "type" : "expression",
+ "value" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : ">>",
+ "left" : {
+ "type" : "field",
+ "value" : ["scalars", "tmp_7"]
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0x30"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0xffffffffffffffff"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0xff"
+ }
+ }
+ }
+ }
+ ],
+ "op" : "set"
+ },
+ {
+ "parameters" : [
+ {
+ "type" : "field",
+ "value" : ["gtpu_0", "msglen"]
+ },
+ {
+ "type" : "expression",
+ "value" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : ">>",
+ "left" : {
+ "type" : "field",
+ "value" : ["scalars", "tmp_7"]
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0x20"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0xffffffffffffffff"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0xffff"
+ }
+ }
+ }
+ }
+ ],
+ "op" : "set"
+ },
+ {
+ "parameters" : [
+ {
+ "type" : "field",
+ "value" : ["gtpu_0", "teid"]
+ },
+ {
+ "type" : "expression",
+ "value" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "field",
+ "value" : ["scalars", "tmp_7"]
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0xffffffff"
+ }
+ }
+ }
+ }
+ ],
+ "op" : "set"
+ },
+ {
+ "parameters" : [
+ {
+ "type" : "field",
+ "value" : ["scalars", "tmp_2"]
+ },
+ {
+ "type" : "expression",
+ "value" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : ">>",
+ "left" : {
+ "type" : "field",
+ "value" : ["scalars", "tmp_7"]
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0x3d"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0xffffffffffffffff"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0x07"
+ }
+ }
+ }
+ }
+ ],
+ "op" : "set"
+ },
+ {
+ "parameters" : [
+ {
+ "type" : "field",
+ "value" : ["scalars", "tmp_4"]
+ },
+ {
+ "type" : "expression",
+ "value" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : ">>",
+ "left" : {
+ "type" : "field",
+ "value" : ["scalars", "tmp_7"]
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0x30"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0xffffffffffffffff"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0xff"
+ }
+ }
+ }
+ }
+ ],
+ "op" : "set"
}
],
"transitions" : [
@@ -1252,6 +1790,14 @@
{
"type" : "field",
"value" : ["udp", "dport"]
+ },
+ {
+ "type" : "field",
+ "value" : ["scalars", "tmp_2"]
+ },
+ {
+ "type" : "field",
+ "value" : ["scalars", "tmp_4"]
}
]
},
@@ -1396,7 +1942,7 @@
"id" : 0,
"source_info" : {
"filename" : "include/parser.p4",
- "line" : 283,
+ "line" : 285,
"column" : 8,
"source_fragment" : "FabricDeparser"
},
@@ -2752,7 +3298,7 @@
"parameters" : [
{
"type" : "field",
- "value" : ["scalars", "tmp_2"]
+ "value" : ["scalars", "tmp_8"]
},
{
"type" : "expression",
@@ -2788,7 +3334,7 @@
},
{
"type" : "field",
- "value" : ["scalars", "tmp_2"]
+ "value" : ["scalars", "tmp_8"]
}
],
"source_info" : {
@@ -2810,7 +3356,7 @@
"parameters" : [
{
"type" : "field",
- "value" : ["scalars", "tmp_4"]
+ "value" : ["scalars", "tmp_9"]
},
{
"type" : "expression",
@@ -2846,7 +3392,7 @@
},
{
"type" : "field",
- "value" : ["scalars", "tmp_4"]
+ "value" : ["scalars", "tmp_9"]
}
],
"source_info" : {
diff --git a/pipelines/fabric/impl/src/main/resources/p4c-out/fabric-spgw-int/bmv2/default/bmv2.json b/pipelines/fabric/impl/src/main/resources/p4c-out/fabric-spgw-int/bmv2/default/bmv2.json
index 800a3c5..3595fd9 100644
--- a/pipelines/fabric/impl/src/main/resources/p4c-out/fabric-spgw-int/bmv2/default/bmv2.json
+++ b/pipelines/fabric/impl/src/main/resources/p4c-out/fabric-spgw-int/bmv2/default/bmv2.json
@@ -5,13 +5,16 @@
"id" : 0,
"fields" : [
["tmp_0", 1, false],
+ ["tmp_2", 3, false],
+ ["tmp_4", 8, false],
["last_ipv4_dscp_0", 6, false],
["tmp_1", 16, false],
["tmp_3", 16, false],
["tmp_5", 4, false],
["tmp_6", 16, false],
- ["tmp_2", 32, false],
- ["tmp_4", 32, false],
+ ["tmp_7", 64, false],
+ ["tmp_8", 32, false],
+ ["tmp_9", 32, false],
["process_int_main_process_int_transit_hasReturned", 1, false],
["userMetadata._ip_eth_type0", 16, false],
["userMetadata._vlan_id1", 12, false],
@@ -53,7 +56,7 @@
["userMetadata._int_meta_new_bytes37", 16, false],
["userMetadata._int_meta_ig_tstamp38", 32, false],
["userMetadata._int_meta_eg_tstamp39", 32, false],
- ["_padding_0", 1, false]
+ ["_padding_0", 6, false]
]
},
{
@@ -66,9 +69,24 @@
]
},
{
- "name" : "standard_metadata",
+ "name" : "gtpu_t",
"id" : 2,
"fields" : [
+ ["version", 3, false],
+ ["pt", 1, false],
+ ["spare", 1, false],
+ ["ex_flag", 1, false],
+ ["seq_flag", 1, false],
+ ["npdu_flag", 1, false],
+ ["msgtype", 8, false],
+ ["msglen", 16, false],
+ ["teid", 32, false]
+ ]
+ },
+ {
+ "name" : "standard_metadata",
+ "id" : 3,
+ "fields" : [
["ingress_port", 9, false],
["egress_spec", 9, false],
["egress_port", 9, false],
@@ -90,7 +108,7 @@
},
{
"name" : "ethernet_t",
- "id" : 3,
+ "id" : 4,
"fields" : [
["dst_addr", 48, false],
["src_addr", 48, false]
@@ -98,7 +116,7 @@
},
{
"name" : "vlan_tag_t",
- "id" : 4,
+ "id" : 5,
"fields" : [
["eth_type", 16, false],
["pri", 3, false],
@@ -108,14 +126,14 @@
},
{
"name" : "eth_type_t",
- "id" : 5,
+ "id" : 6,
"fields" : [
["value", 16, false]
]
},
{
"name" : "mpls_t",
- "id" : 6,
+ "id" : 7,
"fields" : [
["label", 20, false],
["tc", 3, false],
@@ -125,7 +143,7 @@
},
{
"name" : "ipv4_t",
- "id" : 7,
+ "id" : 8,
"fields" : [
["version", 4, false],
["ihl", 4, false],
@@ -144,7 +162,7 @@
},
{
"name" : "udp_t",
- "id" : 8,
+ "id" : 9,
"fields" : [
["sport", 16, false],
["dport", 16, false],
@@ -153,21 +171,6 @@
]
},
{
- "name" : "gtpu_t",
- "id" : 9,
- "fields" : [
- ["version", 3, false],
- ["pt", 1, false],
- ["spare", 1, false],
- ["ex_flag", 1, false],
- ["seq_flag", 1, false],
- ["npdu_flag", 1, false],
- ["msgtype", 8, false],
- ["msglen", 16, false],
- ["teid", 32, false]
- ]
- },
- {
"name" : "tcp_t",
"id" : 10,
"fields" : [
@@ -312,225 +315,232 @@
"pi_omit" : true
},
{
- "name" : "scalars",
+ "name" : "gtpu_0",
"id" : 1,
+ "header_type" : "gtpu_t",
+ "metadata" : false,
+ "pi_omit" : true
+ },
+ {
+ "name" : "scalars",
+ "id" : 2,
"header_type" : "scalars_0",
"metadata" : true,
"pi_omit" : true
},
{
"name" : "standard_metadata",
- "id" : 2,
+ "id" : 3,
"header_type" : "standard_metadata",
"metadata" : true,
"pi_omit" : true
},
{
"name" : "ethernet",
- "id" : 3,
+ "id" : 4,
"header_type" : "ethernet_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "vlan_tag",
- "id" : 4,
- "header_type" : "vlan_tag_t",
- "metadata" : false,
- "pi_omit" : true
- },
- {
- "name" : "inner_vlan_tag",
"id" : 5,
"header_type" : "vlan_tag_t",
"metadata" : false,
"pi_omit" : true
},
{
- "name" : "eth_type",
+ "name" : "inner_vlan_tag",
"id" : 6,
+ "header_type" : "vlan_tag_t",
+ "metadata" : false,
+ "pi_omit" : true
+ },
+ {
+ "name" : "eth_type",
+ "id" : 7,
"header_type" : "eth_type_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "mpls",
- "id" : 7,
+ "id" : 8,
"header_type" : "mpls_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "gtpu_ipv4",
- "id" : 8,
+ "id" : 9,
"header_type" : "ipv4_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "gtpu_udp",
- "id" : 9,
+ "id" : 10,
"header_type" : "udp_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "outer_gtpu",
- "id" : 10,
- "header_type" : "gtpu_t",
- "metadata" : false,
- "pi_omit" : true
- },
- {
- "name" : "gtpu",
"id" : 11,
"header_type" : "gtpu_t",
"metadata" : false,
"pi_omit" : true
},
{
- "name" : "inner_ipv4",
+ "name" : "gtpu",
"id" : 12,
+ "header_type" : "gtpu_t",
+ "metadata" : false,
+ "pi_omit" : true
+ },
+ {
+ "name" : "inner_ipv4",
+ "id" : 13,
"header_type" : "ipv4_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "inner_udp",
- "id" : 13,
+ "id" : 14,
"header_type" : "udp_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "inner_tcp",
- "id" : 14,
+ "id" : 15,
"header_type" : "tcp_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "inner_icmp",
- "id" : 15,
+ "id" : 16,
"header_type" : "icmp_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "ipv4",
- "id" : 16,
+ "id" : 17,
"header_type" : "ipv4_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "tcp",
- "id" : 17,
+ "id" : 18,
"header_type" : "tcp_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "udp",
- "id" : 18,
+ "id" : 19,
"header_type" : "udp_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "icmp",
- "id" : 19,
+ "id" : 20,
"header_type" : "icmp_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "packet_out",
- "id" : 20,
+ "id" : 21,
"header_type" : "packet_out_header_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "packet_in",
- "id" : 21,
+ "id" : 22,
"header_type" : "packet_in_header_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "intl4_shim",
- "id" : 22,
+ "id" : 23,
"header_type" : "intl4_shim_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "int_header",
- "id" : 23,
+ "id" : 24,
"header_type" : "int_header_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "int_switch_id",
- "id" : 24,
+ "id" : 25,
"header_type" : "int_switch_id_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "int_port_ids",
- "id" : 25,
+ "id" : 26,
"header_type" : "int_port_ids_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "int_hop_latency",
- "id" : 26,
+ "id" : 27,
"header_type" : "int_hop_latency_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "int_q_occupancy",
- "id" : 27,
+ "id" : 28,
"header_type" : "int_q_occupancy_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "int_ingress_tstamp",
- "id" : 28,
+ "id" : 29,
"header_type" : "int_ingress_tstamp_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "int_egress_tstamp",
- "id" : 29,
+ "id" : 30,
"header_type" : "int_egress_tstamp_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "int_q_congestion",
- "id" : 30,
+ "id" : 31,
"header_type" : "int_q_congestion_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "int_egress_tx_util",
- "id" : 31,
+ "id" : 32,
"header_type" : "int_egress_port_tx_util_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "intl4_tail",
- "id" : 32,
+ "id" : 33,
"header_type" : "intl4_tail_t",
"metadata" : false,
"pi_omit" : true
@@ -1324,12 +1334,525 @@
}
],
"op" : "set"
+ },
+ {
+ "parameters" : [
+ {
+ "type" : "field",
+ "value" : ["scalars", "tmp_7"]
+ },
+ {
+ "type" : "lookahead",
+ "value" : [0, 64]
+ }
+ ],
+ "op" : "set"
+ },
+ {
+ "parameters" : [
+ {
+ "parameters" : [
+ {
+ "type" : "header",
+ "value" : "gtpu_0"
+ }
+ ],
+ "op" : "add_header"
+ }
+ ],
+ "op" : "primitive"
+ },
+ {
+ "parameters" : [
+ {
+ "type" : "field",
+ "value" : ["gtpu_0", "version"]
+ },
+ {
+ "type" : "expression",
+ "value" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : ">>",
+ "left" : {
+ "type" : "field",
+ "value" : ["scalars", "tmp_7"]
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0x3d"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0xffffffffffffffff"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0x07"
+ }
+ }
+ }
+ }
+ ],
+ "op" : "set"
+ },
+ {
+ "parameters" : [
+ {
+ "type" : "field",
+ "value" : ["gtpu_0", "pt"]
+ },
+ {
+ "type" : "expression",
+ "value" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : ">>",
+ "left" : {
+ "type" : "field",
+ "value" : ["scalars", "tmp_7"]
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0x3c"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0xffffffffffffffff"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0x01"
+ }
+ }
+ }
+ }
+ ],
+ "op" : "set"
+ },
+ {
+ "parameters" : [
+ {
+ "type" : "field",
+ "value" : ["gtpu_0", "spare"]
+ },
+ {
+ "type" : "expression",
+ "value" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : ">>",
+ "left" : {
+ "type" : "field",
+ "value" : ["scalars", "tmp_7"]
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0x3b"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0xffffffffffffffff"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0x01"
+ }
+ }
+ }
+ }
+ ],
+ "op" : "set"
+ },
+ {
+ "parameters" : [
+ {
+ "type" : "field",
+ "value" : ["gtpu_0", "ex_flag"]
+ },
+ {
+ "type" : "expression",
+ "value" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : ">>",
+ "left" : {
+ "type" : "field",
+ "value" : ["scalars", "tmp_7"]
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0x3a"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0xffffffffffffffff"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0x01"
+ }
+ }
+ }
+ }
+ ],
+ "op" : "set"
+ },
+ {
+ "parameters" : [
+ {
+ "type" : "field",
+ "value" : ["gtpu_0", "seq_flag"]
+ },
+ {
+ "type" : "expression",
+ "value" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : ">>",
+ "left" : {
+ "type" : "field",
+ "value" : ["scalars", "tmp_7"]
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0x39"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0xffffffffffffffff"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0x01"
+ }
+ }
+ }
+ }
+ ],
+ "op" : "set"
+ },
+ {
+ "parameters" : [
+ {
+ "type" : "field",
+ "value" : ["gtpu_0", "npdu_flag"]
+ },
+ {
+ "type" : "expression",
+ "value" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : ">>",
+ "left" : {
+ "type" : "field",
+ "value" : ["scalars", "tmp_7"]
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0x38"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0xffffffffffffffff"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0x01"
+ }
+ }
+ }
+ }
+ ],
+ "op" : "set"
+ },
+ {
+ "parameters" : [
+ {
+ "type" : "field",
+ "value" : ["gtpu_0", "msgtype"]
+ },
+ {
+ "type" : "expression",
+ "value" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : ">>",
+ "left" : {
+ "type" : "field",
+ "value" : ["scalars", "tmp_7"]
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0x30"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0xffffffffffffffff"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0xff"
+ }
+ }
+ }
+ }
+ ],
+ "op" : "set"
+ },
+ {
+ "parameters" : [
+ {
+ "type" : "field",
+ "value" : ["gtpu_0", "msglen"]
+ },
+ {
+ "type" : "expression",
+ "value" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : ">>",
+ "left" : {
+ "type" : "field",
+ "value" : ["scalars", "tmp_7"]
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0x20"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0xffffffffffffffff"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0xffff"
+ }
+ }
+ }
+ }
+ ],
+ "op" : "set"
+ },
+ {
+ "parameters" : [
+ {
+ "type" : "field",
+ "value" : ["gtpu_0", "teid"]
+ },
+ {
+ "type" : "expression",
+ "value" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "field",
+ "value" : ["scalars", "tmp_7"]
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0xffffffff"
+ }
+ }
+ }
+ }
+ ],
+ "op" : "set"
+ },
+ {
+ "parameters" : [
+ {
+ "type" : "field",
+ "value" : ["scalars", "tmp_2"]
+ },
+ {
+ "type" : "expression",
+ "value" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : ">>",
+ "left" : {
+ "type" : "field",
+ "value" : ["scalars", "tmp_7"]
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0x3d"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0xffffffffffffffff"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0x07"
+ }
+ }
+ }
+ }
+ ],
+ "op" : "set"
+ },
+ {
+ "parameters" : [
+ {
+ "type" : "field",
+ "value" : ["scalars", "tmp_4"]
+ },
+ {
+ "type" : "expression",
+ "value" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : ">>",
+ "left" : {
+ "type" : "field",
+ "value" : ["scalars", "tmp_7"]
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0x30"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0xffffffffffffffff"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0xff"
+ }
+ }
+ }
+ }
+ ],
+ "op" : "set"
}
],
"transitions" : [
{
"type" : "hexstr",
- "value" : "0x0868",
+ "value" : "0x086801ff",
"mask" : null,
"next_state" : "parse_gtpu"
},
@@ -1344,6 +1867,14 @@
{
"type" : "field",
"value" : ["udp", "dport"]
+ },
+ {
+ "type" : "field",
+ "value" : ["scalars", "tmp_2"]
+ },
+ {
+ "type" : "field",
+ "value" : ["scalars", "tmp_4"]
}
]
},
@@ -1607,7 +2138,7 @@
"id" : 0,
"source_info" : {
"filename" : "include/parser.p4",
- "line" : 283,
+ "line" : 285,
"column" : 8,
"source_fragment" : "FabricDeparser"
},
@@ -6099,7 +6630,7 @@
"parameters" : [
{
"type" : "field",
- "value" : ["scalars", "tmp_2"]
+ "value" : ["scalars", "tmp_8"]
},
{
"type" : "expression",
@@ -6135,7 +6666,7 @@
},
{
"type" : "field",
- "value" : ["scalars", "tmp_2"]
+ "value" : ["scalars", "tmp_8"]
}
],
"source_info" : {
@@ -6157,7 +6688,7 @@
"parameters" : [
{
"type" : "field",
- "value" : ["scalars", "tmp_4"]
+ "value" : ["scalars", "tmp_9"]
},
{
"type" : "expression",
@@ -6193,7 +6724,7 @@
},
{
"type" : "field",
- "value" : ["scalars", "tmp_4"]
+ "value" : ["scalars", "tmp_9"]
}
],
"source_info" : {
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 3150ab0a..df6af4c 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
@@ -5,12 +5,15 @@
"id" : 0,
"fields" : [
["tmp_0", 1, false],
+ ["tmp_2", 3, false],
+ ["tmp_4", 8, false],
["tmp_1", 16, false],
["tmp_3", 16, false],
["tmp_5", 4, false],
["tmp_6", 16, false],
- ["tmp_2", 32, false],
- ["tmp_4", 32, false],
+ ["tmp_7", 64, false],
+ ["tmp_8", 32, false],
+ ["tmp_9", 32, false],
["userMetadata._ip_eth_type0", 16, false],
["userMetadata._vlan_id1", 12, false],
["userMetadata._vlan_pri2", 3, false],
@@ -42,8 +45,7 @@
["userMetadata._spgw_notify_spgwc28", 1, false],
["userMetadata._spgw_needs_gtpu_encap29", 1, false],
["userMetadata._spgw_needs_gtpu_decap30", 1, false],
- ["userMetadata._spgw_skip_egress_pdr_ctr31", 1, false],
- ["_padding_0", 3, false]
+ ["userMetadata._spgw_skip_egress_pdr_ctr31", 1, false]
]
},
{
@@ -56,9 +58,24 @@
]
},
{
- "name" : "standard_metadata",
+ "name" : "gtpu_t",
"id" : 2,
"fields" : [
+ ["version", 3, false],
+ ["pt", 1, false],
+ ["spare", 1, false],
+ ["ex_flag", 1, false],
+ ["seq_flag", 1, false],
+ ["npdu_flag", 1, false],
+ ["msgtype", 8, false],
+ ["msglen", 16, false],
+ ["teid", 32, false]
+ ]
+ },
+ {
+ "name" : "standard_metadata",
+ "id" : 3,
+ "fields" : [
["ingress_port", 9, false],
["egress_spec", 9, false],
["egress_port", 9, false],
@@ -80,7 +97,7 @@
},
{
"name" : "ethernet_t",
- "id" : 3,
+ "id" : 4,
"fields" : [
["dst_addr", 48, false],
["src_addr", 48, false]
@@ -88,7 +105,7 @@
},
{
"name" : "vlan_tag_t",
- "id" : 4,
+ "id" : 5,
"fields" : [
["eth_type", 16, false],
["pri", 3, false],
@@ -98,14 +115,14 @@
},
{
"name" : "eth_type_t",
- "id" : 5,
+ "id" : 6,
"fields" : [
["value", 16, false]
]
},
{
"name" : "mpls_t",
- "id" : 6,
+ "id" : 7,
"fields" : [
["label", 20, false],
["tc", 3, false],
@@ -115,7 +132,7 @@
},
{
"name" : "ipv4_t",
- "id" : 7,
+ "id" : 8,
"fields" : [
["version", 4, false],
["ihl", 4, false],
@@ -134,7 +151,7 @@
},
{
"name" : "udp_t",
- "id" : 8,
+ "id" : 9,
"fields" : [
["sport", 16, false],
["dport", 16, false],
@@ -143,21 +160,6 @@
]
},
{
- "name" : "gtpu_t",
- "id" : 9,
- "fields" : [
- ["version", 3, false],
- ["pt", 1, false],
- ["spare", 1, false],
- ["ex_flag", 1, false],
- ["seq_flag", 1, false],
- ["npdu_flag", 1, false],
- ["msgtype", 8, false],
- ["msglen", 16, false],
- ["teid", 32, false]
- ]
- },
- {
"name" : "tcp_t",
"id" : 10,
"fields" : [
@@ -204,148 +206,155 @@
"pi_omit" : true
},
{
- "name" : "scalars",
+ "name" : "gtpu_0",
"id" : 1,
+ "header_type" : "gtpu_t",
+ "metadata" : false,
+ "pi_omit" : true
+ },
+ {
+ "name" : "scalars",
+ "id" : 2,
"header_type" : "scalars_0",
"metadata" : true,
"pi_omit" : true
},
{
"name" : "standard_metadata",
- "id" : 2,
+ "id" : 3,
"header_type" : "standard_metadata",
"metadata" : true,
"pi_omit" : true
},
{
"name" : "ethernet",
- "id" : 3,
+ "id" : 4,
"header_type" : "ethernet_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "vlan_tag",
- "id" : 4,
- "header_type" : "vlan_tag_t",
- "metadata" : false,
- "pi_omit" : true
- },
- {
- "name" : "inner_vlan_tag",
"id" : 5,
"header_type" : "vlan_tag_t",
"metadata" : false,
"pi_omit" : true
},
{
- "name" : "eth_type",
+ "name" : "inner_vlan_tag",
"id" : 6,
+ "header_type" : "vlan_tag_t",
+ "metadata" : false,
+ "pi_omit" : true
+ },
+ {
+ "name" : "eth_type",
+ "id" : 7,
"header_type" : "eth_type_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "mpls",
- "id" : 7,
+ "id" : 8,
"header_type" : "mpls_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "gtpu_ipv4",
- "id" : 8,
+ "id" : 9,
"header_type" : "ipv4_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "gtpu_udp",
- "id" : 9,
+ "id" : 10,
"header_type" : "udp_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "outer_gtpu",
- "id" : 10,
- "header_type" : "gtpu_t",
- "metadata" : false,
- "pi_omit" : true
- },
- {
- "name" : "gtpu",
"id" : 11,
"header_type" : "gtpu_t",
"metadata" : false,
"pi_omit" : true
},
{
- "name" : "inner_ipv4",
+ "name" : "gtpu",
"id" : 12,
+ "header_type" : "gtpu_t",
+ "metadata" : false,
+ "pi_omit" : true
+ },
+ {
+ "name" : "inner_ipv4",
+ "id" : 13,
"header_type" : "ipv4_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "inner_udp",
- "id" : 13,
+ "id" : 14,
"header_type" : "udp_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "inner_tcp",
- "id" : 14,
+ "id" : 15,
"header_type" : "tcp_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "inner_icmp",
- "id" : 15,
+ "id" : 16,
"header_type" : "icmp_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "ipv4",
- "id" : 16,
+ "id" : 17,
"header_type" : "ipv4_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "tcp",
- "id" : 17,
+ "id" : 18,
"header_type" : "tcp_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "udp",
- "id" : 18,
+ "id" : 19,
"header_type" : "udp_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "icmp",
- "id" : 19,
+ "id" : 20,
"header_type" : "icmp_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "packet_out",
- "id" : 20,
+ "id" : 21,
"header_type" : "packet_out_header_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "packet_in",
- "id" : 21,
+ "id" : 22,
"header_type" : "packet_in_header_t",
"metadata" : false,
"pi_omit" : true
@@ -1126,12 +1135,525 @@
}
],
"op" : "set"
+ },
+ {
+ "parameters" : [
+ {
+ "type" : "field",
+ "value" : ["scalars", "tmp_7"]
+ },
+ {
+ "type" : "lookahead",
+ "value" : [0, 64]
+ }
+ ],
+ "op" : "set"
+ },
+ {
+ "parameters" : [
+ {
+ "parameters" : [
+ {
+ "type" : "header",
+ "value" : "gtpu_0"
+ }
+ ],
+ "op" : "add_header"
+ }
+ ],
+ "op" : "primitive"
+ },
+ {
+ "parameters" : [
+ {
+ "type" : "field",
+ "value" : ["gtpu_0", "version"]
+ },
+ {
+ "type" : "expression",
+ "value" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : ">>",
+ "left" : {
+ "type" : "field",
+ "value" : ["scalars", "tmp_7"]
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0x3d"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0xffffffffffffffff"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0x07"
+ }
+ }
+ }
+ }
+ ],
+ "op" : "set"
+ },
+ {
+ "parameters" : [
+ {
+ "type" : "field",
+ "value" : ["gtpu_0", "pt"]
+ },
+ {
+ "type" : "expression",
+ "value" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : ">>",
+ "left" : {
+ "type" : "field",
+ "value" : ["scalars", "tmp_7"]
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0x3c"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0xffffffffffffffff"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0x01"
+ }
+ }
+ }
+ }
+ ],
+ "op" : "set"
+ },
+ {
+ "parameters" : [
+ {
+ "type" : "field",
+ "value" : ["gtpu_0", "spare"]
+ },
+ {
+ "type" : "expression",
+ "value" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : ">>",
+ "left" : {
+ "type" : "field",
+ "value" : ["scalars", "tmp_7"]
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0x3b"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0xffffffffffffffff"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0x01"
+ }
+ }
+ }
+ }
+ ],
+ "op" : "set"
+ },
+ {
+ "parameters" : [
+ {
+ "type" : "field",
+ "value" : ["gtpu_0", "ex_flag"]
+ },
+ {
+ "type" : "expression",
+ "value" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : ">>",
+ "left" : {
+ "type" : "field",
+ "value" : ["scalars", "tmp_7"]
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0x3a"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0xffffffffffffffff"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0x01"
+ }
+ }
+ }
+ }
+ ],
+ "op" : "set"
+ },
+ {
+ "parameters" : [
+ {
+ "type" : "field",
+ "value" : ["gtpu_0", "seq_flag"]
+ },
+ {
+ "type" : "expression",
+ "value" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : ">>",
+ "left" : {
+ "type" : "field",
+ "value" : ["scalars", "tmp_7"]
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0x39"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0xffffffffffffffff"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0x01"
+ }
+ }
+ }
+ }
+ ],
+ "op" : "set"
+ },
+ {
+ "parameters" : [
+ {
+ "type" : "field",
+ "value" : ["gtpu_0", "npdu_flag"]
+ },
+ {
+ "type" : "expression",
+ "value" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : ">>",
+ "left" : {
+ "type" : "field",
+ "value" : ["scalars", "tmp_7"]
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0x38"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0xffffffffffffffff"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0x01"
+ }
+ }
+ }
+ }
+ ],
+ "op" : "set"
+ },
+ {
+ "parameters" : [
+ {
+ "type" : "field",
+ "value" : ["gtpu_0", "msgtype"]
+ },
+ {
+ "type" : "expression",
+ "value" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : ">>",
+ "left" : {
+ "type" : "field",
+ "value" : ["scalars", "tmp_7"]
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0x30"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0xffffffffffffffff"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0xff"
+ }
+ }
+ }
+ }
+ ],
+ "op" : "set"
+ },
+ {
+ "parameters" : [
+ {
+ "type" : "field",
+ "value" : ["gtpu_0", "msglen"]
+ },
+ {
+ "type" : "expression",
+ "value" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : ">>",
+ "left" : {
+ "type" : "field",
+ "value" : ["scalars", "tmp_7"]
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0x20"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0xffffffffffffffff"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0xffff"
+ }
+ }
+ }
+ }
+ ],
+ "op" : "set"
+ },
+ {
+ "parameters" : [
+ {
+ "type" : "field",
+ "value" : ["gtpu_0", "teid"]
+ },
+ {
+ "type" : "expression",
+ "value" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "field",
+ "value" : ["scalars", "tmp_7"]
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0xffffffff"
+ }
+ }
+ }
+ }
+ ],
+ "op" : "set"
+ },
+ {
+ "parameters" : [
+ {
+ "type" : "field",
+ "value" : ["scalars", "tmp_2"]
+ },
+ {
+ "type" : "expression",
+ "value" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : ">>",
+ "left" : {
+ "type" : "field",
+ "value" : ["scalars", "tmp_7"]
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0x3d"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0xffffffffffffffff"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0x07"
+ }
+ }
+ }
+ }
+ ],
+ "op" : "set"
+ },
+ {
+ "parameters" : [
+ {
+ "type" : "field",
+ "value" : ["scalars", "tmp_4"]
+ },
+ {
+ "type" : "expression",
+ "value" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : ">>",
+ "left" : {
+ "type" : "field",
+ "value" : ["scalars", "tmp_7"]
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0x30"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0xffffffffffffffff"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0xff"
+ }
+ }
+ }
+ }
+ ],
+ "op" : "set"
}
],
"transitions" : [
{
"type" : "hexstr",
- "value" : "0x0868",
+ "value" : "0x086801ff",
"mask" : null,
"next_state" : "parse_gtpu"
},
@@ -1146,6 +1668,14 @@
{
"type" : "field",
"value" : ["udp", "dport"]
+ },
+ {
+ "type" : "field",
+ "value" : ["scalars", "tmp_2"]
+ },
+ {
+ "type" : "field",
+ "value" : ["scalars", "tmp_4"]
}
]
},
@@ -1289,7 +1819,7 @@
"id" : 0,
"source_info" : {
"filename" : "include/parser.p4",
- "line" : 283,
+ "line" : 285,
"column" : 8,
"source_fragment" : "FabricDeparser"
},
@@ -5715,7 +6245,7 @@
"parameters" : [
{
"type" : "field",
- "value" : ["scalars", "tmp_2"]
+ "value" : ["scalars", "tmp_8"]
},
{
"type" : "expression",
@@ -5751,7 +6281,7 @@
},
{
"type" : "field",
- "value" : ["scalars", "tmp_2"]
+ "value" : ["scalars", "tmp_8"]
}
],
"source_info" : {
@@ -5773,7 +6303,7 @@
"parameters" : [
{
"type" : "field",
- "value" : ["scalars", "tmp_4"]
+ "value" : ["scalars", "tmp_9"]
},
{
"type" : "expression",
@@ -5809,7 +6339,7 @@
},
{
"type" : "field",
- "value" : ["scalars", "tmp_4"]
+ "value" : ["scalars", "tmp_9"]
}
],
"source_info" : {
diff --git a/pipelines/fabric/impl/src/main/resources/p4c-out/fabric/bmv2/default/bmv2.json b/pipelines/fabric/impl/src/main/resources/p4c-out/fabric/bmv2/default/bmv2.json
index 43db30e..3c76283 100644
--- a/pipelines/fabric/impl/src/main/resources/p4c-out/fabric/bmv2/default/bmv2.json
+++ b/pipelines/fabric/impl/src/main/resources/p4c-out/fabric/bmv2/default/bmv2.json
@@ -5,12 +5,15 @@
"id" : 0,
"fields" : [
["tmp_0", 1, false],
+ ["tmp_2", 3, false],
+ ["tmp_4", 8, false],
["tmp_1", 16, false],
["tmp_3", 16, false],
["tmp_5", 4, false],
["tmp_6", 16, false],
- ["tmp_2", 32, false],
- ["tmp_4", 32, false],
+ ["tmp_7", 64, false],
+ ["tmp_8", 32, false],
+ ["tmp_9", 32, false],
["userMetadata.ip_eth_type", 16, false],
["userMetadata.vlan_id", 12, false],
["userMetadata.vlan_pri", 3, false],
@@ -27,7 +30,8 @@
["userMetadata.l4_sport", 16, false],
["userMetadata.l4_dport", 16, false],
["userMetadata.ipv4_src_addr", 32, false],
- ["userMetadata.ipv4_dst_addr", 32, false]
+ ["userMetadata.ipv4_dst_addr", 32, false],
+ ["_padding_0", 5, false]
]
},
{
@@ -40,9 +44,24 @@
]
},
{
- "name" : "standard_metadata",
+ "name" : "gtpu_t",
"id" : 2,
"fields" : [
+ ["version", 3, false],
+ ["pt", 1, false],
+ ["spare", 1, false],
+ ["ex_flag", 1, false],
+ ["seq_flag", 1, false],
+ ["npdu_flag", 1, false],
+ ["msgtype", 8, false],
+ ["msglen", 16, false],
+ ["teid", 32, false]
+ ]
+ },
+ {
+ "name" : "standard_metadata",
+ "id" : 3,
+ "fields" : [
["ingress_port", 9, false],
["egress_spec", 9, false],
["egress_port", 9, false],
@@ -64,7 +83,7 @@
},
{
"name" : "ethernet_t",
- "id" : 3,
+ "id" : 4,
"fields" : [
["dst_addr", 48, false],
["src_addr", 48, false]
@@ -72,7 +91,7 @@
},
{
"name" : "vlan_tag_t",
- "id" : 4,
+ "id" : 5,
"fields" : [
["eth_type", 16, false],
["pri", 3, false],
@@ -82,14 +101,14 @@
},
{
"name" : "eth_type_t",
- "id" : 5,
+ "id" : 6,
"fields" : [
["value", 16, false]
]
},
{
"name" : "mpls_t",
- "id" : 6,
+ "id" : 7,
"fields" : [
["label", 20, false],
["tc", 3, false],
@@ -99,7 +118,7 @@
},
{
"name" : "ipv4_t",
- "id" : 7,
+ "id" : 8,
"fields" : [
["version", 4, false],
["ihl", 4, false],
@@ -118,7 +137,7 @@
},
{
"name" : "tcp_t",
- "id" : 8,
+ "id" : 9,
"fields" : [
["sport", 16, false],
["dport", 16, false],
@@ -135,7 +154,7 @@
},
{
"name" : "udp_t",
- "id" : 9,
+ "id" : 10,
"fields" : [
["sport", 16, false],
["dport", 16, false],
@@ -145,7 +164,7 @@
},
{
"name" : "icmp_t",
- "id" : 10,
+ "id" : 11,
"fields" : [
["icmp_type", 8, false],
["icmp_code", 8, false],
@@ -157,7 +176,7 @@
},
{
"name" : "packet_in_header_t",
- "id" : 11,
+ "id" : 12,
"fields" : [
["ingress_port", 9, false],
["_pad", 7, false]
@@ -173,92 +192,99 @@
"pi_omit" : true
},
{
- "name" : "scalars",
+ "name" : "gtpu_0",
"id" : 1,
+ "header_type" : "gtpu_t",
+ "metadata" : false,
+ "pi_omit" : true
+ },
+ {
+ "name" : "scalars",
+ "id" : 2,
"header_type" : "scalars_0",
"metadata" : true,
"pi_omit" : true
},
{
"name" : "standard_metadata",
- "id" : 2,
+ "id" : 3,
"header_type" : "standard_metadata",
"metadata" : true,
"pi_omit" : true
},
{
"name" : "ethernet",
- "id" : 3,
+ "id" : 4,
"header_type" : "ethernet_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "vlan_tag",
- "id" : 4,
- "header_type" : "vlan_tag_t",
- "metadata" : false,
- "pi_omit" : true
- },
- {
- "name" : "inner_vlan_tag",
"id" : 5,
"header_type" : "vlan_tag_t",
"metadata" : false,
"pi_omit" : true
},
{
- "name" : "eth_type",
+ "name" : "inner_vlan_tag",
"id" : 6,
+ "header_type" : "vlan_tag_t",
+ "metadata" : false,
+ "pi_omit" : true
+ },
+ {
+ "name" : "eth_type",
+ "id" : 7,
"header_type" : "eth_type_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "mpls",
- "id" : 7,
+ "id" : 8,
"header_type" : "mpls_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "ipv4",
- "id" : 8,
+ "id" : 9,
"header_type" : "ipv4_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "tcp",
- "id" : 9,
+ "id" : 10,
"header_type" : "tcp_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "udp",
- "id" : 10,
+ "id" : 11,
"header_type" : "udp_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "icmp",
- "id" : 11,
+ "id" : 12,
"header_type" : "icmp_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "packet_out",
- "id" : 12,
+ "id" : 13,
"header_type" : "packet_out_header_t",
"metadata" : false,
"pi_omit" : true
},
{
"name" : "packet_in",
- "id" : 13,
+ "id" : 14,
"header_type" : "packet_in_header_t",
"metadata" : false,
"pi_omit" : true
@@ -1039,6 +1065,519 @@
}
],
"op" : "set"
+ },
+ {
+ "parameters" : [
+ {
+ "type" : "field",
+ "value" : ["scalars", "tmp_7"]
+ },
+ {
+ "type" : "lookahead",
+ "value" : [0, 64]
+ }
+ ],
+ "op" : "set"
+ },
+ {
+ "parameters" : [
+ {
+ "parameters" : [
+ {
+ "type" : "header",
+ "value" : "gtpu_0"
+ }
+ ],
+ "op" : "add_header"
+ }
+ ],
+ "op" : "primitive"
+ },
+ {
+ "parameters" : [
+ {
+ "type" : "field",
+ "value" : ["gtpu_0", "version"]
+ },
+ {
+ "type" : "expression",
+ "value" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : ">>",
+ "left" : {
+ "type" : "field",
+ "value" : ["scalars", "tmp_7"]
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0x3d"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0xffffffffffffffff"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0x07"
+ }
+ }
+ }
+ }
+ ],
+ "op" : "set"
+ },
+ {
+ "parameters" : [
+ {
+ "type" : "field",
+ "value" : ["gtpu_0", "pt"]
+ },
+ {
+ "type" : "expression",
+ "value" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : ">>",
+ "left" : {
+ "type" : "field",
+ "value" : ["scalars", "tmp_7"]
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0x3c"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0xffffffffffffffff"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0x01"
+ }
+ }
+ }
+ }
+ ],
+ "op" : "set"
+ },
+ {
+ "parameters" : [
+ {
+ "type" : "field",
+ "value" : ["gtpu_0", "spare"]
+ },
+ {
+ "type" : "expression",
+ "value" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : ">>",
+ "left" : {
+ "type" : "field",
+ "value" : ["scalars", "tmp_7"]
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0x3b"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0xffffffffffffffff"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0x01"
+ }
+ }
+ }
+ }
+ ],
+ "op" : "set"
+ },
+ {
+ "parameters" : [
+ {
+ "type" : "field",
+ "value" : ["gtpu_0", "ex_flag"]
+ },
+ {
+ "type" : "expression",
+ "value" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : ">>",
+ "left" : {
+ "type" : "field",
+ "value" : ["scalars", "tmp_7"]
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0x3a"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0xffffffffffffffff"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0x01"
+ }
+ }
+ }
+ }
+ ],
+ "op" : "set"
+ },
+ {
+ "parameters" : [
+ {
+ "type" : "field",
+ "value" : ["gtpu_0", "seq_flag"]
+ },
+ {
+ "type" : "expression",
+ "value" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : ">>",
+ "left" : {
+ "type" : "field",
+ "value" : ["scalars", "tmp_7"]
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0x39"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0xffffffffffffffff"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0x01"
+ }
+ }
+ }
+ }
+ ],
+ "op" : "set"
+ },
+ {
+ "parameters" : [
+ {
+ "type" : "field",
+ "value" : ["gtpu_0", "npdu_flag"]
+ },
+ {
+ "type" : "expression",
+ "value" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : ">>",
+ "left" : {
+ "type" : "field",
+ "value" : ["scalars", "tmp_7"]
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0x38"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0xffffffffffffffff"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0x01"
+ }
+ }
+ }
+ }
+ ],
+ "op" : "set"
+ },
+ {
+ "parameters" : [
+ {
+ "type" : "field",
+ "value" : ["gtpu_0", "msgtype"]
+ },
+ {
+ "type" : "expression",
+ "value" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : ">>",
+ "left" : {
+ "type" : "field",
+ "value" : ["scalars", "tmp_7"]
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0x30"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0xffffffffffffffff"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0xff"
+ }
+ }
+ }
+ }
+ ],
+ "op" : "set"
+ },
+ {
+ "parameters" : [
+ {
+ "type" : "field",
+ "value" : ["gtpu_0", "msglen"]
+ },
+ {
+ "type" : "expression",
+ "value" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : ">>",
+ "left" : {
+ "type" : "field",
+ "value" : ["scalars", "tmp_7"]
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0x20"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0xffffffffffffffff"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0xffff"
+ }
+ }
+ }
+ }
+ ],
+ "op" : "set"
+ },
+ {
+ "parameters" : [
+ {
+ "type" : "field",
+ "value" : ["gtpu_0", "teid"]
+ },
+ {
+ "type" : "expression",
+ "value" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "field",
+ "value" : ["scalars", "tmp_7"]
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0xffffffff"
+ }
+ }
+ }
+ }
+ ],
+ "op" : "set"
+ },
+ {
+ "parameters" : [
+ {
+ "type" : "field",
+ "value" : ["scalars", "tmp_2"]
+ },
+ {
+ "type" : "expression",
+ "value" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : ">>",
+ "left" : {
+ "type" : "field",
+ "value" : ["scalars", "tmp_7"]
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0x3d"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0xffffffffffffffff"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0x07"
+ }
+ }
+ }
+ }
+ ],
+ "op" : "set"
+ },
+ {
+ "parameters" : [
+ {
+ "type" : "field",
+ "value" : ["scalars", "tmp_4"]
+ },
+ {
+ "type" : "expression",
+ "value" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : "&",
+ "left" : {
+ "type" : "expression",
+ "value" : {
+ "op" : ">>",
+ "left" : {
+ "type" : "field",
+ "value" : ["scalars", "tmp_7"]
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0x30"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0xffffffffffffffff"
+ }
+ }
+ },
+ "right" : {
+ "type" : "hexstr",
+ "value" : "0xff"
+ }
+ }
+ }
+ }
+ ],
+ "op" : "set"
}
],
"transitions" : [
@@ -1053,6 +1592,14 @@
{
"type" : "field",
"value" : ["udp", "dport"]
+ },
+ {
+ "type" : "field",
+ "value" : ["scalars", "tmp_2"]
+ },
+ {
+ "type" : "field",
+ "value" : ["scalars", "tmp_4"]
}
]
},
@@ -1090,7 +1637,7 @@
"id" : 0,
"source_info" : {
"filename" : "include/parser.p4",
- "line" : 283,
+ "line" : 285,
"column" : 8,
"source_fragment" : "FabricDeparser"
},
@@ -2380,7 +2927,7 @@
"parameters" : [
{
"type" : "field",
- "value" : ["scalars", "tmp_2"]
+ "value" : ["scalars", "tmp_8"]
},
{
"type" : "expression",
@@ -2416,7 +2963,7 @@
},
{
"type" : "field",
- "value" : ["scalars", "tmp_2"]
+ "value" : ["scalars", "tmp_8"]
}
],
"source_info" : {
@@ -2438,7 +2985,7 @@
"parameters" : [
{
"type" : "field",
- "value" : ["scalars", "tmp_4"]
+ "value" : ["scalars", "tmp_9"]
},
{
"type" : "expression",
@@ -2474,7 +3021,7 @@
},
{
"type" : "field",
- "value" : ["scalars", "tmp_4"]
+ "value" : ["scalars", "tmp_9"]
}
],
"source_info" : {
diff --git a/pipelines/fabric/impl/src/test/java/org/onosproject/pipelines/fabric/impl/behaviour/FabricInterpreterTest.java b/pipelines/fabric/impl/src/test/java/org/onosproject/pipelines/fabric/impl/behaviour/FabricInterpreterTest.java
index ccec055..0ad8d02 100644
--- a/pipelines/fabric/impl/src/test/java/org/onosproject/pipelines/fabric/impl/behaviour/FabricInterpreterTest.java
+++ b/pipelines/fabric/impl/src/test/java/org/onosproject/pipelines/fabric/impl/behaviour/FabricInterpreterTest.java
@@ -241,10 +241,6 @@
.withValue(ImmutableByteSequence.copyFrom(outputPort.toLong())
.fit(PORT_BITWIDTH))
.build());
- builder.add(PiPacketMetadata.builder()
- .withId(FabricConstants.DO_FORWARDING)
- .withValue(ImmutableByteSequence.copyFrom(0).fit(1))
- .build());
PiPacketOperation expectedPktOp = PiPacketOperation.builder()
.withType(PiPacketOperationType.PACKET_OUT)
@@ -269,11 +265,6 @@
ImmutableList.Builder<PiPacketMetadata> builder = ImmutableList.builder();
builder.add(PiPacketMetadata.builder()
- .withId(FabricConstants.EGRESS_PORT)
- .withValue(ImmutableByteSequence.copyFrom(0)
- .fit(PORT_BITWIDTH))
- .build());
- builder.add(PiPacketMetadata.builder()
.withId(FabricConstants.DO_FORWARDING)
.withValue(ImmutableByteSequence.copyFrom(1)
.fit(1))