-
Notifications
You must be signed in to change notification settings - Fork 2k
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
rpl: remove unnecessary check for multiple instances #2606
rpl: remove unnecessary check for multiple instances #2606
Conversation
@@ -539,19 +532,6 @@ void rpl_recv_DIO(void) | |||
return; | |||
} | |||
} | |||
else if (my_inst == NULL) { | |||
DEBUGF("Not joined an instance yet\n"); | |||
} |
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.
Couldn't this debug line useful anyway?
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 don't see the importance of this debug message. If the rpl implementation did not join any instance yet, it will do it now with the information specified in this incoming DIO
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 it could be good to keep an overview if this node will join the dodag because it hasn't joined any dodag or because it prefers the dodag its DIO it is currently receiving.
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 information cannot be retrieved here, because this part of the code handles the instances and not the dodags. The implementation will create any instance it encounters, if it did exist before, it will skip the creation process. This is all to this section of the code, therefore it was kind of too complex before..
I don't get why this check is unnecessary in the first place. |
The check is too complicated and does not allow more then one instance. With the proposed changes it will check, if the implementation joined the current DIO's instance. If not, it will create this instance and join the dodag (later in the code). Otherwise, it already joined the isntance and continues. |
But isn't this dependent on another patch then? |
not really dependent.. there is in the momentan no code which utilizes multiple instance ids. So it will not hurt to remove the restrictions that block the creation of other than the first instance. And even if there were two different instance ids floating around, the current implemenation does not take this into account, because it uses |
I think if the node uses/takes advantage of more than one RPL instance the current check can be adopted to determine if the node is already using it. [1] https://github.com/RIOT-OS/RIOT/blob/master/sys/net/routing/rpl/rpl_control_messages.c#L669 |
9f184dd
to
45554bf
Compare
So, what will happen if there's another instance ID and the node calls the join function? |
|
Ah, because it is checked later in this function, right? |
Ok, strike my comment I just starred on wrong codelines. [1] https://github.com/cgundogan/RIOT/blob/rpl_remove_multiple_instance_check/sys/net/routing/rpl/rpl_control_messages.c#L672 |
Ok, I think I finally understood this. ACK and go. |
…check rpl: remove unnecessary check for multiple instances
If another instance id is received, the current implementation returns, because it does not support multiple instances. The check however is unnecessary in this case and will be removed anyway when I introduce multiple instances support.
Putting this in smaller PRs will reduce complexity.