Fixed p4-14 programs not working on BMv2
The hack to deparse the packet_in breaks when using MAC addressess that
have many leading zeros (like in Mininet).
Change-Id: I509d98a21247903105cfb7d4206f8cc1a74acd3b
diff --git a/tools/test/p4src/p4-14/p4c-out/ecmp.json b/tools/test/p4src/p4-14/p4c-out/ecmp.json
index ba4f79b..60d929c 100644
--- a/tools/test/p4src/p4-14/p4c-out/ecmp.json
+++ b/tools/test/p4src/p4-14/p4c-out/ecmp.json
@@ -9,10 +9,8 @@
"name" : "scalars_0",
"id" : 0,
"fields" : [
- ["tmp_0", 104, false],
- ["tmp", 8, false],
- ["tmp_1", 32, false],
- ["tmp_2", 32, false]
+ ["tmp", 32, false],
+ ["tmp_0", 32, false]
]
},
{
@@ -396,50 +394,10 @@
{
"name" : "start",
"id" : 7,
- "parser_ops" : [
- {
- "parameters" : [
- {
- "type" : "field",
- "value" : ["scalars", "tmp_0"]
- },
- {
- "type" : "lookahead",
- "value" : [0, 104]
- }
- ],
- "op" : "set"
- },
- {
- "parameters" : [
- {
- "type" : "field",
- "value" : ["scalars", "tmp"]
- },
- {
- "type" : "expression",
- "value" : {
- "type" : "expression",
- "value" : {
- "op" : "&",
- "left" : {
- "type" : "field",
- "value" : ["scalars", "tmp_0"]
- },
- "right" : {
- "type" : "hexstr",
- "value" : "0xff"
- }
- }
- }
- }
- ],
- "op" : "set"
- }
- ],
+ "parser_ops" : [],
"transitions" : [
{
- "value" : "0x00",
+ "value" : "0x00ff",
"mask" : null,
"next_state" : "parse_pkt_in"
},
@@ -452,7 +410,7 @@
"transition_key" : [
{
"type" : "field",
- "value" : ["scalars", "tmp"]
+ "value" : ["standard_metadata", "egress_spec"]
}
]
}
@@ -498,7 +456,7 @@
{
"name" : "calc",
"id" : 0,
- "algo" : "crc32",
+ "algo" : "crc16",
"input" : [
{
"type" : "field",
@@ -633,7 +591,7 @@
},
{
"type" : "hexstr",
- "value" : "0x00000000"
+ "value" : "0x0000"
},
{
"type" : "calculation",
@@ -641,7 +599,7 @@
},
{
"type" : "hexstr",
- "value" : "0x0000000000000002"
+ "value" : "0x00000002"
}
],
"source_info" : {
@@ -790,7 +748,7 @@
"parameters" : [
{
"type" : "field",
- "value" : ["scalars", "tmp_1"]
+ "value" : ["scalars", "tmp"]
},
{
"type" : "expression",
@@ -820,7 +778,7 @@
},
{
"type" : "field",
- "value" : ["scalars", "tmp_1"]
+ "value" : ["scalars", "tmp"]
}
],
"source_info" : {
@@ -842,7 +800,7 @@
"parameters" : [
{
"type" : "field",
- "value" : ["scalars", "tmp_2"]
+ "value" : ["scalars", "tmp_0"]
},
{
"type" : "expression",
@@ -872,7 +830,7 @@
},
{
"type" : "field",
- "value" : ["scalars", "tmp_2"]
+ "value" : ["scalars", "tmp_0"]
}
],
"source_info" : {