summaryrefslogtreecommitdiff
path: root/include/uapi/linux/tls.h
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2022-07-06 12:56:35 +0100
committerDavid S. Miller <davem@davemloft.net>2022-07-06 12:56:35 +0100
commit4874fb9484be4cee78d8b3b0f0209cd16e5ae35d (patch)
treec3759309c9c88b17a1f87d0bcbb4b939491e2ef7 /include/uapi/linux/tls.h
parent2ef8e39f58f08589ab035223c2687830c0eba30f (diff)
parentc46b01839f7aad5889e23505bbfbeb5f4d7fde8e (diff)
Merge branch 'tls-rx-nopad-and-backlog-flushing'
Jakub Kicinski says: ==================== tls: rx: nopad and backlog flushing This small series contains the two changes I've been working towards in the previous ~50 patches a couple of months ago. The first major change is the optional "nopad" optimization. Currently TLS 1.3 Rx performs quite poorly because it does not support the "zero-copy" or rather direct decrypt to a user space buffer. Because of TLS 1.3 record padding we don't know if a record contains data or a control message until we decrypt it. Most records will contain data, tho, so the optimization is to try the decryption hoping its data and retry if it wasn't. The performance gain from doing that is significant (~40%) but if I'm completely honest the major reason is that we call skb_cow_data() on the non-"zc" path. The next series will remove the CoW, dropping the gain to only ~10%. The second change is to flush the backlog every 128kB. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/uapi/linux/tls.h')
-rw-r--r--include/uapi/linux/tls.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/uapi/linux/tls.h b/include/uapi/linux/tls.h
index bb8f80812b0b..f1157d8f4acd 100644
--- a/include/uapi/linux/tls.h
+++ b/include/uapi/linux/tls.h
@@ -40,6 +40,7 @@
#define TLS_TX 1 /* Set transmit parameters */
#define TLS_RX 2 /* Set receive parameters */
#define TLS_TX_ZEROCOPY_RO 3 /* TX zerocopy (only sendfile now) */
+#define TLS_RX_EXPECT_NO_PAD 4 /* Attempt opportunistic zero-copy */
/* Supported versions */
#define TLS_VERSION_MINOR(ver) ((ver) & 0xFF)
@@ -162,6 +163,7 @@ enum {
TLS_INFO_TXCONF,
TLS_INFO_RXCONF,
TLS_INFO_ZC_RO_TX,
+ TLS_INFO_RX_NO_PAD,
__TLS_INFO_MAX,
};
#define TLS_INFO_MAX (__TLS_INFO_MAX - 1)