Thanks for the reply. I read your name under the Author for may be all the IBV structs/operations at <a href="http://linux.die.net" target="_blank">linux.die.net</a>. So I am highly impressed by the work (can only dream of it myself). :)<br>
<br>1. I don't know why the original author (Roland Dreir) has used ntohl() for rkey and remote_addr. Though to use it on buffer (buf) is essential in order to transfer the byte order from network to host.<br>
<br>2. I am using QP type RC for reliable connection.<br><br>3. Yes I am checking for that but the code gets stuck before that, around when I call ibv_get_cq_event to wait for next completion event in the event channel. I think the second write (second iteration of for loop) is not working properly since when I try to send buf[0] via RDMA_WRITE and buf[1] via SEND then it works fine.<br>
<br>The code I am walking about:<br><br> while(1) {<br> if(ibv_get_cq_event(comp_chan, &evt_cq, &cq_context)) // here it gets stuck<br> return 1;<br><br>// does not print this<br>printf("after get_cq_event\n"); fflush(stdout);<br>
<br> if(ibv_req_notify_cq(cq, 0))<br> return 1;<br><br>printf("after req_notify_cq\n"); fflush(stdout);<br><br> if(ibv_poll_cq(cq, 1, &wc) != 1)<br> return 1;<br><br>printf("after poll_cq\n"); fflush(stdout);<br>
<br> if(wc.status != IBV_WC_SUCCESS)<br> return 1;<br><br>printf("after wc.status\n"); fflush(stdout);<br><br> if(wc.wr_id == 0) {<br> printf("%d\n", ntohl(buf[0])); fflush(stdout);<br>
return 0;<br> }<br> }<br><br>Your thoughts on this?<br><br>Thanks,<br>zafar<br>