[NET]: Remove gso.segs field from netif protocol.
authorkfraser@dhcp93.uk.xensource.com <kfraser@dhcp93.uk.xensource.com>
Fri, 30 Jun 2006 09:04:22 +0000 (10:04 +0100)
committerkfraser@dhcp93.uk.xensource.com <kfraser@dhcp93.uk.xensource.com>
Fri, 30 Jun 2006 09:04:22 +0000 (10:04 +0100)
From: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Keir Fraser <keir@xensource.com>
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

index 56dc73116776420a3fb3fddc383e1e9021411644..93e39612bc3cc2cc8a701f77d0b0e6882cd3aa9c 100644 (file)
@@ -819,17 +819,20 @@ static void net_tx_action(unsigned long unused)
                        struct netif_extra_info *gso;
                        gso = &extras[XEN_NETIF_EXTRA_TYPE_GSO - 1];
 
+                       /* Currently on TCPv4 S.O. is supported. */
                        if (gso->u.gso.type != XEN_NETIF_GSO_TCPV4) {
-                               DPRINTK("Bad GSO type.\n");
+                               DPRINTK("Bad GSO type %d.\n", gso->u.gso.type);
                                kfree_skb(skb);
                                netbk_tx_err(netif, &txreq, i);
                                break;
                        }
 
                        skb_shinfo(skb)->gso_size = gso->u.gso.size;
-                       skb_shinfo(skb)->gso_segs = gso->u.gso.segs;
-                       skb_shinfo(skb)->gso_type =
-                               SKB_GSO_TCPV4 | SKB_GSO_DODGY;
+                       skb_shinfo(skb)->gso_type = SKB_GSO_TCPV4;
+
+                       /* Header must be checked, and gso_segs computed. */
+                       skb_shinfo(skb)->gso_type |= SKB_GSO_DODGY;
+                       skb_shinfo(skb)->gso_segs = 0;
                }
 
                gnttab_set_map_op(mop, MMAP_VADDR(pending_idx),
index 8ebcf841d4824bc290574a2a93e7e9f0e5ba5e8c..1c34a906147270a27ebc41ab9b234cfa79915692 100644 (file)
@@ -787,7 +787,6 @@ static int network_start_xmit(struct sk_buff *skb, struct net_device *dev)
                        tx->flags |= NETTXF_extra_info;
 
                gso->u.gso.size = skb_shinfo(skb)->gso_size;
-               gso->u.gso.segs = skb_shinfo(skb)->gso_segs;
                gso->u.gso.type = XEN_NETIF_GSO_TCPV4;
 
                gso->type = XEN_NETIF_EXTRA_TYPE_GSO;
index 39ca7b746110b5976ab7d46c89d003ef9f136df8..dfd9627fd90017e4f78ac9a267d159292b5f765c 100644 (file)
@@ -78,23 +78,19 @@ struct netif_extra_info {
     union {
         struct {
             /*
-             * Maximum payload size of each segment.  For example, for TCP this
+             * Maximum payload size of each segment. For example, for TCP this
              * is just the path MSS.
              */
             uint16_t size;
 
             /*
-             * Number of GSO segments.  This is the number of segments that
-             * have to be generated for this packet given the MSS.
-             */
-            uint16_t segs;
-
-            /*
-             * GSO type.  This determines the protocol of the packet and any
+             * GSO type. This determines the protocol of the packet and any
              * extra features required to segment the packet properly.
              */
             uint16_t type; /* XEN_NETIF_GSO_* */
         } gso;
+
+        uint16_t pad[3];
     } u;
 };