[lkml]   [2002]   [Feb]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Need some help with IP/TCP Checksum Offload
On Fri, Feb 22, 2002 at 02:57:22PM -0800, wrote:
> Hi All,
> I am trying to offload checksum calculation to my hardware. What i am doing in my driver (kernel 2.4.6) is :
> dev->features = NETIF_F_IP_CHECKSUM;
> Then, in my start_xmit( ) routine, i am parsing for the right headers & when i get the IP/TCP header, i print out the checksum & it is already the right checksum. When does the OS/Protocol offload this task? Am i missing something here?

For TX the checksum is only offloaded when you set and support NETIF_F_SG
as well. Otherwise the stack has to copy anyways and can compute the
checksum during the copy operation. Then with NETIF_F_SG the TX checksumming
will only be used with sendfile(), because that is the only way to do zero
copy for now.

For RX you should set skb->ip_summed and skb->csum. The hardware checksum
is more useful in this case.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

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