-
Notifications
You must be signed in to change notification settings - Fork 2k
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
gnrc_netdev2: link-layer retransmissions outside the transceiver driver #4795
Conversation
I know it's not a beauty, but can become quite handy if you want to measure what's really happening inside the stack. |
This seems to be at first glance more of a |
Well, ideally, it would go into netdev2, but I need something to queue the packets while waiting for retransmission and therefore the pktbuf is quite handy. |
Why netdev2? Isn't this a very radio-only feature? |
Why radio-only? |
@OlegHahm Would you mind factoring out the netstats? Regarding the retransmissions, I think a combined approach is best:
I propose that netdev2 devices do, if not configured to do some kind of internal retransmissions, return a defined error when the medium is busy when sending, e.g., "-EBUSY" or "-EAGAIN" (we should use one for the device actually being busy and the other for "medium is busy". In gnrc, we devise a simple intermediate handler that overrides _send (and possibly _get/_set), on which radio devices (gnrc_iee802154/gnrc_cc110x) can be stacked.
|
Yes, makes sense, will do. Although without the retransmission mechanism the stats won't be accurate. |
The problem that I'm current facing is that I lose interrupts on the SAMR21. If I send fragmented 6LoWPAN packets and the last fragment is rather small (e.g. <= 20 bytes of payload), I will only get one TX_END IRQ. |
Problem fixed. Thanks @haukepetersen for the advice. |
@kaspar030, here you go: #4801 |
c2f2260
to
f3734d8
Compare
Surprisingly it doesn't seem to affect the performance when running pinging (tested on SAMR21-xpro with 100 pings a 1008 bytes, i.e. 10 fragments per datagram). |
Needs rebase. I did not look into the code, but if I understand the problem correctly: Can't this be solved with a |
What can be solved? |
Getting the number of retransmissions done by the driver. |
I don't understand how. The transceiver and therefore the driver doesn't know anything about the number of retransmissions. |
Huh? If not the transceiver, who else? |
In this PR: gnrc_netdev2. That's basically the whole point of this PR. ;) |
Ahhhh sorry I missunderstood the PR. I thought you introduced a feature to get the number of automatic retransmissions of the device... not that you take out the retransmissions to the MAC layer... Okay, then I wait until #4646 is merged for my final review :-) |
6079edc
to
82516bb
Compare
rebased to current master after #4646 got merged. |
Isn't netstats introduced in #4801? |
Yes. |
So why did you rebase to master then? |
Might also be of interest for @zhuoshuguo and @daniel-k especially considering that they are working on a priority queue for MAC too. |
Postponed due to feature freeze |
@OlegHahm ping? |
(both PRs got merged in the meantime so rebasing is and unification with those is now required) |
I can certainly rebase, but I'm not sure I will find the time for extensive testing. |
Ok, then let's postpone |
@OlegHahm What is the status of this? |
Needs rebase. |
The code looks pretty stale and I think it would be better to have this done in a matter as proposed in #7736, so that other stacks can benefit from that. |
This PR introduces two features:
1.) Link layer retransmissions inside netdev2. Therefore, link layer retransmissions are disabled in the driver.
2.) netstats as a mostly generic module to collect statistics per layer. A first implementation for at86rf2xx's netdev2 driver is added.
Depends on #4645