diff --git a/src/connection_pool.c b/src/connection_pool.c index 18d37ef..779939c 100644 --- a/src/connection_pool.c +++ b/src/connection_pool.c @@ -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; diff --git a/src/connection_pool.h b/src/connection_pool.h index 1cb372b..08af0d3 100644 --- a/src/connection_pool.h +++ b/src/connection_pool.h @@ -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 {