On 2020/11/19 3:11, Jason Gunthorpe wrote: > On Mon, Nov 16, 2020 at 07:33:28PM +0800, Weihang Li wrote: >> @@ -503,7 +581,23 @@ static inline int set_ud_wqe(struct hns_roce_qp *qp, >> if (ret) >> return ret; >> >> - set_extend_sge(qp, wr, &curr_idx, valid_num_sge); >> + if (wr->send_flags & IB_SEND_INLINE) { >> + ret = set_ud_inl(qp, wr, ud_sq_wqe, &curr_idx); >> + if (ret) >> + return ret; > > Why are you implementing this in the kernel? No kernel ULP sets this > flag? > > Jason > Hi Jason, Sorry, I don't understand. Some kernel users may set IB_SEND_INLINE when using UD, some may not, we just check this flag to decide how to fill the data into UD SQ WQE here. Thanks Weihang