lihaidong wrote:
Mr.Wise
|||                 else {
||| ||| cb->rdma_sq_wr.opcode = IB_WR_RDMA_READ;
|||                         if (cb->mem == FASTREG) {
||| /* ||| * Immediately follow the read with a ||| * fenced LOCAL_INV.
|||                                  */
|||                                 cb->rdma_sq_wr.next = &inv;
|||                                 memset(&inv, 0, sizeof inv);
|||                                 inv.opcode = IB_WR_LOCAL_INV;
|||                                 inv.ex.invalidate_rkey = 
cb->fastreg_mr->rkey;
|||                                 inv.send_flags = IB_SEND_FENCE;
|||                         }
|||                 }
||| ||| ret = ib_post_send(cb->qp, &cb->rdma_sq_wr, &bad_wr);
|||                 if (ret) {
|||                         printk(KERN_ERR PFX "post send error %d\n", ret);
|||                         break;
|||                 }
|||                 cb->rdma_sq_wr.next = NULL;
the last line, is that safe? There's an invalidate wr following rdma_sq_wr.This line will not disturb invalidate wr being performed in lower level, right?

Correct. The work requests are copied by the verbs layer. So once you return from ib_post_send, the send work request structure itself can be reused/freed/whatever.


--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to