]> 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)
commit0ae7f6ef6012e9fc2eae3fd3ed9359dc4edfbeb0
tree3484798eba5ada6ed8bf5452debeadca96688c12
parentf542f5dbba200a7dcbc7f06d494c19b14a3a6248
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