-
Notifications
You must be signed in to change notification settings - Fork 2.1k
gnrc_ipv6_ext: move ipv6_ext_rh (partly) to GNRC #10231
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_ipv6_ext: move ipv6_ext_rh (partly) to GNRC #10231
Conversation
56fdbf7
to
97784fe
Compare
@bergzand could you maybe have a look (if doesn't intervene with the current release cycle)? @cgundogan is currently on vacation and this PR is giving me a really hard time, when I try to rebase #10238 on top of it and #10234 (which I do for testing). |
f251de6
to
5683c4e
Compare
Rebased and squashed current state, so tracking during the review is easier. |
5683c4e
to
90607e3
Compare
I also made my train of thought a little clearer by splitting out one commit (the second one, 692eaa0 while I was writing this) of another. |
The motivation for this change is to have these functions inside GNRC so that the structs/arguments can be kept GNRC-specific? |
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 review iteration here.
Yes, and also that |
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.
A few more nits.
sys/include/net/gnrc/ipv6/ext/rh.h
Outdated
GNRC_IPV6_EXT_RH_OK = 0, | ||
/** | ||
* @brief The routing header was successfully processed and the packet | ||
* was forwarded or should be forwarded by the central RH handler. |
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.
Something that "was forwarded" could have this node as destionation right? Does the GNRC_IPV6_EXT_RH_OK
have priority over this result?
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 rephrase this? I'm not sure I understand.
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.
Ah I get it now
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.
Maybe I'm interpreting the "was forwarded" here not correct. To me it sounds as if a frame was forwarded by another node to this node. Where at that point both the conditions from this documentation and the option currently renamed to GNRC_IPV6_EXT_RH_AT_DST
match the frame.
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.
Because it was both forwarded to this node and at the destination.
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.
Maybe the documentation update clarifies it better.
sys/include/net/gnrc/ipv6/ext/rh.h
Outdated
* @brief The routing header was successfully processed and this node | ||
* is the destination | ||
*/ | ||
GNRC_IPV6_EXT_RH_OK = 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.
Does it make sense to change the name here to something that indicates that the current node is the destination such as GNRC_IPV6_EXT_RH_DEST
(Feel free to change to something that makes more sense to you, my lack of coffee prevents me from thinking of a sensible name)
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.
GNRC_IPV6_EXT_RH_AT_DST
?
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 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.
(since this enum values are providing the most headache when rebasing, this will be fun to rename ;-D, but I think you are right regarding the naming)
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.
Sorry :(
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.
Done
I changed the order of the enum, as it makes more sense when |
I just noticed, that I did a terrible mistake with my fixup commits. May I squash? |
Ack |
eab20ad
to
e9fa72e
Compare
Squashed |
Those return values are internal anyway, and they have the same intent as the one provided by `gnrc_ipv6_ext_rh`.
e9fa72e
to
ad183db
Compare
I put the rename of |
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.
Tested, ACK
@jia200x since this is an API change (and thus high-impact IMHO) I would merge this right after feature freeze (i.e. when you forked the release branch). Are you alright with that? |
Yes, I'm alright ;) |
Adapted the unittests for the value name changes as well. |
Release is feature frozen, so I'm merging this now. |
Contribution description
This moves all implementation specific parts of the
ipv6_ext_rh
module tognrc_ipv6_ext_rh
.It also removes a module that isn't used after this change and doesn't contain any code (but isn't a pseudo-module for some reason).
Testing procedure
Try to compile
gnrc_networking
withUSEMODULE = gnrc_rpl_srh
. It should still work.Also (at least when run without DEBUG)
tests/gnrc_ipv6_ext
should still work without crashing (I will rework them once the integration process progressed).Issues/PRs references
Addresses parts of #10133