buglwIP - A Lightweight TCP/IP stack - Bugs: bug #42737, TCP_SND_QUEUELEN check in init.c...

 
 

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

bug #42737: TCP_SND_QUEUELEN check in init.c (and comment in opt.h) are slighlty wrong

Submitter:  Valery Ushakov <uwe>
Submitted:  Sat 12 Jul 2014 01:04:44 AM UTC
   
 
Category:  TCP Severity:  3 - Normal
Item Group:  Faulty Behaviour Status:  Works For Me
Privacy:  Public Assigned to:  goldsimon
Open/Closed:  Closed Planned Release:  None
lwIP version:  git head

Thu 12 Feb 2015 08:46:33 PM UTC, comment #2: 

On 2nd thought, I don't think there's a problem here: you might not be able to write the full TCP_SND_BUF, but that's how it's meant to be these are 2 independent limitations to prevent one connection from hogging too much memory. The comment in opt.h and check in init.c are to ensure you can write at least 2 segments (to not break the delayed ACK mechanisms). For this, TCP_MSS is correct.

Simon Goldschmidt <goldsimon>
Group administrator
Tue 02 Sep 2014 06:22:29 PM UTC, comment #1: 

Any suggestions on how to fix this? I'm tempted to leave it as it is...

Simon Goldschmidt <goldsimon>
Group administrator
Sat 12 Jul 2014 01:04:44 AM UTC, original submission:  

init.c checks that

#if TCP_SND_QUEUELEN < (2 * (TCP_SND_BUF / TCP_MSS))

since for each mss-sized pbuf with data there's another pbuf with header, hence the factor of two.

The problem is that TCP_MSS is static maximum and actual mss may be smaller - e.g. IPv6 header is larger than IPv4, so IPv6 mss is smaller.  This leads to a situation where a write of full TCP_SND_BUF bytes does not fit into TCP_SND_QUEUELEN limit

Valery Ushakov <uwe>

 

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

No files currently attached

 

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 uwe (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 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-02-12 goldsimon StatusNeed Info Works For Me
        Assigned toNone goldsimon
        Open/ClosedOpen Closed
    2014-09-02 goldsimon StatusNone Need Info

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code