[ofa-general] Re: IPOIB CM (NOSRQ)[PATCH V3] patch for review

Pradeep Satyanarayana pradeep at us.ibm.com
Wed May 2 18:39:15 PDT 2007


> 
> > 
> > > +   spin_lock_irqsave(&priv->lock, flags);
> > > +   rx_ptr = priv->cm.rx_index_ring[index];
> > > +   spin_unlock_irqrestore(&priv->lock, flags);
> > 
> > 3. You never actually test the rx_ptr that you got.
> >    So why does locking help?
> >    A better way to destroy QPs might be to move it to error state 
first.
> 
> In ipoib_cm_stale_task(): priv->cm.rx_index_ring[p->index] = NULL;
> this assignment does happen under lock. All I need to do (in the code 
snippet 
> above you point out) is check if rx_pt == NULL, if so drop the packet.
> I did think about this one, but never implemented it.
> 

I get what you suggest. Move the QP to error state under a lock and then
destroy it subsequently. Since the QP is in error state, nothing else 
should
come through and we can eliminate the locking -right?

Yes, this is doable, just that we need to check if rx_ptr == NULL check 
and
drop it if that is the case.

Pradeep
pradeep at us.ibm.com



More information about the general mailing list