[ofa-general] A question about tx lock in ipoib_flush_paths

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Roland Dreier <rdreier@...>, Eli Cohen <eli@...>, Jack Morgenstein <jackm@...>, Moni Shoua <monis@...>
Cc: general list <general@...>
Date: Friday, July 3, 2009 - 10:43 am

In ipoib_flush_paths(), we take the netif_tx_lock to remove a path
My question is - what data does this lock protect?
It isn't path->list and path->rb_node, because priv->lock is enough to protect them.

It might be neigh and neigh->ah, to avoid freeing the neighbour and its address
handle while ipoib_start_xmit() is using it, but this particular part is done *outside*
the tx lock.

Unless I'm missing something - shouldn't the code:

		spin_unlock_irqrestore(&priv->lock, flags);
		netif_tx_unlock_bh(dev);
		wait_for_completion(&path->done);
release >>	path_free(dev, path);
lock >>		netif_tx_lock_bh(dev);
		spin_lock_irqsave(&priv->lock, flags);

Be like this:

		spin_unlock_irqrestore(&priv->lock, flags);
		netif_tx_unlock_bh(dev);
		wait_for_completion(&path->done);
lock >>		netif_tx_lock_bh(dev);
release >>	path_free(dev, path);
		spin_lock_irqsave(&priv->lock, flags);


-Yossi
_______________________________________________
general mailing list
general@lists.openfabrics.org
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[ofa-general] A question about tx lock in ipoib_flush_paths, Yossi Etigin, (Fri Jul 3, 10:43 am)