Fixes to fabric.p4 pipeline
- Fix ethernet matching fields in ACL (dst and src were inverted)
- When doing punt_to_cpu after setting a multicast group clear the mcast_grp metadata field
Change-Id: I456566929b118188a1b2a40ff3f4de4c6c63d5bb
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 84ec0fe..7620adc 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
@@ -333,7 +333,34 @@
{
"name" : "start",
"id" : 0,
- "parser_ops" : [],
+ "parser_ops" : [
+ {
+ "parameters" : [
+ {
+ "type" : "field",
+ "value" : ["scalars", "fabric_metadata_t._bng_s_tag23"]
+ },
+ {
+ "type" : "hexstr",
+ "value" : "0x0000"
+ }
+ ],
+ "op" : "set"
+ },
+ {
+ "parameters" : [
+ {
+ "type" : "field",
+ "value" : ["scalars", "fabric_metadata_t._bng_c_tag24"]
+ },
+ {
+ "type" : "hexstr",
+ "value" : "0x0000"
+ }
+ ],
+ "op" : "set"
+ }
+ ],
"transitions" : [
{
"type" : "hexstr",
@@ -918,7 +945,7 @@
"id" : 0,
"source_info" : {
"filename" : "include/parser.p4",
- "line" : 265,
+ "line" : 269,
"column" : 8,
"source_fragment" : "FabricDeparser"
},
@@ -931,7 +958,7 @@
"id" : 0,
"source_info" : {
"filename" : "include/bng.p4",
- "line" : 151,
+ "line" : 154,
"column" : 33,
"source_fragment" : "m_besteff"
},
@@ -945,7 +972,7 @@
"id" : 1,
"source_info" : {
"filename" : "include/bng.p4",
- "line" : 152,
+ "line" : 155,
"column" : 33,
"source_fragment" : "m_prio"
},
@@ -997,7 +1024,7 @@
"id" : 3,
"source_info" : {
"filename" : "include/bng.p4",
- "line" : 149,
+ "line" : 152,
"column" : 37,
"source_fragment" : "c_line_rx"
},
@@ -1129,7 +1156,7 @@
"id" : 14,
"source_info" : {
"filename" : "include/bng.p4",
- "line" : 264,
+ "line" : 267,
"column" : 37,
"source_fragment" : "c_line_tx"
},
@@ -1349,6 +1376,25 @@
}
},
{
+ "op" : "assign",
+ "parameters" : [
+ {
+ "type" : "field",
+ "value" : ["standard_metadata", "mcast_grp"]
+ },
+ {
+ "type" : "hexstr",
+ "value" : "0x0000"
+ }
+ ],
+ "source_info" : {
+ "filename" : "include/bng.p4",
+ "line" : 47,
+ "column" : 8,
+ "source_fragment" : "smeta.mcast_grp = 0"
+ }
+ },
+ {
"op" : "count",
"parameters" : [
{
@@ -1362,7 +1408,7 @@
],
"source_info" : {
"filename" : "include/bng.p4",
- "line" : 45,
+ "line" : 48,
"column" : 8,
"source_fragment" : "c_control.count(fmeta.bng.line_id)"
}
@@ -1403,7 +1449,7 @@
],
"source_info" : {
"filename" : "include/bng.p4",
- "line" : 74,
+ "line" : 77,
"column" : 8,
"source_fragment" : "mark_to_drop(smeta)"
}
@@ -1444,7 +1490,7 @@
],
"source_info" : {
"filename" : "include/bng.p4",
- "line" : 68,
+ "line" : 71,
"column" : 8,
"source_fragment" : "hdr.pppoe.setInvalid()"
}
@@ -1463,7 +1509,7 @@
],
"source_info" : {
"filename" : "include/bng.p4",
- "line" : 69,
+ "line" : 72,
"column" : 8,
"source_fragment" : "c_terminated.count(fmeta.bng.line_id)"
}
@@ -1513,7 +1559,7 @@
],
"source_info" : {
"filename" : "include/bng.p4",
- "line" : 156,
+ "line" : 159,
"column" : 35,
"source_fragment" : "= pppoe_session_id; ..."
}
@@ -1532,7 +1578,7 @@
],
"source_info" : {
"filename" : "include/bng.p4",
- "line" : 157,
+ "line" : 160,
"column" : 8,
"source_fragment" : "c_line_rx.count(fmeta.bng.line_id)"
}
@@ -1577,7 +1623,7 @@
],
"source_info" : {
"filename" : "include/bng.p4",
- "line" : 162,
+ "line" : 165,
"column" : 8,
"source_fragment" : "c_line_rx.count(fmeta.bng.line_id)"
}
@@ -1592,7 +1638,7 @@
],
"source_info" : {
"filename" : "include/bng.p4",
- "line" : 163,
+ "line" : 166,
"column" : 8,
"source_fragment" : "mark_to_drop(smeta)"
}
@@ -1635,7 +1681,7 @@
],
"source_info" : {
"filename" : "include/bng.p4",
- "line" : 317,
+ "line" : 320,
"column" : 30,
"source_fragment" : "= line_id; ..."
}
@@ -2975,7 +3021,7 @@
],
"source_info" : {
"filename" : "include/bng.p4",
- "line" : 123,
+ "line" : 126,
"column" : 12,
"source_fragment" : "return"
}
@@ -3001,7 +3047,7 @@
],
"source_info" : {
"filename" : "include/bng.p4",
- "line" : 128,
+ "line" : 131,
"column" : 20,
"source_fragment" : "c_dropped.count(fmeta.bng.line_id)"
}
@@ -3091,7 +3137,7 @@
],
"source_info" : {
"filename" : "include/bng.p4",
- "line" : 235,
+ "line" : 238,
"column" : 24,
"source_fragment" : "m_prio.execute_meter(fmeta.bng.line_id, fmeta.bng.ds_meter_result)"
}
@@ -3121,7 +3167,7 @@
],
"source_info" : {
"filename" : "include/bng.p4",
- "line" : 238,
+ "line" : 241,
"column" : 24,
"source_fragment" : "m_besteff.execute_meter(fmeta.bng.line_id, fmeta.bng.ds_meter_result)"
}
@@ -3168,7 +3214,7 @@
],
"source_info" : {
"filename" : "include/bng.p4",
- "line" : 270,
+ "line" : 273,
"column" : 8,
"source_fragment" : "hdr.pppoe.setValid()"
}
@@ -3187,7 +3233,7 @@
],
"source_info" : {
"filename" : "include/bng.p4",
- "line" : 271,
+ "line" : 274,
"column" : 8,
"source_fragment" : "hdr.pppoe.version = 4w1"
}
@@ -3206,7 +3252,7 @@
],
"source_info" : {
"filename" : "include/bng.p4",
- "line" : 272,
+ "line" : 275,
"column" : 8,
"source_fragment" : "hdr.pppoe.type_id = 4w1"
}
@@ -3225,7 +3271,7 @@
],
"source_info" : {
"filename" : "include/bng.p4",
- "line" : 273,
+ "line" : 276,
"column" : 8,
"source_fragment" : "hdr.pppoe.code = 8w0"
}
@@ -3244,7 +3290,7 @@
],
"source_info" : {
"filename" : "include/bng.p4",
- "line" : 274,
+ "line" : 277,
"column" : 8,
"source_fragment" : "hdr.pppoe.session_id = fmeta.bng.pppoe_session_id; ..."
}
@@ -3263,7 +3309,7 @@
],
"source_info" : {
"filename" : "include/bng.p4",
- "line" : 275,
+ "line" : 278,
"column" : 8,
"source_fragment" : "c_line_tx.count(fmeta.bng.line_id)"
}
@@ -3305,7 +3351,7 @@
],
"source_info" : {
"filename" : "include/bng.p4",
- "line" : 280,
+ "line" : 283,
"column" : 8,
"source_fragment" : "hdr.pppoe.length = hdr.ipv4.total_len + 16w2"
}
@@ -4531,13 +4577,13 @@
},
{
"match_type" : "ternary",
- "name" : "eth_src",
+ "name" : "eth_dst",
"target" : ["ethernet", "dst_addr"],
"mask" : null
},
{
"match_type" : "ternary",
- "name" : "eth_dst",
+ "name" : "eth_src",
"target" : ["ethernet", "src_addr"],
"mask" : null
},
@@ -4773,7 +4819,7 @@
"id" : 15,
"source_info" : {
"filename" : "include/bng.p4",
- "line" : 320,
+ "line" : 323,
"column" : 14,
"source_fragment" : "t_line_map"
},
@@ -4815,7 +4861,7 @@
"id" : 16,
"source_info" : {
"filename" : "include/bng.p4",
- "line" : 339,
+ "line" : 342,
"column" : 31,
"source_fragment" : "="
},
@@ -4844,7 +4890,7 @@
"id" : 17,
"source_info" : {
"filename" : "include/bng.p4",
- "line" : 48,
+ "line" : 51,
"column" : 10,
"source_fragment" : "t_pppoe_cp"
},
@@ -4933,7 +4979,7 @@
"id" : 20,
"source_info" : {
"filename" : "include/bng.p4",
- "line" : 123,
+ "line" : 126,
"column" : 12,
"source_fragment" : "return"
},
@@ -4962,7 +5008,7 @@
"id" : 21,
"source_info" : {
"filename" : "include/bng.p4",
- "line" : 84,
+ "line" : 87,
"column" : 10,
"source_fragment" : "t_pppoe_term_v4"
},
@@ -5011,7 +5057,7 @@
"id" : 22,
"source_info" : {
"filename" : "include/bng.p4",
- "line" : 128,
+ "line" : 131,
"column" : 20,
"source_fragment" : "c_dropped.count(fmeta.bng.line_id)"
},
@@ -5040,7 +5086,7 @@
"id" : 23,
"source_info" : {
"filename" : "include/bng.p4",
- "line" : 166,
+ "line" : 169,
"column" : 10,
"source_fragment" : "t_line_session_map"
},
@@ -5123,7 +5169,7 @@
"id" : 26,
"source_info" : {
"filename" : "include/bng.p4",
- "line" : 191,
+ "line" : 194,
"column" : 10,
"source_fragment" : "t_qos_v4"
},
@@ -5178,7 +5224,7 @@
"id" : 27,
"source_info" : {
"filename" : "include/bng.p4",
- "line" : 235,
+ "line" : 238,
"column" : 24,
"source_fragment" : "m_prio.execute_meter(fmeta.bng.line_id, fmeta.bng.ds_meter_result)"
},
@@ -5207,7 +5253,7 @@
"id" : 28,
"source_info" : {
"filename" : "include/bng.p4",
- "line" : 238,
+ "line" : 241,
"column" : 24,
"source_fragment" : "m_besteff.execute_meter(fmeta.bng.line_id, fmeta.bng.ds_meter_result)"
},
@@ -5571,7 +5617,7 @@
"id" : 11,
"source_info" : {
"filename" : "include/bng.p4",
- "line" : 338,
+ "line" : 341,
"column" : 16,
"source_fragment" : "hdr.pppoe.isValid()"
},
@@ -5635,7 +5681,7 @@
"id" : 14,
"source_info" : {
"filename" : "include/bng.p4",
- "line" : 125,
+ "line" : 128,
"column" : 12,
"source_fragment" : "hdr.ipv4.isValid()"
},
@@ -5675,7 +5721,7 @@
"id" : 16,
"source_info" : {
"filename" : "include/bng.p4",
- "line" : 232,
+ "line" : 235,
"column" : 16,
"source_fragment" : "hdr.ipv4.isValid()"
},
@@ -6177,7 +6223,7 @@
"id" : 45,
"source_info" : {
"filename" : "include/bng.p4",
- "line" : 294,
+ "line" : 297,
"column" : 12,
"source_fragment" : "encap_v4()"
},
@@ -6557,7 +6603,7 @@
"id" : 29,
"source_info" : {
"filename" : "include/bng.p4",
- "line" : 355,
+ "line" : 358,
"column" : 12,
"source_fragment" : "fmeta.bng.type == BNG_TYPE_DOWNSTREAM"
},
@@ -6583,7 +6629,7 @@
"id" : 30,
"source_info" : {
"filename" : "include/bng.p4",
- "line" : 293,
+ "line" : 296,
"column" : 12,
"source_fragment" : "hdr.ipv4.isValid()"
},
diff --git a/pipelines/fabric/impl/src/main/resources/p4c-out/fabric-bng/bmv2/default/p4info.txt b/pipelines/fabric/impl/src/main/resources/p4c-out/fabric-bng/bmv2/default/p4info.txt
index 9f6001e..d95b294 100644
--- a/pipelines/fabric/impl/src/main/resources/p4c-out/fabric-bng/bmv2/default/p4info.txt
+++ b/pipelines/fabric/impl/src/main/resources/p4c-out/fabric-bng/bmv2/default/p4info.txt
@@ -345,13 +345,13 @@
}
match_fields {
id: 5
- name: "eth_src"
+ name: "eth_dst"
bitwidth: 48
match_type: TERNARY
}
match_fields {
id: 6
- name: "eth_dst"
+ name: "eth_src"
bitwidth: 48
match_type: TERNARY
}