[openib-general] [PATCH] IB/ipoib: NAPI

Michael S. Tsirkin mst at mellanox.co.il
Mon Sep 25 12:35:58 PDT 2006


Quoting r. Rimmer, Todd <trimmer at silverstorm.com>:
> In Eli's proposed code:
> +void ipoib_ib_completion(struct ib_cq *cq, void *dev_ptr) {
> +	struct net_device *dev = (struct net_device *) dev_ptr;
> +	struct ipoib_dev_priv *priv = netdev_priv(dev);
> +
> +	/* tell the network layer we have packts */
> +        if (netif_rx_schedule_prep(dev))
> +		__netif_rx_schedule(dev);
> +	else {
> +		ipoib_warn(priv, "received interupt while in
> polling\n");
> +	}
>  }
> 
> The call to ipoib_warn should be removed if you go with a peek and
> reschedule approach, because after notify has been called, we could get
> a completion callback after the peek has decided to reschedule the poll.

right.

-- 
MST




More information about the general mailing list