Skip to content

Commit

Permalink
net, rps: fix build failure when CONFIG_RPS isn't set
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Zhi Yong Wu authored and David S. Miller committed Dec 31, 2013
1 parent 0438816 commit c9d8ca0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions include/net/sock.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit c9d8ca0

Please sign in to comment.