Re: [PATCH v2 3/4] IB/mlx5, ib_post_send(), IB_WR_REG_SIG_MR: Do not modify the 'wr' argument

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, 2018-07-08 at 10:30 +0300, Leon Romanovsky wrote:
> On Fri, Jul 06, 2018 at 04:08:10PM -0700, Bart Van Assche wrote:
> > +static int begin_wqe(struct mlx5_ib_qp *qp, void **seg,
> > +		     struct mlx5_wqe_ctrl_seg **ctrl,
> > +		     const struct ib_send_wr *wr, unsigned *idx,
> > +		     int *size, int nreq)
> > +{
> > +	return __begin_wqe(qp, seg, ctrl, wr, idx, size, nreq,
> > +			   wr->send_flags & IB_SEND_SIGNALED,
> > +			   wr->send_flags & IB_SEND_SOLICITED);
> > +}
> 
> It adds an extra call to data-path, most probably the effect of it will
> be neglected, but it needs Ack from Max.

Hi Leon,

Since this patch changes begin_wqe() into a one-line function I expect that the
compiler will inline __begin_wqe() into begin_wqe().

> >  static void finish_wqe(struct mlx5_ib_qp *qp,
> >  		       struct mlx5_wqe_ctrl_seg *ctrl,
> >  		       u8 size, unsigned idx, u64 wr_id,
> > @@ -4499,10 +4507,8 @@ static int _mlx5_ib_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr,
> >  				 * SET_PSV WQEs are not signaled and solicited
> >  				 * on error
> >  				 */
> > -				wr->send_flags &= ~IB_SEND_SIGNALED;
> > -				wr->send_flags |= IB_SEND_SOLICITED;
> > -				err = begin_wqe(qp, &seg, &ctrl, wr,
> > -						&idx, &size, nreq);
> > +				err = __begin_wqe(qp, &seg, &ctrl, wr, &idx,
> > +						  &size, nreq, 0, 1);
> 
> 1. 0 -> false, 1 -> true
> 2. There is another begin_wqe() in the case of IB_WR_REG_SIG_MR which
> needs proper wr->send_flags.

I will use true and false instead of 1 and 0. But please note that the prototype
of begin_wqe() has not been changed so the begin_wqe() calls that do not modify
the work request send flags do not have to be modified.

Bart.




��.n��������+%������w��{.n�����{���fk��ܨ}���Ơz�j:+v�����w����ޙ��&�)ߡ�a����z�ޗ���ݢj��w�f




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux