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

ChibiOS public support forum for topics related to the Atmel AT91SAM7x family of micro-controllers.
Brrzzt
Posts: 5
Joined: Wed Apr 25, 2012 11:54 am

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

Postby Brrzzt » Mon Jul 16, 2012 12:43 pm

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

User avatar
Giovanni
Site Admin
Posts: 14444
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1074 times
Been thanked: 921 times
Contact:

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

Postby Giovanni » Mon Jul 16, 2012 5:21 pm

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

Brrzzt
Posts: 5
Joined: Wed Apr 25, 2012 11:54 am

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

Postby Brrzzt » Wed Jul 18, 2012 9:34 am

Hi Giovanni,

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

BR

Gerhard

mattbucknall
Posts: 1
Joined: Thu Aug 16, 2012 12:59 pm

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

Postby mattbucknall » Thu Aug 16, 2012 1:03 pm

Hi,

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

Regards,
Matt.

User avatar
Giovanni
Site Admin
Posts: 14444
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1074 times
Been thanked: 921 times
Contact:

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

Postby Giovanni » Thu Aug 16, 2012 1:18 pm

Hi,

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

Giovanni


Return to “AT91SAM7x Support”

Who is online

Users browsing this forum: No registered users and 15 guests