[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] netfront: Check availability of grant references in start_xmit().
# HG changeset patch # User kfraser@xxxxxxxxxxxxxxxxxxxxx # Date 1169727883 0 # Node ID 42aaf08dd20ec6cabf9b4c3aa536b918be352352 # Parent ee1febe317f72957c2cf2142dc7cf0cc6c46647d netfront: Check availability of grant references in start_xmit(). Signed-off-by: Tomonari Horikoshi <t.horikoshi@xxxxxxxxxxxxxx> --- linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c | 4 ++++ 1 files changed, 4 insertions(+) diff -r ee1febe317f7 -r 42aaf08dd20e linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c --- a/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c Thu Jan 25 11:58:00 2007 +0000 +++ b/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c Thu Jan 25 12:24:43 2007 +0000 @@ -613,6 +613,10 @@ static int network_open(struct net_devic static inline int netfront_tx_slot_available(struct netfront_info *np) { + /* XXX Need to check we have enough grants for worst-case fragments. */ + if (gnttab_empty_grant_references(&np->gref_tx_head)) + return 0; + return RING_FREE_REQUESTS(&np->tx) >= MAX_SKB_FRAGS + 2; } _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |