]> git.baikalelectronics.ru Git - kernel.git/commit
net: add a UID to use for ULP socket assignment
authorJohn Fastabend <john.fastabend@gmail.com>
Mon, 5 Feb 2018 18:17:43 +0000 (10:17 -0800)
committerDaniel Borkmann <daniel@iogearbox.net>
Tue, 6 Feb 2018 10:39:31 +0000 (11:39 +0100)
commitde1798708b08441916b7101c21f4315b32a74312
tree3484798eba5ada6ed8bf5452debeadca96688c12
parenta67bd6d5f212e4e7e0862b0f2324a41dc7368e92
net: add a UID to use for ULP socket assignment

Create a UID field and enum that can be used to assign ULPs to
sockets. This saves a set of string comparisons if the ULP id
is known.

For sockmap, which is added in the next patches, a ULP is used to
hook into TCP sockets close state. In this case the ULP being added
is done at map insert time and the ULP is known and done on the kernel
side. In this case the named lookup is not needed. Because we don't
want to expose psock internals to user space socket options a user
visible flag is also added. For TLS this is set for BPF it will be
cleared.

Alos remove pr_notice, user gets an error code back and should check
that rather than rely on logs.

Signed-off-by: John Fastabend <john.fastabend@gmail.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
include/net/tcp.h
net/ipv4/tcp_ulp.c
net/tls/tls_main.c