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),
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;
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;
};