patchlwIP - A Lightweight TCP/IP stack - Patches: patch #7837, Default TCP_MSS to 1220 if...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

patch #7837: Default TCP_MSS to 1220 if LWIP_IPV6 support is enabled

Submitter:  Sylvain Rochet <gradator>
Submitted:  Sun 26 Aug 2012 09:04:54 PM UTC
   
 
Category:  None Priority:  3 - Low
Status:  Wont Do Privacy:  Public
Assigned to:  None Open/Closed:  Closed
Planned Release:  None

Tue 28 Aug 2012 08:01:35 PM UTC, comment #3: 

You are right Simon, the relationship between MSS and MTU is performance oriented, not memory oriented. I would leave default as is leave it to the user to change in lwipopts.h if performance is desired.


Ivan Delamer <idelamer>
Group Member
Tue 28 Aug 2012 07:55:19 PM UTC, comment #2: 

I don't know about this. I don't like that it changes IPv4 behaviour only because IPv6 is enabled.

And I do see a problem regarding memory usage when changing the default. I doubt that anyone seeking performance leaves TCP_MSS at its default, but the defaults are meant for small memory, not for good performance.

As a side note, TCP_MSS does not limit what we can accept. We accept anything that we get passed in a pbuf (from the netif driver). TCP_MSS is only used to
a) limit tx segment size and
b) sending the MSS option
so strictly speaking, we do conform to the RFC.

Other than that, I don't really see the connection between MTU and MSS: only because we must be able to handle big MSS doesn't mean we have to use a big MSS, right?

Simon Goldschmidt <goldsimon>
Group administrator
Tue 28 Aug 2012 07:30:00 PM UTC, comment #1: 

This is an interesting patch. It's true that for IPv6 there should ideally be a minimum MSS of 1220. In general, this will be a bit larger (e.g. for Ethernet it will be around 1400). Personally I set this value in lwipopts.h to match the smallest netif MTU I'll be using.

I'm not sure what kind of memory implications changing this default brings, and if it is 100% safe (I'm not saying it's not safe, I just don't know yet). Obviously if we have IPv6 then we should be able to accomodate 1220 whether the TCP session is over v4 or v6. So from an MTU point of view it should be a safe change.

But I guess this will increase the minimum memory requirement for a default environment. And I don't know if this would break a system which does not set its own TCP_MSS (relying on default) and does not increase the memory allocation.

Any other opinions?

Ivan Delamer <idelamer>
Group Member
Sun 26 Aug 2012 09:04:54 PM UTC, original submission:  

Tiny patch to set TCP_MSS to 1220 if LWIP_IPV6 support is enabled.

Not sure if this is strictly necessary, it seems every host must be able to handle the maximum possible MSS related to the minimum MTU, which is 1280 for IPv6, so minimum IPv6 TCP MSS seem to be 1220 octets (= 1280 - 40 - 20).

Sylvain

Sylvain Rochet <gradator>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by goldsimon (Posted a comment)
  • -email is unavailable- added by idelamer (Posted a comment)
  • -email is unavailable- added by gradator (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2012-10-12 gradator StatusNone Wont Do
        Open/ClosedOpen Closed
    2012-08-26 gradator Attached File- Added 0001-Default-TCP_MSS-to-1220-if-LWIP_IPV6-support-is-enab.patch, #26429

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code