patchlwIP - A Lightweight TCP/IP stack - Patches: patch #5506, api_lib.c: netbuf_copy_partial()...

 
 

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

patch #5506: api_lib.c: netbuf_copy_partial() use memcpy instead of byte copy

Submitted by:  Simon Goldschmidt <goldsimon>
Submitted on:  Tue 31 Oct 2006 07:56:35 AM UTC  
 
Category:  None Priority:  3 - Low
Status:  None Privacy:  Public
Assigned to:  Jonathan Larmour <jifl> Open/Closed:  Closed
Planned Release:  None

( Jump to the original submission)

Tue 27 Feb 2007 07:23:41 AM UTC, comment #6: 

I'm perfectly happy with that. Even better than what I did ;-)

Oh, and I wanted to say I really appreaciate you and Kieran are cleaning up the bugs & patches list. Only it's sad you two and Christiaan seem to be the only active developers in the project (or am I missing someone?)

Simon Goldschmidt <goldsimon>
Project Administrator
Mon 26 Feb 2007 07:52:16 PM UTC, comment #5: 

Checked in. Simon, please try it out and let me know if you're not happy with it.

Jonathan Larmour <jifl>
Project MemberIn charge of this item.
Mon 26 Feb 2007 05:19:49 PM UTC, comment #4: 

I've made a few slight tweaks to the patch to simplify and slightly improve it a little. I can apply it when I get CVS write access working.

(file #12046)

Jonathan Larmour <jifl>
Project MemberIn charge of this item.
Mon 26 Feb 2007 04:40:18 PM UTC, comment #3: 

My only concern is that there may be some platforms that don't have a memcpy function, but as we use memcpy elsewhere in the core code this is a moot point.

I'll add this to my list to apply.

Kieran Mansley <kieranm>
Project Member
Mon 26 Feb 2007 04:09:48 PM UTC, comment #2: 

I use this patch, and it seems to work fine for me (no problem, and I got a performance gain).

Frédéric Bernon <fbernon>
Project Member
Fri 01 Dec 2006 08:56:54 AM UTC, comment #1: 

Hi,
If the payload or dataptr is not aligned, is this patch still working but with peformance gain, or is it failed?
Regards

Frédéric Bernon <fbernon>
Project Member
Tue 31 Oct 2006 07:56:35 AM UTC, original submission:  

(As you probably all know:) netbuf_copy_partial() copies TCP data from a pbuf into the buffer provided by an application using the netbuf- or socket layer. This function seems to be a bottle neck since it uses 2 loops and copies byte per byte.

My implementation uses memcpy(), which is much faster than byte copy (if the payload is aligned!!!)!

[If the payload or dataptr is not aligned, we gain nothing :( ]

Simon Goldschmidt <goldsimon>
Project Administrator

 

Attached Files
file #12046:  lwip.netbuf.memcpy.patch added by jifl (2KiB - text/x-patch - Updated netbuf_copy_partial patch)
file #11110:  netbuf_copy_partial.patch added by goldsimon (2KiB - application/octet-stream - see patch description: patches api_lib.c)

 

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 jifl (Updated the item)
  • -email is unavailable- added by kieranm (Updated the item)
  • -email is unavailable- added by fbernon (Posted a comment)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

     

     

    Follow 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2007-02-26 jifl Open/ClosedOpen => Closed
    2007-02-26 jifl Attached File- => Added lwip.netbuf.memcpy.patch, #12046
        Assigned tokieranm => jifl
    2007-02-26 kieranm Assigned toNone => kieranm
    2007-02-19 kieranm Priority5 - Normal => 3 - Low
    2006-10-31 goldsimon Attached File- => Added netbuf_copy_partial.patch, #11110
        Carbon-Copy- => Added lwip-users@nongnu.org

    Back to the top


    Powered by Savane 3.5