lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] TCP Buffer Size Increment


From: Gaurav Jain
Subject: Re: [lwip-users] TCP Buffer Size Increment
Date: Thu, 4 Feb 2016 11:16:24 +0530

Simon,
This is the text from TCP/IP ietf document
(https://tools.ietf.org/html/rfc879). Please have a read:

"The TCP Maximum Segment Size Option

   TCP provides an option that may be used at the time a connection is
   established (only) to indicate the maximum size TCP segment that can
   be accepted on that connection.  This Maximum Segment Size (MSS)
   announcement (often mistakenly called a negotiation) is sent from the
   data receiver to the data sender and says "I can accept TCP segments
   up to size X". The size (X) may be larger or smaller than the
   default.  The MSS can be used completely independently in each
   direction of data flow.  The result may be quite different maximum

   sizes in the two directions."

On Thu, Feb 4, 2016 at 11:12 AM, Gaurav Jain <address@hidden> wrote:
> My scenario is like this:
> I have a windows machine acting as a client and a Virtex 707 acting as
> Server (implemented using Lwip). From the client side I had set the
> limit to 512 bytes per send request. However, on logging the
> activities on the server side, what I observed was that the first
> packet received is of 512 bytes, as sent by the client. However, there
> onwards the next packet received was 1460 bytes.
>
> In addition I even observed packet queuing behaviour, i.e.
>
> Now since the client is sending packets in chunks of 512 bytes and as
> per my observation, the server waits for 1460 bytes before processing,
> it implies that until it receives 3 packets of 512 bytes, it would not
> push the data upward (provided a close is not requested). Now once it
> does receive them, what it does, as I have observed, is that
> 512+512+512 > 1460, so it pushes the 1460 bytes first, then it pushes
> the remaining 76 bytes as well. Now how do you explain this behavior
> if the congestion window mechanism was not coming into picture? Or is
> it something with my implementation?
>
>
> On Wed, Feb 3, 2016 at 2:35 PM, Simon Goldschmidt <address@hidden> wrote:
>> Gaurav Jain wrote:
>>> TCP has a mechanism to increase the buffer after every successful
>>> transaction. So after receiving how does it increase it to 1460 bytes(
>>> the upper limit)?
>>
>> It's the sender that has this limit. As in your example, lwIP is the 
>> receiver,
>> slow start doesn't help you.
>>
>> Also, what you are talking about is actually a limit to the window, not to
>> the maximum segment size. Being like that, 1460 is NOT the upper limit.
>>
>> Again, without having the remote side under control, you can NOT ensure to
>> get 512 byte sized segments. That's just not what TCP is like.
>>
>>
>> Simon
>>
>> _______________________________________________
>> lwip-users mailing list
>> address@hidden
>> https://lists.nongnu.org/mailman/listinfo/lwip-users



reply via email to

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