gnrc_netif: allow for wait of minimum time between sends#11837
Merged
fjmolinas merged 1 commit intoRIOT-OS:masterfrom Aug 9, 2019
Merged
gnrc_netif: allow for wait of minimum time between sends#11837fjmolinas merged 1 commit intoRIOT-OS:masterfrom
fjmolinas merged 1 commit intoRIOT-OS:masterfrom
Conversation
fjmolinas
reviewed
Aug 9, 2019
Contributor
fjmolinas
left a comment
There was a problem hiding this comment.
Tested using a samr21-xpro and pba-d-01-kw2x. I only have a minor comment on the doc, if you agree please squash directly.
GNRC_NETIF_MIN_WAIT_AFTER_SEND_US=5000
> ping6 fe80::d1c1:6d4e:ab6a:1336
2019-08-09 10:07:59,059 - INFO # ping6 fe80::d1c1:6d4e:ab6a:1336
2019-08-09 10:08:02,058 - INFO #
2019-08-09 10:08:02,062 - INFO # --- fe80::d1c1:6d4e:ab6a:1336 PING statistics ---
2019-08-09 10:08:02,067 - INFO # 3 packets transmitted, 0 packets received, 100% packet loss
GNRC_NETIF_MIN_WAIT_AFTER_SEND_US=500
ping6 fe80::d1c1:6d4e:ab6a:1336
2019-08-09 10:08:58,750 - INFO # ping6 fe80::d1c1:6d4e:ab6a:1336
2019-08-09 10:08:58,766 - INFO # 12 bytes from fe80::d1c1:6d4e:ab6a:1336: icmp_seq=0 ttl=64 rssi=-57 dBm time=8.689 ms
2019-08-09 10:08:59,765 - INFO # 12 bytes from fe80::d1c1:6d4e:ab6a:1336: icmp_seq=1 ttl=64 rssi=-63 dBm time=8.995 ms
2019-08-09 10:09:00,764 - INFO # 12 bytes from fe80::d1c1:6d4e:ab6a:1336: icmp_seq=2 ttl=64 rssi=-64 dBm time=8.371 ms
2019-08-09 10:09:00,764 - INFO #
2019-08-09 10:09:00,768 - INFO # --- fe80::d1c1:6d4e:ab6a:1336 PING statistics ---
2019-08-09 10:09:00,774 - INFO # 3 packets transmitted, 3 packets received, 0% packet loss
2019-08-09 10:09:00,778 - INFO # round-trip min/avg/max = 8.371/8.685/8.995 ms
GNRC_NETIF_MIN_WAIT_AFTER_SEND_US=0
2019-08-09 10:06:41,414 - INFO # ping6 fe80::d1c1:6d4e:ab6a:1336
2019-08-09 10:06:41,429 - INFO # 12 bytes from fe80::d1c1:6d4e:ab6a:1336: id=83 seq=1 hop limit=64 time = 7.684 ms
2019-08-09 10:06:42,443 - INFO # 12 bytes from fe80::d1c1:6d4e:ab6a:1336: id=83 seq=2 hop limit=64 time = 7.692 ms
2019-08-09 10:06:43,457 - INFO # 12 bytes from fe80::d1c1:6d4e:ab6a:1336: id=83 seq=3 hop limit=64 time = 8.321 ms
6b617ee to
488c47c
Compare
Member
Author
Done |
Contributor
|
All green! GO! |
miri64
added a commit
to 5G-I3/RIOT-public
that referenced
this pull request
Sep 25, 2019
(cherry picked from commit 488c47c, see RIOT-OS#11837)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Contribution description
This was cherry-picked out of #11068 (which became a huge mess during my experiment phase in preparation for the 6LoWPAN fragment forwarding paper.
This adds a minimum sleep between every send, to allow for slowing down the send operations of a device.
To be perfectly honest, I don't know if and how useful this could be in production operation or beyond experimentation in general, but it helped me to confirm some things during my experimentation. However, I kept it optional and marked it as experimental so I think it does not harm to merge.
Testing procedure
First compile and flash
gnrc_networkingnormally withGNRC_NETIF_MIN_WAIT_AFTER_SEND_US=0. Ping another node with the same configuration. There should be no significant changes to to master.Now compile with a higher delay e.g.
GNRC_NETIF_MIN_WAIT_AFTER_SEND_US=5000. The RTT when pinging should now significantly increase (maybe even timeout), if you have access to a sniffer: the time different between two transmissions (ignoring L2 retransmissions) should now be at minimum at the configured time interval.Issues/PRs references
Cherry-picked from #11068, but this PR has no dependencies.