[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] [NET] front: Added feature-rx-notify
# HG changeset patch # User kfraser@xxxxxxxxxxxxxxxxxxxxx # Node ID 23c37bc942da6cffaa9936784af7913a0a091675 # Parent 2e91ad1a89ce35c522e8989593cd2d4e83f04755 [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 <herbert@xxxxxxxxxxxxxxxxxxx> Modified to only send notification if req_event index is set appropriately. Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx> --- linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c | 12 ++++++++++-- xen/include/public/io/netif.h | 7 ++++--- 2 files changed, 14 insertions(+), 5 deletions(-) diff -r 2e91ad1a89ce -r 23c37bc942da linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c --- a/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c Fri Jul 28 17:04:55 2006 +0100 +++ b/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c Fri Jul 28 17:13:08 2006 +0100 @@ -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) @@ -569,7 +575,7 @@ static void network_alloc_rx_buffers(str unsigned short id; struct netfront_info *np = netdev_priv(dev); struct sk_buff *skb; - int i, batch_target; + int i, batch_target, notify; RING_IDX req_prod = np->rx.req_prod_pvt; struct xen_memory_reservation reservation; grant_ref_t ref; @@ -682,7 +688,9 @@ static void network_alloc_rx_buffers(str /* Above is a suitable barrier to ensure backend will see requests. */ np->rx.req_prod_pvt = req_prod + i; push: - RING_PUSH_REQUESTS(&np->rx); + RING_PUSH_REQUESTS_AND_CHECK_NOTIFY(&np->rx, notify); + if (notify) + notify_remote_via_irq(np->irq); } static void xennet_make_frags(struct sk_buff *skb, struct net_device *dev, diff -r 2e91ad1a89ce -r 23c37bc942da xen/include/public/io/netif.h --- a/xen/include/public/io/netif.h Fri Jul 28 17:04:55 2006 +0100 +++ b/xen/include/public/io/netif.h Fri Jul 28 17:13:08 2006 +0100 @@ -13,10 +13,11 @@ #include "../grant_table.h" /* - * Note that there is *never* any need to notify the backend when - * enqueuing receive requests (struct netif_rx_request). Notifications - * after enqueuing any other type of message should be conditional on + * Notifications after enqueuing any type of message should be conditional on * the appropriate req_event or rsp_event field in the shared ring. + * If the client sends notification for rx requests then it should specify + * feature 'feature-rx-notify' via xenbus. Otherwise the backend will assume + * that it cannot safely queue packets (as it may not be kicked to send them). */ /* _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |