Thread (7 messages) 7 messages, 3 authors, 2014-01-01

Re: [net-next bugfix] net, rps: fix build failure when CONFIG_RPS isn't set

From: David Miller <davem@davemloft.net>
Date: 2013-12-31 21:08:53

From: Sergei Shtylyov <redacted>
Date: Wed, 01 Jan 2014 01:03:18 +0300
Hello.

On 12/31/2013 11:31 PM, Zhi Yong Wu wrote:
quoted
From: Zhi Yong Wu <redacted>
quoted
Reported-by: Fengguang Wu <redacted>
Signed-off-by: Zhi Yong Wu <redacted>
---
  include/net/sock.h |    4 ++++
  1 files changed, 4 insertions(+), 0 deletions(-)
quoted
diff --git a/include/net/sock.h b/include/net/sock.h
index 8ee90ad..bd716b6 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
  }
   A lot better style would be:
Sorry, I meant to say, this is consistent with how the other functions
dependent upon RPS are handled.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help