lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-users] TCP checksumming


From: Bill Auerbach
Subject: [lwip-users] TCP checksumming
Date: Mon, 25 Feb 2008 11:59:00 -0500

Hello,

 

The point about TPC checksumming:

 

/* These are some reference implementations of the checksum algorithm, with the

 * aim of being simple, correct and fully portable. Checksumming is the

 * first thing you would want to optimize for your platform. If you create

 * your own version, link it in and in your sys_arch.h put:

 *

 * #define LWIP_CHKSUM <your_checksum_routine>

*/

#ifndef LWIP_CHKSUM

#define LWIP_CHKSUM lwip_standard_chksum

 

is well advised.  On a 32-bit PowerPC, the Rev C lwip_standard_chksum is almost twice as fast as the Rev A.  Resulting bandwidth improves by 1.5 times from A to C.  I wrote a PPC assembly version that works on cache line size loops with a speedup of almost double over the Rev A check sum and almost doubling the bandwidth.  I can now enable CHECKSUM_CHECK_TCP with only a slight drop in bandwidth

 

One problem however:  If I define LWIP_CHKSUM in my sys_arch.h, inet_chksum.c doesn’t know about it.  I had to add #include "sys_arch.h" to inet_chksum.c.  In order to override LWIP_CHKSUM without changing source code, shouldn’t include sys_arch.h?

 

Bill


reply via email to

[Prev in Thread] Current Thread [Next in Thread]