-
Notifications
You must be signed in to change notification settings - Fork 2.1k
gnrc: integrate gnrc_netif2 #7424
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: integrate gnrc_netif2 #7424
Conversation
ede4a9c
to
2522259
Compare
f45f37b
to
61e9ef0
Compare
50ccef3
to
9f1a304
Compare
Rebased and adapted to current master and current dependencies |
9f1a304
to
65ae715
Compare
c02ef0c
to
eba909a
Compare
Rebased to current master and dependencies |
The function `_update_nce_ar_state()` was introduced during the review of \RIOT-OS#7424, but it's return value never used, causing faulty behavior.
I changed the base branch now to the freshly created |
Seems like I already did that ^^" Ready for review. |
Makefile.dep
Outdated
@@ -319,38 +313,6 @@ ifneq (,$(filter gnrc_ipv6_nc,$(USEMODULE))) | |||
USEMODULE += ipv6_addr | |||
endif | |||
|
|||
ifneq (,$(filter gnrc_ipv6_nib_6lbr,$(USEMODULE))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do you remove the nib dependency information?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably rebase error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
Mhhhhh problem with all the non-unintrusive porting now is: Murdock fails to build (actually only to link), since old NDP isn't ported (and I don't plan to). This is now merged into a seperate branch. Do we accept the temporary broken state? |
8f4a5dd
to
f4b9474
Compare
Rebased to current gnrc_netif2_integration/master. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First part of the PR revieweded (Up to (and including) sys/net/gnrc/network_layer/ipv6/gnrc_ipv6.c
).
So far only three minor things. Until now everything looks like obvious old-new code replacements.
examples/gnrc_minimal/main.c
Outdated
ipv6_addr_to_str(ipv6_addr, &entry->addrs[i].addr, IPV6_ADDR_MAX_STR_LEN); | ||
printf("My address is %s\n", ipv6_addr); | ||
} | ||
/* get interface and print their addresses */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small grammatical error between "interface" (singular) and "their" (plural)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"their" can be singular, but I guess this does not apply for things 😛
examples/gnrc_minimal/main.c
Outdated
int res = gnrc_netapi_get(netif->pid, NETOPT_IPV6_ADDR, 0, ipv6_addrs, | ||
sizeof(ipv6_addrs)); | ||
|
||
for (int i = 0; i < (res / sizeof(ipv6_addr_t)); i++) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm getting a signed vs unsigned comparison error here (gcc-5.4.0)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will fix
examples/gnrc_networking/Makefile
Outdated
@@ -22,7 +22,7 @@ USEMODULE += gnrc_ipv6_router_default | |||
USEMODULE += gnrc_udp | |||
# Add a routing protocol | |||
USEMODULE += gnrc_rpl | |||
USEMODULE += auto_init_gnrc_rpl | |||
# USEMODULE += auto_init_gnrc_rpl |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume this depends on the RPL port to gnrc_ipv6_nib
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will remove.
@bergzand addressed your comments |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Second half of my review.
@@ -129,8 +129,7 @@ gnrc_rpl_instance_t *gnrc_rpl_instance_get(uint8_t instance_id) | |||
return NULL; | |||
} | |||
|
|||
bool gnrc_rpl_dodag_init(gnrc_rpl_instance_t *instance, ipv6_addr_t *dodag_id, kernel_pid_t iface, | |||
gnrc_ipv6_netif_addr_t *netif_addr) | |||
bool gnrc_rpl_dodag_init(gnrc_rpl_instance_t *instance, ipv6_addr_t *dodag_id, kernel_pid_t iface) | |||
{ | |||
/* TODO: check if netif_addr belongs to iface */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This todo looks obsolete now that the netif_addr
argument is removed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would like to keep it in for the person that is porting RPL (@cgundogan) so he can decide how they get the interface address.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ack, fine with me :)
sys/shell/commands/sc_fib.c
Outdated
@@ -208,10 +206,11 @@ int _fib_route_handler(int argc, char **argv) | |||
/* e.g. fibroute add <destination> via <next hop> lifetime <lifetime> */ | |||
if ((argc == 7) && (strcmp("add", argv[1]) == 0) && (strcmp("via", argv[3]) == 0) | |||
&& (strcmp("lifetime", argv[5]) == 0)) { | |||
kernel_pid_t ifs[GNRC_NETIF_NUMOF]; | |||
size_t ifnum = gnrc_netif_get(ifs); | |||
size_t ifnum = gnrc_netif2_numof(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indentation looks off here
sys/shell/commands/sc_gnrc_6ctx.c
Outdated
@@ -72,6 +69,7 @@ static void _adv_ctx(void) | |||
gnrc_ndp_internal_send_rtr_adv(ifs[i], NULL, NULL, false); | |||
} | |||
} | |||
#endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like a stray #endif
Just to confirm, I'm getting compilation errors (not only linking errors) with the gnrc_networking example. All due to missing
They are gone when testing with #7456, so I don't really mind as long as it is known. |
It is known :-) |
Addressed comments |
Thanks for the changes and clarifications. Looks good to me now |
Not link-able, since NDP and NC are missing (intentionally)
5bf981b
to
861035f
Compare
Squashed |
@smlng can we dismiss your review? |
@miri64 general question (and suggestion if you want): netif2 will replace netif, right? As you now PRed against a feature branch it would IMHO make perfect sense to use |
I will do that, but not in this PR. In fact that's intended to be the very last PR against #7925 before reintegrating it into master ;) |
changes addressed, but haven't had time for 2 second review round
See also https://github.com/RIOT-OS/RIOT/projects/6#card-5336168 regarding that |
Merged intentionally with broken Murdock state |
Does not link ATM, since I did not bother to port the old NC and NDP (will provide a port for #7014 in a separate PR though [#7456]) and those modules now complain that they don't find the old interfaces functions. Since this change is unintrusive (and I do not provide special new applications for this), this should be okay.
Depends on #7410 and #7409 and all their dependencies.This PR is part of the network layer remodelling effort:
