mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-22 18:43:02 +01:00
CORE-6004: Add a switch to disable the "TCP Loopback Fast Path" option (Windows only)
This commit is contained in:
parent
d31495be14
commit
540c90546f
@ -768,6 +768,14 @@
|
||||
#
|
||||
#TcpNoNagle = 1
|
||||
|
||||
#
|
||||
# Either enables or disables the "TCP Loopback Fast Path" feature (SIO_LOOPBACK_FAST_PATH).
|
||||
# Applies to Windows (version 8/2012 or higher) only.
|
||||
#
|
||||
# Type: Boolean, default 1 (true)
|
||||
#
|
||||
#TcpLoopbackFastPathOption = 1
|
||||
|
||||
#
|
||||
# Allows setting of IPV6_V6ONLY socket option. If enabled, IPv6 sockets
|
||||
# allow only IPv6 communication and separate sockets must be used for
|
||||
|
@ -124,6 +124,7 @@ Only meaningful for Windows SS on SMP systems.
|
||||
OldParameterOrdering boolean default false
|
||||
TcpRemoteBufferSize integer default 8192 (bytes)
|
||||
TcpNoNagle boolean default false
|
||||
TcpLoopbackFastPathOption boolean default true
|
||||
IpcMapSize integer default 4096 (bytes)
|
||||
DefaultDbCachePages integer default SS: 2048. CS: 75
|
||||
ConnectionTimeout integer default 180 (seconds)
|
||||
|
@ -148,6 +148,7 @@ const Config::ConfigEntry Config::entries[MAX_CONFIG_KEY] =
|
||||
{TYPE_INTEGER, "CpuAffinityMask", (ConfigValue) 0},
|
||||
{TYPE_INTEGER, "TcpRemoteBufferSize", (ConfigValue) 8192}, // bytes
|
||||
{TYPE_BOOLEAN, "TcpNoNagle", (ConfigValue) true},
|
||||
{TYPE_BOOLEAN, "TcpLoopbackFastPathOption",(ConfigValue) true},
|
||||
{TYPE_INTEGER, "DefaultDbCachePages", (ConfigValue) -1}, // pages
|
||||
{TYPE_INTEGER, "ConnectionTimeout", (ConfigValue) 180}, // seconds
|
||||
{TYPE_INTEGER, "DummyPacketInterval", (ConfigValue) 0}, // seconds
|
||||
@ -492,6 +493,11 @@ bool Config::getTcpNoNagle() const
|
||||
return get<bool>(KEY_TCP_NO_NAGLE);
|
||||
}
|
||||
|
||||
bool Config::getTcpLoopbackFastPathOption() const
|
||||
{
|
||||
return get<bool>(KEY_TCP_LOOPBACK_FAST_PATH_OPTION);
|
||||
}
|
||||
|
||||
bool Config::getIPv6V6Only() const
|
||||
{
|
||||
return get<bool>(KEY_IPV6_V6ONLY);
|
||||
|
@ -95,6 +95,7 @@ public:
|
||||
KEY_CPU_AFFINITY_MASK,
|
||||
KEY_TCP_REMOTE_BUFFER_SIZE,
|
||||
KEY_TCP_NO_NAGLE,
|
||||
KEY_TCP_LOOPBACK_FAST_PATH_OPTION,
|
||||
KEY_DEFAULT_DB_CACHE_PAGES,
|
||||
KEY_CONNECTION_TIMEOUT,
|
||||
KEY_DUMMY_PACKET_INTERVAL,
|
||||
@ -252,6 +253,9 @@ public:
|
||||
// Disable Nagle algorithm
|
||||
bool getTcpNoNagle() const;
|
||||
|
||||
// Enable or disable the TCP Loopback Fast Path option
|
||||
bool getTcpLoopbackFastPathOption() const;
|
||||
|
||||
// Let IPv6 socket accept only IPv6 packets
|
||||
bool getIPv6V6Only() const;
|
||||
|
||||
|
@ -3242,6 +3242,8 @@ static bool setNoNagleOption(rem_port* port)
|
||||
bool setFastLoopbackOption(SOCKET s)
|
||||
{
|
||||
#ifdef WIN_NT
|
||||
if (Config::getDefaultConfig()->getTcpLoopbackFastPathOption())
|
||||
{
|
||||
int optval = 1;
|
||||
DWORD bytes = 0;
|
||||
|
||||
@ -3249,9 +3251,9 @@ bool setFastLoopbackOption(SOCKET s)
|
||||
NULL, 0, &bytes, 0, 0);
|
||||
|
||||
return (ret == 0);
|
||||
#else
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
|
||||
void setStopMainThread(FPTR_INT func)
|
||||
|
Loading…
Reference in New Issue
Block a user