[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] [NET]: Remove gso.segs field from netif protocol.



# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxxxx
# Node ID 5db7bbccf4d2d759265415085fa81094893f60a9
# Parent  f147efaa24adf9f369c3483c651eb23fb60cd65e
[NET]: Remove gso.segs field from netif protocol.
From: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
 linux-2.6-xen-sparse/drivers/xen/netback/netback.c   |   11 +++++++----
 linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c |    1 -
 xen/include/public/io/netif.h                        |   12 ++++--------
 3 files changed, 11 insertions(+), 13 deletions(-)

diff -r f147efaa24ad -r 5db7bbccf4d2 
linux-2.6-xen-sparse/drivers/xen/netback/netback.c
--- a/linux-2.6-xen-sparse/drivers/xen/netback/netback.c        Fri Jun 30 
09:52:04 2006 +0100
+++ b/linux-2.6-xen-sparse/drivers/xen/netback/netback.c        Fri Jun 30 
10:04:22 2006 +0100
@@ -819,17 +819,20 @@ static void net_tx_action(unsigned long 
                        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),
diff -r f147efaa24ad -r 5db7bbccf4d2 
linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c
--- a/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c      Fri Jun 30 
09:52:04 2006 +0100
+++ b/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c      Fri Jun 30 
10:04:22 2006 +0100
@@ -787,7 +787,6 @@ static int network_start_xmit(struct sk_
                        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;
diff -r f147efaa24ad -r 5db7bbccf4d2 xen/include/public/io/netif.h
--- a/xen/include/public/io/netif.h     Fri Jun 30 09:52:04 2006 +0100
+++ b/xen/include/public/io/netif.h     Fri Jun 30 10:04:22 2006 +0100
@@ -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;
 };
 

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.