[En-Nut-Discussion] IP Checksum calculation broken. Reenabled old algorithm for the meantime.

Harald Kipp harald.kipp at egnite.de
Fri Jul 6 13:05:00 CEST 2012


Hi Ole,

On 06.07.2012 12:04, Ole Reinhardt wrote:
 
> Yes, I agree. One point is that some _peripherals_ of the LPC needs a 4
> byte alignment. e.g. the IAP (flash programmer rom code) and some other
> peripherals like the EMAC too. So I strongly advice to keep at least the
> malloc aligned to 4.

If I remember correctly, the EMAC buffers even need 8 byte alignment. Or was that on AT91? Anyway, if hardware buffers need specific alignments, then the driver should _not_ rely on malloc providing the required alignment.

Btw. did you ever test the optimized IP checksumming after setting back the alignment to 4? I'm just asking because I never experienced IP checksum problems on ARM7/ARM9 and would like to re-enable the optimized version at least for these platforms. If the optimized version is broken only for alignments of 1 or 2, we may still use it on 4-byte aligned packets.

My application requires uploading of large files (several MByte), where every performance increase is noticeable.

Regards,

Harald





More information about the En-Nut-Discussion mailing list