ia64/xen-unstable

changeset 2563:b68e751add47

bitkeeper revision 1.1159.1.188 (415811d1m0nK1omm86T97uO0zh9rqw)

Increase rx headroom.
author kaf24@freefall.cl.cam.ac.uk
date Mon Sep 27 13:12:49 2004 +0000 (2004-09-27)
parents 464c5ab1400e
children 0a062a592e97
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	Mon Sep 27 10:34:30 2004 +0000
     1.2 +++ b/linux-2.6.8.1-xen-sparse/drivers/xen/netfront/netfront.c	Mon Sep 27 13:12:49 2004 +0000
     1.3 @@ -32,14 +32,10 @@
     1.4  #define DEBUG 0
     1.5  
     1.6  #if DEBUG
     1.7 -
     1.8  #define DPRINTK(fmt, args...) \
     1.9      printk(KERN_INFO "[XEN] %s" fmt, __FUNCTION__, ##args)
    1.10 -
    1.11  #else
    1.12 -
    1.13  #define DPRINTK(fmt, args...) ((void)0)
    1.14 -
    1.15  #endif
    1.16  
    1.17  #define IPRINTK(fmt, args...) \
    1.18 @@ -51,8 +47,6 @@
    1.19  #define EPRINTK(fmt, args...) \
    1.20      printk(KERN_ERROR "[XEN]" fmt, ##args)
    1.21  
    1.22 -
    1.23 -
    1.24  #ifndef __GFP_NOWARN
    1.25  #define __GFP_NOWARN 0
    1.26  #endif
    1.27 @@ -66,7 +60,7 @@
    1.28      } while ( 0 )
    1.29  
    1.30  /* Allow headroom on each rx pkt for Ethernet header, alignment padding, ... */
    1.31 -#define RX_HEADROOM 100
    1.32 +#define RX_HEADROOM 200
    1.33  
    1.34  /*
    1.35   * If the backend driver is pipelining transmit requests then we can be very
    1.36 @@ -757,9 +751,10 @@ static void network_connect(struct net_d
    1.37      spin_unlock_irq(&np->tx_lock);
    1.38  }
    1.39  
    1.40 -static void vif_show(struct net_private *np){
    1.41 +static void vif_show(struct net_private *np)
    1.42 +{
    1.43  #if DEBUG
    1.44 -    if(np){
    1.45 +    if (np) {
    1.46          IPRINTK(" <vif handle=%u %s(%s) evtchn=%u irq=%u tx=%p rx=%p>\n",
    1.47                 np->handle,
    1.48                 be_state_name[np->backend_state],
    1.49 @@ -774,9 +769,9 @@ static void vif_show(struct net_private 
    1.50  #endif
    1.51  }
    1.52  
    1.53 -/* Send a connect message to xend to tell it to bring up the interface.
    1.54 - */
    1.55 -static void send_interface_connect(struct net_private *np){
    1.56 +/* Send a connect message to xend to tell it to bring up the interface. */
    1.57 +static void send_interface_connect(struct net_private *np)
    1.58 +{
    1.59      ctrl_msg_t cmsg = {
    1.60          .type    = CMSG_NETIF_FE,
    1.61          .subtype = CMSG_NETIF_FE_INTERFACE_CONNECT,
    1.62 @@ -1034,8 +1029,8 @@ static void netif_interface_status(netif
    1.63      switch (status->status) {
    1.64  
    1.65      case NETIF_INTERFACE_STATUS_CLOSED:
    1.66 -        switch(np->backend_state){
    1.67 -
    1.68 +        switch ( np->backend_state )
    1.69 +        {
    1.70          case BEST_CLOSED:
    1.71          case BEST_DISCONNECTED:
    1.72          case BEST_CONNECTED:
    1.73 @@ -1045,12 +1040,11 @@ static void netif_interface_status(netif
    1.74          break;
    1.75  
    1.76      case NETIF_INTERFACE_STATUS_DISCONNECTED:
    1.77 -        switch(np->backend_state){
    1.78 -
    1.79 +        switch ( np->backend_state )
    1.80 +        {
    1.81          case BEST_CLOSED:
    1.82              vif_disconnect(np);
    1.83              break;
    1.84 -
    1.85          case BEST_DISCONNECTED:
    1.86          case BEST_CONNECTED:
    1.87              vif_reset(np);
    1.88 @@ -1059,29 +1053,24 @@ static void netif_interface_status(netif
    1.89          break;
    1.90  
    1.91      case NETIF_INTERFACE_STATUS_CONNECTED:
    1.92 -        switch(np->backend_state){
    1.93 -
    1.94 +        switch ( np->backend_state )
    1.95 +        {
    1.96          case BEST_CLOSED:
    1.97              unexpected(np, status);
    1.98              vif_disconnect(np);
    1.99              vif_connect(np, status);
   1.100              break;
   1.101 -
   1.102          case BEST_DISCONNECTED:
   1.103              vif_connect(np, status);
   1.104              break;
   1.105 -
   1.106 -        case BEST_CONNECTED:
   1.107 -            //todo Do what?
   1.108 -            unexpected(np, status);
   1.109 -            break;
   1.110          }
   1.111          break;
   1.112  
   1.113      case NETIF_INTERFACE_STATUS_CHANGED:
   1.114 -        /* The domain controller is notifying us that a device has been
   1.115 -        * added or removed.
   1.116 -        */
   1.117 +        /*
   1.118 +         * The domain controller is notifying us that a device has been
   1.119 +         * added or removed.
   1.120 +         */
   1.121          break;
   1.122  
   1.123      default: