diff options
author | 2017-04-08 08:07:02 -0700 | |
---|---|---|
committer | 2017-04-08 08:15:22 -0700 | |
commit | 7cb164ef5b47b2e947d8361f6f2cd4823ff01557 (patch) | |
tree | 566ff6609ee3fc6ff216b9c18d3118dc50b3bf30 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | Merge tag 'mlx5-updates-2017-04-16' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux (diff) | |
parent | Sample program using SO_COOKIE (diff) | |
download | wireguard-linux-7cb164ef5b47b2e947d8361f6f2cd4823ff01557.tar.xz wireguard-linux-7cb164ef5b47b2e947d8361f6f2cd4823ff01557.zip |
Merge branch 'net-SO_COOKIE'
Chenbo Feng says:
====================
New getsockopt option to retrieve socket cookie
In the current kernel socket cookie implementation, there is no simple
and direct way to retrieve the socket cookie based on file descriptor. A
process mat need to get it from sock fd if it want to correlate with
sock_diag output or use a bpf map with new socket cookie function.
If userspace wants to receive the socket cookie for a given socket fd,
it must send a SOCK_DIAG_BY_FAMILY dump request and look for the 5-tuple.
This is slow and can be ambiguous in the case of sockets that have the
same 5-tuple (e.g., tproxy / transparent sockets, SO_REUSEPORT sockets,
etc.).
As shown in the example program. The xt_eBPF program is using socket cookie
to record the network traffics statistics and with the socket cookie
retrieved by getsockopt. The program can directly access to a specific
socket data without scanning the whole bpf map.
====================
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions