lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] Works with Win7, not Windows XP?


From: Sylvain Rochet
Subject: Re: [lwip-users] Works with Win7, not Windows XP?
Date: Thu, 31 Oct 2013 18:19:29 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

Hi,


On Thu, Oct 31, 2013 at 08:34:06AM +0000, Niall Donovan wrote:
> Hi,
>   There is evidence that Windows 7 and 8 ignore the MSS value if it is less
> 576. I have TCP links working between my embedded app and both Windows XP
> and Windows 7. In my case XP was always working (TCP_MSS  = 1518) but when
> I moved to windows 7 I had tried TCP_MSS   256 to start and it ignored it
> and defaulted to MSS=576 (windows sent me 576 byte chunks, overflowing my
> pbufs). I now have TCP_MSS = 576 in my embedded system and it works for
> both Win XP and Win 7.

Well, but there is nothing wrong here, Windows behavior is perfectly 
fine.

Every IPv4 host *MUST* accept IP packets of at least 576 octets, thus 
you must be ready to receive packets up to 576 octets even if you 
absolutely don't want to.

MSS field in TCP is what you *want* the other side to do when sending 
frames back to you, setting MSS below 536 might be refused by the other 
host, since you *must* receive IP packets of at least 576 octets, so 
there is no reason of setting a MSS below 536.

RFC 879 - The TCP Maximum Segment Size and Related Topics,
   page 2, section 2:
"The maximum size datagram that all hosts are required to accept or
 reassemble from fragments is 576 octets."

And this is exactly the same for IPv6, except every IPv6 host *MUST* 
accept IPv6 packets of at least 1280 octets.

RFC 2460 - Internet Protocol, Version 6 (IPv6) Specification,
   page 24, section 5:
"IPv6 requires that every link in the internet have an MTU of 1280 
 octets or greater. On any link that cannot convey a 1280-octet packet
 in one piece, link-specific fragmentation and reassembly must be
 provided at a layer below IPv6."

So, as well, setting a MSS below 1220 in TCP over IPv6 will probably be 
refused by the other side.


In lwIP, the TCP_MSS option is used to limit the *transmitted* TCP 
fragment size and sending the MSS TCP option. lwIP accept anything that 
is passed from the netif, so we conform to the RFC.


> You also need to ensure that you have allocated pbufs of the necessary 
> size for this MSS to work.

Nah, this is wrong, PBUF are chained, so you can use any PBUF size as 
long as IP and transport headers fit into the first pbuf for performance 
reasons.

But the PBUF_POOL_SIZE * PBUF_POOL_BUFSIZE must be at least 576+LLH 
bytes long to receive a IPv4 packet. I hope it is or your system does 
not meet at all minimum requirements for the IP world :p


Sylvain

Attachment: signature.asc
Description: Digital signature


reply via email to

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