add RDMA callbacks: send_done post_recv

support_rdma
YuQing 2023-09-28 22:19:30 +08:00
parent 6151ea721b
commit 61e07a4c0f
2 changed files with 7 additions and 1 deletions

View File

@ -786,6 +786,7 @@ int conn_pool_global_init_for_rdma()
LOAD_API(G_RDMA_CONNECTION_CALLBACKS, close_connection);
LOAD_API(G_RDMA_CONNECTION_CALLBACKS, destroy_connection);
LOAD_API(G_RDMA_CONNECTION_CALLBACKS, is_connected);
LOAD_API(G_RDMA_CONNECTION_CALLBACKS, send_done);
LOAD_API(G_RDMA_CONNECTION_CALLBACKS, get_recv_buffer);
LOAD_API(G_RDMA_CONNECTION_CALLBACKS, request_by_buf1);
LOAD_API(G_RDMA_CONNECTION_CALLBACKS, request_by_buf2);
@ -793,6 +794,7 @@ int conn_pool_global_init_for_rdma()
LOAD_API(G_RDMA_CONNECTION_CALLBACKS, request_by_mix);
LOAD_API(G_RDMA_CONNECTION_CALLBACKS, send_by_buf1);
LOAD_API(G_RDMA_CONNECTION_CALLBACKS, recv_data);
LOAD_API(G_RDMA_CONNECTION_CALLBACKS, post_recv);
g_connection_callbacks.inited = true;
return 0;

View File

@ -69,6 +69,7 @@ typedef int (*fc_make_connection_callback)(ConnectionInfo *conn,
const char *service_name, const int timeout_ms,
const char *bind_ipaddr, const bool log_connect_error);
typedef bool (*fc_is_connected_callback)(ConnectionInfo *conn);
typedef bool (*fc_send_done_callback)(ConnectionInfo *conn);
typedef void (*fc_close_connection_callback)(ConnectionInfo *conn);
typedef void (*fc_destroy_connection_callback)(ConnectionInfo *conn);
@ -87,7 +88,8 @@ typedef int (*fc_rdma_request_by_mix_callback)(ConnectionInfo *conn,
typedef int (*fc_rdma_send_by_buf1_callback)(ConnectionInfo *conn,
const char *data, const int length);
typedef int (*fc_rdma_recv_data_callback)(ConnectionInfo *conn,
const int timeout_ms);
const bool call_post_recv, const int timeout_ms);
typedef int (*fc_rdma_post_recv_callback)(ConnectionInfo *conn);
typedef struct {
fc_make_connection_callback make_connection;
@ -104,6 +106,7 @@ typedef struct {
fc_close_connection_callback close_connection;
fc_destroy_connection_callback destroy_connection;
fc_is_connected_callback is_connected;
fc_send_done_callback send_done;
fc_rdma_get_recv_buffer_callback get_recv_buffer;
fc_rdma_request_by_buf1_callback request_by_buf1;
@ -113,6 +116,7 @@ typedef struct {
fc_rdma_send_by_buf1_callback send_by_buf1;
fc_rdma_recv_data_callback recv_data;
fc_rdma_post_recv_callback post_recv;
} RDMAConnectionCallbacks;
typedef struct {