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

routing: add OLSRv2 #2294

Closed
wants to merge 51 commits into
base: master
from

Conversation

Projects
None yet
5 participants
@OlegHahm
Member

OlegHahm commented Jan 13, 2015

In consultation with @benpicco I take over PR #765. Original description:

This adds an implementation of the OLSRv2 routing protocol (without metrics), based on oonf_api.
The interface offered to applications currently consists of only a olsr_init function which will set up and start a sender and receiver thread for RFC5444 based (UDP on port 269) HELLO and Topology Control messages.
That means that every HELLO_REFRESH_INTERVAL (2s + random jitter) a non-forwarded HELLO message is send for neighborhood discovery. Every TC_REFRESH_INTERVAL (5s + random jitter) a topology control message is broadcast (only by selected flooding MPRs) through the network.

This happens transparent to the application, IP packets are now routed to known hosts within the MANET once a path has been established.

print_topology_set will output the forwarding table with all known mesh nodes.

Does work well on native with #680, but still crashes on the testbed after some time.
Each known MANET router requires 72 byte of memory + 12 bytes for each alternative route to the node.

Depends on #630

@OlegHahm OlegHahm added this to the Release NEXT MAJOR milestone Jan 13, 2015

@cgundogan

This comment has been minimized.

Show comment
Hide comment
@cgundogan

cgundogan Jan 13, 2015

Member

are there plans to remove the RFC5444 code from this PR and use the NHDP implementation from @fnack instead?

Member

cgundogan commented Jan 13, 2015

are there plans to remove the RFC5444 code from this PR and use the NHDP implementation from @fnack instead?

@OlegHahm

This comment has been minimized.

Show comment
Hide comment
@OlegHahm

OlegHahm Jan 13, 2015

Member

Might make sense indeed. Will try to check with @fnack.

Member

OlegHahm commented Jan 13, 2015

Might make sense indeed. Will try to check with @fnack.

@OlegHahm

This comment has been minimized.

Show comment
Hide comment
@OlegHahm

OlegHahm Jan 13, 2015

Member

Rebased.

Member

OlegHahm commented Jan 13, 2015

Rebased.

Show outdated Hide outdated Makefile.dep
@@ -2,6 +2,16 @@ ifneq (,$(filter libcoap,$(USEPKG)))
USEMODULE += pnet
endif
ifneq (,$(filter olsr2,$(USEMODULE)))
USEMODULE += vtimer
USEMODULE += socket_base

This comment has been minimized.

@cgundogan

cgundogan Jan 13, 2015

Member

remove this line. udp has it as a dependency in Makefile.dep

@cgundogan

cgundogan Jan 13, 2015

Member

remove this line. udp has it as a dependency in Makefile.dep

@@ -0,0 +1 @@
include $(RIOTBASE)/Makefile.base

This comment has been minimized.

@cgundogan

cgundogan Jan 13, 2015

Member

moving the slist implementation into its own PR and then rebase the olsr branch onto the slist branch would reduce the diff a little bit..

EDIT: actually, it would not reduce the diff until the slist PR would get merged..but still, would make things more clear :)

@cgundogan

cgundogan Jan 13, 2015

Member

moving the slist implementation into its own PR and then rebase the olsr branch onto the slist branch would reduce the diff a little bit..

EDIT: actually, it would not reduce the diff until the slist PR would get merged..but still, would make things more clear :)

@OlegHahm OlegHahm modified the milestones: FIX ME FIRST, Release NEXT MAJOR Jan 13, 2015

@@ -16,6 +16,9 @@
* @author René Kijewski
*/
#ifndef KERNEL_MACROS_

This comment has been minimized.

@cgundogan

cgundogan Jan 14, 2015

Member

the diff of this file could be completely moved to its own PR. seems unrelated to OLSR to me.

@cgundogan

cgundogan Jan 14, 2015

Member

the diff of this file could be completely moved to its own PR. seems unrelated to OLSR to me.

This comment has been minimized.

@OlegHahm

OlegHahm Jan 14, 2015

Member

👍

@OlegHahm
- const typeof(((type *)0)->member ) *__tempptr = (ptr); \
- (type *)((char *)__tempptr - offsetof(type,member)); \
- })
+#if __STDC_VERSION__ >= 201112L

This comment has been minimized.

@cgundogan

cgundogan Jan 14, 2015

Member

quick question: why is this the same as in core/include/kernel_macros.h. Is it possible to reduce the redundance anywhere?

@cgundogan

cgundogan Jan 14, 2015

Member

quick question: why is this the same as in core/include/kernel_macros.h. Is it possible to reduce the redundance anywhere?

@@ -10,6 +10,21 @@ endif
ifneq (,$(filter shell_commands,$(USEMODULE)))
DIRS += shell/commands
endif
ifneq (,$(filter slist,$(USEMODULE)))

This comment has been minimized.

@cgundogan

cgundogan Jan 14, 2015

Member

IMHO all following lines (excluding the olsr specific ones) are unnecessary in this file

@cgundogan

cgundogan Jan 14, 2015

Member

IMHO all following lines (excluding the olsr specific ones) are unnecessary in this file

#define OLSR2_HYST_SCALING 0.4
#define OLSR2_HYST_LOW 0.3
#define OLSR2_HYST_HIGH 0.8

This comment has been minimized.

@cgundogan

cgundogan Jan 14, 2015

Member

-1 indentation

@cgundogan

cgundogan Jan 14, 2015

Member

-1 indentation

/* in µs */
#define SECOND (1000 * 1000)
#define OLSR2_MAX_JITTER_US SECOND

This comment has been minimized.

@cgundogan

cgundogan Jan 14, 2015

Member

s/SECOND/SEC_IN_USEC/g

@cgundogan

cgundogan Jan 14, 2015

Member

s/SECOND/SEC_IN_USEC/g

DEBUG("This is node %s with IP %s", olsr2_local_name, netaddr_to_str_s(&nbuf[0], get_local_addr()));
/* enable sending */
int pid = thread_create(sender_thread_stack, sizeof sender_thread_stack, PRIORITY_MAIN - 1, CREATE_STACKTEST, olsr_sender_thread, NULL, "olsr_snd");

This comment has been minimized.

@cgundogan

cgundogan Jan 14, 2015

Member

Is it possible to combine both threads (l202[receiving] + l215[sending]) into only 1 thread?

@cgundogan

cgundogan Jan 14, 2015

Member

Is it possible to combine both threads (l202[receiving] + l215[sending]) into only 1 thread?

This comment has been minimized.

@OlegHahm

OlegHahm Jan 14, 2015

Member

Maybe, but I won't touch this in this PR.

@OlegHahm

OlegHahm Jan 14, 2015

Member

Maybe, but I won't touch this in this PR.

avl_init(get_olsr_head(), _addr_cmp, false);
}
struct netaddr *get_local_addr(void)

This comment has been minimized.

@cgundogan

cgundogan Jan 14, 2015

Member

might make sense to inline this function or keep a global pointer already casted to &local_addr. This function gets called quite frequently.

@cgundogan

cgundogan Jan 14, 2015

Member

might make sense to inline this function or keep a global pointer already casted to &local_addr. This function gets called quite frequently.

@OlegHahm OlegHahm modified the milestones: Release NEXT MAJOR, FIX ME FIRST Jul 3, 2015

@OlegHahm OlegHahm modified the milestone: Release 2015.12 Nov 28, 2015

@OlegHahm OlegHahm modified the milestone: Release 2015.12 Dec 8, 2015

@emmanuelsearch

This comment has been minimized.

Show comment
Hide comment
@emmanuelsearch

emmanuelsearch Dec 11, 2015

Member

Is this still planned for 2015.12 ?

Member

emmanuelsearch commented Dec 11, 2015

Is this still planned for 2015.12 ?

@OlegHahm OlegHahm modified the milestones: Release 2015.12, Release 2016.03 Dec 11, 2015

@OlegHahm

This comment has been minimized.

Show comment
Hide comment
@OlegHahm

OlegHahm Dec 11, 2015

Member

Definitely not - most likely a mishap while retagging some PRs and issues.

Member

OlegHahm commented Dec 11, 2015

Definitely not - most likely a mishap while retagging some PRs and issues.

@OlegHahm OlegHahm removed this from the Release 2016.04 milestone Mar 8, 2016

@OlegHahm OlegHahm added the memo label Mar 8, 2016

@OlegHahm

This comment has been minimized.

Show comment
Hide comment
@OlegHahm

OlegHahm Mar 8, 2016

Member

I have to admit: I was not very successful adopting this PR...

Member

OlegHahm commented Mar 8, 2016

I have to admit: I was not very successful adopting this PR...

@OlegHahm OlegHahm closed this Mar 8, 2016

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