[ofa-general] ibverbs help

Kelly Burkhart kelly at tradebotsystems.com
Fri Oct 24 07:00:32 PDT 2008


Hello,

I have written a simple program as my first foray into verbs
programming.  The intent is to create a connection and do a single send.
The logic (ripped primarily from rc_pingpong) is this:

get device
ibv_open_device
ibv_alloc_pd
allocate buffer
ibv_reg_mr
ibv_create_cq
ibv_create_qp
ibv_modify_qp  (set to INIT)
ibv_query_port (exchange lid/qp_num with peer)
ibv_modify_qp  (set to RTR, set remote qpnum, lid)
ibv_modify_qp  (set to RTS)

SERVER:
  ibv_post_recv
  ibv_poll_cq  (loop)

CLIENT:
  ibv_post_send
  ibv_poll_cq  (loop)

My assumption is that when I call ibv_post_send or ibv_post_recv, that I
should be able to receive notification of the completion of that call by
spinning on ibv_poll_cq until the work completion is available.
However, my program spins on ibv_poll_cq indefinitely.  Is there an
error in my understanding?  Or an error in my program (attached).

To run:

test_ibv_simple  (run as server)
test_ibv_simple asdf  (any arg will cause client)

Thanks,

-Kelly
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test_ibv_simple.cpp
Type: application/octet-stream
Size: 15690 bytes
Desc: test_ibv_simple.cpp
URL: <http://lists.openfabrics.org/pipermail/general/attachments/20081024/8e4c5a49/attachment.obj>


More information about the general mailing list