aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/ktls.h
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2019-10-08 21:34:06 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2019-10-08 21:34:06 +0000
commit9e14430d463ccd92a3acd5e82676ee3ccad8b0ef (patch)
treea04cfa4e909307db8e5bade6407d50314678e525 /sys/sys/ktls.h
parentfa43c5d49e09c9bab2f2e2dd2e895a81297a20aa (diff)
downloadsrc-9e14430d463ccd92a3acd5e82676ee3ccad8b0ef.tar.gz
src-9e14430d463ccd92a3acd5e82676ee3ccad8b0ef.zip
Add a TOE KTLS mode and a TOE hook for allocating TLS sessions.
This adds the glue to allocate TLS sessions and invokes it from the TLS enable socket option handler. This also adds some counters for active TOE sessions. The TOE KTLS mode is returned by getsockopt(TLSTX_TLS_MODE) when TOE KTLS is in use on a socket, but cannot be set via setsockopt(). To simplify various checks, a TLS session now includes an explicit 'mode' member set to the value returned by TLSTX_TLS_MODE. Various places that used to check 'sw_encrypt' against NULL to determine software vs ifnet (NIC) TLS now check 'mode' instead. Reviewed by: np, gallatin Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D21891
Notes
Notes: svn path=/head/; revision=353328
Diffstat (limited to 'sys/sys/ktls.h')
-rw-r--r--sys/sys/ktls.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/sys/ktls.h b/sys/sys/ktls.h
index 62f694b3daee..f11cd8c287ee 100644
--- a/sys/sys/ktls.h
+++ b/sys/sys/ktls.h
@@ -156,6 +156,7 @@ struct ktls_session {
struct tls_session_params params;
u_int wq_index;
volatile u_int refcount;
+ int mode;
struct task reset_tag_task;
struct inpcb *inp;