aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/sock_diag.h
diff options
context:
space:
mode:
authorYafang Shao <laoar.shao@gmail.com>2018-04-24 23:07:45 +0800
committerDavid S. Miller <davem@davemloft.net>2018-04-24 11:15:32 -0400
commita06ac0d67d9fda7c255476c6391032319030045d (patch)
tree8ed0839695d99367f1e75dc1968c422b91a340c6 /include/linux/sock_diag.h
parentMerge branch 'net-DIM-tx' (diff)
downloadlinux-dev-a06ac0d67d9fda7c255476c6391032319030045d.tar.xz
linux-dev-a06ac0d67d9fda7c255476c6391032319030045d.zip
Revert "net: init sk_cookie for inet socket"
This reverts commit <c6849a3ac17e> ("net: init sk_cookie for inet socket") Per discussion with Eric, when update sock_net(sk)->cookie_gen, the whole cache cache line will be invalidated, as this cache line is shared with all cpus, that may cause great performace hit. Bellow is the data form Eric. "Performance is reduced from ~5 Mpps to ~3.8 Mpps with 16 RX queues on my host" when running synflood test. Have to revert it to prevent from cache line false sharing. Signed-off-by: Yafang Shao <laoar.shao@gmail.com> Reviewed-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r--include/linux/sock_diag.h9
1 files changed, 0 insertions, 9 deletions
diff --git a/include/linux/sock_diag.h b/include/linux/sock_diag.h
index 5c916e6dff36..15fe980a27ea 100644
--- a/include/linux/sock_diag.h
+++ b/include/linux/sock_diag.h
@@ -25,15 +25,6 @@ void sock_diag_unregister(const struct sock_diag_handler *h);
void sock_diag_register_inet_compat(int (*fn)(struct sk_buff *skb, struct nlmsghdr *nlh));
void sock_diag_unregister_inet_compat(int (*fn)(struct sk_buff *skb, struct nlmsghdr *nlh));
-static inline
-void sock_init_cookie(struct sock *sk)
-{
- u64 res;
-
- res = atomic64_inc_return(&sock_net(sk)->cookie_gen);
- atomic64_set(&sk->sk_cookie, res);
-}
-
u64 sock_gen_cookie(struct sock *sk);
int sock_diag_check_cookie(struct sock *sk, const __u32 *cookie);
void sock_diag_save_cookie(struct sock *sk, __u32 *cookie);