> > > > > > + 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 [EMAIL PROTECTED] _______________________________________________ general mailing list [email protected] http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general
