On 2020/9/30 0:54, Jason Gunthorpe wrote: > On Sun, Sep 27, 2020 at 05:45:01PM +0800, Weihang Li wrote: >> @@ -517,7 +514,18 @@ static inline int set_ud_wqe(struct hns_roce_qp *qp, >> >> set_extend_sge(qp, wr, &curr_idx, valid_num_sge); >> >> + /* >> + * The pipeline can sequentially post all valid WQEs into WQ buffer, >> + * including new WQEs waiting for the doorbell to update the PI again. >> + * Therefore, the owner bit of WQE MUST be updated after all fields >> + * and extSGEs have been written into DDR instead of cache. >> + */ >> + if (qp->en_flags & HNS_ROCE_QP_CAP_OWNER_DB) >> + wmb(); > > Should this be dma_wmb() ? > > Jason > Yes, dma_wmb() is better, thank you. Weihang