From: Herbert Xu Subject: [4/9] [NET] front: Added feature-rx-notify Date: Fri, 28 Jul 2006 18:44:34 +1000 Message-ID: <20060728084434.GD22659@gondor.apana.org.au> References: <20060728084212.GA22620@gondor.apana.org.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <20060728084212.GA22620@gondor.apana.org.au> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Keir Fraser , Xen Development Mailing List List-Id: xen-devel@lists.xenproject.org Hi: [NET] front: Added feature-rx-notify This patch adds support to the frontend for notifying the backend whenever the rx ring is refilled. This is required in order for the backend to get a tx queue. Signed-off-by: Herbert Xu Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt -- diff -r c42c1f4bd148 -r b41da4470aa6 linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c --- a/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c Fri Jul 28 18:11:09 2006 +1000 +++ b/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c Fri Jul 28 18:11:21 2006 +1000 @@ -326,6 +326,12 @@ again: goto abort_transaction; } + err = xenbus_printf(xbt, dev->nodename, "feature-rx-notify", "%d", 1); + if (err) { + message = "writing feature-rx-notify"; + goto abort_transaction; + } + err = xenbus_transaction_end(xbt, 0); if (err) { if (err == -EAGAIN) @@ -683,6 +689,7 @@ static void network_alloc_rx_buffers(str np->rx.req_prod_pvt = req_prod + i; push: RING_PUSH_REQUESTS(&np->rx); + notify_remote_via_irq(np->irq); } static void xennet_make_frags(struct sk_buff *skb, struct net_device *dev, @@ -1221,7 +1228,6 @@ static void network_connect(struct net_d * packets. */ netif_carrier_on(dev); - notify_remote_via_irq(np->irq); network_tx_buf_gc(dev); network_alloc_rx_buffers(dev);