gnrc_sixlowpan_nd: initial import of host behavior of 6LoWPAN-ND#3748
gnrc_sixlowpan_nd: initial import of host behavior of 6LoWPAN-ND#3748miri64 merged 2 commits intoRIOT-OS:masterfrom
Conversation
b53e88b to
e4751a8
Compare
|
Rebased to current master and current dependencies |
e4751a8 to
43a8189
Compare
|
Rebased to current master and dependencies |
43a8189 to
a31ab94
Compare
|
Rebased to current master and dependencies |
There was a problem hiding this comment.
Propose a bit of code and I fix it. Every solution I come up with seems to complicated to me to just keep inexperienced users from wasting memory (because this is what you essentially are proposing, right?).
There was a problem hiding this comment.
Right. Will propose something - later.
There was a problem hiding this comment.
Also, technically speaking, this already describes a non-border-router case. We only got 1 interface, that is not a 6LoWPAN interface, if we have one interface more we just include it (see below). The else case for >1 interface could just be a little more sophisticated (maybe check if dev_eth or gnrc_slip are included… I don't know…)
a31ab94 to
096fafb
Compare
|
Rebased to current master. No longer dependent on any PRs. |
161de70 to
e7487df
Compare
|
Rebased to current master and squashed already. |
There was a problem hiding this comment.
Just checking: the snip is released elsewhere, right?
There was a problem hiding this comment.
Japp, in gnrc_ipv6_demux(), when there are no more receivers for the packet.
|
Addressed comments |
|
Please squash and kick Travis, will test now. |
5f567cf to
f3b45b2
Compare
|
Done |
|
For some reason neighbor cache doesn't get filled correctly with RPL. In master after some time: with this PR: Trying to figure out what's going wrong. |
|
For link-local addresses the neighbor cache won't be filled. See https://tools.ietf.org/html/rfc6775#section-5.6 |
|
Then master and this PR are broken. |
|
This PR is introducing 6LoWPAN-ND, so master does not know about RFC6775. Will investigate the brokenness of this PR as I get ping timeouts with diff --git a/examples/gnrc_networking/Makefile b/examples/gnrc_networking/Makefile
index 3347e0c..0bd2560 100644
--- a/examples/gnrc_networking/Makefile
+++ b/examples/gnrc_networking/Makefile
@@ -20,10 +20,8 @@ BOARD_BLACKLIST := arduino-mega2560 spark-core
USEMODULE += gnrc_netif_default
USEMODULE += auto_init_gnrc_netif
# Specify the mandatory networking modules for IPv6 and UDP
-USEMODULE += gnrc_ipv6_router_default
+USEMODULE += gnrc_ipv6_default
USEMODULE += gnrc_udp
-# Add a routing protocol
-USEMODULE += gnrc_rpl
# This application dumps received packets to STDIO using the pktdump module
USEMODULE += gnrc_pktdump
# Additional networking modules that can be dropped if not neededtoo |
|
Double whammy: I checked for |
|
On your tests: |
|
It is working. |
|
Maybe RPL is doing something on its own ;-) |
There was a problem hiding this comment.
How do we check that these are all 802.15.4 interfaces? But I'm not in favor to check this at runtime anyway.
There was a problem hiding this comment.
Well… you kind of only land at this point if you are a 6LoWPAN host (meaning that this one interface is a 6Lo interface [no guarantee for being a 802.15.4 device though, but I'm not even sure how other 6Lo-L2s handle this case]).
There was a problem hiding this comment.
The node still may have several other interfaces.
There was a problem hiding this comment.
Assumption: a host has only one interface (otherwise it would be a router IMHO). We only come to this point, if the node is a 6LoWPAN node and if it is a host, ergo at this point we can assume to only have one 6Lo interface.
There was a problem hiding this comment.
I wouldn't agree on the assumption that hosts are only allowed to have 1 interface. IMO it should be possible for a node to participate in the network as a host and be able to communicate e.g. by using one 802.15 transceiver and a BLE transceiver
There was a problem hiding this comment.
Yes, but that has nothing to do with ND, because ND is for IP. I now take the first 6LoWPAN interface if there is more than one. Is there is only one, I assume it to be a 6LoWPAN interface because otherwise we wouldn't be in this function. Please check the updated code.
There was a problem hiding this comment.
I would elide the ifdef. If there's only one interface and it's not a 6LoWPAN interface, something is very broken anyway.
There was a problem hiding this comment.
Yes, and that's why I assume that I wouldn't even get there.
There was a problem hiding this comment.
Then it's just a superfluous ifdef.
There was a problem hiding this comment.
See my reply in https://github.com/RIOT-OS/RIOT/pull/3748/files#r38941027
4208350 to
813eaff
Compare
There was a problem hiding this comment.
From #3748 (comment) (in outdated diff)
Then it's just a superfluous ifdef.
Just return the only interface that there is vs. for-loop + getting of the IPv6 interface + checking if that interface is a 6LoWPAN interface. How is that superfluous, when it prevents a lot of "useless" checking?
There was a problem hiding this comment.
Can you turn it into a real if() {} else{} block?
There was a problem hiding this comment.
IMO there's a lot of code in gnrc that can be tremendously simplified (and even improved) if we add this #if (GNRC_NETIF_NUMOF == 1) at several places on the cost of readability. For now, I would prefer to go without these preprocessor ifs and leave optimization for the single-interface case for later.
There was a problem hiding this comment.
Removed "superfluous" CPP if, but used input iface in case it was set (e.g. by FIB)
There was a problem hiding this comment.
Can you turn it into a real if() {} else{} block?
What good would that be for?
|
Please squash |
5831caa to
b8f27ee
Compare
|
Squashed |
|
ACK |
|
Btw this PR adds about 1.7k ROM for iotlab-m3 and about 2k ROM for samr21 with |
b8f27ee to
ea3426e
Compare
Then we have a lot of room for optimization. :-) |
|
Fixed unused variable issue and squashed immediately |
|
Travis is finally happy \o/ |
…tial gnrc_sixlowpan_nd: initial import of host behavior of 6LoWPAN-ND
|
Thanks for the review! |
This imports host behavior for 6LoWPAN-ND and adapts GNRC accordingly
Depends on:
gnrc_ndp: add support for address-less link-layers #3628: address-less link-layer handling for NDP(merged)gnrc_ipv6_nc: adapt neighbor cache for different ND implementations #3744:(merged)gnrc_ipv6_ncadaption for 6LoWPAN-NDgnrc_ipv6_netif: prepare for router discovery #3745:(merged)gnrc_ipv6_netifadaptations for router discoverygnrc_ndp_host: Initial import of host behavior of router discovery #3746: host-behavior for normal router discovery(merged)gnrc_ndp_internal: add capability to add external options to NAs #3747: adaption of the NA send function to build ARO externally(merged)