-
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: logic to switch between dodags #2631
Conversation
@@ -669,6 +669,21 @@ void rpl_recv_DIO(void) | |||
/* handle packet content... */ | |||
rpl_dodag_t *my_dodag = rpl_get_my_dodag(); | |||
|
|||
if (my_dodag != NULL && my_dodag->node_status != ROOT_NODE |
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.
Please put parens around each condition.
Should a node really always switch the dodag upon DIO reception if the other provides a better rank? |
adressed @OlegHahm's comment |
@OlegHahm I think it is a good assumption that a node should join a dodag, which provides a better rank in order to get more 'optimal' dodag structures. |
To me this sounds dangerous in a way that nodes might end up wasting some energy by switching between dodags only to gain a better rank, @emmanuelsearch, what do you say? |
I guess in a theoretical scenraio you only switch so often until you join the dodag, which yields the best rank for you. After then there won't be any more switches, because all other DIOs from the same instance are ignored (worse or equal rank). EDIT: After each switch to a better dodag, you also eliminate all other dodags which have worse or equal ranks.. so I guess there won't be much extra energy consumption here? |
@OlegHahm @cgundogan the RFC states that a node should not be greedy to gain a better rank in one DODAG, but switching the DODAGs for a better rank is not mentioned explicitly.
This greediness for a better DODAG could result in some oscillation if we assume that a DODAG can change its shape over time, which consumes energy on several nodes. (That's just some thoughts and maybe I missed something or just catastrophize a harmless situation) [1] https://github.com/RIOT-OS/RIOT/blob/master/sys/net/routing/rpl/rpl_dodag.c#L393 |
9f184dd
to
45554bf
Compare
@BytesGalore @OlegHahm What should we aim for then? At some point the node has to decide to switch to a better dodag (or not). I would vote for the simplistic approach of beeing greedy and think about other strategies later (when we have real multiple dodag support) @emmanuelsearch what is your opinion on this subject? |
@cgundogan Because of the problems outlined by @BytesGalore above, I vote for staying with the current DODAG instead of being greedy. Can the implementation today detect if we are no longer receiving DIOs for the current DODAG? |
@gebart at least we recognize the opposite here [1], if a DIO is not from our current DODAG. [1] https://github.com/RIOT-OS/RIOT/blob/master/sys/net/routing/rpl/rpl_control_messages.c#L700 |
@gebart The route to the preferred parent could timeout (due to missing DIOs). This is the only way that comes to my mind for finding inactive Dodags. However, this timeout can be fairly long. But I want to point out the following scenario: The point I want to make is that beeing greedy could be a good and simple starting point to develop further strategies on top of it and still be able to have support for multiple dodags in the same instance. |
Let's take a step back and think about scenarios where DODAG jumping makes sense. On one hand, in order for jumping to make sense based on rank comparison, this implies that the OF and the root should be the same in both DODAGs. Else, metrics are not comparable, and thus jumping based on such a comparison is nonsense. On the other hand, it is counterproductive (and thus unlikely) to have several DODAGs aiming to optimize the exact same metric, towards the same destination (root). Thus, I think we should not worry too much about nodes "jumping" around between DODAGs. There are other cases, where we have several DODAGs, with the same OF, but each with a different root (e.g. with P2P-RPL [1] running in parallel of basic RPL). So all in all: I guess we do not need such logic. Or am I missing something? |
@emmanuelsearch most probably I'm confusing things, but what I understand is that one RPL-Insatnce is a set of |
@BytesGalore I'm not sure where you get this understanding from, but to me, it makes no practical sense to have multiple DODAGs using the same OF, with the same root. Sounds like overhead for nothing gained? |
@emmanuelsearch, I think @BytesGalore was refering to multiple dodag-roots for the same rpl-instance. To my understanding it should be possible to have several dodag roots using the same global instance id RFC6550#section-5.1, while local instance ids are bound to the dodagid and thus unique. But again, the majority agrees on dropping this PR for now, so I will close it if there is no objection? |
Ahh, I just confused the term global DODAG being a regular local DODAG [1]. (and I should read my mails before posting replies) |
This PR introduces a simple check whether to leave the current dodag and join a new one, which would yield a better rank.