Re: skbuff.h

From: Richard B. Johnson (root@chaos.analogic.com)
Date: Mon Apr 09 2001 - 10:59:29 EST


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/



This archive was generated by hypermail 2b29 : Sun Apr 15 2001 - 21:00:11 EST