Skip to content

rpl: update routing table information for all dodags#2607

Merged
cgundogan merged 1 commit intoRIOT-OS:masterfrom
cgundogan:rpl_update_rt_table_for_all_dodags
Apr 14, 2015
Merged

rpl: update routing table information for all dodags#2607
cgundogan merged 1 commit intoRIOT-OS:masterfrom
cgundogan:rpl_update_rt_table_for_all_dodags

Conversation

@cgundogan
Copy link
Copy Markdown
Member

In the current implementation only the default dodag's routing table information is updated periodically. This PR extends this to iterate over all used dodags instead.

@cgundogan cgundogan added Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation Impact: minor The PR is small in size and might only require a quick look of a knowledgeable reviewer labels Mar 16, 2015
@cgundogan cgundogan added Area: network Area: Networking and removed Impact: minor The PR is small in size and might only require a quick look of a knowledgeable reviewer labels Mar 16, 2015
@cgundogan cgundogan force-pushed the rpl_update_rt_table_for_all_dodags branch from 88f760a to 541352a Compare March 17, 2015 10:41
@BytesGalore BytesGalore mentioned this pull request Mar 17, 2015
21 tasks
@OlegHahm OlegHahm added the State: waiting for other PR State: The PR requires another PR to be merged first label Mar 18, 2015
@cgundogan cgundogan force-pushed the rpl_update_rt_table_for_all_dodags branch from 541352a to 4f213f6 Compare March 19, 2015 10:46
@cgundogan
Copy link
Copy Markdown
Member Author

rebased to address @OlegHahm's comment mentioned #2622

@OlegHahm OlegHahm removed the State: waiting for other PR State: The PR requires another PR to be merged first label Mar 19, 2015
@OlegHahm
Copy link
Copy Markdown
Member

needs rebasing

@cgundogan
Copy link
Copy Markdown
Member Author

@OlegHahm according to github this PR can be automatically merged 😕

@OlegHahm
Copy link
Copy Markdown
Member

But cgundogan@d7722c1 which is part of this PR got already merged, didn't it?

@cgundogan
Copy link
Copy Markdown
Member Author

ah, you are right. will rebase :bowtie:

@cgundogan cgundogan force-pushed the rpl_update_rt_table_for_all_dodags branch from 4f213f6 to dbe86b7 Compare March 19, 2015 18:02
@cgundogan
Copy link
Copy Markdown
Member Author

rebased to current master

@cgundogan
Copy link
Copy Markdown
Member Author

@OlegHahm any objection?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be outside the DODAG iteration

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, I will update and rebase this PR

@cgundogan cgundogan force-pushed the rpl_update_rt_table_for_all_dodags branch from dbe86b7 to 95a28f9 Compare March 31, 2015 08:13
@cgundogan
Copy link
Copy Markdown
Member Author

addressed @BytesGalore comment. Rebased

@cgundogan
Copy link
Copy Markdown
Member Author

ping @OlegHahm @BytesGalore @gebart . any ACKs? The change is small but it's important to handle the lifetimes of multiple dodags. Otherwise only the dodag's lifetime gets decreased, which is returned by rpl_get_my_dodag(). I want to eliminate the dependency to this function (rpl_get_my_dodag()) in the long(actually short) run.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just for my curiosity, is this check needed?
When the node joins a DODAG the value is set and never touched again (if I'm not missed something).
I can't find any occurrences where the ->used entry of a DODAG is set to 0.

update: I know that this value is initialized with 0 but maybe we can find a way to rip this member entry

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently we do not really support a proper way of leaving a dodag. But this will change with subsequent PRs. The idea of this check is to ignore all dodags, which are stored in memory (as left-overs) and only handle the active ones.

@BytesGalore
Copy link
Copy Markdown
Member

From the code side it looks good, and works for at least one DODAG (I assume it will also work for multiple DODAGS) 👍, so ACK from my side

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could change the uint8_t to unsigned int while you're at it.

@cgundogan cgundogan force-pushed the rpl_update_rt_table_for_all_dodags branch from 95a28f9 to ee1dd43 Compare April 13, 2015 16:15
@cgundogan
Copy link
Copy Markdown
Member Author

rebased and addressed @OlegHahm's comment

@OlegHahm OlegHahm added the CI: needs squashing Commits in this PR need to be squashed; If set, CI systems will mark this PR as unmergable label Apr 13, 2015
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if ((my_dodag->used) && (my_dodag->my_preferred_parent != NULL)) {

saves a level of indentation.

@cgundogan cgundogan force-pushed the rpl_update_rt_table_for_all_dodags branch from 26c0272 to 5557778 Compare April 13, 2015 16:47
@cgundogan
Copy link
Copy Markdown
Member Author

addressed @OlegHahm's comment and combined both if-statements.
I also took the liberty of removing the meaningless comment "/* Parent is NULL for root too */"

@OlegHahm
Copy link
Copy Markdown
Member

ACK. Please squash.

@cgundogan cgundogan force-pushed the rpl_update_rt_table_for_all_dodags branch from 5557778 to d27cd45 Compare April 13, 2015 16:59
@cgundogan cgundogan removed the CI: needs squashing Commits in this PR need to be squashed; If set, CI systems will mark this PR as unmergable label Apr 13, 2015
@cgundogan
Copy link
Copy Markdown
Member Author

squashed

@BytesGalore
Copy link
Copy Markdown
Member

My ACK holds, when travis is happy merge at will

@cgundogan
Copy link
Copy Markdown
Member Author

travis is happy => GO

cgundogan added a commit that referenced this pull request Apr 14, 2015
…odags

rpl: update routing table information for all dodags
@cgundogan cgundogan merged commit ac5e9af into RIOT-OS:master Apr 14, 2015
@cgundogan cgundogan deleted the rpl_update_rt_table_for_all_dodags branch April 14, 2015 09:11
@OlegHahm OlegHahm modified the milestone: Release 2015.06 Apr 29, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: network Area: Networking Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants