Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

netstats_l2: cc2538 (and at86rf2xx fixes) #5985

Merged
merged 2 commits into from
Oct 24, 2016

Conversation

smlng
Copy link
Member

@smlng smlng commented Oct 21, 2016

add layer2 netstats to cc2538 and minor correction in at86rf2xx.

@smlng smlng added Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation Area: network Area: Networking Area: drivers Area: Device drivers labels Oct 21, 2016
@PeterKietzmann
Copy link
Member

@smlng would you mind splitting the at86rf2xx part into a separate commit? ACK for the changes in general. @cgundogan would you give it a quick try? Maybe at the Hack'n'ACK?!

@PeterKietzmann PeterKietzmann added the Community: Hack'n'ACK candidate This PR is a candidate for review and discussion during one of RIOT's monthly Hack'n'ACK parties label Oct 22, 2016
@smlng
Copy link
Member Author

smlng commented Oct 22, 2016

@PeterKietzmann the at86rf2xx corrections are in a seperate commit, just not in a new PR - but I don't think thats needed here.

@alignan
Copy link
Contributor

alignan commented Oct 24, 2016

👍

@miri64 miri64 changed the title netstats_l2: cc2538 netstats_l2: cc2538 (and at86rf2xx fixes) Oct 24, 2016
@PeterKietzmann PeterKietzmann added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Oct 24, 2016
Copy link
Member

@PeterKietzmann PeterKietzmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK and go

@PeterKietzmann PeterKietzmann merged commit 32eb239 into RIOT-OS:master Oct 24, 2016
@miri64 miri64 added this to the Release 2016.10 milestone Oct 24, 2016
@smlng smlng deleted the pr/netstats_l2 branch October 25, 2016 06:57
@OlegHahm
Copy link
Member

Hm, I disagree with the at86rf2xx "fix".

  1. Data that was received on L2 should go into statistics, whether it can be processed or not.
  2. A preprocessor line must always start with a #, i.e. no preceding white spaces are allowed.

@smlng
Copy link
Member Author

smlng commented Oct 27, 2016

@OlegHahm

  1. I understand your concerns, but contrary to Linux' ip -s -s link we currently have no (distinct) RX errors - and this definitely is a receive error not a success.
  2. my editor tricked me into this, for cc2538 cc2538: Minor indentation fix #5995 corrects this - should be done here, too. But only if we don't revert this anyways

@OlegHahm
Copy link
Member

I understand your concerns, but contrary to Linux' ip -s -s link we currently have no (distinct) RX errors - and this definitely is a receive error not a success.

From the L2 perspective I would argue that it is a success - otherwise the packet would not be passed to the driver.

@smlng
Copy link
Member Author

smlng commented Oct 27, 2016

In general I would agree; but I would argue that from the RIOT perspective I would say L2 ends when the packet passes out of grnrc_netdev2_ieee802154.c, or not? That way, netstat could (should) be captured in netdev2?

@PeterKietzmann
Copy link
Member

Hi! Sorry for merging this too fast. About the leading white spaces in the preprocessor lines, I have completely overlooked them. About the position of the rx byte counter I do understand both of your argumentations. When I reviewed this I was thinking about what I would assume as a user of these statistics and that was actually "how many bytes have successfully been received by the driver". That's why I gave my ACK. On the other hand I see Olegs concerns which might allow for easier troubleshooting. If we go with the change in this PR I agree that it might be reasonable to think about moving to grnrc_netdev2_ieee802154.c

@OlegHahm
Copy link
Member

The best solution would be probably to properly specify and document what these statistics mean.

@PeterKietzmann
Copy link
Member

@OlegHahm this seems reasonable. But I think we should first agree on what we want them to mean: (i) complete number bytes received, including later removed ones from malformed frames or (ii) number of successfully received bytes by the driver. IIRC you wrote the initial support for L2 statistics so I'd like to leave the decision up to you :-)!

@smlng
Copy link
Member Author

smlng commented Nov 1, 2016

I'd like to point out here that for Linux/Unix experienced user or developer these stats might be more intuitive (to understand) if they mean (and capture) the same as on Linux, i.e., ip -s -s link as already referenced above.

@OlegHahm
Copy link
Member

OlegHahm commented Nov 1, 2016

@smlng, agreed. Can you (i) provide documentation of the meanings of the statistics for iproute2 and (ii) provide a PR with the missing netstats?

@OlegHahm
Copy link
Member

OlegHahm commented Nov 1, 2016

@PeterKietzmann, okay, let's have a discussion on the mailing list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: drivers Area: Device drivers Area: network Area: Networking CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Community: Hack'n'ACK candidate This PR is a candidate for review and discussion during one of RIOT's monthly Hack'n'ACK parties Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants