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_sfr_congure_sfr: initial import #16158

Merged

Conversation

miri64
Copy link
Member

@miri64 miri64 commented Mar 5, 2021

Contribution description

This provides a CongURE implementation of the very basic congestion control for 6LoWPAN SFR proposed in Appendix C of RFC 8931 and provisions it to be usable with GNRC's SFR implementation.

Testing procedure

A test is provided in tests/gnrc_sixlowpan_frag_sfr_congure_impl which will be made reusable for other CongURE implementations. I tested it at the Grenoble site of the FIT IoT-LAB using RPL for route construction so that there is at least a hop between the pinger and the pinged and with sizes that will cause fragmentation:

1614964306.996314;Aggregator started
ifconfig
1614964310.548301;m3-101;ifconfig
1614964310.548622;m3-95;ifconfig
1614964310.548891;m3-96;ifconfig
1614964310.549791;m3-101;Iface  6  HWaddr: 1F:60  Channel: 26  Page: 0  NID: 0x23  PHY: O-QPSK 
1614964310.550280;m3-96;Iface  6  HWaddr: 16:0D  Channel: 26  Page: 0  NID: 0x23  PHY: O-QPSK 
1614964310.550443;m3-95;Iface  6  HWaddr: 42:D9  Channel: 26  Page: 0  NID: 0x23  PHY: O-QPSK 
1614964310.550555;m3-95;          
1614964310.550769;m3-101;          
1614964310.550918;m3-96;          
1614964310.551440;m3-95;          Long HWaddr: EE:1A:A6:05:46:D1:C2:D9 
1614964310.551759;m3-101;          Long HWaddr: A6:DA:E9:93:B3:CC:9F:60 
1614964310.551874;m3-96;          Long HWaddr: E6:49:92:FA:82:65:16:0D 
1614964310.553391;m3-95;           TX-Power: 0dBm  State: IDLE  max. Retrans.: 3  CSMA Retries: 4 
1614964310.553828;m3-101;           TX-Power: 0dBm  State: IDLE  max. Retrans.: 3  CSMA Retries: 4 
1614964310.553942;m3-96;           TX-Power: 0dBm  State: IDLE  max. Retrans.: 3  CSMA Retries: 4 
1614964310.555562;m3-95;          AUTOACK  ACK_REQ  CSMA  L2-PDU:102  MTU:1280  HL:64  RTR  
1614964310.555708;m3-96;          AUTOACK  ACK_REQ  CSMA  L2-PDU:102  MTU:1280  HL:64  RTR  
1614964310.555788;m3-96;          6LO  IPHC  
1614964310.555903;m3-101;          AUTOACK  ACK_REQ  CSMA  L2-PDU:102  MTU:1280  HL:64  RTR  
1614964310.555978;m3-101;          6LO  IPHC  
1614964310.556520;m3-95;          6LO  IPHC  
1614964310.556754;m3-101;          Source address length: 8
1614964310.556867;m3-96;          Source address length: 8
1614964310.557529;m3-95;          Source address length: 8
1614964310.557622;m3-95;          Link type: wireless
1614964310.557739;m3-101;          Link type: wireless
1614964310.557832;m3-96;          Link type: wireless
1614964310.558753;m3-101;          inet6 addr: fe80::a4da:e993:b3cc:9f60  scope: link  VAL
1614964310.558903;m3-96;          inet6 addr: fe80::e449:92fa:8265:160d  scope: link  VAL
1614964310.559543;m3-95;          inet6 addr: fe80::ec1a:a605:46d1:c2d9  scope: link  VAL
1614964310.559665;m3-95;          inet6 group: ff02::2
1614964310.559806;m3-101;          inet6 group: ff02::2
1614964310.559925;m3-101;          inet6 group: ff02::1
1614964310.560059;m3-96;          inet6 group: ff02::2
1614964310.560390;m3-95;          inet6 group: ff02::1
1614964310.560746;m3-101;          inet6 group: ff02::1:ffcc:9f60
1614964310.560886;m3-96;          inet6 group: ff02::1
1614964310.560989;m3-96;          inet6 group: ff02::1:ff65:160d
1614964310.561434;m3-95;          inet6 group: ff02::1:ffd1:c2d9
1614964310.561550;m3-95;          
1614964310.561695;m3-96;          
1614964310.561809;m3-96;          Statistics for Layer 2
1614964310.561961;m3-101;          
1614964310.562063;m3-101;          Statistics for Layer 2
1614964310.562508;m3-95;          Statistics for Layer 2
1614964310.562736;m3-101;            RX packets 15  bytes 645
1614964310.562864;m3-96;            RX packets 16  bytes 688
1614964310.563540;m3-95;            RX packets 14  bytes 602
1614964310.563757;m3-101;            TX packets 8 (Multicast: 8)  bytes 344
1614964310.563861;m3-96;            TX packets 8 (Multicast: 8)  bytes 344
1614964310.564470;m3-95;            TX packets 8 (Multicast: 8)  bytes 344
1614964310.564728;m3-101;            TX succeeded 8 errors 0
1614964310.564835;m3-96;            TX succeeded 8 errors 0
1614964310.565458;m3-95;            TX succeeded 8 errors 0
1614964310.565536;m3-95;          Statistics for IPv6
1614964310.565767;m3-101;          Statistics for IPv6
1614964310.565843;m3-101;            RX packets 15  bytes 960
1614964310.565928;m3-96;          Statistics for IPv6
1614964310.566522;m3-95;            RX packets 14  bytes 896
1614964310.566741;m3-96;            RX packets 16  bytes 1024
1614964310.567728;m3-95;            TX packets 8 (Multicast: 8)  bytes 512
1614964310.567952;m3-101;            TX packets 8 (Multicast: 8)  bytes 512
1614964310.568044;m3-101;            TX succeeded 8 errors 0
1614964310.568110;m3-101;
1614964310.568228;m3-96;            TX packets 8 (Multicast: 8)  bytes 512
1614964310.568541;m3-95;            TX succeeded 8 errors 0
1614964310.568624;m3-95;
1614964310.568903;m3-96;            TX succeeded 8 errors 0
1614964310.568973;m3-96;
m3-95;ifconfig 6 add 2001:db8::ec1a:a605:46d1:c2d9
1614964346.851658;m3-95;> ifconfig 6 add 2001:db8::ec1a:a605:46d1:c2d9
1614964346.854863;m3-95;success: added 2001:db8::ec1a:a605:46d1:c2d9/64 to interface 6
rpl init 6
1614964366.237649;m3-96;> rpl init 6
1614964366.238013;m3-95;> rpl init 6
1614964366.238570;m3-96;successfully initialized RPL on interface 6
1614964366.238989;m3-95;successfully initialized RPL on interface 6
1614964366.239846;m3-101;> rpl init 6
1614964366.241086;m3-101;successfully initialized RPL on interface 6
m3-95;rpl root 0 2001:db8::ec1a:a605:46d1:c2d9
1614964376.037773;m3-95;> rpl root 0 2001:db8::ec1a:a605:46d1:c2d9
1614964376.038735;m3-95;successfully added a new RPL DODAG
rpl
1614964379.321016;m3-101;> rpl
1614964379.321258;m3-101;instance table:	[X]	
1614964379.321708;m3-101;parent table:	[X]	[ ]	[ ]	
1614964379.321900;m3-101;
1614964379.322028;m3-95;> rpl
1614964379.322165;m3-96;> rpl
1614964379.323082;m3-101;instance [0 | Iface: 6 | mop: 2 | ocp: 0 | mhri: 256 | mri 0]
1614964379.323263;m3-96;instance table:	[X]	
1614964379.323358;m3-96;parent table:	[X]	[ ]	[ ]	
1614964379.323443;m3-96;
1614964379.323717;m3-95;instance table:	[X]	
1614964379.323820;m3-95;parent table:	[ ]	[ ]	[ ]	
1614964379.323906;m3-95;
1614964379.324702;m3-96;instance [0 | Iface: 6 | mop: 2 | ocp: 0 | mhri: 256 | mri 0]
1614964379.325938;m3-101;	dodag [2001:db8::ec1a:a605:46d1:c2d9 | R: 512 | OP: Router | PIO: on | TR(I=[8,20], k=10, c=0, TC=0s)]
1614964379.326166;m3-95;instance [0 | Iface: 6 | mop: 2 | ocp: 0 | mhri: 256 | mri 0]
1614964379.326720;m3-101;		parent [addr: fe80::ec1a:a605:46d1:c2d9 | rank: 256]
1614964379.326938;m3-96;	dodag [2001:db8::ec1a:a605:46d1:c2d9 | R: 512 | OP: Router | PIO: on | TR(I=[8,20], k=10, c=1, TC=0s)]
1614964379.327097;m3-95;	dodag [2001:db8::ec1a:a605:46d1:c2d9 | R: 256 | OP: Router | PIO: on | TR(I=[8,20], k=10, c=2, TC=0s)]
1614964379.327705;m3-96;		parent [addr: fe80::ec1a:a605:46d1:c2d9 | rank: 256]
m3-101;ifconfig
1614964415.189030;m3-101;> ifconfig
1614964415.190607;m3-101;Iface  6  HWaddr: 1F:60  Channel: 26  Page: 0  NID: 0x23  PHY: O-QPSK 
1614964415.190843;m3-101;          
1614964415.191428;m3-101;          Long HWaddr: A6:DA:E9:93:B3:CC:9F:60 
1614964415.193735;m3-101;           TX-Power: 0dBm  State: IDLE  max. Retrans.: 3  CSMA Retries: 4 
1614964415.195794;m3-101;          AUTOACK  ACK_REQ  CSMA  L2-PDU:102  MTU:1280  HL:64  RTR  
1614964415.195987;m3-101;          6LO  IPHC  
1614964415.196461;m3-101;          Source address length: 8
1614964415.197599;m3-101;          Link type: wireless
1614964415.198425;m3-101;          inet6 addr: fe80::a4da:e993:b3cc:9f60  scope: link  VAL
1614964415.200584;m3-101;          inet6 addr: 2001:db8::a4da:e993:b3cc:9f60  scope: global  VAL
1614964415.201419;m3-101;          inet6 group: ff02::2
1614964415.201560;m3-101;          inet6 group: ff02::1
1614964415.202677;m3-101;          inet6 group: ff02::1:ffcc:9f60
1614964415.203438;m3-101;          inet6 group: ff02::1a
1614964415.203618;m3-101;          
1614964415.204408;m3-101;          Statistics for Layer 2
1614964415.205607;m3-101;            RX packets 40  bytes 2461
1614964415.206545;m3-101;            TX packets 23 (Multicast: 22)  bytes 1408
1614964415.207707;m3-101;            TX succeeded 23 errors 0
1614964415.207899;m3-101;          Statistics for IPv6
1614964415.208484;m3-101;            RX packets 40  bytes 3296
1614964415.209651;m3-101;            TX packets 23 (Multicast: 22)  bytes 1886
1614964415.210469;m3-101;            TX succeeded 23 errors 0
1614964415.210580;m3-101;
m3-96;ping6 2001:db8::a4da:e993:b3cc:9f60
1614964428.654179;m3-96;> ping6 2001:db8::a4da:e993:b3cc:9f60
1614964428.677176;m3-96;12 bytes from 2001:db8::a4da:e993:b3cc:9f60: icmp_seq=0 ttl=63 rssi=-35 dBm time=20.233 ms
1614964429.676029;m3-96;12 bytes from 2001:db8::a4da:e993:b3cc:9f60: icmp_seq=1 ttl=63 rssi=-36 dBm time=20.557 ms
1614964430.677166;m3-96;12 bytes from 2001:db8::a4da:e993:b3cc:9f60: icmp_seq=2 ttl=63 rssi=-36 dBm time=21.507 ms
1614964430.677397;m3-96;
1614964430.678876;m3-96;--- 2001:db8::a4da:e993:b3cc:9f60 PING statistics ---
1614964430.680083;m3-96;3 packets transmitted, 3 packets received, 0% packet loss
1614964430.682217;m3-96;round-trip min/avg/max = 20.233/20.765/21.507 ms
m3-96;ping6 -s 100 2001:db8::a4da:e993:b3cc:9f60
1614964437.596575;m3-96;> ping6 -s 100 2001:db8::a4da:e993:b3cc:9f60
1614964437.663689;m3-96;108 bytes from 2001:db8::a4da:e993:b3cc:9f60: icmp_seq=0 ttl=63 rssi=-35 dBm time=63.280 ms
1614964438.666144;m3-96;108 bytes from 2001:db8::a4da:e993:b3cc:9f60: icmp_seq=1 ttl=63 rssi=-35 dBm time=67.108 ms
1614964439.677878;m3-96;108 bytes from 2001:db8::a4da:e993:b3cc:9f60: icmp_seq=2 ttl=63 rssi=-36 dBm time=77.627 ms
1614964439.678080;m3-96;
1614964439.679264;m3-96;--- 2001:db8::a4da:e993:b3cc:9f60 PING statistics ---
1614964439.681041;m3-96;3 packets transmitted, 3 packets received, 0% packet loss
1614964439.681232;m3-96;round-trip min/avg/max = 63.280/69.338/77.627 ms
m3-96;ping6 -s 200 2001:db8::a4da:e993:b3cc:9f60
1614964442.518263;m3-96;> ping6 -s 200 2001:db8::a4da:e993:b3cc:9f60
1614964442.624595;m3-96;208 bytes from 2001:db8::a4da:e993:b3cc:9f60: icmp_seq=0 ttl=63 rssi=-36 dBm time=103.726 ms
1614964444.614176;m3-96;208 bytes from 2001:db8::a4da:e993:b3cc:9f60: icmp_seq=2 ttl=63 rssi=-34 dBm time=94.053 ms
1614964445.518162;m3-96;
1614964445.519228;m3-96;--- 2001:db8::a4da:e993:b3cc:9f60 PING statistics ---
1614964445.521034;m3-96;3 packets transmitted, 2 packets received, 33% packet loss
1614964445.521668;m3-96;round-trip min/avg/max = 94.053/98.889/103.726 ms
m3-96;ping6 -s 100 2001:db8::a4da:e993:b3cc:9f60
1614964470.226600;m3-96;> ping6 -s 100 2001:db8::a4da:e993:b3cc:9f60
1614964470.289566;m3-96;108 bytes from 2001:db8::a4da:e993:b3cc:9f60: icmp_seq=0 ttl=63 rssi=-35 dBm time=61.421 ms
1614964471.286497;m3-96;108 bytes from 2001:db8::a4da:e993:b3cc:9f60: icmp_seq=1 ttl=63 rssi=-35 dBm time=57.948 ms
1614964472.300406;m3-96;108 bytes from 2001:db8::a4da:e993:b3cc:9f60: icmp_seq=2 ttl=63 rssi=-36 dBm time=72.318 ms
1614964472.300606;m3-96;
1614964472.301200;m3-96;--- 2001:db8::a4da:e993:b3cc:9f60 PING statistics ---
1614964472.303436;m3-96;3 packets transmitted, 3 packets received, 0% packet loss
1614964472.304284;m3-96;round-trip min/avg/max = 57.948/63.895/72.318 ms

Issues/PRs references

Depends on #16156 and all its dependencies.

PR dependency graph

@miri64 miri64 changed the title Gnrc sixlowpan frag sfr congure sfr/feat/initial gnrc_sixlowpan_frag_sfr_congure_sfr: initial import Mar 5, 2021
@miri64 miri64 added Area: network Area: Networking State: waiting for other PR State: The PR requires another PR to be merged first Type: new feature The issue requests / The PR implemements a new feature for RIOT labels Mar 5, 2021
@miri64 miri64 force-pushed the gnrc_sixlowpan_frag_sfr_congure_sfr/feat/initial branch from 35a31d4 to e7d6a44 Compare May 6, 2021 15:16
@miri64
Copy link
Member Author

miri64 commented May 6, 2021

Rebased and squashed to current master.

@stale
Copy link

stale bot commented Aug 13, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you want me to ignore this issue, please mark it with the "State: don't stale" label. Thank you for your contributions.

@stale stale bot added the State: stale State: The issue / PR has no activity for >185 days label Aug 13, 2022
@miri64 miri64 removed the State: stale State: The issue / PR has no activity for >185 days label Aug 13, 2022
@miri64 miri64 force-pushed the gnrc_sixlowpan_frag_sfr_congure_sfr/feat/initial branch from e7d6a44 to fc634c0 Compare October 25, 2022 10:44
@miri64 miri64 requested a review from MrKevinWeiss as a code owner October 25, 2022 10:44
@miri64 miri64 force-pushed the gnrc_sixlowpan_frag_sfr_congure_sfr/feat/initial branch from d3bf63c to ec88642 Compare January 20, 2023 07:41
@miri64 miri64 force-pushed the gnrc_sixlowpan_frag_sfr_congure_sfr/feat/initial branch from ec88642 to 579d69a Compare February 28, 2023 18:22
@miri64 miri64 force-pushed the gnrc_sixlowpan_frag_sfr_congure_sfr/feat/initial branch from 579d69a to ecdc64e Compare February 28, 2023 19:25
Copy link
Contributor

@benpicco benpicco left a comment

Choose a reason for hiding this comment

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

Thank you for cleaning up the test!

@miri64
Copy link
Member Author

miri64 commented Feb 28, 2023

Woop woop

bors merge

🚂

@bors
Copy link
Contributor

bors bot commented Feb 28, 2023

🕐 Waiting for PR status (GitHub check) to be set, probably by CI. Bors will automatically try to run when all required PR statuses are set.

@miri64
Copy link
Member Author

miri64 commented Feb 28, 2023

bors merge

bors bot added a commit that referenced this pull request Feb 28, 2023
16158: gnrc_sixlowpan_frag_sfr_congure_sfr: initial import r=miri64 a=miri64



Co-authored-by: Martine Lenders <m.lenders@fu-berlin.de>
@miri64
Copy link
Member Author

miri64 commented Feb 28, 2023

bors cancel
bors merge

@bors
Copy link
Contributor

bors bot commented Feb 28, 2023

Canceled.

bors bot added a commit that referenced this pull request Feb 28, 2023
16158: gnrc_sixlowpan_frag_sfr_congure_sfr: initial import r=miri64 a=miri64



19331: pkg/tinydtls: Adjust defaults r=miri64 a=chrysn

### Contribution description

This adjusts two defaults in tinydtls:

* Default verbosity is set to warning. At the info level, this module produces way more output (several lines per new connection, and even per message) than is common in RIOT.
* If gcoap is used, the buffer size is adjusted to the gcoap buffer size plus overhead. Otherwise, CoAP-over-DTLS works fine until one happens to request larger resources.

### Testing procedure

* Run examples/gcoap_dtls
* Send a CoAP request from outside, eg. with `aiocoap-client 'coaps://[fe80::3c63:beff:fe85:ca96%tapbr0]/.well-known/core' --credentials testserver.json` (where testserver.json is `{"coaps://[fe80::3c63:beff:fe85:ca96%tapbr0]/*": {"dtls": {"psk": {"ascii": "secretPSK"}, "client-identity": {"ascii": "Client_identity"}}}}`).

Before, there are messages shown for every request; now there are none.

Modify `examples/gcoap/server.c` as follows:

```patch
diff --git a/examples/gcoap/server.c b/examples/gcoap/server.c
index bf2315cd01..28e1faac27 100644
--- a/examples/gcoap/server.c
+++ b/examples/gcoap/server.c
`@@` -68,7 +68,7 `@@` static const coap_resource_t _resources[] = {
 };
 
 static const char *_link_params[] = {
-    ";ct=0;rt=\"count\";obs",
+    ";ct=0;rt=\"count\";obs;looooooooooooooooooooooong-attribute=\"loooooooooooooooooooooooooooooong\"",
     NULL
 };
```

The request passes; without this patch, it is stuck in retransmissions until "Network error: Retransmissions exceeded".

### Issues/PRs references

This contributes to making #19289 usable with a minimum level of security. (That module fills up the gcoap buffer to the brim). While the module handles the verbosity as well as it can (occasionally admitting that it lost bytes of output), the previous verbosity produces an infinite stream of stdout data. (But the default should be quiet immaterial of that particular PR).

Co-authored-by: Martine Lenders <m.lenders@fu-berlin.de>
Co-authored-by: chrysn <chrysn@fsfe.org>
@bors
Copy link
Contributor

bors bot commented Feb 28, 2023

Build failed (retrying...):

bors bot added a commit that referenced this pull request Feb 28, 2023
16158: gnrc_sixlowpan_frag_sfr_congure_sfr: initial import r=miri64 a=miri64



Co-authored-by: Martine Lenders <m.lenders@fu-berlin.de>
@benpicco
Copy link
Contributor

bors merge

@bors
Copy link
Contributor

bors bot commented Feb 28, 2023

Already running a review

@benpicco
Copy link
Contributor

bors cancel
bors merge

@bors
Copy link
Contributor

bors bot commented Feb 28, 2023

Canceled.

@miri64
Copy link
Member Author

miri64 commented Mar 1, 2023

bors merge

bors bot added a commit that referenced this pull request Mar 1, 2023
16158: gnrc_sixlowpan_frag_sfr_congure_sfr: initial import r=miri64 a=miri64



Co-authored-by: Martine Lenders <m.lenders@fu-berlin.de>
@bors
Copy link
Contributor

bors bot commented Mar 1, 2023

Build failed:

@miri64 miri64 force-pushed the gnrc_sixlowpan_frag_sfr_congure_sfr/feat/initial branch from ecdc64e to 918d48a Compare March 1, 2023 08:21
@miri64
Copy link
Member Author

miri64 commented Mar 1, 2023

bors merge

@bors
Copy link
Contributor

bors bot commented Mar 1, 2023

Build succeeded:

@bors bors bot merged commit 04ef372 into RIOT-OS:master Mar 1, 2023
@miri64 miri64 deleted the gnrc_sixlowpan_frag_sfr_congure_sfr/feat/initial branch March 1, 2023 11:53
@MrKevinWeiss MrKevinWeiss added this to the Release 2023.04 milestone Apr 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: build system Area: Build system Area: doc Area: Documentation Area: network Area: Networking Area: sys Area: System Area: tests Area: tests and testing framework CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Type: new feature The issue requests / The PR implemements a new feature for RIOT
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants