ia64/xen-unstable

changeset 10612:5db7bbccf4d2

[NET]: Remove gso.segs field from netif protocol.
From: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Keir Fraser <keir@xensource.com>
author kfraser@dhcp93.uk.xensource.com
date Fri Jun 30 10:04:22 2006 +0100 (2006-06-30)
parents f147efaa24ad
children c9696012fe05
files linux-2.6-xen-sparse/drivers/xen/netback/netback.c linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c xen/include/public/io/netif.h
line diff
     1.1 --- a/linux-2.6-xen-sparse/drivers/xen/netback/netback.c	Fri Jun 30 09:52:04 2006 +0100
     1.2 +++ b/linux-2.6-xen-sparse/drivers/xen/netback/netback.c	Fri Jun 30 10:04:22 2006 +0100
     1.3 @@ -819,17 +819,20 @@ static void net_tx_action(unsigned long 
     1.4  			struct netif_extra_info *gso;
     1.5  			gso = &extras[XEN_NETIF_EXTRA_TYPE_GSO - 1];
     1.6  
     1.7 +			/* Currently on TCPv4 S.O. is supported. */
     1.8  			if (gso->u.gso.type != XEN_NETIF_GSO_TCPV4) {
     1.9 -				DPRINTK("Bad GSO type.\n");
    1.10 +				DPRINTK("Bad GSO type %d.\n", gso->u.gso.type);
    1.11  				kfree_skb(skb);
    1.12  				netbk_tx_err(netif, &txreq, i);
    1.13  				break;
    1.14  			}
    1.15  
    1.16  			skb_shinfo(skb)->gso_size = gso->u.gso.size;
    1.17 -			skb_shinfo(skb)->gso_segs = gso->u.gso.segs;
    1.18 -			skb_shinfo(skb)->gso_type =
    1.19 -				SKB_GSO_TCPV4 | SKB_GSO_DODGY;
    1.20 +			skb_shinfo(skb)->gso_type = SKB_GSO_TCPV4;
    1.21 +
    1.22 +			/* Header must be checked, and gso_segs computed. */
    1.23 +			skb_shinfo(skb)->gso_type |= SKB_GSO_DODGY;
    1.24 +			skb_shinfo(skb)->gso_segs = 0;
    1.25  		}
    1.26  
    1.27  		gnttab_set_map_op(mop, MMAP_VADDR(pending_idx),
     2.1 --- a/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c	Fri Jun 30 09:52:04 2006 +0100
     2.2 +++ b/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c	Fri Jun 30 10:04:22 2006 +0100
     2.3 @@ -787,7 +787,6 @@ static int network_start_xmit(struct sk_
     2.4  			tx->flags |= NETTXF_extra_info;
     2.5  
     2.6  		gso->u.gso.size = skb_shinfo(skb)->gso_size;
     2.7 -		gso->u.gso.segs = skb_shinfo(skb)->gso_segs;
     2.8  		gso->u.gso.type = XEN_NETIF_GSO_TCPV4;
     2.9  
    2.10  		gso->type = XEN_NETIF_EXTRA_TYPE_GSO;
     3.1 --- a/xen/include/public/io/netif.h	Fri Jun 30 09:52:04 2006 +0100
     3.2 +++ b/xen/include/public/io/netif.h	Fri Jun 30 10:04:22 2006 +0100
     3.3 @@ -78,23 +78,19 @@ struct netif_extra_info {
     3.4      union {
     3.5          struct {
     3.6              /*
     3.7 -             * Maximum payload size of each segment.  For example, for TCP this
     3.8 +             * Maximum payload size of each segment. For example, for TCP this
     3.9               * is just the path MSS.
    3.10               */
    3.11              uint16_t size;
    3.12  
    3.13              /*
    3.14 -             * Number of GSO segments.  This is the number of segments that
    3.15 -             * have to be generated for this packet given the MSS.
    3.16 -             */
    3.17 -            uint16_t segs;
    3.18 -
    3.19 -            /*
    3.20 -             * GSO type.  This determines the protocol of the packet and any
    3.21 +             * GSO type. This determines the protocol of the packet and any
    3.22               * extra features required to segment the packet properly.
    3.23               */
    3.24              uint16_t type; /* XEN_NETIF_GSO_* */
    3.25          } gso;
    3.26 +
    3.27 +        uint16_t pad[3];
    3.28      } u;
    3.29  };
    3.30