lwip-devel
[Top][All Lists]
Advanced

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

Re: [lwip-devel] TCP MSS question


From: Jonathan Larmour
Subject: Re: [lwip-devel] TCP MSS question
Date: Sun, 28 Oct 2007 21:20:06 +0000
User-agent: Mozilla Thunderbird 1.0.8-1.1.fc4 (X11/20060501)

address@hidden wrote:
Two questions about our TCP implementation:

- RFC 1122 says TCP should send with an MSS of "536 if no MSS option is received" (chapter 4.2.2.6). We send with our configured TCP_MSS instead. Since even Windows sends with 536 (btw: what does linux do?), we should maybe change our code to meet the RFC?

I think the intention of that is to limit it so that it does not exceed 536, rather than be 536 exactly. This is almost certainly because the standard minimum MTU for the internet is 576. In practice of course, the MTU is usually more than 576, and the MSS therefore could be more than 536, which is why the temptation would be to send more.

So we could probably change tcp_connect and tcp_alloc to set up the pcb with:
  pcb->mss = (TCP_MSS > 536) ? 536 : TCP_MSS;
and ensure the MSS option we build to send ourselves uses TCP_MSS, not pcb->mss.

It's true that people may want to configure a larger TCP_MSS in general, especially when using devices on a LAN that are not routeable on the wider net, and when they know the environment it's going to be used in (more likely in the contexts lwIP is used in than Windows/*nix). But we're only talking about the case when the remote end hasn't sent an MSS option (which wouldn't even include lwIP for example) so I don't think it's a big concern.

- tcp_parseopt() doesn't allow a send MSS (advertised by the remote side) to be larger than the configured TCP_MSS. Is this included in order to configure memory usage or does it have other reasons?

That was my belief. It certainly seems reasonable that a system with a small receive MSS is not likely to have enough memory for an unlimited (up to the MTU) send MSS.

Jifl
--
eCosCentric Limited      http://www.eCosCentric.com/     The eCos experts
Barnwell House, Barnwell Drive, Cambridge, UK.       Tel: +44 1223 245571
Registered in England and Wales: Reg No 4422071.
------["The best things in life aren't things."]------      Opinions==mine




reply via email to

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