ia64/xen-unstable

changeset 483:0d6b14f25be6

bitkeeper revision 1.257 (3ef83e78zlLnwymIwasqq3xZQcUx-g)

minor fix: moved logging to locations suggested by KAF
author rgr22@boulderdash.cl.cam.ac.uk
date Tue Jun 24 12:05:12 2003 +0000 (2003-06-24)
parents a7588afbdfe5
children b6f13a6cdded
files xen/net/dev.c
line diff
     1.1 --- a/xen/net/dev.c	Tue Jun 10 16:39:25 2003 +0000
     1.2 +++ b/xen/net/dev.c	Tue Jun 24 12:05:12 2003 +0000
     1.3 @@ -574,6 +574,10 @@ void deliver_packet(struct sk_buff *skb,
     1.4  
     1.5   out:
     1.6      make_rx_response(vif, rx->id, size, status, offset);
     1.7 +
     1.8 +    /* record this so they can be billed */
     1.9 +    vif->total_packets_received++;
    1.10 +    vif->total_bytes_received += size;
    1.11  }
    1.12  
    1.13  /**
    1.14 @@ -765,6 +769,10 @@ static void net_tx_action(unsigned long 
    1.15          skb->data_len = tx->size - PKT_PROT_LEN;
    1.16          skb->len      = tx->size;
    1.17  
    1.18 +        /* record the transmission so they can be billed */
    1.19 +        vif->total_packets_sent++;
    1.20 +        vif->total_bytes_sent += tx->size;
    1.21 +
    1.22          /* Transmit should always work, or the queue would be stopped. */
    1.23          if ( dev->hard_start_xmit(skb, dev) != 0 )
    1.24          {
    1.25 @@ -1882,10 +1890,6 @@ long do_net_update(void)
    1.26                  make_tx_response(vif, tx.id, RING_STATUS_OK);
    1.27              }
    1.28  
    1.29 -            /* record the transmission so they can be billed */
    1.30 -            vif->total_packets_sent++;
    1.31 -            vif->total_bytes_sent += tx.size;
    1.32 -
    1.33          tx_unmap_and_continue:
    1.34              unmap_domain_mem(g_data);
    1.35              spin_unlock_irq(&current->page_lock);
    1.36 @@ -2041,10 +2045,6 @@ static void make_rx_response(net_vif_t  
    1.37          guest_event_notify(cpu_mask);    
    1.38      }
    1.39      spin_unlock_irqrestore(&vif->rx_lock, flags);
    1.40 -
    1.41 -    /* record this so they can be billed */
    1.42 -    vif->total_packets_received++;
    1.43 -    vif->total_bytes_received += size;
    1.44  }
    1.45  
    1.46