diff options
Diffstat (limited to 'include/net/sock.h')
-rw-r--r-- | include/net/sock.h | 55 |
1 files changed, 31 insertions, 24 deletions
diff --git a/include/net/sock.h b/include/net/sock.h index eb0c1f50467..5557dfb3dd6 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
@@ -241,59 +241,67 @@ struct sock { | |||
241 | #define sk_bind_node __sk_common.skc_bind_node | 241 | #define sk_bind_node __sk_common.skc_bind_node |
242 | #define sk_prot __sk_common.skc_prot | 242 | #define sk_prot __sk_common.skc_prot |
243 | #define sk_net __sk_common.skc_net | 243 | #define sk_net __sk_common.skc_net |
244 | kmemcheck_bitfield_begin(flags); | ||
245 | unsigned int sk_shutdown : 2, | ||
246 | sk_no_check : 2, | ||
247 | sk_userlocks : 4, | ||
248 | sk_protocol : 8, | ||
249 | sk_type : 16; | ||
250 | kmemcheck_bitfield_end(flags); | ||
251 | int sk_rcvbuf; | ||
252 | socket_lock_t sk_lock; | 244 | socket_lock_t sk_lock; |
245 | struct sk_buff_head sk_receive_queue; | ||
253 | /* | 246 | /* |
254 | * The backlog queue is special, it is always used with | 247 | * The backlog queue is special, it is always used with |
255 | * the per-socket spinlock held and requires low latency | 248 | * the per-socket spinlock held and requires low latency |
256 | * access. Therefore we special case it's implementation. | 249 | * access. Therefore we special case it's implementation. |
250 | * Note : rmem_alloc is in this structure to fill a hole | ||
251 | * on 64bit arches, not because its logically part of | ||
252 | * backlog. | ||
257 | */ | 253 | */ |
258 | struct { | 254 | struct { |
259 | struct sk_buff *head; | 255 | atomic_t rmem_alloc; |
260 | struct sk_buff *tail; | 256 | int len; |
261 | int len; | 257 | struct sk_buff *head; |
258 | struct sk_buff *tail; | ||
262 | } sk_backlog; | 259 | } sk_backlog; |
260 | #define sk_rmem_alloc sk_backlog.rmem_alloc | ||
261 | int sk_forward_alloc; | ||
262 | #ifdef CONFIG_RPS | ||
263 | __u32 sk_rxhash; | ||
264 | #endif | ||
265 | atomic_t sk_drops; | ||
266 | int sk_rcvbuf; | ||
267 | |||
268 | struct sk_filter __rcu *sk_filter; | ||
263 | struct socket_wq *sk_wq; | 269 | struct socket_wq *sk_wq; |
264 | struct dst_entry *sk_dst_cache; | 270 | |
271 | #ifdef CONFIG_NET_DMA | ||
272 | struct sk_buff_head sk_async_wait_queue; | ||
273 | #endif | ||
274 | |||
265 | #ifdef CONFIG_XFRM | 275 | #ifdef CONFIG_XFRM |
266 | struct xfrm_policy *sk_policy[2]; | 276 | struct xfrm_policy *sk_policy[2]; |
267 | #endif | 277 | #endif |
278 | unsigned long sk_flags; | ||
279 | struct dst_entry *sk_dst_cache; | ||
268 | spinlock_t sk_dst_lock; | 280 | spinlock_t sk_dst_lock; |
269 | atomic_t sk_rmem_alloc; | ||
270 | atomic_t sk_wmem_alloc; | 281 | atomic_t sk_wmem_alloc; |
271 | atomic_t sk_omem_alloc; | 282 | atomic_t sk_omem_alloc; |
272 | int sk_sndbuf; | 283 | int sk_sndbuf; |
273 | struct sk_buff_head sk_receive_queue; | ||
274 | struct sk_buff_head sk_write_queue; | 284 | struct sk_buff_head sk_write_queue; |
275 | #ifdef CONFIG_NET_DMA | 285 | kmemcheck_bitfield_begin(flags); |
276 | struct sk_buff_head sk_async_wait_queue; | 286 | unsigned int sk_shutdown : 2, |
277 | #endif | 287 | sk_no_check : 2, |
288 | sk_userlocks : 4, | ||
289 | sk_protocol : 8, | ||
290 | sk_type : 16; | ||
291 | kmemcheck_bitfield_end(flags); | ||
278 | int sk_wmem_queued; | 292 | int sk_wmem_queued; |
279 | int sk_forward_alloc; | ||
280 | gfp_t sk_allocation; | 293 | gfp_t sk_allocation; |
281 | int sk_route_caps; | 294 | int sk_route_caps; |
282 | int sk_route_nocaps; | 295 | int sk_route_nocaps; |
283 | int sk_gso_type; | 296 | int sk_gso_type; |
284 | unsigned int sk_gso_max_size; | 297 | unsigned int sk_gso_max_size; |
285 | int sk_rcvlowat; | 298 | int sk_rcvlowat; |
286 | #ifdef CONFIG_RPS | ||
287 | __u32 sk_rxhash; | ||
288 | #endif | ||
289 | unsigned long sk_flags; | ||
290 | unsigned long sk_lingertime; | 299 | unsigned long sk_lingertime; |
291 | struct sk_buff_head sk_error_queue; | 300 | struct sk_buff_head sk_error_queue; |
292 | struct proto *sk_prot_creator; | 301 | struct proto *sk_prot_creator; |
293 | rwlock_t sk_callback_lock; | 302 | rwlock_t sk_callback_lock; |
294 | int sk_err, | 303 | int sk_err, |
295 | sk_err_soft; | 304 | sk_err_soft; |
296 | atomic_t sk_drops; | ||
297 | unsigned short sk_ack_backlog; | 305 | unsigned short sk_ack_backlog; |
298 | unsigned short sk_max_ack_backlog; | 306 | unsigned short sk_max_ack_backlog; |
299 | __u32 sk_priority; | 307 | __u32 sk_priority; |
@@ -301,7 +309,6 @@ struct sock { | |||
301 | const struct cred *sk_peer_cred; | 309 | const struct cred *sk_peer_cred; |
302 | long sk_rcvtimeo; | 310 | long sk_rcvtimeo; |
303 | long sk_sndtimeo; | 311 | long sk_sndtimeo; |
304 | struct sk_filter __rcu *sk_filter; | ||
305 | void *sk_protinfo; | 312 | void *sk_protinfo; |
306 | struct timer_list sk_timer; | 313 | struct timer_list sk_timer; |
307 | ktime_t sk_stamp; | 314 | ktime_t sk_stamp; |