lkml.org 
[lkml]   [2003]   [Apr]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: Deactivating TCP checksumming
From
Date
On Fri, 2003-04-04 at 02:17, Jeff Garzik wrote:

>
> CHECKSUM_HW is for receive, not transmit. Read the comments at the top
> of include/linux/skbuff.h.
>
Actually CHECKSUM_HW can be set at either of the "producer" ends. At
least this is what I gather from tcp_output.c

// tcp_output.c:454
if (!skb_shinfo(skb)->nr_frags && skb->ip_summed != CHECKSUM_HW) {
//...
}
else {
skb->ip_summed = CHECKSUM_HW;
skb_split(skb, buff, len);
}

AND

//1014 dev.c:dev_queue_xmit()
/* If packet is not checksummed and device does not support
* checksumming for this protocol, complete checksumming here.
*/
if (skb->ip_summed == CHECKSUM_HW &&
(!(dev->features&(NETIF_F_HW_CSUM|NETIF_F_NO_CSUM)) &&
(!(dev->features&NETIF_F_IP_CSUM) ||
skb->protocol != htons(ETH_P_IP)))) {
if ((skb = skb_checksum_help(skb)) == NULL)
return -ENOMEM;
}



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:34    [W:0.092 / U:0.404 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site