[ofa-general] IBV_WC_LOC_PROT_ERROR in receive

Bharath Ramesh bramesh at vt.edu
Mon Sep 17 21:22:02 PDT 2007


I am getting this error when I am trying to do a bunch of send/receives.
I have registered the receive buffer. I printed the address of the
buffers and their respective lkeys, they all match but I am still
getting this error.

The code snippet looks as follows:

struct ibv_mr *mr;
struct ibv_sge sge;
struct ibv_recv_wr wr;
struct ibv_recv_wr *wr_bad;

// registering buffers
mr = ibv_reg_mr (ib_pd, buf, size, IBV_ACCESS_LOCAL_WRITE |
                        IBV_ACCESS_REMOTE_READ |
			IBV_ACCESS_REMOTE_WRITE);


//Post the receive buffer
sge.addr = (uintptr_t) buf;
sge.length = size;
sge.lkey = mr->lkey;
wr.wr_id = WR_ID;
wr.next = NULL;
wr.sg_list = &sge;
wr.num_sge = 1;
if (ibv_post_recv (ib_qp, &wr, &wr_bad) != 0) {
  printf ("ERROR: Unable to post receiver buffer.\n");
  return -1;
}

When I poll for the completion event I get this error. Any help on this
is appreciated. I am not subscribed to this list, I would appreciate if
you please cc me on the reply.

Thanks,

Bharath

---
Bharath Ramesh       <bramesh at vt.edu>       http://people.cs.vt.edu/~bramesh




More information about the general mailing list