Hello folks!
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?
Someone could probably say that a node far at least TTL hops will never be reached by a unicast packet, then it is meaningless to let it know about me. But then it could be possible to recalibrate the TTL such that it has to be equal to the maximum length in number of hops of the longest path the OGM can traverse.
Bye! :)
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.
Someone could probably say that a node far at least TTL hops will never be reached by a unicast packet, then it is meaningless to let it know about me. But then it could be possible to recalibrate the TTL such that it has to be equal to the maximum length in number of hops of the longest path the OGM can traverse.
Not quite sure what you are proposing. A TTL of TQ_MAX / hop penalty ?
Cheers, Marek
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
b.a.t.m.a.n@lists.open-mesh.org