Christan,
>>> There are some error counters that aren't errors, then there are statistic
>>> counters.
>>>
>>> I'm curious did one come before the other? I ask b/c some nodes count
>>> non-error statistics using errors (e.g., arp, ipsec, ...) and I'm wondering
>>> why.
>>
>> The node errors as implemented in src/vlib/error.[ch] came first.
>> The stats segment is just a representation of these per-node counters. The
>> stats segment is essentially a KV store,
>> where the node counters are given a key as
>> "/err/<node-name>/<error-counter-name>
>>
>> You are absoultely right that some nodes do use this counter infrastructure
>> for non-error situations.
>> e.g. we have "no error", "encapsulated", "decapsulated" by some nodes and so
>> on.
>> I at some point was thinking of placing these under a different path. Then I
>> distracted myself by thinking of how all the counters could be represented
>> in a data model instead (specifically a YANG tree).
>
> Yeah, I noticed they all get collected under /err. In any case before I
> noticed that, I had started using them (errors) for a bunch of stats I needed
> to collect, and then realized this was probably not the right way to do this
> (I started in the ipsec code which is where I got the idea :). They are a
> convenient way to do this, which maybe is why they are being used that way in
> some places.
>
> I wonder if this could be cleaned up so that "show error" really only shows
> errors (and is empty if there are no errors). Maybe there could be a simple
> way to setup positive counters like there is for errors (i.e., the error
> array in the node registration structure, and counters in the node).
What constitutes an error is somewhat subjective. I see the YANG models
typically group all counters together as "statistics", and it's up to the user
to interpret the counters.
E.g. https://tools.ietf.org/html/rfc8343#section-3
That said I wouldn't object to giving the "no error" counters that some nodes
use a different path.
Perhaps make a generic counter per-node that is used to count the number of
success packets per-node.
Cheers,
Ole
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#15058): https://lists.fd.io/g/vpp-dev/message/15058
Mute This Topic: https://lists.fd.io/mt/69440602/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-