diff options
Diffstat (limited to 'include/linux/net.h')
| -rw-r--r-- | include/linux/net.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/include/linux/net.h b/include/linux/net.h index 70ac5e28e6b7..0b4ac7da583a 100644 --- a/include/linux/net.h +++ b/include/linux/net.h | |||
| @@ -34,8 +34,12 @@ struct inode; | |||
| 34 | struct file; | 34 | struct file; |
| 35 | struct net; | 35 | struct net; |
| 36 | 36 | ||
| 37 | #define SOCK_ASYNC_NOSPACE 0 | 37 | /* Historically, SOCKWQ_ASYNC_NOSPACE & SOCKWQ_ASYNC_WAITDATA were located |
| 38 | #define SOCK_ASYNC_WAITDATA 1 | 38 | * in sock->flags, but moved into sk->sk_wq->flags to be RCU protected. |
| 39 | * Eventually all flags will be in sk->sk_wq_flags. | ||
| 40 | */ | ||
| 41 | #define SOCKWQ_ASYNC_NOSPACE 0 | ||
| 42 | #define SOCKWQ_ASYNC_WAITDATA 1 | ||
| 39 | #define SOCK_NOSPACE 2 | 43 | #define SOCK_NOSPACE 2 |
| 40 | #define SOCK_PASSCRED 3 | 44 | #define SOCK_PASSCRED 3 |
| 41 | #define SOCK_PASSSEC 4 | 45 | #define SOCK_PASSSEC 4 |
| @@ -89,6 +93,7 @@ struct socket_wq { | |||
| 89 | /* Note: wait MUST be first field of socket_wq */ | 93 | /* Note: wait MUST be first field of socket_wq */ |
| 90 | wait_queue_head_t wait; | 94 | wait_queue_head_t wait; |
| 91 | struct fasync_struct *fasync_list; | 95 | struct fasync_struct *fasync_list; |
| 96 | unsigned long flags; /* %SOCKWQ_ASYNC_NOSPACE, etc */ | ||
| 92 | struct rcu_head rcu; | 97 | struct rcu_head rcu; |
| 93 | } ____cacheline_aligned_in_smp; | 98 | } ____cacheline_aligned_in_smp; |
| 94 | 99 | ||
| @@ -96,7 +101,7 @@ struct socket_wq { | |||
| 96 | * struct socket - general BSD socket | 101 | * struct socket - general BSD socket |
| 97 | * @state: socket state (%SS_CONNECTED, etc) | 102 | * @state: socket state (%SS_CONNECTED, etc) |
| 98 | * @type: socket type (%SOCK_STREAM, etc) | 103 | * @type: socket type (%SOCK_STREAM, etc) |
| 99 | * @flags: socket flags (%SOCK_ASYNC_NOSPACE, etc) | 104 | * @flags: socket flags (%SOCK_NOSPACE, etc) |
| 100 | * @ops: protocol specific socket operations | 105 | * @ops: protocol specific socket operations |
| 101 | * @file: File back pointer for gc | 106 | * @file: File back pointer for gc |
| 102 | * @sk: internal networking protocol agnostic socket representation | 107 | * @sk: internal networking protocol agnostic socket representation |
| @@ -202,7 +207,7 @@ enum { | |||
| 202 | SOCK_WAKE_URG, | 207 | SOCK_WAKE_URG, |
| 203 | }; | 208 | }; |
| 204 | 209 | ||
| 205 | int sock_wake_async(struct socket *sk, int how, int band); | 210 | int sock_wake_async(struct socket_wq *sk_wq, int how, int band); |
| 206 | int sock_register(const struct net_proto_family *fam); | 211 | int sock_register(const struct net_proto_family *fam); |
| 207 | void sock_unregister(int family); | 212 | void sock_unregister(int family); |
| 208 | int __sock_create(struct net *net, int family, int type, int proto, | 213 | int __sock_create(struct net *net, int family, int type, int proto, |
