function conn_pool_set_rdma_extra_params_ex support double_buffers
parent
255defa788
commit
6151ea721b
|
|
@ -838,8 +838,9 @@ ConnectionInfo *conn_pool_alloc_connection_ex(
|
||||||
return conn;
|
return conn;
|
||||||
}
|
}
|
||||||
|
|
||||||
int conn_pool_set_rdma_extra_params(ConnectionExtraParams *extra_params,
|
int conn_pool_set_rdma_extra_params_ex(ConnectionExtraParams *extra_params,
|
||||||
struct fc_server_config *server_cfg, const int server_group_index)
|
struct fc_server_config *server_cfg, const int server_group_index,
|
||||||
|
const bool double_buffers)
|
||||||
{
|
{
|
||||||
const int padding_size = 1024;
|
const int padding_size = 1024;
|
||||||
FCServerGroupInfo *server_group;
|
FCServerGroupInfo *server_group;
|
||||||
|
|
@ -876,13 +877,14 @@ int conn_pool_set_rdma_extra_params(ConnectionExtraParams *extra_params,
|
||||||
extra_params->tls.htable_capacity = 0;
|
extra_params->tls.htable_capacity = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
extra_params->rdma.double_buffers = false;
|
|
||||||
if (server_group->comm_type == fc_comm_type_sock) {
|
if (server_group->comm_type == fc_comm_type_sock) {
|
||||||
|
extra_params->rdma.double_buffers = false;
|
||||||
extra_params->rdma.buffer_size = 0;
|
extra_params->rdma.buffer_size = 0;
|
||||||
extra_params->rdma.pd = NULL;
|
extra_params->rdma.pd = NULL;
|
||||||
return 0;
|
return 0;
|
||||||
} else {
|
} else {
|
||||||
first_server = FC_SID_SERVERS(*server_cfg);
|
first_server = FC_SID_SERVERS(*server_cfg);
|
||||||
|
extra_params->rdma.double_buffers = double_buffers;
|
||||||
extra_params->rdma.buffer_size = server_cfg->buffer_size + padding_size;
|
extra_params->rdma.buffer_size = server_cfg->buffer_size + padding_size;
|
||||||
extra_params->rdma.pd = fc_alloc_rdma_pd(G_RDMA_CONNECTION_CALLBACKS.
|
extra_params->rdma.pd = fc_alloc_rdma_pd(G_RDMA_CONNECTION_CALLBACKS.
|
||||||
alloc_pd, &first_server->group_addrs[server_group_index].
|
alloc_pd, &first_server->group_addrs[server_group_index].
|
||||||
|
|
|
||||||
|
|
@ -475,8 +475,19 @@ static inline void conn_pool_free_connection(ConnectionInfo *conn)
|
||||||
free(conn);
|
free(conn);
|
||||||
}
|
}
|
||||||
|
|
||||||
int conn_pool_set_rdma_extra_params(ConnectionExtraParams *extra_params,
|
int conn_pool_set_rdma_extra_params_ex(ConnectionExtraParams *extra_params,
|
||||||
struct fc_server_config *server_cfg, const int server_group_index);
|
struct fc_server_config *server_cfg, const int server_group_index,
|
||||||
|
const bool double_buffers);
|
||||||
|
|
||||||
|
static inline int conn_pool_set_rdma_extra_params(
|
||||||
|
ConnectionExtraParams *extra_params,
|
||||||
|
struct fc_server_config *server_cfg,
|
||||||
|
const int server_group_index)
|
||||||
|
{
|
||||||
|
const bool double_buffers = false;
|
||||||
|
return conn_pool_set_rdma_extra_params_ex(extra_params,
|
||||||
|
server_cfg, server_group_index, double_buffers);
|
||||||
|
}
|
||||||
|
|
||||||
static inline const char *fc_comm_type_str(const FCCommunicationType type)
|
static inline const char *fc_comm_type_str(const FCCommunicationType type)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue