]> git.baikalelectronics.ru Git - kernel.git/commit
net: init sk_cookie for inet socket
authorYafang Shao <laoar.shao@gmail.com>
Sun, 22 Apr 2018 13:50:04 +0000 (21:50 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 23 Apr 2018 15:56:44 +0000 (11:56 -0400)
commitf5a9a625a98cd93540976e4c4200d58923fcc6dc
treeb7348427ce20d56554deaabba280b190f46d9cb1
parentc00387ace2a2e3aaa0573b9bff67757d8b6ddcfd
net: init sk_cookie for inet socket

With sk_cookie we can identify a socket, that is very helpful for
traceing and statistic, i.e. tcp tracepiont and ebpf.
So we'd better init it by default for inet socket.
When using it, we just need call atomic64_read(&sk->sk_cookie).

Signed-off-by: Yafang Shao <laoar.shao@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/sock_diag.h
net/ipv4/tcp_input.c