skb->nh.iph->tot_len = 0; skb->nh.iph->check = 0; skb->h.th->check = ~csum_tcpudp_magic(skb->nh.iph->saddr, skb->nh.iph->daddr, 0, IPPROTO_TCP, 0); 
if(skb->protocol == ntohs(ETH_P_IP)) { skb->nh.iph->tot_len = 0; skb->nh.iph->check = 0; skb->h.th->check = ~csum_tcpudp_magic(skb->nh.iph->saddr, skb->nh.iph->daddr, 0, IPPROTO_TCP, 0); cmd_length = E1000_TXD_CMD_IP; ipcse = skb->h.raw - skb->data - 1; #ifdef NETIF_F_TSO_IPV6 } else if(skb->protocol == ntohs(ETH_P_IPV6)) { skb->nh.ipv6h->payload_len = 0; skb->h.th->check = ~csum_ipv6_magic(&skb->nh.ipv6h->saddr, &skb->nh.ipv6h->daddr, 0, IPPROTO_TCP, 0); ipcse = 0; #endif } 
e1000_tso(struct e1000_adapter *adapter, struct sk_buff *skb){#ifdef NETIF_F_TSO	struct e1000_context_desc *context_desc;	unsigned int i;	uint32_t cmd_length = 0;	uint16_t ipcse, tucse, mss;	uint8_t ipcss, ipcso, tucss, tucso, hdr_len;	int err;	if(skb_shinfo(skb)->tso_size) {		if (skb_header_cloned(skb)) {			err = pskb_expand_head(skb, 0, 0, GFP_ATOMIC);			if (err)				return err;		}		hdr_len = ((skb->h.raw - skb->data) + (skb->h.th->doff << 2));		mss = skb_shinfo(skb)->tso_size;		skb->nh.iph->tot_len = 0;		skb->nh.iph->check = 0;		skb->h.th->check = ~csum_tcpudp_magic(skb->nh.iph->saddr,		                                      skb->nh.iph->daddr,		                                      0,		                                      IPPROTO_TCP,		                                      0);		ipcss = skb->nh.raw - skb->data;		ipcso = (void *)&(skb->nh.iph->check) - (void *)skb->data;		ipcse = skb->h.raw - skb->data - 1;		tucss = skb->h.raw - skb->data;		tucso = (void *)&(skb->h.th->check) - (void *)skb->data;		tucse = 0;		cmd_length |= (E1000_TXD_CMD_DEXT | E1000_TXD_CMD_TSE |			       E1000_TXD_CMD_IP | E1000_TXD_CMD_TCP |			       (skb->len - (hdr_len)));		i = adapter->tx_ring.next_to_use;		context_desc = E1000_CONTEXT_DESC(adapter->tx_ring, i);		context_desc->lower_setup.ip_fields.ipcss  = ipcss;		context_desc->lower_setup.ip_fields.ipcso  = ipcso;		context_desc->lower_setup.ip_fields.ipcse  = cpu_to_le16(ipcse);		context_desc->upper_setup.tcp_fields.tucss = tucss;		context_desc->upper_setup.tcp_fields.tucso = tucso;		context_desc->upper_setup.tcp_fields.tucse = cpu_to_le16(tucse);		context_desc->tcp_seg_setup.fields.mss     = cpu_to_le16(mss);		context_desc->tcp_seg_setup.fields.hdr_len = hdr_len;		context_desc->cmd_and_length = cpu_to_le32(cmd_length);		if(++i == adapter->tx_ring.count) i = 0;		adapter->tx_ring.next_to_use = i;		return 1;	}#endif	return 0;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/2d7edb923a823660b081bd4c660300ee19adca8d/e1000_main.c/clean/drivers/net/e1000/e1000_main.c