Re: [Intel-wired-lan] [PATCH 1/1] igb: Use ARRAY_SIZE instead fo sizeof(a)/sizeof(a[0])

2015-06-30 Thread Alex Gartrell
ur array to a pointer to an array (you'll get a build failure instead of 0). -- Alex Gartrell -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info

We've released a generic netlink python library -- gnlpy

2015-05-20 Thread Alex Gartrell
k family. We welcome your pull requests :) -- Alex Gartrell -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: [PATCH net-next 1/2] socket: Allow external sockets to use socket syscalls

2014-12-26 Thread Alex Gartrell
Hello Al, On 12/26/14 2:56 PM, Al Viro wrote: On Thu, Dec 25, 2014 at 10:50:23PM -0800, Alex Gartrell wrote: Currently the "is-socket" test for a file compares the ops table pointer, which is static and local to the socket.c. Instead, this adds a flag for private_data_is_socket.

Re: [PATCH net-next 1/2] socket: Allow external sockets to use socket syscalls

2014-12-26 Thread Alex Gartrell
return file->private_data; /* set in sock_map_fd */ *err = -ENOTSOCK; Not sure it's the best method, how about a dedicated f_op to do this? So like a get_socket operation? That would simplify this a lot, certainly (we wouldn't need to move private_data around in the tu

Re: [PATCH net-next 2/2] tun: enable socket system calls

2014-12-26 Thread Alex Gartrell
Hello Jason, Thanks for commenting. On 12/26/14 4:43 AM, Jason Wang wrote: On 12/26/2014 02:50 PM, Alex Gartrell wrote: By setting private_data to a socket and private_data_is_socket to true, we can use the socket syscalls. We also can't just blindly use private_data anymore, so ther

[PATCH net-next] tun: return proper error code from tun_do_read

2014-12-25 Thread Alex Gartrell
Instead of -1 with EAGAIN, read on a O_NONBLOCK tun fd will return 0. This fixes this by properly returning the error code from __skb_recv_datagram. Signed-off-by: Alex Gartrell --- drivers/net/tun.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/tun.c b

[PATCH net-next] tun: Fixed unsigned/signed comparison

2014-12-25 Thread Alex Gartrell
Validated that this was actually using the unsigned comparison with gdb. Signed-off-by: Alex Gartrell --- drivers/net/tun.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/tun.c b/drivers/net/tun.c index a5cbf67..6c63e21 100644 --- a/drivers/net/tun.c +++ b

[PATCH net-next 1/2] socket: Allow external sockets to use socket syscalls

2014-12-25 Thread Alex Gartrell
Currently the "is-socket" test for a file compares the ops table pointer, which is static and local to the socket.c. Instead, this adds a flag for private_data_is_socket. This is an exceptionally long commit message for a two-line patch. Signed-off-by: Alex Gartrell --- include/linu

[PATCH net-next 2/2] tun: enable socket system calls

2014-12-25 Thread Alex Gartrell
By setting private_data to a socket and private_data_is_socket to true, we can use the socket syscalls. We also can't just blindly use private_data anymore, so there's a __tun_file_get function that returns the container_of private_data appropriately. Signed-off-by: Alex Gartrell --

[PATCH net-next 0/2] tun: support socket system calls

2014-12-25 Thread Alex Gartrell
There is an underlying socket object in struct tun that isn't accessible, so if you try to do a recvmmsg on a tun file descriptor you'll get an error. This small patchset allows external file objects to claim socket status and enables it for tun_files. Alex Gartrell (2): socket: Allo

Re: [RFC PATCH net-next] tun: support retrieving multiple packets in a single read with IFF_MULTI_READ

2014-12-22 Thread Alex Gartrell
Hey Herbert, On 12/22/2014 02:34 PM, Herbert Xu wrote: On Mon, Dec 22, 2014 at 12:18:39PM -0800, Alex Gartrell wrote: 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. Well

Re: [RFC PATCH net-next] tun: support retrieving multiple packets in a single read with IFF_MULTI_READ

2014-12-22 Thread Alex Gartrell
e right way to do this either. Thanks, -- Alex Gartrell -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

[RFC PATCH net-next] tun: support retrieving multiple packets in a single read with IFF_MULTI_READ

2014-12-04 Thread Alex Gartrell
same L2 network (single hop through a top-of-rack switch). Signed-off-by: Alex Gartrell --- drivers/net/tun.c | 66 ++--- include/uapi/linux/if_tun.h | 3 +++ 2 files changed, 60 insertions(+), 9 deletions(-) diff --git a/drivers/net/tun.c b