linux/Documentation/networking
Wilfred Mallawa 82cb5be6ad net/tls: support setting the maximum payload size
During a handshake, an endpoint may specify a maximum record size limit.
Currently, the kernel defaults to TLS_MAX_PAYLOAD_SIZE (16KB) for the
maximum record size. Meaning that, the outgoing records from the kernel
can exceed a lower size negotiated during the handshake. In such a case,
the TLS endpoint must send a fatal "record_overflow" alert [1], and
thus the record is discarded.

Upcoming Western Digital NVMe-TCP hardware controllers implement TLS
support. For these devices, supporting TLS record size negotiation is
necessary because the maximum TLS record size supported by the controller
is less than the default 16KB currently used by the kernel.

Currently, there is no way to inform the kernel of such a limit. This patch
adds support to a new setsockopt() option `TLS_TX_MAX_PAYLOAD_LEN` that
allows for setting the maximum plaintext fragment size. Once set, outgoing
records are no larger than the size specified. This option can be used to
specify the record size limit.

[1] https://www.rfc-editor.org/rfc/rfc8449

Signed-off-by: Wilfred Mallawa <wilfred.mallawa@wdc.com>
Reviewed-by: Sabrina Dubroca <sd@queasysnail.net>
Link: https://patch.msgid.link/20251022001937.20155-1-wilfred.opensource@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
History 2025-10-27 16:13:42 -07:00
..
caif tty: cumulate and document tty_struct::flow* members 2021-05-13 16:57:16 +02:00
device_drivers net: rmnet: Use section heading markup for packet format subsections 2025-10-23 17:28:44 -07:00
devlink net/mlx5: Expose uar access and odp page fault counters 2025-09-27 08:53:50 -07:00
diagnostic Documentation: networking: update PHY error counter diagnostics in twisted pair guide 2025-01-14 11:44:19 +01:00
dsa net: dsa: Rename IFLA_DSA_MASTER to IFLA_DSA_CONDUIT 2023-10-24 13:08:14 -07:00
mac80211_hwsim docs: net: convert two README files to ReST format 2019-07-31 13:31:56 -06:00
net_cachelines ipv6: Move ipv6_fl_list from ipv6_pinfo to inet_sock. 2025-10-17 16:06:52 -07:00
pse-pd net: pse-pd: Add support for PSE PIs 2024-04-18 18:27:33 -07:00
6lowpan.rst docs: networking: convert 6lowpan.txt to ReST 2020-02-28 14:52:36 +01:00
6pack.rst net: 6pack: Demote "How to turn on 6pack support" section heading 2025-10-21 10:57:45 +02:00
af_xdp.rst net: xsk: introduce XDP_MAX_TX_SKB_BUDGET setsockopt 2025-07-10 14:48:29 +02:00
alias.rst docs: networking: Convert alias.txt to rst 2018-07-18 15:28:27 -07:00
arcnet-hardware.rst Update Christoph's Email address and make it consistent 2025-05-12 23:50:31 -07:00
arcnet.rst Documentation: networking: arcnet: drop doubled word 2020-07-04 17:46:21 -07:00
atm.rst docs: networking: convert atm.txt to ReST 2020-04-28 14:38:38 -07:00
ax25.rst Documentation: networking: ax25: update the mailing list info. 2025-10-21 17:41:57 -07:00
bareudp.rst docs: net: bareudp: fix spelling and grammar mistakes 2024-11-30 13:54:28 -08:00
batman-adv.rst batman-adv: Use consistent name for mesh interface 2025-02-22 11:36:22 +01:00
bonding.rst bonding: support aggregator selection based on port priority 2025-09-09 10:56:02 +02:00
bridge.rst Documentation: update mailing list addresses 2024-02-21 13:44:21 -07:00
can.rst linux-can-fixes-for-6.18-20251014 2025-10-15 17:56:20 -07:00
can_ucan_protocol.rst Documentation: networking: correct spelling 2023-01-31 13:00:47 +01:00
cdc_mbim.rst Fix spelling mistake 2024-11-28 12:08:32 +01:00
checksum-offloads.rst docs: networking: convert netdev-features.txt to ReST 2020-04-30 12:56:36 -07:00
dctcp.rst docs: networking: convert dctcp.txt to ReST 2020-04-28 14:38:39 -07:00
devmem.rst net: add devmem TCP TX documentation 2025-05-13 11:12:48 +02:00
dns_resolver.rst net: dns_resolver: Fix request-key cross-reference 2025-09-26 15:21:38 -07:00
driver.rst net: docs: update the sample code in driver.rst 2023-04-13 13:30:21 +02:00
eql.rst docs: networking: convert eql.txt to ReST 2020-04-28 14:39:46 -07:00
ethtool-netlink.rst ethtool: add FEC bins histogram report 2025-09-26 16:49:18 -07:00
failover.rst net: Introduce generic failover module 2018-05-28 22:59:54 -04:00
fib_trie.rst docs: networking: convert fib_trie.txt to ReST 2020-04-28 14:39:46 -07:00
filter.rst ARC: Add eBPF JIT support 2024-05-12 16:51:36 -07:00
gen_stats.rst docs: networking: convert gen_stats.txt to ReST 2020-04-28 14:39:46 -07:00
generic-hdlc.rst docs: networking: convert generic-hdlc.txt to ReST 2020-04-28 14:39:46 -07:00
generic_netlink.rst Documentation: networking: Update generic_netlink_howto URL 2022-11-23 17:25:02 -08:00
gtp.rst Documentation: networking: correct spelling 2023-01-31 13:00:47 +01:00
ieee802154.rst Documentation: ieee802154: fix grammar 2024-10-28 21:14:27 +01:00
ila.rst docs: networking: convert ila.txt to ReST 2020-04-28 14:39:47 -07:00
index.rst Revert "Documentation: net: add flow control guide and document ethtool API" 2025-10-01 09:48:21 +02:00
ioam6-sysctl.rst ipv6: ioam: Documentation for new IOAM sysctls 2021-07-21 08:14:33 -07:00
iou-zcrx.rst io_uring/zcrx: add support for IORING_SETUP_CQE_MIXED 2025-08-27 11:24:22 -06:00
ip-sysctl.rst tcp: accecn: AccECN option send control 2025-09-18 08:47:52 +02:00
ip_dynaddr.rst docs: networking: convert ip_dynaddr.txt to ReST 2020-04-28 14:39:47 -07:00
ipsec.rst docs: networking: convert ipsec.txt to ReST 2020-04-28 14:39:47 -07:00
ipv6.rst docs: networking: convert ipv6.txt to ReST 2020-04-28 14:40:18 -07:00
ipvlan.rst Documentation: networking: correct spelling 2023-01-31 13:00:47 +01:00
ipvs-sysctl.rst ipvs: run_estimation should control the kthread tasks 2022-12-10 22:44:43 +01:00
iso15765-2.rst Documentation/networking: fix basic node example document ISO 15765-2 2025-02-08 11:28:11 +01:00
j1939.rst can: j1939: Extend stack documentation with buffer size behavior 2025-02-19 11:10:53 +01:00
kapi.rst net-shapers: implement NL get operation 2024-10-10 08:30:22 -07:00
kcm.rst docs/kcm: Fix typo "BFP" 2025-03-24 12:20:42 -07:00
l2tp.rst documentation/networking: update l2tp docs 2024-08-11 04:38:49 +01:00
lapb-module.rst docs: networking: convert lapb-module.txt to ReST 2020-04-30 12:56:35 -07:00
mac80211-auth-assoc-deauth.txt mac80211: set HT channel before association 2012-04-10 14:54:07 -04:00
mac80211-injection.rst doc: networking: wireless: fix wiki website url 2020-06-08 10:05:53 +02:00
mctp.rst mctp: Add SIOCMCTP{ALLOC,DROP}TAG ioctls for tag control 2022-02-09 12:00:11 +00:00
mpls-sysctl.rst docs: networking: convert mpls-sysctl.txt to ReST 2020-04-30 12:56:36 -07:00
mptcp-sysctl.rst mptcp: make ADD_ADDR retransmission timeout adaptive 2025-09-09 18:57:45 -07:00
mptcp.rst Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2025-09-11 17:40:13 -07:00
msg_zerocopy.rst docs: net: description of MSG_ZEROCOPY for AF_VSOCK 2023-10-15 13:19:42 +01:00
multi-pf-netdev.rst tools: ynl: move python code to separate sub-directory 2025-01-09 12:53:27 -08:00
multiqueue.rst docs: networking: convert multiqueue.txt to ReST 2020-04-30 12:56:36 -07:00
napi.rst docs: remove obsolete description about threaded NAPI 2025-09-01 13:09:08 -07:00
net_dim.rst dim: pass dim_sample to net_dim() by reference 2024-11-03 12:36:54 -08:00
net_failover.rst Documentation: net: net_failover: Separate cloud-ifupdown-helper and reattach-vf.sh code blocks marker 2025-10-17 16:28:29 -07:00
netconsole.rst docs: netconsole: document msgid feature 2025-06-18 10:46:10 +01:00
netdev-features.rst net: enable driver support for netmem TX 2025-05-13 11:12:49 +02:00
netdevices.rst netdev: fix the locking for netdev notifications 2025-04-17 18:55:14 -07:00
netfilter-sysctl.rst docs: networking: convert netfilter-sysctl.txt to ReST 2020-04-30 12:56:36 -07:00
netif-msg.rst docs: networking: convert netif-msg.txt to ReST 2020-04-30 12:56:36 -07:00
netmem.rst net: enable driver support for netmem TX 2025-05-13 11:12:49 +02:00
nexthop-group-resilient.rst Documentation: net: Document resilient next-hop groups 2021-03-29 13:51:38 -07:00
nf_conntrack-sysctl.rst netfilter: conntrack: remove DCCP protocol support 2025-07-03 13:51:39 +02:00
nf_flowtable.rst docs: nf_flowtable: fix compilation and warnings 2021-03-25 17:42:02 -07:00
nfc.rst net: nfc: Format userspace interface subsection headings 2025-10-21 10:57:45 +02:00
oa-tc6-framework.rst Documentation: networking: add OPEN Alliance 10BASE-T1x MAC-PHY serial interface 2024-09-11 20:53:42 -07:00
openvswitch.rst docs: networking: convert openvswitch.txt to ReST 2020-04-30 12:56:36 -07:00
operstates.rst docs: operstates: document IF_OPER_TESTING 2021-08-02 15:16:04 +01:00
packet_mmap.rst docs: networking: packet_mmap: replace dead links with archive.org links 2024-10-28 15:47:10 -07:00
page_pool.rst net: page_pool: expose page pool stats via netlink 2023-11-28 15:48:39 +01:00
phonet.rst Documentation: networking: correct spelling 2023-01-31 13:00:47 +01:00
phy-link-topology.rst Documentation: networking: document phy_link_topology 2024-08-23 13:04:35 +01:00
phy.rst Revert "Documentation: net: add flow control guide and document ethtool API" 2025-10-01 09:48:21 +02:00
pktgen.rst pktgen: Introducing 'SHARED' flag for testing with non-shared skb 2023-09-28 16:25:14 +02:00
plip.rst docs: networking: convert PLIP.txt to ReST 2020-04-30 12:56:37 -07:00
ppp_generic.rst docs: update ppp_generic.rst to document new ioctls 2020-12-10 13:57:36 -08:00
proc_net_tcp.rst docs: networking: convert proc_net_tcp.txt to ReST 2020-04-30 12:56:37 -07:00
psp.rst psp: add documentation 2025-09-18 12:32:06 +02:00
radiotap-headers.rst docs: networking: convert radiotap-headers.txt to ReST 2020-04-30 12:56:37 -07:00
rds.rst Documentation: Fix networking typos 2025-08-18 10:31:20 -06:00
regulatory.rst Documentation: networking: correct spelling 2023-01-31 13:00:47 +01:00
representors.rst Documentation: Add documentation for eswitch attribute 2024-03-28 18:20:08 -07:00
rxrpc.rst Documentation: rxrpc: Demote three sections 2025-09-24 18:12:10 -07:00
scaling.rst net: move aRFS rmap management and CPU affinity to core 2025-02-26 19:51:37 -08:00
sctp.rst docs: networking: convert sctp.txt to ReST 2020-04-30 12:56:38 -07:00
secid.rst docs: networking: convert secid.txt to ReST 2020-04-30 12:56:38 -07:00
seg6-sysctl.rst doc: fix seg6_flowlabel path 2025-10-12 22:51:37 +01:00
segmentation-offloads.rst net: gso: restore ids of outer ip headers correctly 2025-09-25 12:42:49 +02:00
sfp-phylink.rst doc: sfp-phylink: update the porting guide with PCS handling 2024-03-07 15:27:05 +01:00
skbuff.rst skbuff: render the checksum comment to documentation 2022-05-10 17:48:37 -07:00
smc-sysctl.rst net/smc: add sysctl for max conns per lgr for SMC-R v2.1 2023-11-24 12:13:14 +00:00
snmp_counter.rst docs: automarkup: linkify git revs 2023-11-17 13:13:24 -07:00
sriov.rst docs: net: document guidance of implementing the SR-IOV NDOs 2024-06-21 10:18:45 +01:00
statistics.rst net: docs: add missing features that can have stats 2025-10-20 18:31:25 -07:00
strparser.rst docs: networking: strparser: Fix a typo 2025-03-24 12:14:16 -07:00
switchdev.rst net: rename netns_local to netns_immutable 2025-03-04 12:44:48 +01:00
sysfs-tagging.rst Documentation: networking: correct spelling 2023-01-31 13:00:47 +01:00
tc-actions-env-rules.rst docs: networking: convert tc-actions-env-rules.txt to ReST 2020-04-30 12:56:38 -07:00
tc-queue-filters.rst Documentation: networking: TC queue based filtering 2022-10-25 10:32:40 +02:00
tcp-thin.rst docs: networking: convert tcp-thin.txt to ReST 2020-04-30 12:56:38 -07:00
tcp_ao.rst Documentation: networking/tcp_ao: typo and grammar fixes 2024-10-03 16:38:48 -07:00
team.rst docs: networking: convert team.txt to ReST 2020-04-30 12:56:38 -07:00
timestamping.rst docs: networking: timestamping: improve stacked PHC sentence 2025-05-13 15:40:54 -07:00
tipc.rst Documentation: tipc: fix formatting issue in tipc.rst 2024-11-19 11:17:13 +01:00
tls-handshake.rst net/handshake: Enable the SNI extension to work properly 2023-05-24 22:05:24 -07:00
tls-offload-layers.svg Documentation: add TLS offload documentation 2019-05-22 12:18:20 -07:00
tls-offload-reorder-bad.svg Documentation: add TLS offload documentation 2019-05-22 12:18:20 -07:00
tls-offload-reorder-good.svg Documentation: add TLS offload documentation 2019-05-22 12:18:20 -07:00
tls-offload.rst Documentation: tls_offload: fix typos and grammar 2024-11-28 12:09:06 +01:00
tls.rst net/tls: support setting the maximum payload size 2025-10-27 16:13:42 -07:00
tproxy.rst docs: tproxy: fix formatting for nft code block 2025-04-29 00:00:26 +02:00
tuntap.rst docs: networking: Replace strncpy() with strscpy() 2021-06-04 11:21:43 -06:00
udplite.rst docs: networking: convert udplite.txt to ReST 2020-05-01 12:24:40 -07:00
vrf.rst doc: Document unexpected tcp_l3mdev_accept=1 behavior 2021-08-23 11:53:24 +01:00
vxlan.rst docs: vxlan: add info about device features 2020-09-28 12:50:12 -07:00
x25-iface.rst docs: networking: fix x25-iface.rst heading & index order 2023-05-10 10:31:46 +01:00
x25.rst net: x25: Remove unimplemented X.25-over-LLC code stubs 2020-12-12 17:15:33 -08:00
xdp-rx-metadata.rst doc: xdp: Clarify driver implementation for XDP Rx metadata 2025-07-16 16:36:11 -07:00
xfrm_device.rst xfrm: Add explicit dev to .xdo_dev_state_{add,delete,free} 2025-04-16 11:01:41 +02:00
xfrm_proc.rst xfrm: Add dir validation to "in" data path lookup 2024-05-01 10:06:27 +02:00
xfrm_sync.rst docs: networking: convert xfrm_sync.txt to ReST 2020-05-01 12:24:41 -07:00
xfrm_sysctl.rst docs: networking: convert xfrm_sysctl.txt to ReST 2020-05-01 12:24:41 -07:00
xsk-tx-metadata.rst xsk: Add launch time hardware offload support to XDP Tx metadata 2025-02-20 15:13:45 -08:00