routing/rpl: adjusted RPL to use the FIB#2765
routing/rpl: adjusted RPL to use the FIB#2765BytesGalore wants to merge 6 commits intoRIOT-OS:masterfrom
Conversation
sys/net/include/rpl.h
Outdated
|
+137 −294. This is nice (: Need to do more testing and reviewing, though. |
sys/net/network_layer/sixlowpan/ip.c
Outdated
There was a problem hiding this comment.
Does it also make sense to outsource the changes to this file to its own PR? Doesn't seem like that there are any dependencies to your RPL refactorings?
There was a problem hiding this comment.
Basically yes, but then no routing protocol will work in mainline RIOT until we merge this PR or adjust the other protocols.
56753d2 to
b555f60
Compare
There was a problem hiding this comment.
Since FIB handles the lifetime of routes, would it make sense to remove this _rpl_update_routing_table thread completely and just pass a function callback (EDIT: or another kind of signalling) to the fib, which should be executed when a certain condition holds? (e.g. route lifetime expired) @BytesGalore @OlegHahm
There was a problem hiding this comment.
@cgundogan the FIB works completely without threads. The exact invalidation point in time of a route is fixed and known, but not monitored by the FIB. A route lifetime and its invalidation is only performed on demand when the specific FIB entry is touched.
So if the lifetime of a route exceeds, probably the parent invalidation will not be triggered.
7e5aff3 to
50b02c1
Compare
|
I had some warnings compiling your branch regarding |
50b02c1 to
5851954
Compare
|
rebased |
|
@BytesGalore did you rebase to current master? I still get the warning regarding |
|
@cgundogan yes the commits are ontop of this merge [1] 19 hours ago |
|
@BytesGalore could you rebase again please? (: This PR conflicts now with the merged #2607 |
5851954 to
5b2101a
Compare
|
sure, done :) |
There was a problem hiding this comment.
Taking the address from the parent results in these link-local addresses we see. In the former implementation rpl_get_routing_table()[i].address returned global addresses. I think the proper way would be to consult the fib and get the global destination address for those link-local addresses, and skip all parents without an entry in the fib.
EDIT: Or simply iterate over all entries in the fib istead of the parents, like in the implementation before
There was a problem hiding this comment.
Unfortunately its not possible that the FIB replies a global address for a given next-hop address, since a next-hop address can be easily used for a large number of destinations.
Iterating is also not possible due to the separation concept of the FIB. But even if iterating would be possible, the FIB can have more entries than just the next-hops from RPL parents.
Fortunately not all is lost :D we could keep the global address for a parent in rpl_parents[i].addr instead of the local one, and ask the FIB for the global address when needed.
There was a problem hiding this comment.
On second thought, iterating over the parents to fill the DAO is not the right way, because DAOs accumulate the routes they encounter up the dodag to the root. By iterating over the parents we can only put their addresses in the DAO but not the addresses the node accumulated through other DAOs (from children). In my opinion there should be a way to iterate over all targets in the fib and write them into the DAO.
There was a problem hiding this comment.
This way we loose the downward route information for sub-DODAGS right?
There was a problem hiding this comment.
I fear so, yes. How could we approach this issue? Is it possible to implement something like a generic iterator for the fib?
There was a problem hiding this comment.
I have to think a bit more on it.
Just to clarify for myself, what we need to know here are all destinations addresses reachable from this node, which are constructed (storing MOP assumed) by receiving DIOs and all target options from all received DAOs right?
There was a problem hiding this comment.
Correct, a DAO includes the address of the sending node in addition to all addresses it received from its children's DAOs, recursively. (storing MOP)
There was a problem hiding this comment.
@cgundogan enhancing the data structures in the FIB or using the type field (uint32_t) for additional indication is no problem.
Maybe (and very related to your proposition), and this is also just thinking out loud, the FIB could return a full set of next-hop/destination tuples based on matching type field or just specific bits of it.
There was a problem hiding this comment.
Maybe something like this:
typedef struct entries{
ng_ipv6_addr_t dst;
ng_ipv6_addr_t next_hop;
};
/**
* param[in] bitmask indicate the bits to use in the search
* param[in] typevalue the query type
* param[out] arr_entries array to store matching entries
* param[in, out] arr_entries_size indicates the storage spce on in and the use count when returned
*/
void fib_get_entry_set(uint32_t bitmask, uint32_t typevalue, entries* arr_entries, size_t* arr_entries_size);There was a problem hiding this comment.
@cgundogan I've opened #2818 as proposition for a function that could help here
5b2101a to
76ad7c4
Compare
76ad7c4 to
90ea180
Compare
|
needs rebase |
|
rebased. |
…le, this will be fixed with RIOT-OS#2782 merged
renamed `parents[]` to `rpl_parents[]` and made it `extern`
|
Anyone interested to keep this PR? |
|
@BytesGalore not really (: I will close it as this references the former |
Formerly the RPL implementation used internal routing and forwarding tables.
This PR changes it to use the new FIB instead of providing a
get_next_hop_provider()to the current fading sixlowpan/ip implementation.The provider registration and usage is replaced by calling the FIB for a next-hop directly.