lwip-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-devel] Speed up lwIP


From: Jonathan Larmour
Subject: Re: [lwip-devel] Speed up lwIP
Date: Fri, 04 May 2007 11:29:13 +0100
User-agent: Mozilla Thunderbird 1.0.8-1.1.fc3.4.legacy (X11/20060515)

Goldschmidt Simon wrote:
Hi all,

Talking about lwIP performance on this list, I have 2 issues which
I think could speed up lwIP (at least for me, they did):

- create a #define MEMCPY(dst,src,len) (defined to memcpy(dst,src,len)
as default) to be able to easily provide a faster memcpy than the one
included in the C library. Especially if src or dst are not aligned,
writing my own memcpy gave me much better performance. I could define
memcpy to my own version, but in my opinion, that's a dirty hack.

This makes sense. Note that care may be required on when to use MEMCPY instead of memcpy - GCC can optimise memcpy away sometimes, particularly with a constant, relatively small "len". That saves a function call. Maybe a second macro for that case? SMEMCPY for small memcpy?

- (only for little endian processors and spectial MACs):
include some kind of define to tell the stack not to convert items in
protocol headers from host to network order if the MAC can do this.
This requires a rather advanced MAC, but still I think it's important
that we support this in order not to slow down MACs that have
accelerating
features.

Perhaps you can just tell lwIP you are big-endian when you aren't? Are there places where endianness is tested but not for protocol headers?

OOI I've never seen such a MAC.

Jifl
--
eCosCentric Limited      http://www.eCosCentric.com/     The eCos experts
Barnwell House, Barnwell Drive, Cambridge, UK.       Tel: +44 1223 245571
Registered in England and Wales: Reg No 4422071.
------["The best things in life aren't things."]------      Opinions==mine




reply via email to

[Prev in Thread] Current Thread [Next in Thread]