Re: [PATCH] Fix sendonly join going away after Reregister event

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

 



On Fri, Jan 22, 2021 at 08:24:57AM +0000, Christoph Lameter wrote:
> On Thu, 21 Jan 2021, Leon Romanovsky wrote:
>
> > >  	spin_lock_irqsave(&port->classport_lock, flags);
> > > -	if ((port->classport_info.valid) &&
> > > -	    (port->classport_info.data.type == RDMA_CLASS_PORT_INFO_IB))
> > > +	if (!port->classport_info.valid) {
> > > +		/* Need to wait until the SM data is available */
> > > +		spin_unlock_irqrestore(&port->classport_lock, flags);
> > > +		goto redo;
> >
> > We have all potential to loop forever here, if valid doesn't change.
> >
>
> Right. So what is the right solution here? The sendonly check function could return
> an errno instead?
>
> 0	= Sendonly join is supported
> -EAGAIN = SM information is currently invalid
> -ENOSUP = SM does not support sendonly join

I would do the same flow as in update_ib_cpi(), use retry count and loop
with delay, but without workqueue.

>
> Since all SMs out there have had support for sendonly join for years now
> we could just remove the check entirely. If there is an old grizzly SM out
> there then it would not process that join request and would return an
> error.

I have no idea if it possible, if yes, this will be the best solution.

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