linux-doc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net] docs: tls: document the TLS_TX_ZEROCOPY_RO
@ 2022-06-10 18:02 Jakub Kicinski
  2022-06-14  6:39 ` Maxim Mikityanskiy
  2022-06-14 10:10 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Jakub Kicinski @ 2022-06-10 18:02 UTC (permalink / raw)
  To: davem; +Cc: netdev, maximmi, Jakub Kicinski, corbet, linux-doc

Add missing documentation for the TLS_TX_ZEROCOPY_RO opt-in.

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
CC: corbet@lwn.net
CC: linux-doc@vger.kernel.org
---
 Documentation/networking/tls.rst | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/Documentation/networking/tls.rst b/Documentation/networking/tls.rst
index 8cb2cd4e2a80..be8e10c14b05 100644
--- a/Documentation/networking/tls.rst
+++ b/Documentation/networking/tls.rst
@@ -214,6 +214,31 @@ of calling send directly after a handshake using gnutls.
 Since it doesn't implement a full record layer, control
 messages are not supported.
 
+Optional optimizations
+----------------------
+
+There are certain condition-specific optimizations the TLS ULP can make,
+if requested. Those optimizations are either not universally beneficial
+or may impact correctness, hence they require an opt-in.
+All options are set per-socket using setsockopt(), and their
+state can be checked using getsockopt() and via socket diag (``ss``).
+
+TLS_TX_ZEROCOPY_RO
+~~~~~~~~~~~~~~~~~~
+
+For device offload only. Allow sendfile() data to be transmitted directly
+to the NIC without making an in-kernel copy. This allows true zero-copy
+behavior when device offload is enabled.
+
+The application must make sure that the data is not modified between being
+submitted and transmission completing. In other words this is mostly
+applicable if the data sent on a socket via sendfile() is read-only.
+
+Modifying the data may result in different versions of the data being used
+for the original TCP transmission and TCP retransmissions. To the receiver
+this will look like TLS records had been tampered with and will result
+in record authentication failures.
+
 Statistics
 ==========
 
-- 
2.36.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH net] docs: tls: document the TLS_TX_ZEROCOPY_RO
  2022-06-10 18:02 [PATCH net] docs: tls: document the TLS_TX_ZEROCOPY_RO Jakub Kicinski
@ 2022-06-14  6:39 ` Maxim Mikityanskiy
  2022-06-14 10:10 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: Maxim Mikityanskiy @ 2022-06-14  6:39 UTC (permalink / raw)
  To: Jakub Kicinski, davem; +Cc: netdev, corbet, linux-doc

On 2022-06-10 21:02, Jakub Kicinski wrote:
> Add missing documentation for the TLS_TX_ZEROCOPY_RO opt-in.
> 
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
> ---
> CC: corbet@lwn.net
> CC: linux-doc@vger.kernel.org
> ---
>   Documentation/networking/tls.rst | 25 +++++++++++++++++++++++++
>   1 file changed, 25 insertions(+)
> 
> diff --git a/Documentation/networking/tls.rst b/Documentation/networking/tls.rst
> index 8cb2cd4e2a80..be8e10c14b05 100644
> --- a/Documentation/networking/tls.rst
> +++ b/Documentation/networking/tls.rst
> @@ -214,6 +214,31 @@ of calling send directly after a handshake using gnutls.
>   Since it doesn't implement a full record layer, control
>   messages are not supported.
>   
> +Optional optimizations
> +----------------------
> +
> +There are certain condition-specific optimizations the TLS ULP can make,
> +if requested. Those optimizations are either not universally beneficial
> +or may impact correctness, hence they require an opt-in.
> +All options are set per-socket using setsockopt(), and their
> +state can be checked using getsockopt() and via socket diag (``ss``).
> +
> +TLS_TX_ZEROCOPY_RO
> +~~~~~~~~~~~~~~~~~~
> +
> +For device offload only. Allow sendfile() data to be transmitted directly
> +to the NIC without making an in-kernel copy. This allows true zero-copy
> +behavior when device offload is enabled.
> +
> +The application must make sure that the data is not modified between being
> +submitted and transmission completing. In other words this is mostly
> +applicable if the data sent on a socket via sendfile() is read-only.
> +
> +Modifying the data may result in different versions of the data being used
> +for the original TCP transmission and TCP retransmissions. To the receiver
> +this will look like TLS records had been tampered with and will result
> +in record authentication failures.
> +
>   Statistics
>   ==========
>   

Acked-by: Maxim Mikityanskiy <maximmi@nvidia.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH net] docs: tls: document the TLS_TX_ZEROCOPY_RO
  2022-06-10 18:02 [PATCH net] docs: tls: document the TLS_TX_ZEROCOPY_RO Jakub Kicinski
  2022-06-14  6:39 ` Maxim Mikityanskiy
@ 2022-06-14 10:10 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-06-14 10:10 UTC (permalink / raw)
  To: Jakub Kicinski; +Cc: davem, netdev, maximmi, corbet, linux-doc

Hello:

This patch was applied to netdev/net-next.git (master)
by Paolo Abeni <pabeni@redhat.com>:

On Fri, 10 Jun 2022 11:02:12 -0700 you wrote:
> Add missing documentation for the TLS_TX_ZEROCOPY_RO opt-in.
> 
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
> ---
> CC: corbet@lwn.net
> CC: linux-doc@vger.kernel.org
> 
> [...]

Here is the summary with links:
  - [net] docs: tls: document the TLS_TX_ZEROCOPY_RO
    https://git.kernel.org/netdev/net-next/c/7e5e8ec7dbd8

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-06-14 10:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-06-10 18:02 [PATCH net] docs: tls: document the TLS_TX_ZEROCOPY_RO Jakub Kicinski
2022-06-14  6:39 ` Maxim Mikityanskiy
2022-06-14 10:10 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).