Skip to content
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 from
Closed

routing: add OLSRv2 #2294

wants to merge 51 commits into from

Conversation

@OlegHahm
Copy link
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
Copy link
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
Copy link
Member Author

OlegHahm commented Jan 13, 2015

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

benpicco added 3 commits Aug 3, 2014
This adds a simple single linked list which allocates and deallocates memory for it's elements on it's own.
It also provides functions to search for and iterate over elements.
@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.

This comment has been minimized.

@OlegHahm

OlegHahm Jan 14, 2015 Author Member

👍

- 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?

@@ -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


#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


/* 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

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?

This comment has been minimized.

@OlegHahm

OlegHahm Jan 14, 2015 Author 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.

@OlegHahm OlegHahm force-pushed the RIOT-OS:master branch 3 times, most recently from 9f184dd to 45554bf Mar 31, 2015
@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
Copy link
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
Copy link
Member Author

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
Copy link
Member Author

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
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

5 participants
You can’t perform that action at this time.