diff options
author | Zhi Yong Wu <wuzhy@linux.vnet.ibm.com> | 2014-01-01 04:31:01 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-12-31 15:59:27 -0500 |
commit | c9d8ca0454a28d0f835138d7294ede4fc6d95572 (patch) | |
tree | b70156265252cafb9541fecab7dbee7b0814713d /include/net | |
parent | 0438816efd86c764d5544bf52e769604062316b3 (diff) | |
download | blackbird-op-linux-c9d8ca0454a28d0f835138d7294ede4fc6d95572.tar.gz blackbird-op-linux-c9d8ca0454a28d0f835138d7294ede4fc6d95572.zip |
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/net')
-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) static inline void sock_rps_record_flow(const struct sock *sk) { +#ifdef CONFIG_RPS sock_rps_record_flow_hash(sk->sk_rxhash); +#endif } static inline void sock_rps_reset_flow(const struct sock *sk) { +#ifdef CONFIG_RPS sock_rps_reset_flow_hash(sk->sk_rxhash); +#endif } static inline void sock_rps_save_rxhash(struct sock *sk, |