lwip-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-devel] TCP Client system fault


From: Kieran Mansley
Subject: Re: [lwip-devel] TCP Client system fault
Date: Fri, 27 Apr 2012 20:02:37 +0100

On 25 Apr 2012, at 12:59, Vinicius Bernardi wrote:

> 1 - I had writen some data using netconn_write 
> Then I had received a semaphore post saying that the TCPIP thread already 
> process that message
> 
> Then PPP thread receive a package (IP buffer) and process it, but during the 
> process of that package the code decide to call do_write method again ( it's 
> related to SEND EVENT about the message confirmed - previous message maybe ) 
> 
> With this new POST again at semaphore, my next write to netconn_write will be 
> out of sync, because I will not wait again, as my semaphore it's already 1 , 
> and it will be released imediatly.
> 
> In my solution for now it's to remove the do_writemore inside of API to send 
> signal, as there is no sense to be there.
> 
> I would like some comments if it's possible.

It sounds like something is seriously wrong here, but I'm not sure what.  I do 
not think that your solution of removing code from do_writemore is correct.  It 
sounds like your problems happen when you have two writes going on at the same 
time.

> Another important question :
> 
> I'm trying to write huge packages, 1600 bytes for example, how the 
> netconn_write should handle it? Right now, there is a output of 1400 bytes 
> and I receive ACK that everything it's ok, and it's not ok, there is a part 
> of package missing.

I would expect a large write to get split if necessary into smaller chunks so 
that they will fit into packets.  It sounds like this is happening, at least in 
part, because the 1400 bytes get sent.  What isn't clear is if the next 200 
bytes also get sent later.

Kieran


reply via email to

[Prev in Thread] Current Thread [Next in Thread]