PowerPC in_cksum() needs -O (was: Re: Loopback test failing, not returning from rtems_bsdnet_event_receive())

Peter Dufault dufault at hda.com
Mon Sep 21 21:00:38 UTC 2009

On Sep 21, 2009, at 2:12 , Peter Dufault wrote:

> I've tracked it down to everything getting dropped with a bad  
> checksum in tcp_input() at line 321.

I had built with optimization off for debugging.  Without optimization  
in_cksum() is returning 1.  With -O2 in effect it is returning 0.

I put a breakpoint right after the call to in_cksum() with the only  
change recompiling tcp_input.c with and without optimization.

Checksum with tcp_input.c compiled with -O2:
(gdb) print ti->ti_t.th_sum
$1 = 0x0

Checksum with tcp_input.c compiled without any optimization:
(gdb) print ti->ti_t.th_sum
$1 = 0x1

I'll open a bug.


More information about the users mailing list