mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-02-02 09:20:39 +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
|
#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
|
# Allows setting of IPV6_V6ONLY socket option. If enabled, IPv6 sockets
|
||||||
# allow only IPv6 communication and separate sockets must be used for
|
# 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
|
OldParameterOrdering boolean default false
|
||||||
TcpRemoteBufferSize integer default 8192 (bytes)
|
TcpRemoteBufferSize integer default 8192 (bytes)
|
||||||
TcpNoNagle boolean default false
|
TcpNoNagle boolean default false
|
||||||
|
TcpLoopbackFastPathOption boolean default true
|
||||||
IpcMapSize integer default 4096 (bytes)
|
IpcMapSize integer default 4096 (bytes)
|
||||||
DefaultDbCachePages integer default SS: 2048. CS: 75
|
DefaultDbCachePages integer default SS: 2048. CS: 75
|
||||||
ConnectionTimeout integer default 180 (seconds)
|
ConnectionTimeout integer default 180 (seconds)
|
||||||
|
@ -148,6 +148,7 @@ const Config::ConfigEntry Config::entries[MAX_CONFIG_KEY] =
|
|||||||
{TYPE_INTEGER, "CpuAffinityMask", (ConfigValue) 0},
|
{TYPE_INTEGER, "CpuAffinityMask", (ConfigValue) 0},
|
||||||
{TYPE_INTEGER, "TcpRemoteBufferSize", (ConfigValue) 8192}, // bytes
|
{TYPE_INTEGER, "TcpRemoteBufferSize", (ConfigValue) 8192}, // bytes
|
||||||
{TYPE_BOOLEAN, "TcpNoNagle", (ConfigValue) true},
|
{TYPE_BOOLEAN, "TcpNoNagle", (ConfigValue) true},
|
||||||
|
{TYPE_BOOLEAN, "TcpLoopbackFastPathOption",(ConfigValue) true},
|
||||||
{TYPE_INTEGER, "DefaultDbCachePages", (ConfigValue) -1}, // pages
|
{TYPE_INTEGER, "DefaultDbCachePages", (ConfigValue) -1}, // pages
|
||||||
{TYPE_INTEGER, "ConnectionTimeout", (ConfigValue) 180}, // seconds
|
{TYPE_INTEGER, "ConnectionTimeout", (ConfigValue) 180}, // seconds
|
||||||
{TYPE_INTEGER, "DummyPacketInterval", (ConfigValue) 0}, // seconds
|
{TYPE_INTEGER, "DummyPacketInterval", (ConfigValue) 0}, // seconds
|
||||||
@ -492,6 +493,11 @@ bool Config::getTcpNoNagle() const
|
|||||||
return get<bool>(KEY_TCP_NO_NAGLE);
|
return get<bool>(KEY_TCP_NO_NAGLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Config::getTcpLoopbackFastPathOption() const
|
||||||
|
{
|
||||||
|
return get<bool>(KEY_TCP_LOOPBACK_FAST_PATH_OPTION);
|
||||||
|
}
|
||||||
|
|
||||||
bool Config::getIPv6V6Only() const
|
bool Config::getIPv6V6Only() const
|
||||||
{
|
{
|
||||||
return get<bool>(KEY_IPV6_V6ONLY);
|
return get<bool>(KEY_IPV6_V6ONLY);
|
||||||
|
@ -95,6 +95,7 @@ public:
|
|||||||
KEY_CPU_AFFINITY_MASK,
|
KEY_CPU_AFFINITY_MASK,
|
||||||
KEY_TCP_REMOTE_BUFFER_SIZE,
|
KEY_TCP_REMOTE_BUFFER_SIZE,
|
||||||
KEY_TCP_NO_NAGLE,
|
KEY_TCP_NO_NAGLE,
|
||||||
|
KEY_TCP_LOOPBACK_FAST_PATH_OPTION,
|
||||||
KEY_DEFAULT_DB_CACHE_PAGES,
|
KEY_DEFAULT_DB_CACHE_PAGES,
|
||||||
KEY_CONNECTION_TIMEOUT,
|
KEY_CONNECTION_TIMEOUT,
|
||||||
KEY_DUMMY_PACKET_INTERVAL,
|
KEY_DUMMY_PACKET_INTERVAL,
|
||||||
@ -252,6 +253,9 @@ public:
|
|||||||
// Disable Nagle algorithm
|
// Disable Nagle algorithm
|
||||||
bool getTcpNoNagle() const;
|
bool getTcpNoNagle() const;
|
||||||
|
|
||||||
|
// Enable or disable the TCP Loopback Fast Path option
|
||||||
|
bool getTcpLoopbackFastPathOption() const;
|
||||||
|
|
||||||
// Let IPv6 socket accept only IPv6 packets
|
// Let IPv6 socket accept only IPv6 packets
|
||||||
bool getIPv6V6Only() const;
|
bool getIPv6V6Only() const;
|
||||||
|
|
||||||
|
@ -3242,16 +3242,18 @@ static bool setNoNagleOption(rem_port* port)
|
|||||||
bool setFastLoopbackOption(SOCKET s)
|
bool setFastLoopbackOption(SOCKET s)
|
||||||
{
|
{
|
||||||
#ifdef WIN_NT
|
#ifdef WIN_NT
|
||||||
int optval = 1;
|
if (Config::getDefaultConfig()->getTcpLoopbackFastPathOption())
|
||||||
DWORD bytes = 0;
|
{
|
||||||
|
int optval = 1;
|
||||||
|
DWORD bytes = 0;
|
||||||
|
|
||||||
int ret = WSAIoctl(s, SIO_LOOPBACK_FAST_PATH, &optval, sizeof(optval),
|
int ret = WSAIoctl(s, SIO_LOOPBACK_FAST_PATH, &optval, sizeof(optval),
|
||||||
NULL, 0, &bytes, 0, 0);
|
NULL, 0, &bytes, 0, 0);
|
||||||
|
|
||||||
return (ret == 0);
|
return (ret == 0);
|
||||||
#else
|
}
|
||||||
return false;
|
|
||||||
#endif
|
#endif
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void setStopMainThread(FPTR_INT func)
|
void setStopMainThread(FPTR_INT func)
|
||||||
|
Loading…
Reference in New Issue
Block a user