[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] lwIP trouble (tcp_write called from more than one locat
Re: [lwip-users] lwIP trouble (tcp_write called from more than one location)
Fri, 1 Mar 2019 20:05:19 -0500
Hopefully somebody could shed some light on the things I
#define LWIP_TCPIP_CORE_LOCKING_INPUT 0
#define LWIP_TCPIP_CORE_LOCKING 0
but when the RX thread receives the ACK in the middle
of the TCP/IP core thread serving my second netconn_write
(specifically being inside tcp_write), it (the rx-thread) ends up calling
tcp_write itself. My understanding is that
LWIP_TCPIP_CORE_LOCKING_INPUT==0 should prevent the RX thread
from trying to call tcp_write directly. Am I wrong? In this configuration
ASSERT_CORE_LOCKED() is empty and
does not do anything, so that seems to be an invalid
Is that a legal scenario? Immediately thereafter
things blow up.
I have tried with
#define LWIP_TCPIP_CORE_LOCKING_INPUT 1
#define LWIP_TCPIP_CORE_LOCKING 1
in this case almost exact same thing happens, with minor difference that
the first tcp_write is now called from the tcp_echo thread
Looking through source code I see that TCP_EVENT_SENT macro
in tcp_input() is dependent upon LWIP_EVENT_API, which is
supposed to make it use message instead of calling the
function directly. But when I enable LWIP_EVENT_API == 1 the code
does not build at all, because tcp_recv() used in
api_msg.c:520(setup_tcp()) is only declared in tcp.h when
LWIP_CALLBACK_API == 1.
Two concurrent calls to netconn_write seems to be wrong
situation, but I don't see what I do wrong here.
Thank you, Slava
lurno> Message: 3
lurno> Date: Tue, 26 Feb 2019 22:10:24 +0100
lurno> From: Simon Goldschmidt <address@hidden>
lurno> To: address@hidden
lurno> Subject: Re: [lwip-users] lwIP trouble
lurno> Message-ID: <address@hidden>
lurno> Content-Type: text/plain; charset=utf-8; format=flowed
lurno> On 26.02.2019 22:07, Slava Zilberfayn wrote:
>> Hello all,
>> I've done some more testing with tcpecho example. When I set
>> chunk size to be less than the size of the tcpecho
>> packets, I get exactly the same failure during the second
>> call to netconn_write. When the packet size small than chunk
>> size it crashes fairly quickly. For example I set chunk size
>> to 400 in the tcpecho example and send 400 bytes packets to
>> it. Works fine.
>> If I start sending 401 bytes, it crashes fairly quickly.
>> There must me something wrong with my settings. Any
>> help would be appreciated.
lurno> If you could get this reproduced with minimal changes on the win32 or
lurno> linux port, it would be *much* easier to see what's going on.
lurno> Message: 4
lurno> Date: Tue, 26 Feb 2019 18:45:29 -0500
lurno> From: Dave Nadler <address@hidden>
lurno> To: Johan Borkhuis <address@hidden>, Mailing list for lwIP
lurno> users <address@hidden>
lurno> Subject: Re: [lwip-users] Throughput benchmark question - nasty pauses
lurno> Message-ID: <address@hidden>
lurno> Content-Type: text/plain; charset="utf-8"; Format="flowed"
lurno> I figured out how to get the wireshark trace,
lurno> but how to get the wireshark GUI to output the summary below in text
lurno> baffles me, hope the pic is OK:
lurno> Everything is going swimmingly until 4316.
lurno> I don't understand the meaning of "previous segment not captured" here -
lurno> something got dropped.
lurno> And then it takes a second to get going again.
lurno> Any pointers appreciated!
lurno> Best Regards, Dave
lurno> On 2/20/2019 1:45 AM, Johan Borkhuis wrote:
>> First thing would be to sniff the network using Wireshark, and see
>> what happens there when the traffic pauses.
>> This would usually give a good indication on what did happen.
>> On 2019-02-20 00:15, Dave Nadler wrote:
>>> Hi - Newbie here trying to do some basic throughput tests.
>>> LwIP 2.1.2 on FreeRTOS 9, ST32F429, IPv4, TCP.
>>> I want to see how much I can consistently push through the stack.
>>> Made a simple test server (sockets API) which repeatedly outputs
>>> 101-character lines.
>>> I access the server via PuTTY raw mode on Winbloze over a local
>>> I can usually send 3 lines per msec for a second (3000 lines in 1
>>> second), but...
>>> Sometimes, I get ~ 1-second pauses (as seen in Putty or TeraTerm).
>>> How should I go about understanding where the pauses come from?
>>> Thanks in advance for any hints,
>>> Best Regards, Dave
>>> Dave Nadler, USA East Coast voice (978) 263-0097, address@hidden,
>>> lwip-users mailing list
Slava Zilberfayn mailto:address@hidden
Phone: 416 7289367
Home Electronics, www.home-electro.com
100 Drumlin Circle,
Concord, ON, L4K 3E6
Description: PNG image
|[Prev in Thread]
||[Next in Thread]|
- Re: [lwip-users] lwIP trouble (tcp_write called from more than one location),
Slava Zilberfayn <=