> - if (reg->mr->need_inval) { > - reg->inv_wr.opcode = IB_WR_LOCAL_INV; > - reg->inv_wr.ex.invalidate_rkey = reg->mr->lkey; > - reg->inv_wr.next = ®->reg_wr.wr; > - count++; > - } else { > - reg->inv_wr.next = NULL; > - } > + count += rdma_rw_inv_key(reg); Splitting out this helper seems separate, would be nice to have it as a prep patch separate from this big one. > + memcpy(ctx->reg->mr->sig_attrs, sig_attrs, sizeof(struct ib_sig_attrs)); Why do we need to do a struct copy here instead of setting up a pointer? Otherwise looks good: Reviewed-by: Christoph Hellwig <hch@xxxxxx>