ia64/xen-unstable

changeset 2484:34a8c72f217f

bitkeeper revision 1.1159.1.153 (41495dc4v3GzGJz41U0jh2uqLzhlIw)

Fix ping with large/fragmented packets from domU to dom0.
author cl349@freefall.cl.cam.ac.uk
date Thu Sep 16 09:32:52 2004 +0000 (2004-09-16)
parents f0629dc22034
children 75c62d5f88c3
files linux-2.6.8.1-xen-sparse/drivers/xen/netfront/netfront.c
line diff
     1.1 --- a/linux-2.6.8.1-xen-sparse/drivers/xen/netfront/netfront.c	Tue Sep 14 09:15:27 2004 +0000
     1.2 +++ b/linux-2.6.8.1-xen-sparse/drivers/xen/netfront/netfront.c	Thu Sep 16 09:32:52 2004 +0000
     1.3 @@ -393,11 +393,12 @@ static int network_start_xmit(struct sk_
     1.4      tx->size = skb->len;
     1.5  
     1.6      wmb(); /* Ensure that backend will see the request. */
     1.7 -    np->tx->req_prod = i + 1;
     1.8 +    i++;
     1.9 +    np->tx->req_prod = i;
    1.10  
    1.11      network_tx_buf_gc(dev);
    1.12  
    1.13 -    if ( (i - np->tx_resp_cons) == (NETIF_TX_RING_SIZE - 1) )
    1.14 +    if ( (i - np->tx_resp_cons) == NETIF_TX_RING_SIZE )
    1.15      {
    1.16          np->tx_full = 1;
    1.17          netif_stop_queue(dev);
    1.18 @@ -410,7 +411,7 @@ static int network_start_xmit(struct sk_
    1.19  
    1.20      /* Only notify Xen if there are no outstanding responses. */
    1.21      mb();
    1.22 -    if ( np->tx->resp_prod == i )
    1.23 +    if ( np->tx->resp_prod != i )
    1.24          notify_via_evtchn(np->evtchn);
    1.25  
    1.26      return 0;