diff options
Diffstat (limited to 'include/net/sock.h')
| -rw-r--r-- | include/net/sock.h | 17 | 
1 files changed, 17 insertions, 0 deletions
diff --git a/include/net/sock.h b/include/net/sock.h index aeeec62992ca..03a362568357 100644 --- a/include/net/sock.h +++ b/include/net/sock.h @@ -294,6 +294,7 @@ struct sock_common {    *	@sk_stamp: time stamp of last packet received    *	@sk_tsflags: SO_TIMESTAMPING socket options    *	@sk_tskey: counter to disambiguate concurrent tstamp requests +  *	@sk_zckey: counter to order MSG_ZEROCOPY notifications    *	@sk_socket: Identd and reporting IO signals    *	@sk_user_data: RPC layer private data    *	@sk_frag: cached page frag @@ -462,6 +463,7 @@ struct sock {  	u16			sk_tsflags;  	u8			sk_shutdown;  	u32			sk_tskey; +	atomic_t		sk_zckey;  	struct socket		*sk_socket;  	void			*sk_user_data;  #ifdef CONFIG_SECURITY @@ -1529,6 +1531,8 @@ struct sk_buff *sock_wmalloc(struct sock *sk, unsigned long size, int force,  			     gfp_t priority);  void __sock_wfree(struct sk_buff *skb);  void sock_wfree(struct sk_buff *skb); +struct sk_buff *sock_omalloc(struct sock *sk, unsigned long size, +			     gfp_t priority);  void skb_orphan_partial(struct sk_buff *skb);  void sock_rfree(struct sk_buff *skb);  void sock_efree(struct sk_buff *skb); @@ -1580,11 +1584,14 @@ int sock_no_shutdown(struct socket *, int);  int sock_no_getsockopt(struct socket *, int , int, char __user *, int __user *);  int sock_no_setsockopt(struct socket *, int, int, char __user *, unsigned int);  int sock_no_sendmsg(struct socket *, struct msghdr *, size_t); +int sock_no_sendmsg_locked(struct sock *sk, struct msghdr *msg, size_t len);  int sock_no_recvmsg(struct socket *, struct msghdr *, size_t, int);  int sock_no_mmap(struct file *file, struct socket *sock,  		 struct vm_area_struct *vma);  ssize_t sock_no_sendpage(struct socket *sock, struct page *page, int offset,  			 size_t size, int flags); +ssize_t sock_no_sendpage_locked(struct sock *sk, struct page *page, +				int offset, size_t size, int flags);  /*   * Functions to fill in entries in struct proto_ops when a protocol @@ -2361,6 +2368,16 @@ bool sk_net_capable(const struct sock *sk, int cap);  void sk_get_meminfo(const struct sock *sk, u32 *meminfo); +/* Take into consideration the size of the struct sk_buff overhead in the + * determination of these values, since that is non-constant across + * platforms.  This makes socket queueing behavior and performance + * not depend upon such differences. + */ +#define _SK_MEM_PACKETS		256 +#define _SK_MEM_OVERHEAD	SKB_TRUESIZE(256) +#define SK_WMEM_MAX		(_SK_MEM_OVERHEAD * _SK_MEM_PACKETS) +#define SK_RMEM_MAX		(_SK_MEM_OVERHEAD * _SK_MEM_PACKETS) +  extern __u32 sysctl_wmem_max;  extern __u32 sysctl_rmem_max;  | 
