Re: [PATCH 07/32] IB/mad: Convert ib_mad_clients to XArray

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

 



On Wed, Feb 20, 2019 at 04:58:31PM -0800, Ira Weiny wrote:
> > +	ret2 = xa_alloc_cyclic(&ib_mad_clients, &mad_agent_priv->agent.hi_tid,
> > +			mad_agent_priv, XA_LIMIT(0, (1 << 24) - 1),
> > +			&ib_mad_client_next, GFP_KERNEL);
> >  	if (ret2 < 0) {
> >  		ret = ERR_PTR(ret2);
> >  		goto error5;
> >  	}
> > -	mad_agent_priv->agent.hi_tid = ret2;
> 
> Why are we removing this?

xa_alloc() and xa_alloc_cyclic() write to the ID before storing the
pointer in the array.

> >  
> > -	/* Client ID 0 is used for snoop-only clients */
> > -	idr_alloc(&ib_mad_clients, NULL, 0, 0, GFP_KERNEL);
> > -
> 
> Hal, will this somehow break the snoop stuff?  It is not straight forward why
> we needed this before and I've been trying to remove the snoop stuff...  ;-)

> > +/* Client ID 0 is used for snoop-only clients */
> > +static DEFINE_XARRAY_ALLOC1(ib_mad_clients);

I didn't change that behaviour.



[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