net: remove tls_toe
Subsystems (9)
Sabrina Dubroca
maintainerv2 cover net: remove tls_toe
This series removes the tls_toe feature, its single user (chtls), and cleans up the EXPORT_SYMBOL()s that no other module requires.
Driver changes only compile-tested.
v2:
- fix small issues in the docs clean up
- also remove NETIF_F_HW_TLS_RECORD (Sashiko)
v1: https://lore.kernel.org/netdev/[email protected]/
Sabrina Dubroca (2):
tls: remove tls_toe and the related driver
net: remove some unused EXPORT_SYMBOL()s
Documentation/networking/tls-offload.rst | 7 +- arch/s390/configs/debug_defconfig | 1 - arch/s390/configs/defconfig | 1 - .../net/ethernet/chelsio/cxgb4/cxgb4_main.c | 3 +- .../ethernet/chelsio/inline_crypto/Kconfig | 12 - .../ethernet/chelsio/inline_crypto/Makefile | 1 - .../chelsio/inline_crypto/chtls/Makefile | 6 - .../chelsio/inline_crypto/chtls/chtls.h | 584 ----- .../chelsio/inline_crypto/chtls/chtls_cm.c | 2336 ----------------- .../chelsio/inline_crypto/chtls/chtls_cm.h | 218 -- .../chelsio/inline_crypto/chtls/chtls_hw.c | 462 ---- .../chelsio/inline_crypto/chtls/chtls_io.c | 1836 ------------- .../chelsio/inline_crypto/chtls/chtls_main.c | 642 ----- include/linux/netdev_features.h | 3 +- include/net/tls.h | 1 - include/net/tls_toe.h | 77 - include/uapi/linux/tls.h | 2 +- net/core/stream.c | 1 - net/ethtool/common.c | 1 - net/ipv4/inet_connection_sock.c | 6 - net/ipv4/inet_hashtables.c | 2 - net/ipv4/tcp.c | 4 - net/ipv4/tcp_ipv4.c | 1 - net/ipv4/tcp_minisocks.c | 2 - net/tls/Kconfig | 10 - net/tls/Makefile | 1 - net/tls/tls_main.c | 17 - net/tls/tls_toe.c | 141 - 28 files changed, 4 insertions(+), 6374 deletions(-) delete mode 100644 drivers/net/ethernet/chelsio/inline_crypto/chtls/Makefile delete mode 100644 drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls.h delete mode 100644 drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_cm.c delete mode 100644 drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_cm.h delete mode 100644 drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_hw.c delete mode 100644 drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_io.c delete mode 100644 drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_main.c delete mode 100644 include/net/tls_toe.h delete mode 100644 net/tls/tls_toe.c
Signature · 1 line
2.54.0
Sabrina Dubroca
maintainerPATCH v2 1/2 tls: remove tls_toe and the related driver
The tls_toe feature and its single user (chelsio chtls) have been unmaintained for multiple years. It also hooks into the core of the TCP implementation, and bypasses most of the networking stack.
--- Documentation/networking/tls-offload.rst | 7 +- arch/s390/configs/debug_defconfig | 1 - arch/s390/configs/defconfig | 1 - .../net/ethernet/chelsio/cxgb4/cxgb4_main.c | 3 +- .../ethernet/chelsio/inline_crypto/Kconfig | 12 - .../ethernet/chelsio/inline_crypto/Makefile | 1 - .../chelsio/inline_crypto/chtls/Makefile | 6 - .../chelsio/inline_crypto/chtls/chtls.h | 584 ----- .../chelsio/inline_crypto/chtls/chtls_cm.c | 2336 ----------------- .../chelsio/inline_crypto/chtls/chtls_cm.h | 218 -- .../chelsio/inline_crypto/chtls/chtls_hw.c | 462 ---- .../chelsio/inline_crypto/chtls/chtls_io.c | 1836 ------------- .../chelsio/inline_crypto/chtls/chtls_main.c | 642 ----- include/linux/netdev_features.h | 3 +- include/net/tls.h | 1 - include/net/tls_toe.h | 77 - include/uapi/linux/tls.h | 2 +- net/ethtool/common.c | 1 - net/tls/Kconfig | 10 - net/tls/Makefile | 1 - net/tls/tls_main.c | 17 - net/tls/tls_toe.c | 141 - 22 files changed, 4 insertions(+), 6358 deletions(-) delete mode 100644 drivers/net/ethernet/chelsio/inline_crypto/chtls/Makefile delete mode 100644 drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls.h delete mode 100644 drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_cm.c delete mode 100644 drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_cm.h delete mode 100644 drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_hw.c delete mode 100644 drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_io.c delete mode 100644 drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_main.c delete mode 100644 include/net/tls_toe.h delete mode 100644 net/tls/tls_toe.c
Documentation/networking/tls-offload.rst +1 -6
@@ -13,7 +13,7 @@ Layer Protocol (ULP) and install the cryptographic connection state. For details regarding the user-facing interface refer to the TLS documentation in :ref:`Documentation/networking/tls.rst <kernel_tls>`. -``ktls`` can operate in three modes: +``ktls`` can operate in two modes: * Software crypto mode (``TLS_SW``) - CPU handles the cryptography. In most basic cases only crypto operations synchronous with the CPU
@@ -26,11 +26,6 @@ documentation in :ref:`Documentation/networking/tls.rst <kernel_tls>`. This mode integrates best with the kernel stack and is described in detail in the remaining part of this document (``ethtool`` flags ``tls-hw-tx-offload`` and ``tls-hw-rx-offload``). - * Full TCP NIC offload mode (``TLS_HW_RECORD``) - mode of operation where - NIC driver and firmware replace the kernel networking stack - with its own TCP handling, it is not usable in production environments - making use of the Linux networking stack for example any firewalling - abilities or QoS and packet scheduling (``ethtool`` flag ``tls-hw-record``). The operation mode is selected automatically based on device configuration, offload opt-in or opt-out on per-connection basis is not currently supported.
arch/s390/configs/debug_defconfig +0 -1
@@ -125,7 +125,6 @@ CONFIG_UNIX=y CONFIG_UNIX_DIAG=m CONFIG_TLS=m CONFIG_TLS_DEVICE=y -CONFIG_TLS_TOE=y CONFIG_XFRM_USER=m CONFIG_NET_KEY=m CONFIG_SMC=m
arch/s390/configs/defconfig +0 -1
@@ -116,7 +116,6 @@ CONFIG_UNIX=y CONFIG_UNIX_DIAG=m CONFIG_TLS=m CONFIG_TLS_DEVICE=y -CONFIG_TLS_TOE=y CONFIG_XFRM_USER=m CONFIG_NET_KEY=m CONFIG_SMC=m
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c +1 -2
@@ -6795,8 +6795,7 @@ static int init_one(struct pci_dev *pdev, const struct pci_device_id *ent)NETIF_F_TSO |NETIF_F_TSO6 ; netdev->hw_features |=NETIF_F_GSO_UDP_TUNNEL | -NETIF_F_GSO_UDP_TUNNEL_CSUM | -NETIF_F_HW_TLS_RECORD ; +NETIF_F_GSO_UDP_TUNNEL_CSUM ;if (adapter->rawf_cnt) netdev->udp_tunnel_nic_info = &cxgb_udp_tunnels;
drivers/net/ethernet/chelsio/inline_crypto/Kconfig +0 -12
@@ -13,18 +13,6 @@ config CHELSIO_INLINE_CRYPTO if CHELSIO_INLINE_CRYPTO -config CRYPTO_DEV_CHELSIO_TLS - tristate "Chelsio Crypto Inline TLS Driver" - depends on CHELSIO_T4 - depends on TLS - depends on TLS_TOE - help - Support Chelsio Inline TLS with Chelsio crypto accelerator. - Enable inline TLS support for Tx and Rx. - - To compile this driver as a module, choose M here: the module - will be called chtls. - config CHELSIO_IPSEC_INLINE tristate "Chelsio IPSec XFRM Tx crypto offload" depends on CHELSIO_T4
drivers/net/ethernet/chelsio/inline_crypto/Makefile +0 -1
@@ -1,4 +1,3 @@ # SPDX-License-Identifier: GPL-2.0-only -obj-$(CONFIG_CRYPTO_DEV_CHELSIO_TLS) += chtls/ obj-$(CONFIG_CHELSIO_IPSEC_INLINE) += ch_ipsec/ obj-$(CONFIG_CHELSIO_TLS_DEVICE) += ch_ktls/
drivers/net/ethernet/chelsio/inline_crypto/chtls/Makefile deleted +0 -6
@@ -1,6 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0-only -ccflags-y := -I $(srctree)/drivers/net/ethernet/chelsio/cxgb4 \ - -I $(srctree)/drivers/crypto/chelsio - -obj-$(CONFIG_CRYPTO_DEV_CHELSIO_TLS) += chtls.o -chtls-objs := chtls_main.o chtls_cm.o chtls_io.o chtls_hw.o
drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls.h deleted +0 -584
584 lines not on this page · raw message
drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_cm.c deleted +0 -2336
2,336 lines not on this page · raw message
drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_cm.h deleted +0 -218
10 lines not on this page · raw message
drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_hw.c deleted +0 -462
462 lines not on this page · raw message
drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_io.c deleted +0 -1836
1,836 lines not on this page · raw message
drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_main.c deleted +0 -642
642 lines not on this page · raw message
include/net/tls_toe.h deleted +0 -77
77 lines not on this page · raw message
net/tls/tls_toe.c deleted +0 -141
141 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.54.0
Part of the diff is not shown here. View the raw message.
Re: [PATCH net-next v2 1/2] tls: remove tls_toe and the related driver
Quoted 7 lines · Sabrina Dubroca
The
tls_toefeature and its single user (chelsio chtls) have been unmaintained for multiple years. It also hooks into the core of the TCP implementation, and bypasses most of the networking stack.Signed-off-by Sabrina Dubroca <[email protected]>---
[email protected]
AI reviewRe: [PATCH net-next v2 1/2] tls: remove tls_toe and the related driver
In reply to Sabrina DubrocaThank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Medium] The cxgb4 driver continues to reserve MSI-X vectors and hardware queues for inline TLS offload…
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] The cxgb4 driver continues to reserve MSI-X vectors and hardware queues for inline TLS offload even though the chtls driver has been removed. --
commit fe56f0d87d512a0eea1f91c98873fd22553c6faf
Author: Sabrina Dubroca <[email protected]>
tls: remove tls_toe and the related driver
This commit removes the tls_toe feature and its single user, the chelsio chtls driver. These components have been unmaintained and bypass most of the networking stack.
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c static int init_one(struct pci_dev *pdev, const struct pci_device_id *ent) · line 6798
Quoted 11 lines
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c +1
-2@@ -6795,8 +6795,7 @@ static int init_one(struct pci_dev *pdev, const struct pci_device_id *ent)NETIF_F_TSO |NETIF_F_TSO6 ; netdev->hw_features |=NETIF_F_GSO_UDP_TUNNEL | -NETIF_F_GSO_UDP_TUNNEL_CSUM | -NETIF_F_HW_TLS_RECORD ; +NETIF_F_GSO_UDP_TUNNEL_CSUM ;
[Severity: Medium]
Since the chtls driver is being removed, should we also remove the FW_CAPS_CONFIG_TLS_INLINE capability check in get_caps() within the same file?
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c:get_caps() {
...
if (ntohs(caps_cmd.cryptocaps) &
FW_CAPS_CONFIG_TLS_INLINE) {
params[0] = FW_PARAM_PFVF(TLS_START);
params[1] = FW_PARAM_PFVF(TLS_END);
ret = t4_query_params(adap, adap->mbox, adap->pf, 0,
2, params, val);
if (ret < 0)
goto bye;
adap->vres.key.start = val[0];
adap->vres.key.size = val[1] - val[0] + 1;
adap->num_uld += 1;
}
...
}Leaving this check in place causes the driver to increment adap->num_uld when the firmware advertises TLS inline offload. This unconditionally reserves MSI-X vectors and offload queues in cfg_queues() for a ULD that no longer exists in the kernel.
Does this waste hardware queues and MSI-X vectors, potentially reducing the number of queues available for the main Ethernet interface?
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
Sabrina Dubroca
maintainerPATCH v2 2/2 net: remove some unused EXPORT_SYMBOL()s
In reply to Sabrina Dubrocachtls was using a lot of symbols that no other module requires. Remove those EXPORT_SYMBOL()s.
--- net/core/stream.c | 1 - net/ipv4/inet_connection_sock.c | 6 ------ net/ipv4/inet_hashtables.c | 2 -- net/ipv4/tcp.c | 4 ---- net/ipv4/tcp_ipv4.c | 1 - net/ipv4/tcp_minisocks.c | 2 -- 6 files changed, 16 deletions(-)
net/core/stream.c +0 -1
@@ -112,7 +112,6 @@ void sk_stream_wait_close(struct sock *sk, long timeout)remove_wait_queue (sk_sleep (sk), &wait); } } -EXPORT_SYMBOL (sk_stream_wait_close);/** * sk_stream_wait_memory - Wait for more memory for a socket
net/ipv4/inet_connection_sock.c +0 -6
@@ -824,7 +824,6 @@ struct dst_entry *inet_csk_route_child_sock(const struct sock *sk,__IP_INC_STATS (net,IPSTATS_MIB_OUTNOROUTES );return NULL ; } -EXPORT_SYMBOL_GPL (inet_csk_route_child_sock);/* Decide when to expire the request and when to resend SYN-ACK */ static void syn_ack_recalc(struct request_sock *req,
@@ -901,7 +900,6 @@ struct request_sock *inet_reqsk_alloc(const struct request_sock_ops *ops,return req; } -EXPORT_SYMBOL (inet_reqsk_alloc);void __reqsk_free (struct request_sock *req) {
@@ -911,7 +909,6 @@ void __reqsk_free(struct request_sock *req)kfree (req->saved_syn);kmem_cache_free (req->rsk_ops->slab, req); } -EXPORT_SYMBOL_GPL (__reqsk_free);static struct request_sock *inet_reqsk_clone (struct request_sock *req,struct sock *sk)
@@ -1280,7 +1277,6 @@ void inet_csk_destroy_sock(struct sock *sk)sock_put (sk); } -EXPORT_SYMBOL (inet_csk_destroy_sock);void inet_csk_prepare_for_destroy_sock (struct sock *sk) {
@@ -1301,7 +1297,6 @@ void inet_csk_prepare_forced_close(struct sock *sk)inet_csk_prepare_for_destroy_sock (sk);inet_sk (sk)->inet_num =0 ; } -EXPORT_SYMBOL (inet_csk_prepare_forced_close);static int inet_ulp_can_listen (const struct sock *sk) {
@@ -1405,7 +1400,6 @@ struct sock *inet_csk_reqsk_queue_add(struct sock *sk,spin_unlock (&queue->rskq_lock);return child; } -EXPORT_SYMBOL (inet_csk_reqsk_queue_add);struct sock *inet_csk_complete_hashdance (struct sock *sk,struct sock *child,struct request_sock *req,bool own_req)
net/ipv4/inet_hashtables.c +0 -2
@@ -252,7 +252,6 @@ void inet_put_port(struct sock *sk)__inet_put_port (sk);local_bh_enable (); } -EXPORT_SYMBOL (inet_put_port);int __inet_inherit_port (const struct sock *sk,struct sock *child) {
@@ -331,7 +330,6 @@ int __inet_inherit_port(const struct sock *sk, struct sock *child)spin_unlock (&head->lock);return -ENOMEM ; } -EXPORT_SYMBOL_GPL (__inet_inherit_port);static struct inet_listen_hashbucket *inet_lhash2_bucket_sk (struct inet_hashinfo *h,struct sock *sk)
net/ipv4/tcp.c +0 -4
@@ -297,7 +297,6 @@ enum { }; DEFINE_PER_CPU(unsigned int, tcp_orphan_count); -EXPORT_PER_CPU_SYMBOL_GPL (tcp_orphan_count);long sysctl_tcp_mem[3 ]__read_mostly ;
@@ -3027,7 +3026,6 @@ void tcp_set_state(struct sock *sk, int state)*/ inet_sk_state_store (sk, state); } -EXPORT_SYMBOL_GPL (tcp_set_state);/* * State processing on a close. This implements the state shift for
@@ -3506,7 +3504,6 @@ int tcp_disconnect(struct sock *sk, int flags)sk_error_report (sk);return 0 ; } -EXPORT_SYMBOL (tcp_disconnect);static inline bool tcp_can_repair_sock (const struct sock *sk) {
@@ -5104,7 +5101,6 @@ void tcp_done(struct sock *sk)else inet_csk_destroy_sock (sk); } -EXPORT_SYMBOL_GPL (tcp_done);int tcp_abort (struct sock *sk,int err) {
net/ipv4/tcp_ipv4.c +0 -1
@@ -1894,7 +1894,6 @@ int tcp_v4_do_rcv(struct sock *sk, struct sk_buff *skb)TCP_INC_STATS (sock_net (sk),TCP_MIB_INERRS ); goto discard; } -EXPORT_SYMBOL (tcp_v4_do_rcv);enum skb_drop_reason tcp_add_backlog (struct sock *sk,struct sk_buff *skb) {
net/ipv4/tcp_minisocks.c +0 -2
@@ -392,7 +392,6 @@ void tcp_time_wait(struct sock *sk, int state, int timeo)tcp_update_metrics (sk);tcp_done (sk); } -EXPORT_SYMBOL (tcp_time_wait);void tcp_twsk_destructor (struct sock *sk) {
@@ -670,7 +669,6 @@ struct sock *tcp_create_openreq_child(const struct sock *sk,return newsk; } -EXPORT_SYMBOL (tcp_create_openreq_child);/* * Process an incoming packet for SYN_RECV sockets represented as a
Signature · 1 line
2.54.0
Re: [PATCH net-next v2 2/2] net: remove some unused EXPORT_SYMBOL()s
Quoted 5 lines · Sabrina Dubroca
chtls was using a lot of symbols that no other module requires. Remove those EXPORT_SYMBOL()s.
Signed-off-by Sabrina Dubroca <[email protected]>
This series was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This series was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Quoted 10 lines · On Thu, 11 Jun 2026 12:21:32 +0200 you wrote:
This series removes the
tls_toefeature, its single user (chtls), and cleans up the EXPORT_SYMBOL()s that no other module requires.Driver changes only compile-tested.
v2:
- fix small issues in the docs clean up
- also removeNETIF_F_HW_TLS_RECORD(Sashiko)[...]
Here is the summary with links:
- [net-next,v2,1/2] tls: remove tls_toe and the related driver
https://git.kernel.org/netdev/net-next/c/cdae65fc43f2 - [net-next,v2,2/2] net: remove some unused EXPORT_SYMBOL()s https://git.kernel.org/netdev/net-next/c/f51a442dc15a
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html