[ofa-general] [PATCH] ipoib: defer skb_orphan() until irqs enabled
Roland Dreier
rdreier at cisco.com
Thu Sep 11 14:19:24 PDT 2008
> I don't think there is a problem. The only SKB which is subject to
> this race, is the one we that we posted right after stopping the net
> queue. But the interrupt handler (resulting from arming the CQ) and
> possibly the following timer invocations, will drain the CQ up to the
> point where there are half the queue outstanding WRs. But and this one
> is at the other half of the queue.
Maybe I'm missing something but where is the logic that stops draining
the CQ? I just see
static int poll_tx(struct ipoib_dev_priv *priv)
{
int n, i;
n = ib_poll_cq(priv->send_cq, MAX_SEND_CQE, priv->send_wc);
for (i = 0; i < n; ++i)
ipoib_ib_handle_tx_wc(priv->dev, priv->send_wc + i);
return n == MAX_SEND_CQE;
}
and
static void drain_tx_cq(struct net_device *dev)
{
struct ipoib_dev_priv *priv = netdev_priv(dev);
unsigned long flags;
spin_lock_irqsave(&priv->tx_lock, flags);
while (poll_tx(priv))
; /* nothing */
which seem like they could easily poll that last completion.
More information about the general
mailing list