diff options
author | Keller, Jacob E <jacob.e.keller@intel.com> | 2013-03-28 11:19:25 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-03-31 19:44:20 -0400 |
commit | 7d4c04fc170087119727119074e72445f2bb192b (patch) | |
tree | d76759bfe44399949f70cc344f3be76b8448cac2 /include | |
parent | 4eb06148250f92e1e58bf069c309dac173e8b5f7 (diff) |
net: add option to enable error queue packets waking select
Currently, when a socket receives something on the error queue it only wakes up
the socket on select if it is in the "read" list, that is the socket has
something to read. It is useful also to wake the socket if it is in the error
list, which would enable software to wait on error queue packets without waking
up for regular data on the socket. The main use case is for receiving
timestamped transmit packets which return the timestamp to the socket via the
error queue. This enables an application to select on the socket for the error
queue only instead of for the regular traffic.
-v2-
* Added the SO_SELECT_ERR_QUEUE socket option to every architechture specific file
* Modified every socket poll function that checks error queue
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Cc: Jeffrey Kirsher <jeffrey.t.kirsher@intel.com>
Cc: Richard Cochran <richardcochran@gmail.com>
Cc: Matthew Vick <matthew.vick@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/net/sock.h | 1 | ||||
-rw-r--r-- | include/uapi/asm-generic/socket.h | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/include/net/sock.h b/include/net/sock.h index 14f6e9d19dc7..08f05f964737 100644 --- a/include/net/sock.h +++ b/include/net/sock.h @@ -667,6 +667,7 @@ enum sock_flags { * user-space instead. */ SOCK_FILTER_LOCKED, /* Filter cannot be changed anymore */ + SOCK_SELECT_ERR_QUEUE, /* Wake select on error queue */ }; static inline void sock_copy_flags(struct sock *nsk, struct sock *osk) diff --git a/include/uapi/asm-generic/socket.h b/include/uapi/asm-generic/socket.h index 4ef3acbba5da..c5d2e3a1cf68 100644 --- a/include/uapi/asm-generic/socket.h +++ b/include/uapi/asm-generic/socket.h @@ -74,4 +74,6 @@ #define SO_LOCK_FILTER 44 +#define SO_SELECT_ERR_QUEUE 45 + #endif /* __ASM_GENERIC_SOCKET_H */ |