Skip to content

ng_rpl: port to the new network stack#3050

Merged
OlegHahm merged 3 commits intoRIOT-OS:masterfrom
cgundogan:ng_rpl_fib
Aug 18, 2015
Merged

ng_rpl: port to the new network stack#3050
OlegHahm merged 3 commits intoRIOT-OS:masterfrom
cgundogan:ng_rpl_fib

Conversation

@cgundogan
Copy link
Copy Markdown
Member

Depends on: #2783 and #2818

This PR introduces RPL for the new network stack. I used the old RPL implementation as a blueprint and copied code blocks, which could be reused.

For a better internal dodag management I made use of utlist.h (linked list).
Thus, it was quite easy to adopt the code to support multiple dodags and/or instances.

Furthermore, I changed the parsing of control packets. The old implementation did use a mediary data structure to parse all the information and then assign them to the internal dodag structure. I completely removed this mediary step and operate directly on the internal data structures.

While adopting the code, I found small discrepancies betwen the implementation and the RFC. I tried to correct them to the best of my knowledge.

This port is far from being complete, as I only included the Storing mode of operation
Missing things:

I did all my testing with the ng_nativenet implementation by rebasing this to the branch of @kaspar030 #2776 and then use the test application in ./tests/driver_netdev_eth/.
There I modifid the Makefile to include ng_ipv6_default and ng_rpl.

When starting two to four nodes (tap0..tap3), I first have to add an IPv6 address to the nodes and can then initialize RPL on the given interface.

ifconfig 5 add 2001:db8::x/64
rpl init 5

Please make sure, that you use the same prefix part for all nodes.

On one node I create a DODAG by issuing: rpl root 1 2001:db8::x, where 1 is the instance id by choice and 2001:db8::x the dodag id. Note that you should not use the prefix notation (*/xx) like I did for ifconfig here.

rpl shows some basic information about the dodags and rpl help will display some more commands, like deleting/adding dodags, starting/stoping trickle timers, sending DIS etc.

I would like to test this on some iotlab m3s, but I don't know how. Could somebody point me to a test/example application, which I can use as a baseline?

@OlegHahm @BytesGalore @authmillenon @gebart @Lotterleben @haukepetersen @emmanuelsearch and basically everyone else: please help me by reviewing this code of a Kraken...

@authmillenon you should especially look into the communication with the network layer part, because I do not know if I implemented it the right way - it works though.

@cgundogan cgundogan added Area: network Area: Networking Type: new feature The issue requests / The PR implemements a new feature for RIOT NSTF labels May 22, 2015
@miri64
Copy link
Copy Markdown
Member

miri64 commented May 22, 2015

I did all my testing with the ng_nativenet implementation by rebasing this to the branch of @kaspar030 #2776 and then use the test application in ./tests/driver_netdev_eth/.
There I modifid the Makefile to include ng_ipv6_default and ng_rpl.

I advice to use ng_ipv6_router_default instead. This way to FIB is included automatically, as well as the router behavior for NDP/6LOWPAN-ND (later on). Also you compile it in the configuration that RPL will be used most likely in.

@miri64
Copy link
Copy Markdown
Member

miri64 commented May 22, 2015

(for the router behavior of NDP you need #3049 of course)

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.

I think I would prefer something like NG_NETTYPE_ICMP_RPL.

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.

It shouldn't need a NG_NETTYPE at all oO let me review ths

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.

It's not even used ;-)

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.

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.

Right, seems like a left-over from my previous attempt.. will address all your comments soon

@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 May 26, 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.

again wrong prefix incrementor?

@OlegHahm
Copy link
Copy Markdown
Member

I think we're finally ready to go: ACK and go as soon as Travis is green.

@cgundogan
Copy link
Copy Markdown
Member Author

travis is not happy, because I modified netif.h. And netif.h has some doxygen warnings. (see #3641)

@jnohlgard
Copy link
Copy Markdown
Member

I don't like merging this without any Travis-enabled build with USEMODULE+=ng_rpl. Currently the RPL implementation is not even being compile-tested by Travis.

@cgundogan
Copy link
Copy Markdown
Member Author

@gebart good catch. I will add ng_rpl to the ng_networking example now. When the future of ng_networking is decided, this can be changed later in follow-up PRs.

@jnohlgard
Copy link
Copy Markdown
Member

ACK, let's wait for Travis

@OlegHahm
Copy link
Copy Markdown
Member

Spark-Core needs black-listing.

@OlegHahm
Copy link
Copy Markdown
Member

cppcheck complains:

sys/net/routing/ng_rpl/ng_rpl_control_messages.c:398: warning (nullPointer): Possible null pointer dereference: parent - otherwise it is redundant to check it against null.

sys/net/routing/ng_rpl/ng_rpl_control_messages.c:38: style (variableScope): The scope of the variable 'tmp' can be reduced.

sys/net/routing/ng_rpl/ng_rpl_control_messages.c:95: style (variableScope): The scope of the variable 'dodag_conf' can be reduced.

sys/shell/commands/sc_ng_rpl.c:31: performance (redundantAssignment): Variable 'iface_pid' is reassigned a value before the old one has been used.

sys/shell/commands/sc_ng_rpl.c:48: style (variableScope): The scope of the variable 'addr_str' can be reduced.

@OlegHahm
Copy link
Copy Markdown
Member

Needs a rebase, too.

@cgundogan
Copy link
Copy Markdown
Member Author

rebased and eliminated cppcheck warnings

@cgundogan
Copy link
Copy Markdown
Member Author

travis approves

@OlegHahm
Copy link
Copy Markdown
Member

Let me run one final test.

@OlegHahm
Copy link
Copy Markdown
Member

Test runs fine, ACK holds - wanna hit the button yourself?

@cgundogan
Copy link
Copy Markdown
Member Author

I am sitting in the bus right now. Merge at will. Otherwise I merge when I
get home
Am 18.08.2015 16:42 schrieb "Oleg Hahm" notifications@github.com:

Test runs fine, ACK holds - wanna hit the button yourself?


Reply to this email directly or view it on GitHub
#3050 (comment).

OlegHahm added a commit that referenced this pull request Aug 18, 2015
ng_rpl: port to the new network stack
@OlegHahm OlegHahm merged commit e3edf34 into RIOT-OS:master Aug 18, 2015
@emmanuelsearch
Copy link
Copy Markdown
Member

Congrats @cgundogan !

@cgundogan
Copy link
Copy Markdown
Member Author

Eureka!
Am 18.08.2015 16:50 schrieb "Emmanuel Baccelli" notifications@github.com:

Congrats @cgundogan https://github.com/cgundogan !


Reply to this email directly or view it on GitHub
#3050 (comment).

@miri64
Copy link
Copy Markdown
Member

miri64 commented Aug 18, 2015

✨ \o/ ✨

@kaspar030
Copy link
Copy Markdown
Contributor

nice!

@BytesGalore
Copy link
Copy Markdown
Member

bäääm, you did it sir 🎆

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: network Area: Networking CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Community: Hack'n'ACK candidate This PR is a candidate for review and discussion during one of RIOT's monthly Hack'n'ACK parties Type: new feature The issue requests / The PR implemements a new feature for RIOT

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants