aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/sock.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/net/sock.h')
-rw-r--r--include/net/sock.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/include/net/sock.h b/include/net/sock.h
index adab9dc58183..a6338d039857 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -301,7 +301,7 @@ struct sock {
301 const struct cred *sk_peer_cred; 301 const struct cred *sk_peer_cred;
302 long sk_rcvtimeo; 302 long sk_rcvtimeo;
303 long sk_sndtimeo; 303 long sk_sndtimeo;
304 struct sk_filter *sk_filter; 304 struct sk_filter __rcu *sk_filter;
305 void *sk_protinfo; 305 void *sk_protinfo;
306 struct timer_list sk_timer; 306 struct timer_list sk_timer;
307 ktime_t sk_stamp; 307 ktime_t sk_stamp;
@@ -762,7 +762,7 @@ struct proto {
762 762
763 /* Memory pressure */ 763 /* Memory pressure */
764 void (*enter_memory_pressure)(struct sock *sk); 764 void (*enter_memory_pressure)(struct sock *sk);
765 atomic_t *memory_allocated; /* Current allocated memory. */ 765 atomic_long_t *memory_allocated; /* Current allocated memory. */
766 struct percpu_counter *sockets_allocated; /* Current number of sockets. */ 766 struct percpu_counter *sockets_allocated; /* Current number of sockets. */
767 /* 767 /*
768 * Pressure flag: try to collapse. 768 * Pressure flag: try to collapse.
@@ -771,7 +771,7 @@ struct proto {
771 * is strict, actions are advisory and have some latency. 771 * is strict, actions are advisory and have some latency.
772 */ 772 */
773 int *memory_pressure; 773 int *memory_pressure;
774 int *sysctl_mem; 774 long *sysctl_mem;
775 int *sysctl_wmem; 775 int *sysctl_wmem;
776 int *sysctl_rmem; 776 int *sysctl_rmem;
777 int max_header; 777 int max_header;
@@ -1558,7 +1558,11 @@ static inline void sk_wake_async(struct sock *sk, int how, int band)
1558} 1558}
1559 1559
1560#define SOCK_MIN_SNDBUF 2048 1560#define SOCK_MIN_SNDBUF 2048
1561#define SOCK_MIN_RCVBUF 256 1561/*
1562 * Since sk_rmem_alloc sums skb->truesize, even a small frame might need
1563 * sizeof(sk_buff) + MTU + padding, unless net driver perform copybreak
1564 */
1565#define SOCK_MIN_RCVBUF (2048 + sizeof(struct sk_buff))
1562 1566
1563static inline void sk_stream_moderate_sndbuf(struct sock *sk) 1567static inline void sk_stream_moderate_sndbuf(struct sock *sk)
1564{ 1568{
@@ -1670,17 +1674,13 @@ static inline void sock_recv_ts_and_drops(struct msghdr *msg, struct sock *sk,
1670 1674
1671/** 1675/**
1672 * sock_tx_timestamp - checks whether the outgoing packet is to be time stamped 1676 * sock_tx_timestamp - checks whether the outgoing packet is to be time stamped
1673 * @msg: outgoing packet
1674 * @sk: socket sending this packet 1677 * @sk: socket sending this packet
1675 * @shtx: filled with instructions for time stamping 1678 * @tx_flags: filled with instructions for time stamping
1676 * 1679 *
1677 * Currently only depends on SOCK_TIMESTAMPING* flags. Returns error code if 1680 * Currently only depends on SOCK_TIMESTAMPING* flags. Returns error code if
1678 * parameters are invalid. 1681 * parameters are invalid.
1679 */ 1682 */
1680extern int sock_tx_timestamp(struct msghdr *msg, 1683extern int sock_tx_timestamp(struct sock *sk, __u8 *tx_flags);
1681 struct sock *sk,
1682 union skb_shared_tx *shtx);
1683
1684 1684
1685/** 1685/**
1686 * sk_eat_skb - Release a skb if it is no longer needed 1686 * sk_eat_skb - Release a skb if it is no longer needed