Re: [PATCH rdma-next 3/3] RDMA/rw: Support threshold for registration vs scattering to local pages

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

 



On Sun, Oct 06, 2019 at 11:58:25PM -0700, Christoph Hellwig wrote:
> >  /*
> > - * Check if the device might use memory registration.  This is currently only
> > - * true for iWarp devices. In the future we can hopefully fine tune this based
> > - * on HCA driver input.
> > + * Check if the device might use memory registration.
> >   */
>
> Please keep the important bits of this comments instead of just
> removing them.
>
> >  {
> > @@ -30,6 +28,8 @@ static inline bool rdma_rw_can_use_mr(struct ib_device *dev, u8 port_num)
> >  		return true;
> >  	if (unlikely(rdma_rw_force_mr))
> >  		return true;
> > +	if (dev->attrs.max_sgl_rd)
> > +		return true;
>
> Logically this should go before the rdma_rw_force_mr check.
>
> >  	if (unlikely(rdma_rw_force_mr))
> >  		return true;
> > +	if (dev->attrs.max_sgl_rd && dir == DMA_FROM_DEVICE
> > +	    && dma_nents > dev->attrs.max_sgl_rd)
>
> Wrong indendation.  The && belongs on the first line.  And again, this
> logically belongs before the rdma_rw_force_mr check.

I'll fix.

Thanks



[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