Re: [RFC PATCH net-next] tun: support retrieving multiple packets in a single read with IFF_MULTI_READ
From: Alex Gartrell
Date: Mon Dec 22 2014 - 15:18:58 EST
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.
Thanks,
--
Alex Gartrell <agartrell@xxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/