lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] TCP fragmentation over PPP - fragments are lost in LwIP


From: Neil Turner
Subject: Re: [lwip-users] TCP fragmentation over PPP - fragments are lost in LwIP if data is queued for sending
Date: Sun, 27 Nov 2016 14:51:57 -0000

Marco,

 

It works when the MMS is set to 1500 because both 1400 messages will fit in TCP, the second call to netconn_write() will send all the buffer not just part of it.

 

You need to take of the situation where netcon_write() only sends some of your buffer before it returns.

 

Neil

 

From: lwip-users [mailto:address@hidden On Behalf Of Marco Jakobs
Sent: 27 November 2016 13:59
To: 'Mailing list for lwIP users' <address@hidden>
Subject: Re: [lwip-users] TCP fragmentation over PPP - fragments are lost in LwIP if data is queued for sending

 

Hi,

 

just to remind all: This issue is only happening when there is a TCP fragmentation in place!

 

I'm using the Netconn interface. If I push these amount of data with MSS set to 1500, the issue does not happen. The packets are queued into LwIP's memory unless there is not enough space to store the next packet, NETCONN_WRITE returns correctly an ERR_WOULDBLOCK and I'll try again after a few milliseconds. That's working without issues.

 

Once the MSS < packet size the issue kicks in as soon as I'm giving more than one packet into LwIP, even without filling up LwIP's memory and pbuf's.

 

There might be some workarounds, but the preferred solution would be to find the issue in LwIP here. I don't think it's in the PPP, so maybe it's something which is also left in LwIP 2.0 …

 

 

>The code is correct. See this excerpt from opengroups about "send()":

>"Upon successful completion, send() shall return the number of bytes sent."

>For nonblocking, this may of course be less than requested. Never ignore return values!


reply via email to

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