Skip to content

Commit 7d4c04f

Browse files
jacob-kellerdavem330
authored andcommitted
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>
1 parent 4eb0614 commit 7d4c04f

23 files changed

Lines changed: 53 additions & 6 deletions

File tree

‎arch/alpha/include/uapi/asm/socket.h‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,4 +79,6 @@
7979

8080
#define SO_LOCK_FILTER 44
8181

82+
#define SO_SELECT_ERR_QUEUE 45
83+
8284
#endif /* _UAPI_ASM_SOCKET_H */

‎arch/avr32/include/uapi/asm/socket.h‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,4 +72,6 @@
7272

7373
#define SO_LOCK_FILTER 44
7474

75+
#define SO_SELECT_ERR_QUEUE 45
76+
7577
#endif /* __ASM_AVR32_SOCKET_H */

‎arch/cris/include/uapi/asm/socket.h‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@
7474

7575
#define SO_LOCK_FILTER 44
7676

77+
#define SO_SELECT_ERR_QUEUE 45
78+
7779
#endif /* _ASM_SOCKET_H */
7880

7981

‎arch/frv/include/uapi/asm/socket.h‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,5 +72,7 @@
7272

7373
#define SO_LOCK_FILTER 44
7474

75+
#define SO_SELECT_ERR_QUEUE 45
76+
7577
#endif /* _ASM_SOCKET_H */
7678

‎arch/h8300/include/uapi/asm/socket.h‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,4 +72,6 @@
7272

7373
#define SO_LOCK_FILTER 44
7474

75+
#define SO_SELECT_ERR_QUEUE 45
76+
7577
#endif /* _ASM_SOCKET_H */

‎arch/ia64/include/uapi/asm/socket.h‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,4 +81,6 @@
8181

8282
#define SO_LOCK_FILTER 44
8383

84+
#define SO_SELECT_ERR_QUEUE 45
85+
8486
#endif /* _ASM_IA64_SOCKET_H */

‎arch/m32r/include/uapi/asm/socket.h‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,4 +72,6 @@
7272

7373
#define SO_LOCK_FILTER 44
7474

75+
#define SO_SELECT_ERR_QUEUE 45
76+
7577
#endif /* _ASM_M32R_SOCKET_H */

‎arch/mips/include/uapi/asm/socket.h‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,4 +90,6 @@
9090

9191
#define SO_LOCK_FILTER 44
9292

93+
#define SO_SELECT_ERR_QUEUE 45
94+
9395
#endif /* _UAPI_ASM_SOCKET_H */

‎arch/mn10300/include/uapi/asm/socket.h‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,4 +72,6 @@
7272

7373
#define SO_LOCK_FILTER 44
7474

75+
#define SO_SELECT_ERR_QUEUE 45
76+
7577
#endif /* _ASM_SOCKET_H */

‎arch/parisc/include/uapi/asm/socket.h‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@
7171

7272
#define SO_LOCK_FILTER 0x4025
7373

74+
#define SO_SELECT_ERR_QUEUE 0x4026
75+
7476
/* O_NONBLOCK clashes with the bits used for socket types. Therefore we
7577
* have to define SOCK_NONBLOCK to a different value here.
7678
*/

0 commit comments

Comments
 (0)