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

Rimmer, Todd trimmer at silverstorm.com
Mon Sep 25 12:32:42 PDT 2006



> From: Roland Dreier [mailto:rdreier at cisco.com]
> Sent: Monday, September 25, 2006 3:17 PM
> To: Rimmer, Todd
> Cc: Michael S. Tsirkin; openib-general at openib.org
> Subject: Re: [openib-general] [PATCH] IB/ipoib: NAPI
> 
>     Todd> I agree.  This would also mean the ipoib_warn in
>     Todd> ipoib_ib_completion would go away (would be a valid
>     Todd> situation).
> 
> Which warning?  I don't see anything that would change, and I don't
> see any warnings at all in ipoib_ib_completion().
> 

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.

Todd Rimmer




More information about the general mailing list