aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/net.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/net.h')
-rw-r--r--include/linux/net.h17
1 files changed, 10 insertions, 7 deletions
diff --git a/include/linux/net.h b/include/linux/net.h
index 4157b5d42bd6..dee0b11a8759 100644
--- a/include/linux/net.h
+++ b/include/linux/net.h
@@ -59,6 +59,7 @@ typedef enum {
59#include <linux/wait.h> 59#include <linux/wait.h>
60#include <linux/fcntl.h> /* For O_CLOEXEC and O_NONBLOCK */ 60#include <linux/fcntl.h> /* For O_CLOEXEC and O_NONBLOCK */
61#include <linux/kmemcheck.h> 61#include <linux/kmemcheck.h>
62#include <linux/rcupdate.h>
62 63
63struct poll_table_struct; 64struct poll_table_struct;
64struct pipe_inode_info; 65struct pipe_inode_info;
@@ -116,16 +117,21 @@ enum sock_shutdown_cmd {
116 SHUT_RDWR = 2, 117 SHUT_RDWR = 2,
117}; 118};
118 119
120struct socket_wq {
121 wait_queue_head_t wait;
122 struct fasync_struct *fasync_list;
123 struct rcu_head rcu;
124} ____cacheline_aligned_in_smp;
125
119/** 126/**
120 * struct socket - general BSD socket 127 * struct socket - general BSD socket
121 * @state: socket state (%SS_CONNECTED, etc) 128 * @state: socket state (%SS_CONNECTED, etc)
122 * @type: socket type (%SOCK_STREAM, etc) 129 * @type: socket type (%SOCK_STREAM, etc)
123 * @flags: socket flags (%SOCK_ASYNC_NOSPACE, etc) 130 * @flags: socket flags (%SOCK_ASYNC_NOSPACE, etc)
124 * @ops: protocol specific socket operations 131 * @ops: protocol specific socket operations
125 * @fasync_list: Asynchronous wake up list
126 * @file: File back pointer for gc 132 * @file: File back pointer for gc
127 * @sk: internal networking protocol agnostic socket representation 133 * @sk: internal networking protocol agnostic socket representation
128 * @wait: wait queue for several uses 134 * @wq: wait queue for several uses
129 */ 135 */
130struct socket { 136struct socket {
131 socket_state state; 137 socket_state state;
@@ -135,11 +141,8 @@ struct socket {
135 kmemcheck_bitfield_end(type); 141 kmemcheck_bitfield_end(type);
136 142
137 unsigned long flags; 143 unsigned long flags;
138 /* 144
139 * Please keep fasync_list & wait fields in the same cache line 145 struct socket_wq *wq;
140 */
141 struct fasync_struct *fasync_list;
142 wait_queue_head_t wait;
143 146
144 struct file *file; 147 struct file *file;
145 struct sock *sk; 148 struct sock *sk;