[PATCH] Receive multiple packets at a time

Guus Sliepen guus at tinc-vpn.org
Thu Dec 10 16:53:14 CET 2015


On Thu, Dec 10, 2015 at 10:15:19AM +0100, Samuel Thibault wrote:

> I did get a bit more than a hundred packets in the queue at 800Mbps. But
> we can reduce to 64, yes.  I wouldn't recommend using a static buffer,
> since we'd want to go threaded at some point. Allocating an array on the
> stack is very cheap anyway.

I assumed that one would only get more than 1 packet at a time under
heavy load, but apparently traffic is bursty enough that it even
triggers in a simple SSH session. But it rarely is over 64, so I kept it
at that.

Your patch was apparently against 1.0.26, not 1.1pre11 as you said
earlier, so I had to port it to the 1.1 branch. It's committed now, with
Michael's de-ifdeffication incorporated as well.

I also made the buffers static, as suggested by Michael. If we go the
multi-threaded way, they can be made thread-local.

-- 
Met vriendelijke groet / with kind regards,
     Guus Sliepen <guus at tinc-vpn.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://www.tinc-vpn.org/pipermail/tinc-devel/attachments/20151210/c6f755b2/attachment.sig>


More information about the tinc-devel mailing list