[lkml]   [2001]   [Jun]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectQuestion on Partial Checksum in TCP/IP
Hello all,
I am trying to understand a little bit about the TCP path in the
Linux kernel.
I saw that while we were even copying the user data into kernel space, we
were doing
the partial checksum of the data portion alone (as the TCP header is not yet
filled up) and storing
it in skb->csum.
Later on when we fill the header portion, we do the checksum of the header
and "add" it to the
already calculated checksum of the data. Here we check if the HW performs
the checksum
or not (skb->ip_summed == CHECKSUM_HW). I am looking into kernel ver 2.4
My question is, why is this check not performed when the data is copied
initially. Instead of
calling csum_and_copy_from_user, if we did a memcpy in the case when HW does
the checksum,
would'nt that be more efficient? Or have I overlooked something...

Thanks a lot

PS. Please CC responses to me also as I am not subscribed to the mailing
list. Thanks


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 12:54    [W:0.140 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site