L2 Netstats

Dear reckoning IOTlers,

in https://github.com/RIOT-OS/RIOT/pull/5985 we started a discussion about what should count for which statistic when using the netstats_l2 module.

My rationale for the "old style" of counting was that L2 is the lowest layer where we can analyze traffic from the node's perspective. Hence, I'd like to count every byte/packet the node receives. However, I realized that this might be a bad idea, given different transceiver capabilities. Old or very cheap transceivers leave most packet parsing and error handling to the driver developer. Hence, here the driver will receive a lot more packets than for more advanced transceivers. Hence, we should probably agree that only successful received packets, i.e., packets with header information and correct checksums (if any) targeted to the receiving node (matching destination address) are counted as successful received packets. All other packets may go into an additional "RX error" field of the statistics.

However, I would vote that packets that are dropped by the driver, e.g., because of insufficient memory, should _not_ count as "RX error" for L2. We could consider adding another field, e.g. "RX dropped" for this purpose.

What do you think?

Cheers, Oleg

Please have a look at RFC7388 when doing this:

Definition of Managed Objects for IPv6 over Low-Power Wireless Personal Area Networks (6LoWPANs). J. Schoenwaelder, A. Sehgal, T. Tsou, C. Zhou. October 2014. (Format: TXT=53451 bytes) (Status: PROPOSED STANDARD) (DOI: 10.17487/RFC7388)

The writing on the package says its SNMP, but the important thing is the definition of the counters, which have wider applicability.

Grüße, Carsten

Hi Carsten!

Hi,

Hi Carsten!

Please have a look at RFC7388 when doing this:

     Definition of Managed Objects for IPv6 over Low-Power Wireless      Personal Area Networks (6LoWPANs). J. Schoenwaelder, A. Sehgal, T.      Tsou, C. Zhou. October 2014. (Format: TXT=53451 bytes) (Status:      PROPOSED STANDARD) (DOI: 10.17487/RFC7388)

The writing on the package says its SNMP, but the important thing is the definition of the counters, which have wider applicability.

That makes a lot of sense. Should have thought of this myself...

and thanks also from my side, I had also the question what to count for linux side _6LoWPAN_ interfaces.

But this is 6LoWPAN only? What about L2 stats. E.g. L2 stats are for me 802.15.4 values. For example if transmission with ack request got an ack or not. Also last LQI value from peer.

I currently think heavily about that because I need it. I also need to solve the short address vs extended address mapping, because I want to count only one peer for an extended address. I maybe use the MAC device table to do some lookup from short to extended. :-/

- Alex