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

gnrc_sixlowpan_frag: allow send of multiple datagrams simultaneously #11021

Merged
merged 4 commits into from
May 27, 2019

Conversation

miri64
Copy link
Member

@miri64 miri64 commented Feb 15, 2019

Contribution description

For fragment forwarding I need to be able to send (and in case the packet is compressed also [re-]construct) fragments of multiple datagrams. Currently this is not possible, since the source for the datagram tag is always taken from the global variable _tag. However, by adding the tag to the gnrc_sixlowpan_msg_frag_t type we are able to allocate a datagram tag from _tag at an earlier point and use the new member to set the fragments datagram tag field from that.

I also piggy-backed some optimizations to the gnrc_sixlowpan_frag module, which results in this enhancement only to require 20 more bytes of code.

Testing procedure

gnrc_networking should still be able to ping between two 6Lo-capable nodes with large payloads.

Issues/PRs references

No dependencies, but provides basis for others:

Route to 6Lo minimal fragment forwarding

@miri64 miri64 added Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation Area: network Area: Networking labels Feb 15, 2019
@miri64 miri64 added this to the Release 2019.04 milestone Feb 15, 2019
@miri64 miri64 removed this from the Release 2019.04 milestone Mar 29, 2019
@miri64
Copy link
Member Author

miri64 commented Mar 29, 2019

#11068 is too experimental so it doesn't make any sense to try too get this into the release => post-poned.

The VRB also needs to be able to generate new tags for forwarding. This
exposes the tag generation.
@miri64 miri64 force-pushed the gnrc_sixlowpan_frag/enh/multiple-send branch from 3b426cd to 4b529d9 Compare April 18, 2019 14:41
@miri64
Copy link
Member Author

miri64 commented Apr 18, 2019

Rebased to current master and moved compile configurations to net/gnrc/sixlowpan/config.h (see #11415)

Copy link
Member

@cgundogan cgundogan left a comment

Choose a reason for hiding this comment

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

The code looks good, tested on the iotlab testbed using 2 nodes. The normal operation still works. I then compiled with GNRC_SIXLOWPAN_MSG_FRAG_SIZE=2 and reduced the ping interval in order to get interleaving ping fragments.

With below configuration pinging works:

ping6 -c 100 -i 200 -s 1232 ...

With below configuration pinging does not work:

ping6 -c 100 -i 100 -s 1232 ...

I assume that with a payload of 1232 I trigger ~10 fragments with an average RTT of ~100ms.
While a pinging interval of 200ms yields almost 100% success, pinging with 100ms yields 0% success. I can't tell whether it's just because of a too small fragmentation buffer.

Nevertheless, the proposed change is sane and the default is to handle 1 datagram at a time anyways. ACK from my side.

@miri64
Copy link
Member Author

miri64 commented May 27, 2019

The effect has nothing to do with the new feature. The same will be visible on master, as you are sending huge packages faster than the node can handle them (RTT for those pings alone is >100ms

@cgundogan
Copy link
Member

The effect has nothing to do with the new feature. The same will be visible on master, as you are sending huge packages faster than the node can handle them (RTT for those pings alone is >100ms

yes, but I would expect at least some pings to succeed. I see 0% success.

@miri64 miri64 force-pushed the gnrc_sixlowpan_frag/enh/multiple-send branch from 4b529d9 to 93050d2 Compare May 27, 2019 08:35
@miri64
Copy link
Member Author

miri64 commented May 27, 2019

Squashed

@miri64
Copy link
Member Author

miri64 commented May 27, 2019

yes, but I would expect at least some pings to succeed. I see 0% success.

How could a ping succeed, if you are draining the pinged nodes resources in one instance? The "problem" is the new asynchronous ping here. It doesn't wait for a reply until it sends the next package, like the old ping did and thus makes such effects more visible. See also RIOT-OS/Release-Specs#121 for what is happening. Anyway, this is unrelated to this PR.

You won't be able to force the 6LoWPAN thread to send multiple datagrams just with one node. You need fragment forwarding to observe this.

@cgundogan
Copy link
Member

You won't be able to force the 6LoWPAN thread to send multiple datagrams just with one node. You need fragment forwarding to observe this.

so it's currently not possible to test this new feature with this PR alone? Nevertheless, I confirmed that it at least does not break the current master's behaviour.

Copy link
Member

@cgundogan cgundogan left a comment

Choose a reason for hiding this comment

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

re-ACK

@miri64
Copy link
Member Author

miri64 commented May 27, 2019

so it's currently not possible to test this new feature with this PR alone?

Yepp, that's why the testing procedures say

gnrc_networking should still be able to ping

;-)

@miri64 miri64 added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label May 27, 2019
@miri64 miri64 merged commit 8fe12bc into RIOT-OS:master May 27, 2019
@miri64 miri64 deleted the gnrc_sixlowpan_frag/enh/multiple-send branch May 27, 2019 09:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: network Area: Networking CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR 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.

2 participants