diff options
author | Andrew Gallatin <gallatin@FreeBSD.org> | 2019-09-27 19:17:40 +0000 |
---|---|---|
committer | Andrew Gallatin <gallatin@FreeBSD.org> | 2019-09-27 19:17:40 +0000 |
commit | 6554362c664073f963300598abc4e8ae2be6d915 (patch) | |
tree | bc8f12f8eeff3b72514ca4d8c814fb6d2b653926 /sys/net/iflib.c | |
parent | 708cf7eb6c21e7eb670ed4595fda761b43197de7 (diff) | |
download | src-6554362c664073f963300598abc4e8ae2be6d915.tar.gz src-6554362c664073f963300598abc4e8ae2be6d915.zip |
kTLS support for TLS 1.3
TLS 1.3 requires a few changes because 1.3 pretends to be 1.2
with a record type of application data. The "real" record type is
then included at the end of the user-supplied plaintext
data. This required adding a field to the mbuf_ext_pgs struct to
save the record type, and passing the real record type to the
sw_encrypt() ktls backend functions.
Reviewed by: jhb, hselasky
Sponsored by: Netflix
Differential Revision: D21801
Notes
Notes:
svn path=/head/; revision=352814
Diffstat (limited to 'sys/net/iflib.c')
-rw-r--r-- | sys/net/iflib.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/net/iflib.c b/sys/net/iflib.c index 148a8b3e6d90..c0d76b5b94a3 100644 --- a/sys/net/iflib.c +++ b/sys/net/iflib.c @@ -4076,7 +4076,7 @@ iflib_if_qflush(if_t ifp) #define IFCAP_FLAGS (IFCAP_HWCSUM_IPV6 | IFCAP_HWCSUM | IFCAP_LRO | \ IFCAP_TSO | IFCAP_VLAN_HWTAGGING | IFCAP_HWSTATS | \ IFCAP_VLAN_MTU | IFCAP_VLAN_HWFILTER | \ - IFCAP_VLAN_HWTSO | IFCAP_VLAN_HWCSUM) + IFCAP_VLAN_HWTSO | IFCAP_VLAN_HWCSUM | IFCAP_NOMAP) static int iflib_if_ioctl(if_t ifp, u_long command, caddr_t data) @@ -4201,7 +4201,7 @@ iflib_if_ioctl(if_t ifp, u_long command, caddr_t data) oldmask = if_getcapenable(ifp); mask = ifr->ifr_reqcap ^ oldmask; - mask &= ctx->ifc_softc_ctx.isc_capabilities; + mask &= ctx->ifc_softc_ctx.isc_capabilities | IFCAP_NOMAP; setmask = 0; #ifdef TCP_OFFLOAD setmask |= mask & (IFCAP_TOE4|IFCAP_TOE6); @@ -4596,8 +4596,10 @@ iflib_device_register(device_t dev, void *sc, if_shared_ctx_t sctx, if_ctx_t *ct MPASS(scctx->isc_tx_csum_flags); #endif - if_setcapabilities(ifp, scctx->isc_capabilities | IFCAP_HWSTATS); - if_setcapenable(ifp, scctx->isc_capenable | IFCAP_HWSTATS); + if_setcapabilities(ifp, + scctx->isc_capabilities | IFCAP_HWSTATS | IFCAP_NOMAP); + if_setcapenable(ifp, + scctx->isc_capenable | IFCAP_HWSTATS | IFCAP_NOMAP); if (scctx->isc_ntxqsets == 0 || (scctx->isc_ntxqsets_max && scctx->isc_ntxqsets_max < scctx->isc_ntxqsets)) scctx->isc_ntxqsets = scctx->isc_ntxqsets_max; |