aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/inet_hashtables.h
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2013-03-19 04:47:30 -0400
committerDaniel Vetter <daniel.vetter@ffwll.ch>2013-03-19 04:47:30 -0400
commit0d4a42f6bd298e826620585e766a154ab460617a (patch)
tree406d8f7778691d858dbe3e48e4bbb10e99c0a58a /include/net/inet_hashtables.h
parentd62b4892f3d9f7dd2002e5309be10719d6805b0f (diff)
parenta937536b868b8369b98967929045f1df54234323 (diff)
Merge tag 'v3.9-rc3' into drm-intel-next-queued
Backmerge so that I can merge Imre Deak's coalesced sg entries fixes, which depend upon the new for_each_sg_page introduce in commit a321e91b6d73ed011ffceed384c40d2785cf723b Author: Imre Deak <imre.deak@intel.com> Date: Wed Feb 27 17:02:56 2013 -0800 lib/scatterlist: add simple page iterator The merge itself is just two trivial conflicts: Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'include/net/inet_hashtables.h')
-rw-r--r--include/net/inet_hashtables.h17
1 files changed, 12 insertions, 5 deletions
diff --git a/include/net/inet_hashtables.h b/include/net/inet_hashtables.h
index 67a8fa098e3a..ef83d9e844b5 100644
--- a/include/net/inet_hashtables.h
+++ b/include/net/inet_hashtables.h
@@ -81,7 +81,9 @@ struct inet_bind_bucket {
81 struct net *ib_net; 81 struct net *ib_net;
82#endif 82#endif
83 unsigned short port; 83 unsigned short port;
84 signed short fastreuse; 84 signed char fastreuse;
85 signed char fastreuseport;
86 kuid_t fastuid;
85 int num_owners; 87 int num_owners;
86 struct hlist_node node; 88 struct hlist_node node;
87 struct hlist_head owners; 89 struct hlist_head owners;
@@ -92,8 +94,8 @@ static inline struct net *ib_net(struct inet_bind_bucket *ib)
92 return read_pnet(&ib->ib_net); 94 return read_pnet(&ib->ib_net);
93} 95}
94 96
95#define inet_bind_bucket_for_each(tb, pos, head) \ 97#define inet_bind_bucket_for_each(tb, head) \
96 hlist_for_each_entry(tb, pos, head, node) 98 hlist_for_each_entry(tb, head, node)
97 99
98struct inet_bind_hashbucket { 100struct inet_bind_hashbucket {
99 spinlock_t lock; 101 spinlock_t lock;
@@ -257,15 +259,19 @@ extern void inet_unhash(struct sock *sk);
257 259
258extern struct sock *__inet_lookup_listener(struct net *net, 260extern struct sock *__inet_lookup_listener(struct net *net,
259 struct inet_hashinfo *hashinfo, 261 struct inet_hashinfo *hashinfo,
262 const __be32 saddr,
263 const __be16 sport,
260 const __be32 daddr, 264 const __be32 daddr,
261 const unsigned short hnum, 265 const unsigned short hnum,
262 const int dif); 266 const int dif);
263 267
264static inline struct sock *inet_lookup_listener(struct net *net, 268static inline struct sock *inet_lookup_listener(struct net *net,
265 struct inet_hashinfo *hashinfo, 269 struct inet_hashinfo *hashinfo,
270 __be32 saddr, __be16 sport,
266 __be32 daddr, __be16 dport, int dif) 271 __be32 daddr, __be16 dport, int dif)
267{ 272{
268 return __inet_lookup_listener(net, hashinfo, daddr, ntohs(dport), dif); 273 return __inet_lookup_listener(net, hashinfo, saddr, sport,
274 daddr, ntohs(dport), dif);
269} 275}
270 276
271/* Socket demux engine toys. */ 277/* Socket demux engine toys. */
@@ -358,7 +364,8 @@ static inline struct sock *__inet_lookup(struct net *net,
358 struct sock *sk = __inet_lookup_established(net, hashinfo, 364 struct sock *sk = __inet_lookup_established(net, hashinfo,
359 saddr, sport, daddr, hnum, dif); 365 saddr, sport, daddr, hnum, dif);
360 366
361 return sk ? : __inet_lookup_listener(net, hashinfo, daddr, hnum, dif); 367 return sk ? : __inet_lookup_listener(net, hashinfo, saddr, sport,
368 daddr, hnum, dif);
362} 369}
363 370
364static inline struct sock *inet_lookup(struct net *net, 371static inline struct sock *inet_lookup(struct net *net,