lwIP - A Lightweight TCP/IP stack - Bugs: bug #29763, CHECKSUM_GEN_IP_INLINE - AVR32
You are not allowed to post comments on this tracker with your current authentication level.
bug #29763: CHECKSUM_GEN_IP_INLINE - AVR32
Submitter: | juan schiavoni <jjsch> | ||
Submitted: | Mon 03 May 2010 11:22:50 PM UTC | ||
Category: | IPv4 | Severity: | 3 - Normal |
Item Group: | Faulty Behaviour | Status: | Fixed |
Privacy: | Public | Assigned to: | goldsimon |
Open/Closed: | Closed | Planned Release: | None |
lwIP version: | CVS Head |
Jump to the original submission
Thu 06 May 2010 02:55:42 PM UTC, comment #12: |
juan schiavoni <jjsch> |
Wed 05 May 2010 12:42:51 PM UTC, comment #11: If htons is a macro creating C code, the compiler will constant fold the redundant shift/ORs away. The advantage of #if/#else/#endif is there is nothing for the compiler to do. If htons generates inline assembly then there is waste because the compiler will be forced to generate the shift/OR and then the inline assembly which for little endian has to undo the shift/OR.
|
Bill Auerbach <billauerbach> |
Wed 05 May 2010 04:42:33 AM UTC, comment #10:
|
Simon Goldschmidt <goldsimon> |
Tue 04 May 2010 08:32:50 PM UTC, comment #9:
|
Bill Auerbach <billauerbach> |
Tue 04 May 2010 07:47:52 PM UTC, comment #8:
|
Simon Goldschmidt <goldsimon> |
Tue 04 May 2010 07:25:01 PM UTC, comment #7: Hi Simon,
|
juan schiavoni <jjsch> |
Tue 04 May 2010 07:00:01 PM UTC, comment #6:
|
Simon Goldschmidt <goldsimon> |
Tue 04 May 2010 05:42:58 PM UTC, comment #5: Ok, thanks Juan.
|
Bill Auerbach <billauerbach> |
Tue 04 May 2010 04:48:48 PM UTC, comment #4: Hi Bill,
|
juan schiavoni <jjsch> |
Tue 04 May 2010 04:28:01 PM UTC, comment #3: chk_sum = iphdr->_ttl_proto;
|
Bill Auerbach <billauerbach> |
Tue 04 May 2010 03:58:32 PM UTC, comment #2: That's because the original patch didn't apply to CVS HEAD and I seem to have forgotten about big-endian as it works for me?? |
Simon Goldschmidt <goldsimon> |
Tue 04 May 2010 01:14:46 PM UTC, comment #1: The code in CVS HEAD is not quite the same as the original patch. On line 600 (CVS HEAD version) it had:
|
Bill Auerbach <billauerbach> |
Mon 03 May 2010 11:22:50 PM UTC, original submission:
Hi, I download the source code of lwip from the cvs, and port to the avr32 framework of Atmel, and found that checksum of IP header has wrong values when the CHECKSUM_GEN_IP_INLINE is defined to one. If I do iphdr->_chksum += 0x7F8; the checksum is good.
|
juan schiavoni <jjsch> |
No files currently attached
Depends on the following items: None found
Items that depend on this one: None found
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
Follow 3 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2010-05-04 | goldsimon | Open/Closed | Open | Closed | |
2010-05-04 | goldsimon | Status | None | Fixed | |
Assigned to | None | goldsimon |
Powered by Savane 3.13-d3ae.
Corresponding source code
I download the source code from cvs, and the patch work fine with avr32.
Thanks a lot
Juan