Skip to content

Commit

Permalink
Switch to LWIP_CHKSUM_ALGORITHM #3 (#42)
Browse files Browse the repository at this point in the history
Algorithm 3 takes about 40% less time per packet on xtensa lx106,
so switch from checksum algorithm #2(lwip default) to #3.

 160MHz CPU, 1450B
46us - Algorithm 1
33us - Algorithm 2
19us - Algorithm 3

 80 MHz CPU, 1450B
92us - Algorithm 1
64us - Algorithm 2
37us - Algorithm 3
  • Loading branch information
rsaxvc authored and d-a-v committed Jan 9, 2020
1 parent fd2a2d5 commit 942df71
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions glue-lwip/arduino/lwipopts.h
Original file line number Diff line number Diff line change
Expand Up @@ -2273,6 +2273,12 @@
* @ingroup lwip_opts_infrastructure
* @{
*/
/**
* LWIP_CHKSUM_ALGORITHM==3: Checksum algorithm fastest for ESP8266
*/
#if !defined LWIP_CHKSUM_ALGORITHM || defined __DOXYGEN__
#define LWIP_CHKSUM_ALGORITHM 3 // 2
#endif
/**
* LWIP_CHECKSUM_CTRL_PER_NETIF==1: Checksum generation/check can be enabled/disabled
* per netif.
Expand Down

0 comments on commit 942df71

Please sign in to comment.