patchlwIP - A Lightweight TCP/IP stack - Patches: patch #6460, inet_chksum minor optimizations

 
 

You are not allowed to post comments on this tracker with your current authentication level.

patch #6460: inet_chksum minor optimizations

Submitter:  Bill Auerbach <billauerbach>
Submitted:  Tue 11 Mar 2008 09:38:59 PM UTC
   
 
Category:  None Priority:  3 - Low
Status:  Done Privacy:  Public
Assigned to:  goldsimon Open/Closed:  Closed
Planned Release:  None

Mon 23 Jun 2008 08:09:14 PM UTC, comment #5: 

no comments / objections -> closed

Simon Goldschmidt <goldsimon>
Group administrator
Tue 17 Jun 2008 08:07:45 PM UTC, comment #4: 

I have just checked in my interpretation of this patch. I intentionally didn't change the default checksum implementation: it isn't fast anyway and can stay as a reference implementation.

Simon Goldschmidt <goldsimon>
Group administrator
Thu 27 Mar 2008 06:15:35 PM UTC, comment #3: 

As long as we don't seriously mess with the checksum functions, I think it's good to speed them up:

- Not all people really want to implement their own function
- These functions will often be used as a 'reference' for faster, arch-dependent functions, so changing a 'while' to an 'if' is a good thing to do in my opinion.

Simon Goldschmidt <goldsimon>
Group administrator
Tue 25 Mar 2008 01:28:27 PM UTC, comment #2: 

Do you have a handle on the performance boost this might give?  I'm a little reluctant to fiddle with the checksum algorithm as it's currently known to work, and I'm guessing that most ports will write their own (for higher native performance) anyway.

Kieran Mansley <kieranm>
Group Member
Tue 11 Mar 2008 11:06:27 PM UTC, comment #1: 

I'm not in a position to test it, but it looks OK to me.

David Empson <dempson>
Tue 11 Mar 2008 09:38:59 PM UTC, original submission:  

inet_chksum.c - Remove unnecessary while loops folding upper and lower checksum words.  Unroll 4 other while loops since the test to run the loop is about as expensive as just doing the fold.

Those who added comments to the optimization thread could review as a double check.

Bill Auerbach <billauerbach>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #15239:  inet_chksum_c.diff added by billauerbach (5KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by goldsimon (Posted a comment)
  • -email is unavailable- added by kieranm (Posted a comment)
  • -email is unavailable- added by dempson (Posted a comment)
  • -email is unavailable- added by billauerbach (Submitted the item)
  • -email is unavailable- added by billauerbach
  •  

    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 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2008-06-23 goldsimon StatusReady For Test Done
        Open/ClosedOpen Closed
    2008-06-17 goldsimon StatusNone Ready For Test
        Assigned toNone goldsimon
    2008-03-11 billauerbach Attached File- Added inet_chksum_c.diff, #15239
        Carbon-Copy- Added -email is unavailable-

    Back to the top

    Powered by Savane 3.13-3230.
    Corresponding source code