Use 64 bits counters to mitigate wrapping
Change-Id: I5c1f6a936fcd0d5d38c95a9fe6344fd7bf440e91
diff --git a/tools/test/p4src/p4-14/p4c-out/tofino/ecmp/mavericks/context/context.json b/tools/test/p4src/p4-14/p4c-out/tofino/ecmp/mavericks/context/context.json
index fc52f75..bb21991 100644
--- a/tools/test/p4src/p4-14/p4c-out/tofino/ecmp/mavericks/context/context.json
+++ b/tools/test/p4src/p4-14/p4c-out/tofino/ecmp/mavericks/context/context.json
@@ -1,5 +1,5 @@
{
- "build_date": "Wed Sep 13 01:40:59 2017",
+ "build_date": "Wed Sep 13 12:57:58 2017",
"phv_allocation": [
{
"ingress": [
@@ -23038,7 +23038,7 @@
"statistics_type": "bytes",
"handle": 67108865,
"name": "ingress_port_counter",
- "byte_counter_resolution": 32,
+ "byte_counter_resolution": 64,
"table_type": "statistics",
"stage_tables": [
{
@@ -23059,7 +23059,7 @@
"pack_format": [
{
"memory_word_width": 128,
- "entries_per_table_word": 4,
+ "entries_per_table_word": 2,
"table_word_width": 128,
"number_memory_units_per_table_word": 1
}
@@ -23067,7 +23067,7 @@
"logical_table_id": 0,
"stage_number": 2,
"stage_table_type": "statistics",
- "size": 4096
+ "size": 2048
}
],
"enable_pfe": true,
@@ -23081,7 +23081,7 @@
"statistics_type": "bytes",
"handle": 67108866,
"name": "egress_port_counter",
- "byte_counter_resolution": 32,
+ "byte_counter_resolution": 64,
"table_type": "statistics",
"stage_tables": [
{
@@ -23102,7 +23102,7 @@
"pack_format": [
{
"memory_word_width": 128,
- "entries_per_table_word": 4,
+ "entries_per_table_word": 2,
"table_word_width": 128,
"number_memory_units_per_table_word": 1
}
@@ -23110,7 +23110,7 @@
"logical_table_id": 1,
"stage_number": 2,
"stage_table_type": "statistics",
- "size": 4096
+ "size": 2048
}
],
"enable_pfe": true,
diff --git a/tools/test/p4src/p4-14/p4c-out/tofino/ecmp/mavericks/context/mau.context.json b/tools/test/p4src/p4-14/p4c-out/tofino/ecmp/mavericks/context/mau.context.json
index b1814d5..ef89160 100644
--- a/tools/test/p4src/p4-14/p4c-out/tofino/ecmp/mavericks/context/mau.context.json
+++ b/tools/test/p4src/p4-14/p4c-out/tofino/ecmp/mavericks/context/mau.context.json
@@ -1,7 +1,7 @@
{
"ProgramInfo": {
"ProgramName": "ecmp",
- "BuildDate": "Wed Sep 13 01:40:59 2017",
+ "BuildDate": "Wed Sep 13 12:57:58 2017",
"CompilerVersion": "5.1.0"
},
"HashJsonNode": {
@@ -25605,13 +25605,13 @@
{
"stage_number": 2,
"stage_table_type": "statistics",
- "number_entries": 4096,
+ "number_entries": 2048,
"pack_format_length": 1,
"pack_format": [
{
"table_word_width": 128,
"memory_word_width": 128,
- "entries_per_table_word": 4,
+ "entries_per_table_word": 2,
"number_memory_units_per_table_word": 1,
"entry_list": [
{
@@ -25621,7 +25621,7 @@
"name": "bytes_0",
"start_offset": 0,
"start_bit": 0,
- "bit_width": 32,
+ "bit_width": 64,
"range_field": false
}
]
@@ -25631,33 +25631,9 @@
"field_list": [
{
"name": "bytes_0",
- "start_offset": 32,
- "start_bit": 0,
- "bit_width": 32,
- "range_field": false
- }
- ]
- },
- {
- "entry_number": 2,
- "field_list": [
- {
- "name": "bytes_0",
"start_offset": 64,
"start_bit": 0,
- "bit_width": 32,
- "range_field": false
- }
- ]
- },
- {
- "entry_number": 3,
- "field_list": [
- {
- "name": "bytes_0",
- "start_offset": 96,
- "start_bit": 0,
- "bit_width": 32,
+ "bit_width": 64,
"range_field": false
}
]
@@ -25682,7 +25658,7 @@
]
},
"pkt_width": 0,
- "byte_width": 32,
+ "byte_width": 64,
"stage_table_handle": 0,
"how_referenced": "indirect",
"stat_type": "bytes",
@@ -25690,8 +25666,8 @@
}
],
"statistics_type": "bytes",
- "statistics_precision": 32,
- "lrt_enable": true,
+ "statistics_precision": 64,
+ "lrt_enable": false,
"saturating": false,
"reference_dictionary": {
"ingress_port_count_table": "indirect"
@@ -25713,13 +25689,13 @@
{
"stage_number": 2,
"stage_table_type": "statistics",
- "number_entries": 4096,
+ "number_entries": 2048,
"pack_format_length": 1,
"pack_format": [
{
"table_word_width": 128,
"memory_word_width": 128,
- "entries_per_table_word": 4,
+ "entries_per_table_word": 2,
"number_memory_units_per_table_word": 1,
"entry_list": [
{
@@ -25729,7 +25705,7 @@
"name": "bytes_0",
"start_offset": 0,
"start_bit": 0,
- "bit_width": 32,
+ "bit_width": 64,
"range_field": false
}
]
@@ -25739,33 +25715,9 @@
"field_list": [
{
"name": "bytes_0",
- "start_offset": 32,
- "start_bit": 0,
- "bit_width": 32,
- "range_field": false
- }
- ]
- },
- {
- "entry_number": 2,
- "field_list": [
- {
- "name": "bytes_0",
"start_offset": 64,
"start_bit": 0,
- "bit_width": 32,
- "range_field": false
- }
- ]
- },
- {
- "entry_number": 3,
- "field_list": [
- {
- "name": "bytes_0",
- "start_offset": 96,
- "start_bit": 0,
- "bit_width": 32,
+ "bit_width": 64,
"range_field": false
}
]
@@ -25790,7 +25742,7 @@
]
},
"pkt_width": 0,
- "byte_width": 32,
+ "byte_width": 64,
"stage_table_handle": 1,
"how_referenced": "indirect",
"stat_type": "bytes",
@@ -25798,8 +25750,8 @@
}
],
"statistics_type": "bytes",
- "statistics_precision": 32,
- "lrt_enable": true,
+ "statistics_precision": 64,
+ "lrt_enable": false,
"saturating": false,
"reference_dictionary": {
"egress_port_count_table": "indirect"