diff options
author | Timo Dritschler <timo.dritschler@kit.edu> | 2014-12-10 15:27:32 +0100 |
---|---|---|
committer | Timo Dritschler <timo.dritschler@kit.edu> | 2014-12-10 15:27:32 +0100 |
commit | 50a297a290c78c7feb0a4918efba82edd019590b (patch) | |
tree | 2407fb62f377a2212df46fdae5f13b9219a2adac /src/kiro-rdma.h | |
parent | b948c151b9f45db2b90a9ecf95ffd4f54edf3924 (diff) | |
download | kiro-50a297a290c78c7feb0a4918efba82edd019590b.tar.gz kiro-50a297a290c78c7feb0a4918efba82edd019590b.tar.bz2 kiro-50a297a290c78c7feb0a4918efba82edd019590b.tar.xz kiro-50a297a290c78c7feb0a4918efba82edd019590b.zip |
Fixed KIRO client getting stuck in the RDMA event handler
Fix #8: KIRO Server and Client now have routines to handle async communication
Fix #6: Added kiro_client_ping_server and respective event handling to server
Changed kiro-test-latency to use the new kiro_client_ping_server instead
Diffstat (limited to 'src/kiro-rdma.h')
-rw-r--r-- | src/kiro-rdma.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/kiro-rdma.h b/src/kiro-rdma.h index 361dabc..5b4895f 100644 --- a/src/kiro-rdma.h +++ b/src/kiro-rdma.h @@ -19,6 +19,7 @@ #include <stdio.h> #include <stdlib.h> #include <unistd.h> +#include <sys/time.h> #ifndef __KIRO_RDMA_H__ #define __KIRO_RDMA_H__ @@ -42,9 +43,7 @@ struct kiro_connection_context { KIRO_IDLE, KIRO_MRI_REQUESTED, // Memory Region Information Requested KIRO_RDMA_ESTABLISHED, // MRI Exchange complete. RDMA is ready - KIRO_RDMA_ACTIVE, // RDMA Operation is being performed - KIRO_PING, // PING Message - KIRO_PONG // PONG Message (PING reply) + KIRO_RDMA_ACTIVE // RDMA Operation is being performed } rdma_state; }; @@ -55,11 +54,12 @@ struct kiro_ctrl_msg { enum { KIRO_REQ_RDMA, // Requesting RDMA Access to/from the peer KIRO_ACK_RDMA, // acknowledge RDMA Request and provide Memory Region Information - KIRO_REJ_RDMA // RDMA Request rejected :( (peer_mri will be invalid) + KIRO_REJ_RDMA, // RDMA Request rejected :( (peer_mri will be invalid) + KIRO_PING, // PING Message + KIRO_PONG // PONG Message (PING reply) } msg_type; struct ibv_mr peer_mri; - }; @@ -89,8 +89,8 @@ kiro_attach_qp (struct rdma_cm_id *id) qp_attr.send_cq = id->send_cq; qp_attr.recv_cq = id->recv_cq; qp_attr.qp_type = IBV_QPT_RC; - qp_attr.cap.max_send_wr = 1; - qp_attr.cap.max_recv_wr = 1; + qp_attr.cap.max_send_wr = 10; + qp_attr.cap.max_recv_wr = 10; qp_attr.cap.max_send_sge = 1; qp_attr.cap.max_recv_sge = 1; return rdma_create_qp (id, id->pd, &qp_attr); |