[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] netconn - using in different tasks
From: |
ncoage |
Subject: |
Re: [lwip-users] netconn - using in different tasks |
Date: |
Wed, 20 May 2009 12:16:40 +0200 |
> > Finally I wrote the server with RAW API and tcpip_callback function. It's
> > working ok, but there is a one strange thing. Sending reply to the client
> > takes about 250 - 1000 ms (taken from Wireshark). Sending reply directly
> > (without tcpip_callback) takes less time (max 2 - 5 ms). Have you got
> > similar
> > results?
>
> Are you saying you are calling something like tcp_write()/tcp_output() from
> one of the serial threads? That would break lwIP threading and very likely
> produces bugs (even if not always - depends on timing).
No, I call tcp_write() directly from recv callback, or call tcpip_callback()
and there I call tcp_write(). So everything is done in tcp_thread.
> Why tcpip_callback needs longer is strange, though. You could try to turn on
> debug logging and/or check the return values of tcp_write()/tcp_output():
> such long time spans suggest data is not sent right away but only later (from
> a TCP timer).
>
Return values are ok, function always returns ERR_OK. I'm wondering if I can
use mem_malloc() form tcp_thread.
I still have no ideas why it's not working correctly.
Greg
- Re: [lwip-users] netconn - using in different tasks, (continued)
- Re: [lwip-users] netconn - using in different tasks, ncoage, 2009/05/13
- Re: [lwip-users] netconn - using in different tasks, Kieran Mansley, 2009/05/13
- Re: [lwip-users] netconn - using in different tasks, Simon Goldschmidt, 2009/05/13
- Re: [lwip-users] netconn - using in different tasks, ncoage, 2009/05/13
- Re: [lwip-users] netconn - using in different tasks, Simon Goldschmidt, 2009/05/13
- Re: [lwip-users] netconn - using in different tasks, Rishi Khan, 2009/05/13
- Re: [lwip-users] netconn - using in different tasks, ncoage, 2009/05/14
- Re: [lwip-users] netconn - using in different tasks, Simon Goldschmidt, 2009/05/14
- Re: [lwip-users] netconn - using in different tasks, ncoage, 2009/05/18
- Re: [lwip-users] netconn - using in different tasks, Simon Goldschmidt, 2009/05/18
- Re: [lwip-users] netconn - using in different tasks,
ncoage <=