lkml.org 
[lkml]   [2001]   [Apr]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: skbuff.h
On Mon, 9 Apr 2001, gis88530 wrote:

> Thanks a lot.
> Do you know the purpose of csum_partial( ) function?
> I can't find out it source code.
>

Sure. It does a partial checksum of various IP fragments when they
are being assembled. By starting with 0 as the input parameter,
and the entire length of the IP packet, you calculate the whole
checksum. It's output has to be shifted into a short, added to the
low word of the result, then inverted, to complete the TCP/IP
checksum.

It was believed that partial checksumming during various stages
of IP packet assembly would improve performance. It is possible
that performance would be improved if the checksum was done only once,
though, because there is a lot of overhead in setting up pointers and
counters prior to calculating the checksum. However, the kind of
"performance" we are talking about is probably nothing that would
actually improve network I/O. That is currently limited by the Ethernet
devices. However, some CPU cycles could be saved.

> I can't believe that I have discovered an area where an
> improvement in performance. Maybe I loss some thing.
>
> Cheers,
> Tom


Cheers,
Dick Johnson

Penguin : Linux version 2.4.1 on an i686 machine (799.53 BogoMips).

"Memory is like gasoline. You use it up when you are running. Of
course you get it all back when you reboot..."; Actual explanation
obtained from the Micro$oft help desk.


-
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:24    [W:0.045 / U:2.304 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site