[olsr-dev] LQ code enhancements

Thomas Lopatic (spam-protected)
Mon Feb 28 17:58:13 CET 2005

onelektra wrote:

> Hi!
>> [diversity in OLSR packet sizes]
>>> LQ is calculated from hello-messages only. They should be realtively 
>>> small. Thomas suggested to increase the hello-paket-size to a fixed 
>>> amount. This may be well worth a try, but is a dirty trick.
>> Errrm, well, yes, only using HELLO messages is the original design. 
>> However, olsrd uses the packet sequence number of the complete OLSR 
>> (UDP) packet (which may contain more than a single HELLO, TC, MID, or 
>> HNA message). What this means is that we calculate the packet loss 
>> over OLSR (UDP) packets and not OLSR messages, which we can in turn 
>> see as calculating the packet loss over all OLSR messages and not only 
>> HELLOs.
>> So, we may see pretty large OLSR (UDP) packets, simply because our 
>> neighbour squeezes a lot of OLSR messages into a single UDP packet to 
>> save bandwidth.
> You are shure that was a good idea?

Hmmm. Well, my idea (The idea to look at UDP packets and not at the 
individual messages inside the UDP packets. Not the idea to put more 
than one message into a single UDP packet.) was inspired by the fact 
that we thus potentially have more sequence numbers to look at and are 
able to detect packet loss earlier, possibly before the next HELLO 
message is due.

As far as I can see we do not lose anything by doing so, do we? Even if 
the LQ code went through the UDP packet and only looked at the HELLO 
messages within, the HELLOs would still be transmitted together with 
other OLSR messages in the same UDP packet. This behaviour has nothing 
to do with the LQ code.

But I think that I can see your point. Big UDP packets get lost more 
easily and, hence, HELLOs might be lost although they're pretty small 
simply because they are packed with other OLSR messages into a single 
big UDP packet. And, to make things worse, the UDP packets are 
broadcasts, which are more prone to packet loss than unicasts, as there 
aren't any acknowledgements for broadcasts. Right?

If this is a problem, then we should think about configuration options 
along the lines of "LonelyHello", "LonelyTc", etc. that force HELLOs, 
TCs, etc. to be sent in their own individual UDP packet separate from 
any other messages. This shouldn't be much programming effort. Simply 
flush the output buffer before adding a HELLO, a TC, etc., add the 
HELLO, the TC, etc. to the buffer, flush the output buffer again.


More information about the Olsr-dev mailing list