Page 1 of 1

chibiOS, lwIP and socket API: Sending needs a long time

Posted: Mon Jul 16, 2012 12:43 pm
by Brrzzt
Hi everybody,

I'm currently evaluating chibiOS for a hardware project containing an ethernet port and the lwIP TCP/IP stack on an AT91SAM7X CPU.
We're using the socket API and everything works fine so far, but we are facing some performance issues.
Situation is as follows: The project acts as server waiting for TCP connection requests on a certain port. When connected, it opens
a separate socket per connection and delivers TCP packets with a payload of less than 100 bytes on a regular basis, which is about
five packets per second and socket.
When pushing out these packages, the lwip_send call needs about 100 milliseconds before returning. This is way longer compared to
the old codebase (same own code, same lwIP version and config, different RTOS) -- therefore I'm assuming that this is a
chibiOS-related problem and not (directly) connected to lwIP or our own code.
Any ideas what could cause such a long time?

Thanks and best regards,

Gerhard

Re: chibiOS, lwIP and socket API: Sending needs a long time

Posted: Mon Jul 16, 2012 5:21 pm
by Giovanni
Hi,

I am unable to run tests right now and for a while... it would be useful to understand if the issue is specific to the AT91 MAC driver or is located in the common lwIP integration code (sys_arch or lwipthread). In the second case the issue should be verifiable also in the STM32 demos.

Does the LWIP_SEND_TIMEOUT setting have any effect on issue?

A test case would help debugging this. Is anybody able to test this?

Giovanni

Re: chibiOS, lwIP and socket API: Sending needs a long time

Posted: Wed Jul 18, 2012 9:34 am
by Brrzzt
Hi Giovanni,

I'm currently working on it based on your hints -- I'll tell as soon as I got any results.

BR

Gerhard

Re: chibiOS, lwIP and socket API: Sending needs a long time

Posted: Thu Aug 16, 2012 1:03 pm
by mattbucknall
Hi,

I am also evaluating ChibiOS for a project and I'd quite like to know, has this problem been resolved?

Regards,
Matt.

Re: chibiOS, lwIP and socket API: Sending needs a long time

Posted: Thu Aug 16, 2012 1:18 pm
by Giovanni
Hi,

Not yet, I am unable to replicate it without a test case. So far it is not even confirmed.

Giovanni