Commit c9d8ca04 authored by Zhi Yong Wu's avatar Zhi Yong Wu Committed by David S. Miller

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: default avatarFengguang Wu <fengguang.wu@intel.com>
Signed-off-by: default avatarZhi Yong Wu <wuzhy@linux.vnet.ibm.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 0438816e
......@@ -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,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment