From: Andrew Lunn <andrew@lunn.ch>
To: The list for a Better Approach To Mobile Ad-hoc Networking
<b.a.t.m.a.n@lists.open-mesh.org>
Subject: Re: [B.A.T.M.A.N.] TTL yes, TTL no
Date: Sat, 26 Mar 2011 17:14:39 +0100 [thread overview]
Message-ID: <20110326161439.GK17979@lunn.ch> (raw)
In-Reply-To: <201103261631.42903.lindner_marek@yahoo.de>
On Sat, Mar 26, 2011 at 04:31:42PM +0100, Marek Lindner wrote:
>
> Hi,
>
> > In these days I was wondering whether the TTL field in the OGM packet is
> > really useful or not...Due to hop_penalty an OGM will be discarded as
> > soon as the TQ will reach 0 (which is a sort of TTL mechanism itself).
> > At this point why is the TTL field needed?
>
> uhm.., you probably are right. As long as there is a hop penalty it also
> functions as a TTL. Keep in mind that it is possible to set the hop penalty to
> zero. With the current default hop penalty of 10 the maximum number of hops is
> limited to 25.
Humm, i could be wrong here.....
static uint8_t hop_penalty(const uint8_t tq, struct bat_priv *bat_priv)
{
int hop_penalty = atomic_read(&bat_priv->hop_penalty);
return (tq * (TQ_MAX_VALUE - hop_penalty)) / (TQ_MAX_VALUE);
}
So 10% is deducted, not 10 absolute. So assuming perfect links, TQ
will be:
255
245
235
226
217
208
200
192
184
177
170
163
157
151
145
139
134
129
124
119
114
110
106
102
98
94
90
86
83
80
77
74
71
68
65
62
60
58
56
54
etc...
Depending on how the rounding works, i think somewhere after hop 72
the TQ is always 12.
But maybe i'm not understanding something correctly....
Andrew
next prev parent reply other threads:[~2011-03-26 16:14 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-26 13:04 [B.A.T.M.A.N.] TTL yes, TTL no Antonio Quartulli
2011-03-26 15:31 ` Marek Lindner
2011-03-26 16:14 ` Andrew Lunn [this message]
-- strict thread matches above, loose matches on Subject: below --
2011-03-26 17:21 Antonio Quartulli
2011-03-26 17:45 ` Andrew Lunn
2011-03-26 18:15 ` Antonio Quartulli
2011-03-26 18:01 Antonio Quartulli
2011-03-26 18:17 Antonio Quartulli
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=20110326161439.GK17979@lunn.ch \
--to=andrew@lunn.ch \
--cc=b.a.t.m.a.n@lists.open-mesh.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