aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-08-14 19:25:21 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-08-14 19:25:21 -0400
commitad15afb8b9e80bec6c4337369f63207ff59c44ae (patch)
treecdd378c1a6f07cc580033730995e2c883379248d /include
parent899552d6e84babd24611fd36ac7051068cb1eb2d (diff)
parenta61ebdfdb13a051f707b408d464f63b991aa21e3 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull networking fixes from David Miller: "I'm sending this out, in particular, to get the iwlwifi fix propagated: 1) Fix build due to missing include in i40e driver, from Lucas Tanure. 2) Memory leak in openvswitch port allocation, from Chirstoph Jaeger. 3) Check DMA mapping errors in myri10ge, from Stanislaw Gruszka. 4) Fix various deadlock scenerios in sunvnet driver, from Sowmini Varadhan. 5) Fix cxgb4i build failures with incompatible Kconfig settings of the driver vs ipv6, from Anish Bhatt. 6) Fix generation of ACK packet timestamps in the presence of TSO which will be split up, from Willem de Bruijn. 7) Don't enable sched scan in iwlwifi driver, it causes firmware crashes in some revisions. From Emmanuel Grumbach. 8) Revert a macvlan simplification that causes crashes. 9) Handle RTT calculations properly in the presence of repair'd SKBs, from Andrey Vagin. 10) SIT tunnel lookup uses wrong device index in compares, from Shmulik Ladkani. 11) Handle MTU reductions in TCP properly for ipv4 mapped ipv6 sockets, from Neal Cardwell. 12) Add missing annotations in rhashtable code, from Thomas Graf. 13) Fix false interpretation of two RTOs as being from the same TCP loss event in the FRTO code, from Neal Cardwell" * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (42 commits) netlink: Annotate RCU locking for seq_file walker rhashtable: fix annotations for rht_for_each_entry_rcu() rhashtable: unexport and make rht_obj() static rhashtable: RCU annotations for next pointers tcp: fix ssthresh and undo for consecutive short FRTO episodes tcp: don't allow syn packets without timestamps to pass tcp_tw_recycle logic tcp: fix tcp_release_cb() to dispatch via address family for mtu_reduced() sit: Fix ipip6_tunnel_lookup device matching criteria net: ethernet: ibm: ehea: Remove duplicate object from Makefile net: xgene: Check negative return value of xgene_enet_get_ring_size() tcp: don't use timestamp from repaired skb-s to calculate RTT (v2) net: xilinx: Remove .owner field for driver Revert "macvlan: simplify the structure port" iwlwifi: mvm: disable scheduled scan to prevent firmware crash xen-netback: remove loop waiting function xen-netback: don't stop dealloc kthread too early xen-netback: move NAPI add/remove calls xen-netback: fix debugfs entry creation xen-netback: fix debugfs write length check net-timestamp: fix missing tcp fragmentation cases ...
Diffstat (limited to 'include')
-rw-r--r--include/linux/rhashtable.h17
-rw-r--r--include/net/inet_connection_sock.h1
-rw-r--r--include/net/sock.h1
-rw-r--r--include/net/tcp.h7
4 files changed, 12 insertions, 14 deletions
diff --git a/include/linux/rhashtable.h b/include/linux/rhashtable.h
index 9cda293c867d..36826c0166c5 100644
--- a/include/linux/rhashtable.h
+++ b/include/linux/rhashtable.h
@@ -21,7 +21,7 @@
21#include <linux/rculist.h> 21#include <linux/rculist.h>
22 22
23struct rhash_head { 23struct rhash_head {
24 struct rhash_head *next; 24 struct rhash_head __rcu *next;
25}; 25};
26 26
27#define INIT_HASH_HEAD(ptr) ((ptr)->next = NULL) 27#define INIT_HASH_HEAD(ptr) ((ptr)->next = NULL)
@@ -97,7 +97,7 @@ u32 rhashtable_obj_hashfn(const struct rhashtable *ht, void *ptr);
97void rhashtable_insert(struct rhashtable *ht, struct rhash_head *node, gfp_t); 97void rhashtable_insert(struct rhashtable *ht, struct rhash_head *node, gfp_t);
98bool rhashtable_remove(struct rhashtable *ht, struct rhash_head *node, gfp_t); 98bool rhashtable_remove(struct rhashtable *ht, struct rhash_head *node, gfp_t);
99void rhashtable_remove_pprev(struct rhashtable *ht, struct rhash_head *obj, 99void rhashtable_remove_pprev(struct rhashtable *ht, struct rhash_head *obj,
100 struct rhash_head **pprev, gfp_t flags); 100 struct rhash_head __rcu **pprev, gfp_t flags);
101 101
102bool rht_grow_above_75(const struct rhashtable *ht, size_t new_size); 102bool rht_grow_above_75(const struct rhashtable *ht, size_t new_size);
103bool rht_shrink_below_30(const struct rhashtable *ht, size_t new_size); 103bool rht_shrink_below_30(const struct rhashtable *ht, size_t new_size);
@@ -117,18 +117,12 @@ void rhashtable_destroy(const struct rhashtable *ht);
117#define rht_dereference_rcu(p, ht) \ 117#define rht_dereference_rcu(p, ht) \
118 rcu_dereference_check(p, lockdep_rht_mutex_is_held(ht)) 118 rcu_dereference_check(p, lockdep_rht_mutex_is_held(ht))
119 119
120/* Internal, use rht_obj() instead */
121#define rht_entry(ptr, type, member) container_of(ptr, type, member) 120#define rht_entry(ptr, type, member) container_of(ptr, type, member)
122#define rht_entry_safe(ptr, type, member) \ 121#define rht_entry_safe(ptr, type, member) \
123({ \ 122({ \
124 typeof(ptr) __ptr = (ptr); \ 123 typeof(ptr) __ptr = (ptr); \
125 __ptr ? rht_entry(__ptr, type, member) : NULL; \ 124 __ptr ? rht_entry(__ptr, type, member) : NULL; \
126}) 125})
127#define rht_entry_safe_rcu(ptr, type, member) \
128({ \
129 typeof(*ptr) __rcu *__ptr = (typeof(*ptr) __rcu __force *)ptr; \
130 __ptr ? container_of((typeof(ptr))rcu_dereference_raw(__ptr), type, member) : NULL; \
131})
132 126
133#define rht_next_entry_safe(pos, ht, member) \ 127#define rht_next_entry_safe(pos, ht, member) \
134({ \ 128({ \
@@ -205,9 +199,10 @@ void rhashtable_destroy(const struct rhashtable *ht);
205 * traversal is guarded by rcu_read_lock(). 199 * traversal is guarded by rcu_read_lock().
206 */ 200 */
207#define rht_for_each_entry_rcu(pos, head, member) \ 201#define rht_for_each_entry_rcu(pos, head, member) \
208 for (pos = rht_entry_safe_rcu(head, typeof(*(pos)), member); \ 202 for (pos = rht_entry_safe(rcu_dereference_raw(head), \
203 typeof(*(pos)), member); \
209 pos; \ 204 pos; \
210 pos = rht_entry_safe_rcu((pos)->member.next, \ 205 pos = rht_entry_safe(rcu_dereference_raw((pos)->member.next), \
211 typeof(*(pos)), member)) 206 typeof(*(pos)), member))
212 207
213#endif /* _LINUX_RHASHTABLE_H */ 208#endif /* _LINUX_RHASHTABLE_H */
diff --git a/include/net/inet_connection_sock.h b/include/net/inet_connection_sock.h
index 7a4313887568..5fbe6568c3cf 100644
--- a/include/net/inet_connection_sock.h
+++ b/include/net/inet_connection_sock.h
@@ -62,6 +62,7 @@ struct inet_connection_sock_af_ops {
62 void (*addr2sockaddr)(struct sock *sk, struct sockaddr *); 62 void (*addr2sockaddr)(struct sock *sk, struct sockaddr *);
63 int (*bind_conflict)(const struct sock *sk, 63 int (*bind_conflict)(const struct sock *sk,
64 const struct inet_bind_bucket *tb, bool relax); 64 const struct inet_bind_bucket *tb, bool relax);
65 void (*mtu_reduced)(struct sock *sk);
65}; 66};
66 67
67/** inet_connection_sock - INET connection oriented sock 68/** inet_connection_sock - INET connection oriented sock
diff --git a/include/net/sock.h b/include/net/sock.h
index 38805fa02e48..7f2ab72f321a 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -987,7 +987,6 @@ struct proto {
987 struct sk_buff *skb); 987 struct sk_buff *skb);
988 988
989 void (*release_cb)(struct sock *sk); 989 void (*release_cb)(struct sock *sk);
990 void (*mtu_reduced)(struct sock *sk);
991 990
992 /* Keeping track of sk's, looking them up, and port selection methods. */ 991 /* Keeping track of sk's, looking them up, and port selection methods. */
993 void (*hash)(struct sock *sk); 992 void (*hash)(struct sock *sk);
diff --git a/include/net/tcp.h b/include/net/tcp.h
index dafa1cbc149b..590e01a476ac 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -417,7 +417,7 @@ void tcp_update_metrics(struct sock *sk);
417void tcp_init_metrics(struct sock *sk); 417void tcp_init_metrics(struct sock *sk);
418void tcp_metrics_init(void); 418void tcp_metrics_init(void);
419bool tcp_peer_is_proven(struct request_sock *req, struct dst_entry *dst, 419bool tcp_peer_is_proven(struct request_sock *req, struct dst_entry *dst,
420 bool paws_check); 420 bool paws_check, bool timestamps);
421bool tcp_remember_stamp(struct sock *sk); 421bool tcp_remember_stamp(struct sock *sk);
422bool tcp_tw_remember_stamp(struct inet_timewait_sock *tw); 422bool tcp_tw_remember_stamp(struct inet_timewait_sock *tw);
423void tcp_fetch_timewait_stamp(struct sock *sk, struct dst_entry *dst); 423void tcp_fetch_timewait_stamp(struct sock *sk, struct dst_entry *dst);
@@ -448,6 +448,7 @@ const u8 *tcp_parse_md5sig_option(const struct tcphdr *th);
448 */ 448 */
449 449
450void tcp_v4_send_check(struct sock *sk, struct sk_buff *skb); 450void tcp_v4_send_check(struct sock *sk, struct sk_buff *skb);
451void tcp_v4_mtu_reduced(struct sock *sk);
451int tcp_v4_conn_request(struct sock *sk, struct sk_buff *skb); 452int tcp_v4_conn_request(struct sock *sk, struct sk_buff *skb);
452struct sock *tcp_create_openreq_child(struct sock *sk, 453struct sock *tcp_create_openreq_child(struct sock *sk,
453 struct request_sock *req, 454 struct request_sock *req,
@@ -705,8 +706,10 @@ struct tcp_skb_cb {
705#define TCPCB_SACKED_RETRANS 0x02 /* SKB retransmitted */ 706#define TCPCB_SACKED_RETRANS 0x02 /* SKB retransmitted */
706#define TCPCB_LOST 0x04 /* SKB is lost */ 707#define TCPCB_LOST 0x04 /* SKB is lost */
707#define TCPCB_TAGBITS 0x07 /* All tag bits */ 708#define TCPCB_TAGBITS 0x07 /* All tag bits */
709#define TCPCB_REPAIRED 0x10 /* SKB repaired (no skb_mstamp) */
708#define TCPCB_EVER_RETRANS 0x80 /* Ever retransmitted frame */ 710#define TCPCB_EVER_RETRANS 0x80 /* Ever retransmitted frame */
709#define TCPCB_RETRANS (TCPCB_SACKED_RETRANS|TCPCB_EVER_RETRANS) 711#define TCPCB_RETRANS (TCPCB_SACKED_RETRANS|TCPCB_EVER_RETRANS| \
712 TCPCB_REPAIRED)
710 713
711 __u8 ip_dsfield; /* IPv4 tos or IPv6 dsfield */ 714 __u8 ip_dsfield; /* IPv4 tos or IPv6 dsfield */
712 /* 1 byte hole */ 715 /* 1 byte hole */