diff options
author | John Fastabend <john.fastabend@gmail.com> | 2018-02-05 21:17:43 +0300 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2018-02-06 13:39:31 +0300 |
commit | b11a632c442eef34a0afeba61fab923241f317e9 (patch) | |
tree | 3484798eba5ada6ed8bf5452debeadca96688c12 /net/tls | |
parent | 7b4eb53d95c30bdc55c44647c6968f24227fd1ba (diff) | |
download | linux-b11a632c442eef34a0afeba61fab923241f317e9.tar.xz |
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>
Diffstat (limited to 'net/tls')
-rw-r--r-- | net/tls/tls_main.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/tls/tls_main.c b/net/tls/tls_main.c index 736719c8314e..b0d5fcea47e7 100644 --- a/net/tls/tls_main.c +++ b/net/tls/tls_main.c @@ -484,6 +484,8 @@ out: static struct tcp_ulp_ops tcp_tls_ulp_ops __read_mostly = { .name = "tls", + .uid = TCP_ULP_TLS, + .user_visible = true, .owner = THIS_MODULE, .init = tls_init, }; |