[ofa-general] Re: question on netpoll
Michael S. Tsirkin
mst at dev.mellanox.co.il
Thu May 24 08:12:54 PDT 2007
> Quoting Michael S. Tsirkin <mst at dev.mellanox.co.il>:
> Subject: question on netpoll
>
> Roland, there's something I don't understand in ipoib:
> ipoib_ib_dev_stop currently moves QP to error, and then
> waits for it to be drained of WRs.
>
> However, if this is done during dev_stop,
> netpoll is turned off (bit __LINK_STATE_START is cleared) -
> so what is draining the CQ?
OK, I noticed the following at the end of dev stop:
do {
n = ib_poll_cq(priv->cq, IPOIB_NUM_WC, priv->ibwc);
for (i = 0; i < n; ++i) {
if (priv->ibwc[i].wr_id & IPOIB_CM_OP_SRQ)
ipoib_cm_handle_rx_wc(dev, priv->ibwc + i);
else if (priv->ibwc[i].wr_id & IPOIB_OP_RECV)
ipoib_ib_handle_rx_wc(dev, priv->ibwc + i);
else
ipoib_ib_handle_tx_wc(dev, priv->ibwc + i);
}
} while (n == IPOIB_NUM_WC);
However: this could call netif_receive_skb - would that be a problem?
For example, what if we don't have any quota left?
--
MST
More information about the general
mailing list