gnrc_netif: centralize device-type-specific functions#10524
gnrc_netif: centralize device-type-specific functions#10524cgundogan merged 4 commits intoRIOT-OS:masterfrom
Conversation
2593e04 to
cc0bc9c
Compare
cc0bc9c to
84093cf
Compare
|
Rebased and adapted for current #10513. |
| #if defined(MODULE_CC110X) | ||
| case NETDEV_TYPE_CC110X: | ||
| (void)opt; | ||
| return sizeof(uint8_t); |
There was a problem hiding this comment.
I added this (in an extra commit), as it wasn't implemented yet.
4849569 to
ef0429e
Compare
|
Rebased to current master. No longer dependent on another PR. |
ef0429e to
43110bd
Compare
|
Rebased again and squashed this time |
43110bd to
6c8f432
Compare
|
@maribu @gschorcht can you test this again? |
|
Maybe @aabadie can test for nordic softdevice and nrfmin (and all the rest :-)) |
|
@miri64 Tested. After configuring After pinging any global unicast address, I guess that is what you expected. |
|
Yepp :-) |
6438b3b to
21261a8
Compare
|
Rebased and adapted for current master. |
|
ESP-now needs retesting, since I needed to adopt for #10581. |
|
Btw: Adding if ! lsmod | grep tun > /dev/null ; then
sudo modprobe tun
fiTo the script run on |
|
OK, it does not work on the MSB-A2 This is what I did in and in But the MSB-A2 all get the same HW and IPv6 address. I changed the address on the board running |
|
@maribu what does not work on MSB-A2? Your comment doesn't really provide any information on that :-/ |
I believe you are the first one to report such a problem. I (with both Ubuntu and Arch) never had to load that module (nor add it to |
|
If I understood correctly, the boarder router should forward packets to the Internet. I did |
|
@maribu I guess your border router is connected to your LAN. Pinging global like |
|
I just tested it with the current master and was unable to ping IPv6 addresses within my LAN. @miri64: Have you tried |
|
@maribu I tried on current master and there were two things I noticed when executing
After that I flashed and configured a second node (I removed lladdr Interestingly enough I am able to ping I confirmed that this is also works for this branch the same way. Since this the bug I reported above also is on current master, but the addresses and MTU are still configured correctly in this branch I'd say it works as expected (address registration doesn't seem to work but also not in master, so I investigate). |
c066069 to
68bf1f5
Compare
Same problem as described in #10723. |
|
Addressed #10589 (comment) |
| * @brief Get the default link-layer address option for the given | ||
| * gnrc_netif_t::device_type of a network interface | ||
| */ | ||
| netopt_t gnrc_netif_get_l2addr_opt(gnrc_netif_t *netif); |
There was a problem hiding this comment.
Aren't @return and @param missing here, or did you left them out intentionally?
There was a problem hiding this comment.
Good point! I also fixed some weird behavior (and the constness of parameter).
cgundogan
left a comment
There was a problem hiding this comment.
Tested successfully with ethernet and 15.4. Cannot test the softdevice at the moment. Nevertheless, IMO the code change shouldn't have an affect on the softdevice operation. ACK
|
addendum: please squash! |
The function to infer the link-layer address length from the length of a S/TLLAO is very dependent on the IPv6 over X specification and thus should be grouped with the other IP over X functions.
|
Squashed. |
311b278 to
55b9757
Compare
Contribution description
This moves all remaining
switch (netif->device_type)-like functions tognrc_netif_device_type.cand also applies the warning mechanisms introduced in #10513. The hope is that if a new device type is implemented the implementor will stumble over these functions basically immediately.Testing procedure
Pinging a global address with
gnrc_networkingvia agnrc_border_routershould still work forgnrc_networkingexamples with one havingifconfig <if> -rtr_advand the other a global address configured by hand should be enough)cc110x(see gnrc_ipv6_nib: 6Lo-ND EUI-64 checks not portable #10723)nrfmin(see gnrc_ipv6_nib: 6Lo-ND EUI-64 checks not portable #10723)ESP NOW(see gnrc_ipv6_nib: 6Lo-ND EUI-64 checks not portable #10723)After pinging the global address of the other node, the neighbor cache (
nib neigh) of the border router (or advertising router - so the one were you didn't typeifconfig <if> -rtr_adv) should contain the other node's global address with the correct link-layer addressIssues/PRs references
Depends on
#10513(merged)