diff options
author | Ondrej Fabry <ofabry@cisco.com> | 2020-03-20 10:52:19 +0100 |
---|---|---|
committer | Ondrej Fabry <ofabry@cisco.com> | 2020-03-20 10:54:39 +0100 |
commit | db87efa2ec1e91e81517236b164b279e57b8daa8 (patch) | |
tree | 063bef85ffcd9903fc0b16dda6a46b3ea45bb26c /adapter/stats_api.go | |
parent | 9f27eeff53ee501b8641595baa7cbc2f0014a68c (diff) |
Fix statsclient for VPP 20.05-rc0 (master)v0.3.2
- this change fixes panic that was occurring with recent VPP that was caused by incorrectly calculated vector length
- converting returned vector length from uint64 to uint32 results in correct length value
Change-Id: I76a4b9d147c3df3bea9d3e5ef5853e2809dc42e8
Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
Diffstat (limited to 'adapter/stats_api.go')
-rw-r--r-- | adapter/stats_api.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/adapter/stats_api.go b/adapter/stats_api.go index d67434c..90dbeb3 100644 --- a/adapter/stats_api.go +++ b/adapter/stats_api.go @@ -113,7 +113,7 @@ func (n Name) String() string { return string(n) } -// Data represents some type of stat which is usually defined by StatType. +// Stat represents some type of stat which is usually defined by StatType. type Stat interface { // IsZero returns true if all of its values equal to zero. IsZero() bool @@ -205,7 +205,7 @@ func ReduceSimpleCounterStatIndex(s SimpleCounterStat, i int) uint64 { return val } -// ReduceSimpleCounterStatIndex returns reduced CombinedCounterStat s for index i. +// ReduceCombinedCounterStatIndex returns reduced CombinedCounterStat s for index i. func ReduceCombinedCounterStatIndex(s CombinedCounterStat, i int) [2]uint64 { var val [2]uint64 for _, w := range s { |