From e806202150fe50e71f765bb8f8a024c3c220e66f Mon Sep 17 00:00:00 2001 From: Raimo Niskanen Date: Mon, 26 Aug 2024 17:10:14 +0200 Subject: [PATCH] Use read_ahead in SSL for KTLS --- lib/ssl/src/inet_tls_dist.erl | 2 +- lib/ssl/test/inet_epmd_cryptcookie_inet_ktls.erl | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/ssl/src/inet_tls_dist.erl b/lib/ssl/src/inet_tls_dist.erl index fddf17bddb19..776886e6fe32 100644 --- a/lib/ssl/src/inet_tls_dist.erl +++ b/lib/ssl/src/inet_tls_dist.erl @@ -945,7 +945,7 @@ inet_set_ktls( inet:setopts( Socket, [list, {packet, Packet}, {packet_size, PacketSize}, - {header, Header}, {active, Active}]) + {header, Header}, {read_ahead, true}, {active, Active}]) of ok -> ok; diff --git a/lib/ssl/test/inet_epmd_cryptcookie_inet_ktls.erl b/lib/ssl/test/inet_epmd_cryptcookie_inet_ktls.erl index d350cc81391a..2c06ad2fcb2a 100644 --- a/lib/ssl/test/inet_epmd_cryptcookie_inet_ktls.erl +++ b/lib/ssl/test/inet_epmd_cryptcookie_inet_ktls.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2023. All Rights Reserved. +%% Copyright Ericsson AB 2023-2024. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -57,7 +57,7 @@ listen_open(_NetAddress, Options) -> inet_epmd_dist:merge_options( Options, [{active, false}, {mode, binary}, {packet, 0}, - inet_epmd_dist:nodelay()], + {read_ahead, false}, inet_epmd_dist:nodelay()], [])}. %% ------------------------------------------------------------ @@ -111,7 +111,7 @@ connect(NetAddress, _Timer, Options) -> inet_epmd_dist:merge_options( Options, [{active, false}, {mode, binary}, {packet, 0}, - inet_epmd_dist:nodelay()], + {read_ahead, false}, inet_epmd_dist:nodelay()], []), #net_address{ address = {Ip, Port} } = NetAddress, maybe