diff options
author | David S. Miller <davem@davemloft.net> | 2008-03-05 15:26:41 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-03-05 15:26:41 -0500 |
commit | 255333c1db3ec63921de29b134418a4e56e5921e (patch) | |
tree | b1cd99373cabfa6fed020496d4d74500e7bc7e92 /include | |
parent | 9a43b709a230705ca40a6f854a334a02334a3c1c (diff) | |
parent | 0d66afe7805b169b6bf3c7a88cf8163298b8ef05 (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
net/mac80211/rc80211_pid_algo.c
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/netpoll.h | 7 | ||||
-rw-r--r-- | include/net/inet_sock.h | 3 |
2 files changed, 6 insertions, 4 deletions
diff --git a/include/linux/netpoll.h b/include/linux/netpoll.h index a0525a1f4715..e3d79593fb3a 100644 --- a/include/linux/netpoll.h +++ b/include/linux/netpoll.h | |||
@@ -25,6 +25,7 @@ struct netpoll { | |||
25 | 25 | ||
26 | struct netpoll_info { | 26 | struct netpoll_info { |
27 | atomic_t refcnt; | 27 | atomic_t refcnt; |
28 | int rx_flags; | ||
28 | spinlock_t rx_lock; | 29 | spinlock_t rx_lock; |
29 | struct netpoll *rx_np; /* netpoll that registered an rx_hook */ | 30 | struct netpoll *rx_np; /* netpoll that registered an rx_hook */ |
30 | struct sk_buff_head arp_tx; /* list of arp requests to reply to */ | 31 | struct sk_buff_head arp_tx; /* list of arp requests to reply to */ |
@@ -50,12 +51,12 @@ static inline int netpoll_rx(struct sk_buff *skb) | |||
50 | unsigned long flags; | 51 | unsigned long flags; |
51 | int ret = 0; | 52 | int ret = 0; |
52 | 53 | ||
53 | if (!npinfo || !npinfo->rx_np) | 54 | if (!npinfo || (!npinfo->rx_np && !npinfo->rx_flags)) |
54 | return 0; | 55 | return 0; |
55 | 56 | ||
56 | spin_lock_irqsave(&npinfo->rx_lock, flags); | 57 | spin_lock_irqsave(&npinfo->rx_lock, flags); |
57 | /* check rx_np again with the lock held */ | 58 | /* check rx_flags again with the lock held */ |
58 | if (npinfo->rx_np && __netpoll_rx(skb)) | 59 | if (npinfo->rx_flags && __netpoll_rx(skb)) |
59 | ret = 1; | 60 | ret = 1; |
60 | spin_unlock_irqrestore(&npinfo->rx_lock, flags); | 61 | spin_unlock_irqrestore(&npinfo->rx_lock, flags); |
61 | 62 | ||
diff --git a/include/net/inet_sock.h b/include/net/inet_sock.h index 70013c5f4e59..89cd011edb99 100644 --- a/include/net/inet_sock.h +++ b/include/net/inet_sock.h | |||
@@ -175,7 +175,8 @@ extern void build_ehash_secret(void); | |||
175 | static inline unsigned int inet_ehashfn(const __be32 laddr, const __u16 lport, | 175 | static inline unsigned int inet_ehashfn(const __be32 laddr, const __u16 lport, |
176 | const __be32 faddr, const __be16 fport) | 176 | const __be32 faddr, const __be16 fport) |
177 | { | 177 | { |
178 | return jhash_2words((__force __u32) laddr ^ (__force __u32) faddr, | 178 | return jhash_3words((__force __u32) laddr, |
179 | (__force __u32) faddr, | ||
179 | ((__u32) lport) << 16 | (__force __u32)fport, | 180 | ((__u32) lport) << 16 | (__force __u32)fport, |
180 | inet_ehash_secret); | 181 | inet_ehash_secret); |
181 | } | 182 | } |