|
From: | Chris Ponder |
Subject: | Re: [lwip-users] lwIP performance with FreeRTOS |
Date: | Fri, 24 Feb 2012 13:06:09 +0000 |
Thanks for the info, that is really helpful. I only have one thread talking to the IP stack so I have been considering using lwIP in that thread and that may speed things up. I have tried adding TCPIP_CORE_LOCKING to the project pre-processor defines but it has made no difference
L, I guess it is all the task switching, it just seems such a performance hit. Thanks Chris From: lwip-users-bounces+address@hidden
[mailto:lwip-users-bounces+address@hidden On Behalf Of
Simon Goldschmidt Chris Ponder <address@hidden> wrote:
I'm assuming you used the same transfer mode (I.e. send by reference or copying the data) with both raw API and netconn API and therefore expect
just a tiny overhead? The traditional way of multitasking in lwIP is to pass messages between threads. This can be quite slow depending on how fast your OS implements
task switches as in this mode, you typically have 2 tasks switches per send-call: - application task calls send, prepares netbuf - task switch to tcpip_thread, which actually sends the packet - back to application thread, send function returns Changing thread priorities doesn't change this behaviour. However, you can try TCPIP_CORE_LOCKING, which changes from thread switching to locking
(using a mutex), which has the potential to be faster (again, depending on how your OS implements that and on how you use the stack, I.e. how many application threads you have). I guess it's worth a try. Simon ******************************************************** The information transmitted is intended only for the person or entity to ******************************************************** |
[Prev in Thread] | Current Thread | [Next in Thread] |