it may result in data corruption under some race conditions.
Future releases may improve this situation.
</para>
+
+ <para>Due to dependencies to kernel APIs of Linux or FreeBSD, it's only possible
+ to use this feature on Linux and FreeBSD for now. For testing this restriction
+ can be overwritten by specifying <constant>force:server multi channel support=yes</constant>
+ in addition.</para>
</description>
<value type="default">no</value>
/* SIOCOUTQ TIOCOUTQ are the same */
#define __IOCTL_SEND_QUEUE_SIZE_OPCODE TIOCOUTQ
#define __HAVE_TCP_INFO_RTO 1
+#define __ALLOW_MULTI_CHANNEL_SUPPORT 1
#elif defined(FREEBSD)
#define __IOCTL_SEND_QUEUE_SIZE_OPCODE FIONWRITE
#define __HAVE_TCP_INFO_RTO 1
+#define __ALLOW_MULTI_CHANNEL_SUPPORT 1
#endif
#include "lib/crypto/gnutls_helpers.h"
return NT_STATUS_OK;
}
+bool smbXsrv_server_multi_channel_enabled(void)
+{
+ bool enabled = lp_server_multi_channel_support();
+#ifndef __ALLOW_MULTI_CHANNEL_SUPPORT
+ bool forced = false;
+ /*
+ * If we don't have support from the kernel
+ * to ask for the un-acked number of bytes
+ * in the socket send queue, we better
+ * don't support multi-channel.
+ */
+ forced = lp_parm_bool(-1, "force", "server multi channel support", false);
+ if (enabled && !forced) {
+ D_NOTICE("'server multi channel support' enabled "
+ "but not supported on %s (%s)\n",
+ SYSTEM_UNAME_SYSNAME, SYSTEM_UNAME_RELEASE);
+ DEBUGADD(DBGLVL_NOTICE, ("Please report this on "
+ "https://bugzilla.samba.org/show_bug.cgi?id=11897\n"));
+ enabled = false;
+ }
+#endif /* ! __ALLOW_MULTI_CHANNEL_SUPPORT */
+ return enabled;
+}
+
static NTSTATUS smbXsrv_connection_get_rto_usecs(struct smbXsrv_connection *xconn,
uint32_t *_rto_usecs)
{
client->raw_ev_ctx = ev_ctx;
client->msg_ctx = msg_ctx;
- client->server_multi_channel_enabled = lp_server_multi_channel_support();
+ client->server_multi_channel_enabled =
+ smbXsrv_server_multi_channel_enabled();
if (client->server_multi_channel_enabled) {
client->next_channel_id = 1;
}