From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D399C37A4B9; Tue, 9 Jun 2026 20:12:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781035949; cv=none; b=F4i6VGCdDyg6soqgrtXMunmesQXWSSnbfWyMehMhUsWyURIywd89D1NlS0MlUOUGak5WKuGUXBHsv3CIq5IxiwzcUx0MG/Nr7l1BUrfrJDnvlhq8DMCP9vB5cY+uJZKfPKywMbkXJToaejRNT/pFLyzHGtscqpxrdmuRr6o2xkU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781035949; c=relaxed/simple; bh=NFiqVKfJAWu9Jxe63lmkVmmow46zdGwaFGVjKVYfUOM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=hF/mWkTyETRs5kfqjl8+bOmS6N5qJryOCIpRrHWkM74uL6HI7wLFlFWD3G0oo5Yp2ehdqzkQbaAvOPm0rYNrzrwN4YPtcXqi3sPoljp4lak14IjwDpLRwOtd30dBm7G8tU+VmFrBEui5FWNO8r5NVJTfpiqcd5HTJ7ZhIDtPGFo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=B7fNvFMP; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="B7fNvFMP" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 343DF1F0089D; Tue, 9 Jun 2026 20:12:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1781035948; bh=xlaHXL/dwpOmq1QcMg3P+QxgnKAOp4bWBq2VchZKBLQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=B7fNvFMPpQ0ZS3x6PuRlyYTQcOpBKP9eiUnUIcq37TpV4W3A12htxbwoazCGLnkap vLxTcuvuLmhtzlmA2Dl3HWZ8fsg32QOoqdrytsu/2FmvOsuPIcBDBZgW7SA1DJc/jZ Yud8ko1ycD2xQzMCS7UttNvmzj1arjIh9iNQ9xoOb73tLng1p71Dc5keWKEtnRF0mC VJ6afJPHH/926Apeqj0yJwYmY3CUhOa+xNjLX/zkDKV7BpQNEnenjfiBJorimOmzks WLTxjiiYymS6fRvd91AbmMibQ5fHO0jrLPD/jRRigqKX3uaV/W0qIUiEWRUnBZk0Hf m9XY8W6CaNjPg== From: Jakub Kicinski To: davem@davemloft.net Cc: netdev@vger.kernel.org, edumazet@google.com, pabeni@redhat.com, andrew+netdev@lunn.ch, horms@kernel.org, corbet@lwn.net, linux-doc@vger.kernel.org, bpf@vger.kernel.org, Jakub Kicinski , john.fastabend@gmail.com, sd@queasysnail.net, skhan@linuxfoundation.org Subject: [PATCH net-next 2/3] docs: net: tls-offload: document tls_dev_del, tls_dev_resync, and rekey Date: Tue, 9 Jun 2026 13:12:23 -0700 Message-ID: <20260609201224.1191391-3-kuba@kernel.org> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260609201224.1191391-1-kuba@kernel.org> References: <20260609201224.1191391-1-kuba@kernel.org> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Fill in some gaps in the TLS offload doc: - describe the tls_dev_del and tls_dev_resync callbacks - add a mention of rekeying being out of scope for now Signed-off-by: Jakub Kicinski --- CC: john.fastabend@gmail.com CC: sd@queasysnail.net CC: corbet@lwn.net CC: skhan@linuxfoundation.org CC: linux-doc@vger.kernel.org --- Documentation/networking/tls-offload.rst | 29 ++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/Documentation/networking/tls-offload.rst b/Documentation/networking/tls-offload.rst index c173f537bf4d..a41f46885e8c 100644 --- a/Documentation/networking/tls-offload.rst +++ b/Documentation/networking/tls-offload.rst @@ -104,6 +104,29 @@ at the end of kernel structures (see :c:member:`driver_state` members in ``include/net/tls.h``) to avoid additional allocations and pointer dereferences. +When the offloaded connection is destroyed the core calls +the :c:member:`tls_dev_del` callback so the driver can release per-direction +state: + +.. code-block:: c + + void (*tls_dev_del)(struct net_device *netdev, + struct tls_context *ctx, + enum tls_offload_ctx_dir direction); + +``tls_dev_del`` is mandatory whenever ``tls_dev_add`` is provided. + +The third TLS device callback is :c:member:`tls_dev_resync`, called by the core +to synchronize the TCP stream with the record boundaries: + +.. code-block:: c + + int (*tls_dev_resync)(struct net_device *netdev, + struct sock *sk, u32 seq, u8 *rcd_sn, + enum tls_offload_ctx_dir direction); + +See the `Resync handling`_ section for details. + TX -- @@ -381,6 +404,12 @@ synchronization with an exponential back off (first after 2 encrypted records, then after 4 records, after 8, after 16... up until every 128 records). +Rekey +===== + +Offload does not currently support TLS 1.3, therefore key rotation +is not a concern for offloaded connections at this point. + Error handling ============== -- 2.54.0