[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-devel] [bug #26649] TCP fails when TCP_MSS > TCP_SND_BUF
From: |
Robert Sprowson |
Subject: |
[lwip-devel] [bug #26649] TCP fails when TCP_MSS > TCP_SND_BUF |
Date: |
Sat, 23 May 2009 18:24:37 +0000 |
User-agent: |
Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1) |
URL:
<http://savannah.nongnu.org/bugs/?26649>
Summary: TCP fails when TCP_MSS > TCP_SND_BUF
Project: lwIP - A Lightweight TCP/IP stack
Submitted by: sprow
Submitted on: Sat 23 May 2009 18:24:35 GMT
Category: TCP
Severity: 3 - Normal
Item Group: Faulty Behaviour
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
Planned Release:
lwIP version: 1.3.0
_______________________________________________________
Details:
I'm assuming it is valid to have TCP_MSS > TCP_SND_BUF, if not a sanity check
in "core/init.c" might be worthwhile.
Anyway, the placement of parenthesis means that
#define TCP_SND_QUEUELEN (4 * (TCP_SND_BUF/TCP_MSS))
in "opt.h" evaluates to zero when the send buffer is larger than the segment
size. Likewise in "core/init.c" the sanity check
if (TCP_SND_QUEUELEN < (2 * (TCP_SND_BUF/TCP_MSS)))
would boil down to
if (0 < 0)
Proposed fixes:
#define TCP_SND_QUEUELEN ((4 * TCP_SND_BUF)/TCP_MSS)
and
if (TCP_SND_QUEUELEN < ((2 * TCP_SND_BUF)/TCP_MSS))
with these in place everything seems to work fine when TCP_SND_BUF=256 and
TCP_MSS=512.
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/bugs/?26649>
_______________________________________________
Message sent via/by Savannah
http://savannah.nongnu.org/
- [lwip-devel] [bug #26649] TCP fails when TCP_MSS > TCP_SND_BUF,
Robert Sprowson <=