diff options
author | Zhi Yong Wu <wuzhy@linux.vnet.ibm.com> | 2013-12-31 15:31:01 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-12-31 15:59:27 -0500 |
commit | c9d8ca0454a28d0f835138d7294ede4fc6d95572 (patch) | |
tree | b70156265252cafb9541fecab7dbee7b0814713d /include | |
parent | 0438816efd86c764d5544bf52e769604062316b3 (diff) |
net, rps: fix build failure when CONFIG_RPS isn't set
In file included from net/socket.c:99:0:
include/net/sock.h: In function ‘sock_rps_record_flow’:
include/net/sock.h:849:30: error: ‘const struct sock’ has no member named ‘sk_rxhash’
include/net/sock.h: In function ‘sock_rps_reset_flow’:
include/net/sock.h:854:29: error: ‘const struct sock’ has no member named ‘sk_rxhash’
Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/net/sock.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/net/sock.h b/include/net/sock.h index 8ee90add69d2..bd716b6996ff 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
@@ -846,12 +846,16 @@ static inline void sock_rps_reset_flow_hash(__u32 hash) | |||
846 | 846 | ||
847 | static inline void sock_rps_record_flow(const struct sock *sk) | 847 | static inline void sock_rps_record_flow(const struct sock *sk) |
848 | { | 848 | { |
849 | #ifdef CONFIG_RPS | ||
849 | sock_rps_record_flow_hash(sk->sk_rxhash); | 850 | sock_rps_record_flow_hash(sk->sk_rxhash); |
851 | #endif | ||
850 | } | 852 | } |
851 | 853 | ||
852 | static inline void sock_rps_reset_flow(const struct sock *sk) | 854 | static inline void sock_rps_reset_flow(const struct sock *sk) |
853 | { | 855 | { |
856 | #ifdef CONFIG_RPS | ||
854 | sock_rps_reset_flow_hash(sk->sk_rxhash); | 857 | sock_rps_reset_flow_hash(sk->sk_rxhash); |
858 | #endif | ||
855 | } | 859 | } |
856 | 860 | ||
857 | static inline void sock_rps_save_rxhash(struct sock *sk, | 861 | static inline void sock_rps_save_rxhash(struct sock *sk, |