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.h15
1 files changed, 12 insertions, 3 deletions
diff --git a/include/net/sock.h b/include/net/sock.h
index 8e4062f165b8..5ac682f73d63 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -686,16 +686,25 @@ static inline void sock_rps_reset_flow(const struct sock *sk)
686#endif 686#endif
687} 687}
688 688
689static inline void sock_rps_save_rxhash(struct sock *sk, u32 rxhash) 689static inline void sock_rps_save_rxhash(struct sock *sk,
690 const struct sk_buff *skb)
690{ 691{
691#ifdef CONFIG_RPS 692#ifdef CONFIG_RPS
692 if (unlikely(sk->sk_rxhash != rxhash)) { 693 if (unlikely(sk->sk_rxhash != skb->rxhash)) {
693 sock_rps_reset_flow(sk); 694 sock_rps_reset_flow(sk);
694 sk->sk_rxhash = rxhash; 695 sk->sk_rxhash = skb->rxhash;
695 } 696 }
696#endif 697#endif
697} 698}
698 699
700static inline void sock_rps_reset_rxhash(struct sock *sk)
701{
702#ifdef CONFIG_RPS
703 sock_rps_reset_flow(sk);
704 sk->sk_rxhash = 0;
705#endif
706}
707
699#define sk_wait_event(__sk, __timeo, __condition) \ 708#define sk_wait_event(__sk, __timeo, __condition) \
700 ({ int __rc; \ 709 ({ int __rc; \
701 release_sock(__sk); \ 710 release_sock(__sk); \