summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2013-12-31 13:31:42 -0500
committerDavid S. Miller <davem@davemloft.net>2013-12-31 13:31:42 -0500
commit71a1d9ee103dc4c0dc9e534ee19bc92ceef0024b (patch)
treece2635a6fe72be741d7dee0138d10c827ee842e9 /include
parent84a6a0acad145fb9bc11dcb60f6d064072f0cc1c (diff)
parent9bc8893937c8369c9c3a045c05f5820f2242bc96 (diff)
Merge branch 'tun_rfs'
Zhi Yong Wu says: ==================== tun: add the RFS support Since Tom Herbert's hash related patchset was modified and got merged, his pachset about adding support for RFS on tun flows also need to get adjusted accordingly. I tried to update them, and before i will start to do some perf tests, i hope to get one correct code base, so it's time to post them out now. Any constructive comments are welcome, thanks. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/net/sock.h18
1 files changed, 14 insertions, 4 deletions
diff --git a/include/net/sock.h b/include/net/sock.h
index 2ef3c3eca47a..8ee90add69d2 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -820,30 +820,40 @@ static inline int sk_backlog_rcv(struct sock *sk, struct sk_buff *skb)
return sk->sk_backlog_rcv(sk, skb);
}
-static inline void sock_rps_record_flow(const struct sock *sk)
+static inline void sock_rps_record_flow_hash(__u32 hash)
{
#ifdef CONFIG_RPS
struct rps_sock_flow_table *sock_flow_table;
rcu_read_lock();
sock_flow_table = rcu_dereference(rps_sock_flow_table);
- rps_record_sock_flow(sock_flow_table, sk->sk_rxhash);
+ rps_record_sock_flow(sock_flow_table, hash);
rcu_read_unlock();
#endif
}
-static inline void sock_rps_reset_flow(const struct sock *sk)
+static inline void sock_rps_reset_flow_hash(__u32 hash)
{
#ifdef CONFIG_RPS
struct rps_sock_flow_table *sock_flow_table;
rcu_read_lock();
sock_flow_table = rcu_dereference(rps_sock_flow_table);
- rps_reset_sock_flow(sock_flow_table, sk->sk_rxhash);
+ rps_reset_sock_flow(sock_flow_table, hash);
rcu_read_unlock();
#endif
}
+static inline void sock_rps_record_flow(const struct sock *sk)
+{
+ sock_rps_record_flow_hash(sk->sk_rxhash);
+}
+
+static inline void sock_rps_reset_flow(const struct sock *sk)
+{
+ sock_rps_reset_flow_hash(sk->sk_rxhash);
+}
+
static inline void sock_rps_save_rxhash(struct sock *sk,
const struct sk_buff *skb)
{