From: Gabriel Kerneis <kerneis@pps.jussieu.fr>
To: Battle of the Mesh Mailing List <battlemesh@ml.ninux.org>
Cc: b.a.t.m.a.n@lists.open-mesh.org
Subject: Re: [B.A.T.M.A.N.] [Battlemesh] Battlemesh v5 tests
Date: Wed, 7 Mar 2012 23:18:48 +0100 [thread overview]
Message-ID: <20120307221847.GR12778@kerneis.info> (raw)
In-Reply-To: <20120307171751.GC1389@ritirata.org>
[CC: b.a.t.m.a.n@lists.open-mesh.org, see note 3 in particular]
Antonio,
On Wed, Mar 07, 2012 at 06:17:52PM +0100, Antonio Quartulli wrote:
> Technical details about what? Interface-alternating? It is there!
> Gabriel wrote the link.
No. Please re-read my email carefuly. The wiki contains a rough explanation of
the general principle (ie. “same interface = bad, different interface = good”).
Not the actual algorithm used by batman-adv (quoting from the wiki: “the
algorithm tries to avoid forwarding packets on the interface which just received
the packet”).
Note that the wiki has been updated since then, by Simon with a few more
details [1], and by Marek with benchmark results from WBMv3.
> Gabriel said he has not enough time to look into it. I'm sorry, but I don't think
> this is a good reason to blame batman-adv devs :P
I finally decided to settle this issue and spent my breakfast reading
batman-adv/routing.c [2] instead of my favorite newspaper. Here is what I
understood:
At all times, batman-adv maintains a list of "bonding candidates" for each
node (bonding_candidate_add, called from bat_iv_ogm.c:699).
Some node "neigh" is a bonding candidate for another node "orig" if and only
if:
- neigh and orig have the same primary address, ie. are in fact the same
router,
- the links to reach them have the same quality up to some additive
constant (BONDING_TQ_THRESHOLD = 50) [3],
- orig does not already have another bonding candidate for the same
interface, because it could interfere – but what if the neigh has a better
link quality, isn’t it a pity to ignore it?
Then, assuming that "interface alternating" is enabled, the list of bonding
candidates is used on every route selection (find_ifalter_router, called
from routing.c:769).
More precisely, once batman has chosen a next-hop router for a packet based
on its classical routing algorithm, it walks the list of the bonding
candidates associated to the primary interface for this router [4]. It
selects the actual next-hop on the following criteria:
- it must not be on the same interface as the packet came in,
- its quality must be as high as possible (given the previous constraint).
This is the kind of explanation I would have loved to find on the wiki. By the
way, consider it public domain and feel free to copy/paste/correct it if you
wish.
It is still not clear to me exactly why this works, but I believe this is what
the code does, and is definitely easier to discuss than generic, unsubstantiated
claims.
Best regards,
Gabriel
[1] “Interface alternating is only performed if the two candidate links to the
next hop have a similar quality.”
http://www.open-mesh.org/wiki/batman-adv/Multi-link-optimize
[2] http://www.open-mesh.org/projects/batman-adv/repository/revisions/master/entry/routing.c
[3] By the way, there is something I don’t understand: neigh_node->tq_avg will be
accepted event if it is far greater than router->tq_avg + BONDING_TQ_THRESHOLD.
Shouldn’t it be: abs(neigh_node->tq_avg - router->tq_avg) > BONDING_TQ_THRESHOLD?
http://www.open-mesh.org/projects/batman-adv/repository/revisions/master/entry/routing.c#L166
[4] Why the primary and not the chosen router directly? Is the bonding
candidates list always associated to the primary interface?
next parent reply other threads:[~2012-03-07 22:18 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <4F4F6D18.3070403@ninux.org>
[not found] ` <201203070156.51341.lindner_marek@yahoo.de>
[not found] ` <20120306193643.GM12778@kerneis.info>
[not found] ` <201203070552.33850.lindner_marek@yahoo.de>
[not found] ` <7i62egijym.fsf@lanthane.pps.jussieu.fr>
[not found] ` <20120307144709.GA19891@ritirata.org>
[not found] ` <7ieht4mnnp.fsf@lanthane.pps.jussieu.fr>
[not found] ` <20120307171751.GC1389@ritirata.org>
2012-03-07 22:18 ` Gabriel Kerneis [this message]
2012-03-09 8:56 ` [B.A.T.M.A.N.] [Battlemesh] Battlemesh v5 tests Simon Wunderlich
2012-03-09 9:17 ` Benjamin Henrion
2012-03-09 9:42 ` Marek Lindner
2012-03-09 9:56 ` Benjamin Henrion
2012-03-09 10:02 ` Marek Lindner
2012-03-09 10:26 ` Juliusz Chroboczek
2012-03-09 10:36 ` Roger Baig Viñas
2012-03-09 10:55 ` Mitar
2012-03-09 10:59 ` Gabriel Kerneis
2012-03-09 11:39 ` [B.A.T.M.A.N.] Diversity in BATMAN [was: Battlemesh v5 tests] Juliusz Chroboczek
2012-03-09 12:44 ` [B.A.T.M.A.N.] [Battlemesh] " andrew.lunn
2012-03-09 13:10 ` [B.A.T.M.A.N.] [Battlemesh] Diversity in BATMAN Juliusz Chroboczek
2012-03-09 13:25 ` Antonio Quartulli
2012-03-09 13:36 ` andrew.lunn
2012-03-09 14:07 ` Benjamin Henrion
2012-03-09 14:36 ` Marek Lindner
2012-03-09 15:25 ` Benjamin Henrion
2012-03-09 15:40 ` Marek Lindner
2012-03-09 15:43 ` Andrew Lunn
2012-03-09 16:07 ` Benjamin Henrion
2012-03-09 16:21 ` Andrew Lunn
2012-03-09 16:38 ` Gabriel Kerneis
2012-03-09 16:57 ` Andrew Lunn
2012-03-09 18:17 ` Andrew Lunn
2012-03-11 1:22 ` Juliusz Chroboczek
2012-03-11 1:37 ` Mitar
2012-03-11 8:53 ` Antonio Quartulli
2012-03-11 15:53 ` Juliusz Chroboczek
2012-03-11 16:02 ` Mitar
2012-03-11 20:39 ` Simon Wunderlich
2012-03-13 3:37 ` Mitar
2012-03-11 1:21 ` Juliusz Chroboczek
2012-03-09 11:12 ` [B.A.T.M.A.N.] [Battlemesh] Battlemesh v5 tests Gabriel Kerneis
2012-03-09 11:26 ` Marek Lindner
2012-03-09 12:04 ` Gabriel Kerneis
2012-03-09 12:39 ` Antonio Quartulli
2012-03-09 12:57 ` Gabriel Kerneis
2012-03-09 13:03 ` Antonio Quartulli
2012-03-09 13:09 ` andrew.lunn
2012-03-09 13:46 ` Gabriel Kerneis
2012-03-09 14:26 ` Juliusz Chroboczek
2012-03-10 16:20 ` Mitar
2012-03-11 8:45 ` Henning Rogge
2012-03-11 15:32 ` [B.A.T.M.A.N.] Network models [was: Battlemesh v5 tests] Juliusz Chroboczek
2012-03-11 16:15 ` Mitar
2012-03-09 13:49 ` [B.A.T.M.A.N.] [Battlemesh] Battlemesh v5 tests Gabriel Kerneis
2012-03-09 14:15 ` Andrew Lunn
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120307221847.GR12778@kerneis.info \
--to=kerneis@pps.jussieu.fr \
--cc=b.a.t.m.a.n@lists.open-mesh.org \
--cc=battlemesh@ml.ninux.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox