lkml.org 
[lkml]   [2014]   [Dec]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCH net-next] tun: support retrieving multiple packets in a single read with IFF_MULTI_READ
Alex Gartrell <agartrell@fb.com> wrote:
> This patch adds the IFF_MULTI_READ flag. This has the following behavior.
>
> 1) If a read is too short for a packet, a single stripped packet will be read
>
> 2) If a read is long enough for multiple packets, as many *full* packets
> will be read as possible. We will not return a stripped packet, so even if
> there are many, many packets, we may get a short read.
>
> In casual performance testing with a simple test program that simply reads
> and counts packets, IFF_MULTI_READ conservatively yielded a 30% CPU win, as
> measured by top. Load was being driven by a bunch of hpings running on a
> server on the same L2 network (single hop through a top-of-rack switch).
>
> Signed-off-by: Alex Gartrell <agartrell@fb.com>

As tun already has a socket interface can we do this through
recvmmsg?

Thanks,
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt


\
 
 \ /
  Last update: 2014-12-22 13:41    [W:0.072 / U:0.668 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site