[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@gondor.apana.org.au>

Modified to only send notification if req_event index is set
appropriately.

Signed-off-by: Keir Fraser <keir@xensource.com>
This commit is contained in:
kfraser@localhost.localdomain committed 2006-07-28 17:13:08 +01:00
1 parent 648ad07608
commit d5dd60406f
2 files changed
+14 -5

No files matched your search

@@ -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(struct net_device *dev)
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(struct net_device *dev)
/* 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,
+4 -3
View File
@@ -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).
*/
/*
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.