-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
ng_sixlowpan: initial import #2614
Conversation
6ce4e84
to
dc7214c
Compare
Rebased to current #2555 |
dc7214c
to
7fd337b
Compare
Rebased to current #2555 |
7fd337b
to
33f0a83
Compare
Rebased to current #2555 |
9f184dd
to
45554bf
Compare
33f0a83
to
e4f8f30
Compare
Rebased to current #2555 |
e4f8f30
to
dd4e87f
Compare
Rebased to current #2555 |
dd4e87f
to
77395f0
Compare
77395f0
to
2a3ad06
Compare
Rebased to current #2555 |
2841b18
to
127d741
Compare
a2c0e06
to
ce1e94b
Compare
ifneq (,$(filter ng_sixlowpan,$(USEMODULE))) | ||
USEMODULE += ng_sixlowpan_netif | ||
USEMODULE += ng_netbase | ||
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.
Conceptional: Shouldn't be IPv6 also a dependency?
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.
Conceptionally, yes. To work: no. If we ever want to introduce stand-alone tests for every layer we would not need IPv6 here.
Sorry for my somewhat nit-picky style comments. I just note down whatever I find, but it's up to you if you want to address it directly or postpone it to a later PR. Just let me know. |
|
||
((ng_netif_hdr_t *)pkt->data)->if_pid = iface; | ||
|
||
if ((if_entry != NULL) && (if_entry->flags & NG_IPV6_NETIF_FLAGS_SIXLOWPAN)) { |
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.
Can we not exit early if if_entry
is NULL?
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.
There is no exit on if_entry == NULL
, it is just send to iface
(which is assumed to be a valid PID at this point).
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 thought NULL indicates that the PID is probably not valid.
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.
Can you still explain this? What does NULL as a return value for ng_ipv6_netif_get(iface);
indicate here?
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.
That there is no IPv6 interface. This is not a case that should happen here so maybe we can even remove the NULL test
Addressed comments. |
Everything's addressed. The rest looks good. ACK. Please squash. |
d4cc6e9
to
5412e0e
Compare
Done. |
Can't restart the failed job. So merge. |
ng_sixlowpan_netif_t *iface; | ||
/* cppcheck: datagram_size will be read by frag */ | ||
/* cppcheck-suppress unreadVariable */ | ||
size_t payload_len, datagram_size; |
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.
The suppression doesn't seem to work for me I got -Wunused-but-set-variable
warning for datagram_size
here, anyone else?
gcc: gcc version 4.9.3 20141119 (release) [ARM/embedded-4_9-branch revision 218278] (GNU Tools for ARM Embedded Processors)
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.
It's a suppression for cppchech, not for gcc.
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.
ahh, my bad thx
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.
The correct way to suppress the GCC warning is to cast to void
, at least for function arguments, I guess it should work for local variables as well.
(void) datagram_size;
edit: However, I do not understand what the purpose of the variable is when it is only set and never used, even as by reference.
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.
Depends on #2433 and all its dependencies.(merged)This only implements handling and sending of uncompressed, unfragmented IPv6 packets. The rest will come as a follow-up: