-
Bug
-
Resolution: Done
-
Medium
-
None
-
None
-
None
In src/vnet/interface.api, in the vnet_interface_counters structure definition, the type of the data parameter is specified as u8 while it is actually u64 (see vpp/stats/stats.c).
This cause the python API binding to incorrectly decode this API message, trashing most of the data.
There are several possibilities to fix this, I propose that:
1) We change the type of the data parameter
2) We change the meaning of the count parameter from the number of interfaces in this stat block to the length of data. So if is_combined!=0, count is twice the number of interfaces, otherwise it is still equal to the number of interfaces in the stat block.
This is the simplest way to get the API bindings to actually decode all the data. Otherwise we would need to adjust the definition of data to, for instance, u64 data[(1+is_combined) * count], which is much more complex.
- is duplicated by
-
VPP-234 API: fix api for vnet_interface_counters
- Closed