summaryrefslogtreecommitdiffstats
path: root/binapi/tcp
diff options
context:
space:
mode:
authorLukas Vogel <vogel@anapaya.net>2022-07-28 16:50:34 +0200
committerNathan Skrzypczak <nathan.skrzypczak@gmail.com>2022-07-29 07:40:44 +0000
commit0f05d2a3730dbe1659d5a310db6039e9c1373989 (patch)
tree483e38256a682a4a0587ebd26920f67d0f8b7df4 /binapi/tcp
parent4223b112aec2f4a1c8577b239932a1de38703bed (diff)
Fix stats API for vpp 22.06
VPP changed the error counters to be simple counters in https://gerrit.fd.io/r/c/vpp/+/35640, that broke goVPP stats extraction. This was partially fixed by https://gerrit.fd.io/r/c/govpp/+/36085, however this fix didn't make it work completely. There were some leftover conversions from dirType (== int) to StatType (== string). Unfortunately the Go compiler does not flag those, they would however be catched by go vet. The fixes that are done here makes the stats extraction work for us partially: We noticed that error counters are now of type symlink and unfortunately updating a stat dir that contains symlink counters doesn't work correctly. CopyEntryData, that is called when initializing the dir, correctly handles the symlink counters. But updateStatOnIndex simply ignores symlink counters because `dirType != entry.Type` will hold. We didn't really figure out how to correctly handle this so this would need to be picked up by someone who is more familiar with the code. For now we work around this limitation by not using the GetErrorStats API and instead manually read the dir everytime we want to access error counters. Co-authored-by: Sergio Gonzalez Monroy <monroy@anapaya.net> Change-Id: I322133f362e782fea3e8a2be70967a796ba87b75 Signed-off-by: Lukas Vogel <vogel@anapaya.net>
Diffstat (limited to 'binapi/tcp')
0 files changed, 0 insertions, 0 deletions