diff options
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 a0525a1f471..e3d79593fb3 100644 --- a/include/linux/netpoll.h +++ b/include/linux/netpoll.h @@ -25,6 +25,7 @@ struct netpoll { struct netpoll_info { atomic_t refcnt; + int rx_flags; spinlock_t rx_lock; struct netpoll *rx_np; /* netpoll that registered an rx_hook */ 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) unsigned long flags; int ret = 0; - if (!npinfo || !npinfo->rx_np) + if (!npinfo || (!npinfo->rx_np && !npinfo->rx_flags)) return 0; spin_lock_irqsave(&npinfo->rx_lock, flags); - /* check rx_np again with the lock held */ - if (npinfo->rx_np && __netpoll_rx(skb)) + /* check rx_flags again with the lock held */ + if (npinfo->rx_flags && __netpoll_rx(skb)) ret = 1; spin_unlock_irqrestore(&npinfo->rx_lock, flags); diff --git a/include/net/inet_sock.h b/include/net/inet_sock.h index 70013c5f4e5..89cd011edb9 100644 --- a/include/net/inet_sock.h +++ b/include/net/inet_sock.h @@ -175,7 +175,8 @@ extern void build_ehash_secret(void); static inline unsigned int inet_ehashfn(const __be32 laddr, const __u16 lport, const __be32 faddr, const __be16 fport) { - return jhash_2words((__force __u32) laddr ^ (__force __u32) faddr, + return jhash_3words((__force __u32) laddr, + (__force __u32) faddr, ((__u32) lport) << 16 | (__force __u32)fport, inet_ehash_secret); } |