[Olsr-dev] net_outbuffer_push / buffering problem

Henning Rogge (spam-protected)
Fri Aug 24 14:43:13 CEST 2012


On 08/24/2012 02:30 PM, Ferry Huberts wrote:
>
> Hi guys
>
>
> When going through our logs we sometimes see messages like:
>
>> Aug 24 08:07:25 AHR olsrd[22551]: PUD: Could not send to OLSR
>> interface wlan0: there was not enough room in the buffer (size=56, r=0)
>
> This is reported when the pud plugin tries to add a message (of 56 bytes
> in the example) to the output buffer but is unable to because there is
> not enough space in the buffer. (the code is at lib/pud/src/receiver.c:165)
>
> Any ideas how we can avoid this?
>
> Ideally I'd like the buffer to be larger, or to be able to force the
> buffer out when I'm hitting this condition (which could then be done
> automatically).

You cannot make the buffer larger, its limited by the MTU. The problem 
happens if there are already OLSR messages in the outgoing queue to be 
aggregated into a single packet.

The solution is to check if there is enough space... if not, just send 
an OLSR packet before adding your message:

if (pu_size > net_outbuffer_bytes_left(ifp)) {
     net_output(ifp);
}

Of course if your message is too large to fit into an UDP packet 
(including the mandatory 4 byte OLSR packet header), this will not help 
you either.

Henning Rogge

-- 
Diplom-Informatiker Henning Rogge , Fraunhofer-Institut für
Kommunikation, Informationsverarbeitung und Ergonomie FKIE
Kommunikationssysteme (KOM)
Neuenahrer Straße 20, 53343 Wachtberg, Germany
Telefon +49 228 9435-961,   Fax +49 228 9435 685
mailto:(spam-protected) http://www.fkie.fraunhofer.de
GPG: E1C6 0914 490B 3909 D944 F80D 4487 C67C 55EC CFE0

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 6169 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.olsr.org/pipermail/olsr-dev/attachments/20120824/2fe8bfab/attachment.bin>


More information about the Olsr-dev mailing list