PowerPC in_cksum() needs -O

Joel Sherrill joel.sherrill at OARcorp.com
Mon Sep 21 21:03:39 UTC 2009


Peter Dufault wrote:
> 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
> (gdb)
>
> Checksum with tcp_input.c compiled without any optimization:
> (gdb) print ti->ti_t.th_sum
> $1 = 0x1
> (gdb)
>
> I'll open a bug.
>
>   
It is probably some less than perfectly specific
asm constraint.  Can you check the current
BSD source for the implementation?  It may
already be fixed.

--joel
> Peter
> _______________________________________________
> rtems-users mailing list
> rtems-users at rtems.org
> http://www.rtems.org/mailman/listinfo/rtems-users
>   


-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel.sherrill at OARcorp.com        On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
   Support Available             (256) 722-9985





More information about the users mailing list