diff options
author | Keller, Jacob E <jacob.e.keller@intel.com> | 2013-03-28 07:19:25 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-03-31 19:44:20 -0400 |
commit | 7d4c04fc170087119727119074e72445f2bb192b (patch) | |
tree | d76759bfe44399949f70cc344f3be76b8448cac2 /arch | |
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 'arch')
-rw-r--r-- | arch/alpha/include/uapi/asm/socket.h | 2 | ||||
-rw-r--r-- | arch/avr32/include/uapi/asm/socket.h | 2 | ||||
-rw-r--r-- | arch/cris/include/uapi/asm/socket.h | 2 | ||||
-rw-r--r-- | arch/frv/include/uapi/asm/socket.h | 2 | ||||
-rw-r--r-- | arch/h8300/include/uapi/asm/socket.h | 2 | ||||
-rw-r--r-- | arch/ia64/include/uapi/asm/socket.h | 2 | ||||
-rw-r--r-- | arch/m32r/include/uapi/asm/socket.h | 2 | ||||
-rw-r--r-- | arch/mips/include/uapi/asm/socket.h | 2 | ||||
-rw-r--r-- | arch/mn10300/include/uapi/asm/socket.h | 2 | ||||
-rw-r--r-- | arch/parisc/include/uapi/asm/socket.h | 2 | ||||
-rw-r--r-- | arch/powerpc/include/uapi/asm/socket.h | 2 | ||||
-rw-r--r-- | arch/s390/include/uapi/asm/socket.h | 2 | ||||
-rw-r--r-- | arch/sparc/include/uapi/asm/socket.h | 2 | ||||
-rw-r--r-- | arch/xtensa/include/uapi/asm/socket.h | 2 |
14 files changed, 28 insertions, 0 deletions
diff --git a/arch/alpha/include/uapi/asm/socket.h b/arch/alpha/include/uapi/asm/socket.h index c5195524d1ef..eee6ea76bdaf 100644 --- a/arch/alpha/include/uapi/asm/socket.h +++ b/arch/alpha/include/uapi/asm/socket.h | |||
@@ -79,4 +79,6 @@ | |||
79 | 79 | ||
80 | #define SO_LOCK_FILTER 44 | 80 | #define SO_LOCK_FILTER 44 |
81 | 81 | ||
82 | #define SO_SELECT_ERR_QUEUE 45 | ||
83 | |||
82 | #endif /* _UAPI_ASM_SOCKET_H */ | 84 | #endif /* _UAPI_ASM_SOCKET_H */ |
diff --git a/arch/avr32/include/uapi/asm/socket.h b/arch/avr32/include/uapi/asm/socket.h index 51c6401582ea..37401f535126 100644 --- a/arch/avr32/include/uapi/asm/socket.h +++ b/arch/avr32/include/uapi/asm/socket.h | |||
@@ -72,4 +72,6 @@ | |||
72 | 72 | ||
73 | #define SO_LOCK_FILTER 44 | 73 | #define SO_LOCK_FILTER 44 |
74 | 74 | ||
75 | #define SO_SELECT_ERR_QUEUE 45 | ||
76 | |||
75 | #endif /* __ASM_AVR32_SOCKET_H */ | 77 | #endif /* __ASM_AVR32_SOCKET_H */ |
diff --git a/arch/cris/include/uapi/asm/socket.h b/arch/cris/include/uapi/asm/socket.h index 50692b738c75..ba409c9947bc 100644 --- a/arch/cris/include/uapi/asm/socket.h +++ b/arch/cris/include/uapi/asm/socket.h | |||
@@ -74,6 +74,8 @@ | |||
74 | 74 | ||
75 | #define SO_LOCK_FILTER 44 | 75 | #define SO_LOCK_FILTER 44 |
76 | 76 | ||
77 | #define SO_SELECT_ERR_QUEUE 45 | ||
78 | |||
77 | #endif /* _ASM_SOCKET_H */ | 79 | #endif /* _ASM_SOCKET_H */ |
78 | 80 | ||
79 | 81 | ||
diff --git a/arch/frv/include/uapi/asm/socket.h b/arch/frv/include/uapi/asm/socket.h index 595391f0f98c..31dbb5d8e13d 100644 --- a/arch/frv/include/uapi/asm/socket.h +++ b/arch/frv/include/uapi/asm/socket.h | |||
@@ -72,5 +72,7 @@ | |||
72 | 72 | ||
73 | #define SO_LOCK_FILTER 44 | 73 | #define SO_LOCK_FILTER 44 |
74 | 74 | ||
75 | #define SO_SELECT_ERR_QUEUE 45 | ||
76 | |||
75 | #endif /* _ASM_SOCKET_H */ | 77 | #endif /* _ASM_SOCKET_H */ |
76 | 78 | ||
diff --git a/arch/h8300/include/uapi/asm/socket.h b/arch/h8300/include/uapi/asm/socket.h index 43e32621da7d..5d1c6d0870e6 100644 --- a/arch/h8300/include/uapi/asm/socket.h +++ b/arch/h8300/include/uapi/asm/socket.h | |||
@@ -72,4 +72,6 @@ | |||
72 | 72 | ||
73 | #define SO_LOCK_FILTER 44 | 73 | #define SO_LOCK_FILTER 44 |
74 | 74 | ||
75 | #define SO_SELECT_ERR_QUEUE 45 | ||
76 | |||
75 | #endif /* _ASM_SOCKET_H */ | 77 | #endif /* _ASM_SOCKET_H */ |
diff --git a/arch/ia64/include/uapi/asm/socket.h b/arch/ia64/include/uapi/asm/socket.h index c567adc8bea5..6b4329f18b29 100644 --- a/arch/ia64/include/uapi/asm/socket.h +++ b/arch/ia64/include/uapi/asm/socket.h | |||
@@ -81,4 +81,6 @@ | |||
81 | 81 | ||
82 | #define SO_LOCK_FILTER 44 | 82 | #define SO_LOCK_FILTER 44 |
83 | 83 | ||
84 | #define SO_SELECT_ERR_QUEUE 45 | ||
85 | |||
84 | #endif /* _ASM_IA64_SOCKET_H */ | 86 | #endif /* _ASM_IA64_SOCKET_H */ |
diff --git a/arch/m32r/include/uapi/asm/socket.h b/arch/m32r/include/uapi/asm/socket.h index 519afa2755db..2a3b59e0e171 100644 --- a/arch/m32r/include/uapi/asm/socket.h +++ b/arch/m32r/include/uapi/asm/socket.h | |||
@@ -72,4 +72,6 @@ | |||
72 | 72 | ||
73 | #define SO_LOCK_FILTER 44 | 73 | #define SO_LOCK_FILTER 44 |
74 | 74 | ||
75 | #define SO_SELECT_ERR_QUEUE 45 | ||
76 | |||
75 | #endif /* _ASM_M32R_SOCKET_H */ | 77 | #endif /* _ASM_M32R_SOCKET_H */ |
diff --git a/arch/mips/include/uapi/asm/socket.h b/arch/mips/include/uapi/asm/socket.h index 47132f44c955..3b211507be7f 100644 --- a/arch/mips/include/uapi/asm/socket.h +++ b/arch/mips/include/uapi/asm/socket.h | |||
@@ -90,4 +90,6 @@ | |||
90 | 90 | ||
91 | #define SO_LOCK_FILTER 44 | 91 | #define SO_LOCK_FILTER 44 |
92 | 92 | ||
93 | #define SO_SELECT_ERR_QUEUE 45 | ||
94 | |||
93 | #endif /* _UAPI_ASM_SOCKET_H */ | 95 | #endif /* _UAPI_ASM_SOCKET_H */ |
diff --git a/arch/mn10300/include/uapi/asm/socket.h b/arch/mn10300/include/uapi/asm/socket.h index 5c7c7c988544..b4ce844c9391 100644 --- a/arch/mn10300/include/uapi/asm/socket.h +++ b/arch/mn10300/include/uapi/asm/socket.h | |||
@@ -72,4 +72,6 @@ | |||
72 | 72 | ||
73 | #define SO_LOCK_FILTER 44 | 73 | #define SO_LOCK_FILTER 44 |
74 | 74 | ||
75 | #define SO_SELECT_ERR_QUEUE 45 | ||
76 | |||
75 | #endif /* _ASM_SOCKET_H */ | 77 | #endif /* _ASM_SOCKET_H */ |
diff --git a/arch/parisc/include/uapi/asm/socket.h b/arch/parisc/include/uapi/asm/socket.h index 526e4b9aece0..70c512a386f7 100644 --- a/arch/parisc/include/uapi/asm/socket.h +++ b/arch/parisc/include/uapi/asm/socket.h | |||
@@ -71,6 +71,8 @@ | |||
71 | 71 | ||
72 | #define SO_LOCK_FILTER 0x4025 | 72 | #define SO_LOCK_FILTER 0x4025 |
73 | 73 | ||
74 | #define SO_SELECT_ERR_QUEUE 0x4026 | ||
75 | |||
74 | /* O_NONBLOCK clashes with the bits used for socket types. Therefore we | 76 | /* O_NONBLOCK clashes with the bits used for socket types. Therefore we |
75 | * have to define SOCK_NONBLOCK to a different value here. | 77 | * have to define SOCK_NONBLOCK to a different value here. |
76 | */ | 78 | */ |
diff --git a/arch/powerpc/include/uapi/asm/socket.h b/arch/powerpc/include/uapi/asm/socket.h index a26dcaece509..a36daf3c6f9a 100644 --- a/arch/powerpc/include/uapi/asm/socket.h +++ b/arch/powerpc/include/uapi/asm/socket.h | |||
@@ -79,4 +79,6 @@ | |||
79 | 79 | ||
80 | #define SO_LOCK_FILTER 44 | 80 | #define SO_LOCK_FILTER 44 |
81 | 81 | ||
82 | #define SO_SELECT_ERR_QUEUE 45 | ||
83 | |||
82 | #endif /* _ASM_POWERPC_SOCKET_H */ | 84 | #endif /* _ASM_POWERPC_SOCKET_H */ |
diff --git a/arch/s390/include/uapi/asm/socket.h b/arch/s390/include/uapi/asm/socket.h index f99eea7fff0f..2dacb306835c 100644 --- a/arch/s390/include/uapi/asm/socket.h +++ b/arch/s390/include/uapi/asm/socket.h | |||
@@ -78,4 +78,6 @@ | |||
78 | 78 | ||
79 | #define SO_LOCK_FILTER 44 | 79 | #define SO_LOCK_FILTER 44 |
80 | 80 | ||
81 | #define SO_SELECT_ERR_QUEUE 45 | ||
82 | |||
81 | #endif /* _ASM_SOCKET_H */ | 83 | #endif /* _ASM_SOCKET_H */ |
diff --git a/arch/sparc/include/uapi/asm/socket.h b/arch/sparc/include/uapi/asm/socket.h index cbbad74b2e06..89f49b68a21c 100644 --- a/arch/sparc/include/uapi/asm/socket.h +++ b/arch/sparc/include/uapi/asm/socket.h | |||
@@ -68,6 +68,8 @@ | |||
68 | 68 | ||
69 | #define SO_LOCK_FILTER 0x0028 | 69 | #define SO_LOCK_FILTER 0x0028 |
70 | 70 | ||
71 | #define SO_SELECT_ERR_QUEUE 0x0029 | ||
72 | |||
71 | /* Security levels - as per NRL IPv6 - don't actually do anything */ | 73 | /* Security levels - as per NRL IPv6 - don't actually do anything */ |
72 | #define SO_SECURITY_AUTHENTICATION 0x5001 | 74 | #define SO_SECURITY_AUTHENTICATION 0x5001 |
73 | #define SO_SECURITY_ENCRYPTION_TRANSPORT 0x5002 | 75 | #define SO_SECURITY_ENCRYPTION_TRANSPORT 0x5002 |
diff --git a/arch/xtensa/include/uapi/asm/socket.h b/arch/xtensa/include/uapi/asm/socket.h index 35905cb6e419..a8f44f50e651 100644 --- a/arch/xtensa/include/uapi/asm/socket.h +++ b/arch/xtensa/include/uapi/asm/socket.h | |||
@@ -83,4 +83,6 @@ | |||
83 | 83 | ||
84 | #define SO_LOCK_FILTER 44 | 84 | #define SO_LOCK_FILTER 44 |
85 | 85 | ||
86 | #define SO_SELECT_ERR_QUEUE 45 | ||
87 | |||
86 | #endif /* _XTENSA_SOCKET_H */ | 88 | #endif /* _XTENSA_SOCKET_H */ |