mirror of
https://github.com/samba-team/samba.git
synced 2025-02-03 13:47:25 +03:00
f8b76235fe
The important factor to distribute connection to workers should be the number of used association group slots instead of the raw number of connections. If one worker has a lot of association groups with just one connection each, but another with few association groups, but multiple connections per association group. The one with less association groups should get the connection. Note each worker is only able to allocate UINT16_MAX allocation groups, but the number of connections is only limited by RAM. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
94 lines
2.3 KiB
Plaintext
94 lines
2.3 KiB
Plaintext
/**
|
|
* @file rpc_host.idl
|
|
*
|
|
* Definitions for communication between samba-dcerpcd and rpc helper
|
|
* daemons
|
|
*/
|
|
#include "idl_types.h"
|
|
|
|
import "named_pipe_auth.idl";
|
|
import "dcerpc.idl";
|
|
|
|
[
|
|
pointer_default(unique)
|
|
]
|
|
|
|
interface rpc_host_msg
|
|
{
|
|
/**
|
|
* @brief MSG_RPC_HOST_NEW_CLIENT: samba-dcerpcd->rpcd
|
|
*
|
|
* samba-dcerpcd to rpcd msg announcing a new client. This
|
|
* will carry a file descriptor representing the new
|
|
* connection
|
|
*/
|
|
typedef [public] struct {
|
|
/**
|
|
* @brief The binding the client wants to connect to
|
|
*/
|
|
[string,charset(UTF8)] char *binding;
|
|
|
|
/**
|
|
* @brief Auth info inherited from SMB
|
|
*/
|
|
named_pipe_auth_req_info8 *npa_info8;
|
|
|
|
/**
|
|
* @brief Raw bind PDU
|
|
*
|
|
* Already read from the socket by samba-dcerpcd
|
|
*/
|
|
DATA_BLOB bind_packet;
|
|
} rpc_host_client;
|
|
|
|
/**
|
|
* @brief MSG_RPC_WORKER_STATUS: rpcd->samba-dcerpcd
|
|
*
|
|
* Once a client has been handed over from samba-dcerpcd to an
|
|
* rpcd, samba-dcerpc has no control over this socket
|
|
* anymore. So it can't know when the client exits and the
|
|
* rpcd helper process has a slot free. Thus whenever a client
|
|
* exits, rpcd sends this message up to samba-dcerpc for a
|
|
* status update.
|
|
*/
|
|
typedef [flag(NDR_NOALIGN),public] struct {
|
|
/**
|
|
* @brief Which rpc service is this message from
|
|
*
|
|
* samba-dcerpcd will only have the source pid of this
|
|
* message. To avoid a walk through all arrays with
|
|
* all rpcd helpers, give samba-dcerpcd a hint where
|
|
* in its arrays to find the rpcd that sent this
|
|
* message.
|
|
*/
|
|
uint32 server_index;
|
|
|
|
/**
|
|
* @brief Which of the processes of a helper prog is this from
|
|
*
|
|
* @note while this is uint32, we currently only support 16-bit
|
|
* values, as we use it in the high 16-bits of the 32-bit
|
|
* association group id.
|
|
*/
|
|
uint32 worker_index;
|
|
|
|
|
|
/**
|
|
* @brief How many association groups this process serves right now
|
|
*
|
|
* @note while this is uint32, we currently only support 16-bit
|
|
* values, as we use the worker_index in the high 16-bits of
|
|
* so we only have 16-bit per worker in order to form the 32-bit
|
|
* association group id.
|
|
*/
|
|
uint32 num_association_groups;
|
|
|
|
/**
|
|
* @brief How many client connections this process serves right now
|
|
*
|
|
* @note might be greater or equal to num_association_groups.
|
|
*/
|
|
uint32 num_connections;
|
|
} rpc_worker_status;
|
|
}
|