>>> + spin_lock_irqsave(&priv->lock, flags); >>> + --priv->tx_outstanding; >>> + if (netif_queue_stopped(dev)) >>> + netif_wake_queue(dev); >>> + spin_unlock_irqrestore(&priv->lock, flags); >> >> Why are you locking the netif_* calls? > > > Yes, I intended to do that. This make the accessing on tx_outstanding and > the reopening of the send queue in the same atomic session which is the > expected behavior. > Otherwise, we may have the following problem: > #time order > > thread1(on cpu1) thread2(on cpu2) > lock > modify/check tx_outstanding > unlock > > > lock > modify/check tx_outstanding > unlock > > reopen queue > > > stop queue > > > So that we actually want reopen the send queue, but the result is we stopped > it. Thanks for the explanation.
> > thanks, > wengang > -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html