[lkml]   [2014]   [Dec]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [RFC PATCH net-next] tun: support retrieving multiple packets in a single read with IFF_MULTI_READ
Hey Herbert,

Thanks for getting back to me

On 12/22/14 4:09 AM, Herbert Xu wrote:
> As tun already has a socket interface can we do this through
> recvmmsg?

This just presents an easier interface (IMHO) for accomplishing that.
And I say easier because I was unable how to figure out the recvmmsg way
to do it.

While fully aware that this makes me look like an idiot, I have to admit
that I've tried and failed to figure out how to get a socket fd out of
the tun device.

The regular fd doesn't work (which is obvious when you look at the
implementation sock_from_file), there's a tun_get_socket function but
it's only referenced by a single file, and none of the ioctl's jump out
at me as doing anything to enable this behavior. Additionally,
tuntap.txt makes no mention of sockets specifically.

FWIW, I don't feel strongly that IFF_MULTI_READ is the right way to do
this either.

Alex Gartrell <>

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