[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] netfront: Better fix for netfront_tx_slot_available().
# HG changeset patch # User kfraser@xxxxxxxxxxxxxxxxxxxxx # Date 1169744301 0 # Node ID e19f9d6a2ff594c948b66c7dc43dd70fecab1d3f # Parent fec1a697558853ffc61e1d8047a5dc2fa965e6a8 netfront: Better fix for netfront_tx_slot_available(). Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx> --- linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c | 7 ++----- 1 files changed, 2 insertions(+), 5 deletions(-) diff -r fec1a6975588 -r e19f9d6a2ff5 linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c --- a/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c Thu Jan 25 16:32:19 2007 +0000 +++ b/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c Thu Jan 25 16:58:21 2007 +0000 @@ -613,11 +613,8 @@ 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; + return ((np->tx.req_prod_pvt - np->tx.rsp_cons) < + (TX_MAX_TARGET - MAX_SKB_FRAGS - 2)); } static inline void network_maybe_wake_tx(struct net_device *dev) _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |