Thanks Hans. I was indeed calling tcp_recvd. Problem was my TCP_WND == TCP_MSS. I doubled TCP_WND and it now works.
-----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of HJ Sent: Friday, October 16, 2009 5:08 PM To: [email protected] Subject: [lwip-users] Re: TCP payload is doubled (Hans-Joerg) I guess my hint is not the solution of the problem, because you mentioned, downgrading to 1.3.0 helped. However I encountered exactly the same symptoms with the following flaw in my application: - I use the callback api - According to rawapi.txt I should have called tcp_recvd for every package but I missed to do it. - When I called tcp_recvd, the problem disappeared (lwip version 1.2.0). Despite this will not solve the problem, it will perhaps point in a direction, if there is a bug in version 1.3.1. Kind regards Hans-Joerg On Fri 16/10/09 18:00 , [email protected] wrote: > Send lwip-users mailing list submissions to To subscribe or > unsubscribe via the World Wide Web, visit > http://lists.nongnu.org/mailman/listinfo/lwip-users > or, via email, send a message with subject or body 'help' to You can > reach the person managing the list at When replying, please edit your > Subject line so it is more specific than "Re: Contents of lwip-users > digest..." > Today's Topics: > 1. RE: TCP payload is doubled (David Shmelzer) 2. Re: > sys_arch_mbox_fetch (Fabian Koch) 3. SV: [lwip-users] TCP payload is > doubled (Jan Wester) 4. Re: sys_arch_mbox_fetch () 5. RE: TCP payload > is doubled (David Shmelzer) > > ---------------------------------------------------------------------- > Message: 1 > Date: Thu, 15 Oct 2009 15:55:42 -0400 > From: "David Shmelzer" > Subject: RE: [lwip-users] TCP payload is doubled > To: "Mailing list for lwIP users" > Message-ID: > Content-Type: text/plain; charset="us-ascii" > I did a wireshark capture and the window size from lwip keeps > decreasing by the packet length received by lwip for each transaction. > When it finally decreases to less than the packet size my s/w hiccups > because it expects a full packet. So this problem exposed a flaw in my > software. Is anyone else seeing teh window size decreasing? > -----Original Message----- > From: lwip-users-bounces+daves= > [mailto:lwip-users-bounces+daves=] On Behalf Of Bill Auerbach > Sent: Wednesday, October 14, 2009 8:13 AM > To: 'Mailing list for lwIP users' > Subject: RE: [lwip-users] TCP payload is doubled > >Occasionally, the payload in my TCP return packet sent from lwip is > > >more bytes than I'm expecting. > >It looks like it may be concatenating two copies of the payload. > Does this mean the data received by the application is bad or you're > just receiving more of it than you expected but it's all good? > Bill > _______________________________________________ > lwip-users mailing list > http://lists.nongnu.org/mailman/listinfo/lwip-users > -------------- next part -------------- A non-text attachment was > scrubbed... > Name: lwIPWinProblem.pcap > Type: application/octet-stream > Size: 1226 bytes > Desc: lwIPWinProblem.pcap > Url : > http://lists.gnu.org/pipermail/lwip-users/attachments/20091015/50e4215 > 1/lwI > PWinProblem.obj------------------------------ > Message: 2 > Date: Fri, 16 Oct 2009 11:37:13 +0200 > From: Fabian Koch > Subject: Re: [lwip-users] sys_arch_mbox_fetch > To: Mailing list for lwIP users > Message-ID: > Content-Type: text/plain; charset="us-ascii" > lwip-users-bounces+fabian.koch= wrote on 15.10.2009 > 16:30:58: > > Your conservative approach is the right thing to do since > basically, > > what you are trying to do is not supported! Calling > netconn_close() > > while the connection waits in netconn_accept() means you are using > one > > netconn from two different threads, which is not supported. > I have one Taks per netconn and I have an EventTask that relays > commands to these socket Tasks. > When my main application tells all subsystems to shut down and free > their resources, the eventTask sends command_close to all socket > Tasks. > This works good for all Tasks except the ones waiting in > netconn_accept() > because the tasks won't execute the close command. > So I took the close command out of the socketTasks and close them > directly from the eventTask. > So yes, I access one netconn from two different task - only in this > specific event. > I'd be glad if you could give me any ideas on how to achieve this > behaviour in another way (and not setting recv_timeo and polling > accept!) > regards, > Fabian > -------------- next part -------------- An HTML attachment was > scrubbed... > URL: > http://lists.gnu.org/pipermail/lwip-users/attachments/20091016/8f4f3e9 > d/att > achment.html------------------------------ > Message: 3 > Date: Fri, 16 Oct 2009 13:41:52 +0200 > From: "Jan Wester" > Subject: SV: [lwip-users] TCP payload is doubled > To: "'Mailing list for lwIP users'" > Message-ID: > Content-Type: text/plain; charset="iso-8859-1" > Hi > I have the same problem > Kieran mention about to set TCP_WND_UPDATE_THRESHOLD = 0. I have not > tested yet, will start to test next week Kieran wrote The window > advertisement code was re-worked in 1.3.1 to only send an explicit > update when the change in window is greater than > TCP_WND_UPDATE_THRESHOLD. This defaults to (TCP_WND / 4). You could > define this to be zero to get the old behaviour, but the new behaviour > should be much better. I would be interested to know what the problem > you encounter as a result of the less-frequent window updates is. > Note that any ACKs for data that get returned should have the > up-to-date window information in them > - it is only the sending of explicit window update ACKs that is > restricted. > /Jan > -----Ursprungligt meddelande----- > Fr > [mailto:lwip-users-bounces+j.wester=] F > Skickat: den 15 oktober 2009 21:56 > Till: Mailing list for lwIP users > I did a wireshark capture and the window size from lwip keeps > decreasing by the packet length received by lwip for each transaction. > When it finally decreases to less than the packet size my s/w hiccups > because it expects a full packet. So this problem exposed a flaw in my > software. Is anyone else seeing teh window size decreasing? > -----Original Message----- > From: lwip-users-bounces+daves= > [mailto:lwip-users-bounces+daves=] On Behalf Of Bill Auerbach > Sent: Wednesday, October 14, 2009 8:13 AM > To: 'Mailing list for lwIP users' > Subject: RE: [lwip-users] TCP payload is doubled > >Occasionally, the payload in my TCP return packet sent from lwip is > > >more bytes than I'm expecting. > >It looks like it may be concatenating two copies of the payload. > Does this mean the data received by the application is bad or you're > just receiving more of it than you expected but it's all good? > Bill > _______________________________________________ > lwip-users mailing list > http://lists.nongnu.org/mailman/listinfo/lwip-users > ------------------------------ > Message: 4 > Date: Fri, 16 Oct 2009 13:45:59 +0200 > From: "" > Subject: Re: [lwip-users] sys_arch_mbox_fetch > To: Mailing list for lwIP users > Message-ID: > Content-Type: text/plain; charset=ISO-8859-1; format=flowed Fabian > Koch wrote: > > I'd be glad if you could give me any ideas on how to achieve this > > behaviour in another way (and not setting recv_timeo and polling > accept!) > In such situations, I guess you'd normally use select to not let the > > accept task block in accept. You can then either have select use a > timeout and check a flag (but that might be polling accept as you > wrote) > or use a (loopback) socket that is only used to send a shutdown > flag: > The accept thread then waits on the accept-socket and the > loopback-socket, it will get woken up when you send the shutdown flag > to the loopback-socket. > Simon > ------------------------------ > Message: 5 > Date: Fri, 16 Oct 2009 10:29:14 -0400 > From: "David Shmelzer" > Subject: RE: [lwip-users] TCP payload is doubled > To: "Mailing list for lwIP users" > Message-ID: > Content-Type: text/plain; charset="iso-8859-1" > Thanks Jan. > I tried setting TCP_WND_UPDATE_THRESHOLD to 0 and I still get the same > behaviour of decreasing window size. > I then reverted to 1.3.0 and the window size stays constant as > expected. > I would stay at 1.3.0 if I could but I need a fix that 1.3.1 has. > Any help would be greatly appreciated. > Thanks, > Dave > -----Original Message----- > From: lwip-users-bounces+daves= [mailto:lwip-users-bounces+daves=] > On Behalf Of Jan Wester > Sent: Friday, October 16, 2009 7:42 AM > To: 'Mailing list for lwIP users' > Subject: SV: [lwip-users] TCP payload is doubled Hi I have the same > problem Kieran mention about to set TCP_WND_UPDATE_THRESHOLD = 0. I > have not tested yet, will start to test next week Kieran wrote The > window advertisement code was re-worked in 1.3.1 to only send an > explicit update when the change in window is greater than > TCP_WND_UPDATE_THRESHOLD. This defaults to (TCP_WND / 4). You could > define this to be zero to get the old behaviour, but the new behaviour > should be much better. I would be interested to know what the problem > you encounter as a result of the less-frequent window updates is. > Note that any ACKs for data that get returned should have the > up-to-date window information in them > - it is only the sending of explicit window update ACKs that is > restricted. > /Jan > -----Ursprungligt meddelande----- > Fr > [mailto:lwip-users-bounces+j.wester=] F > Skickat: den 15 oktober 2009 21:56 > Till: Mailing list for lwIP users > I did a wireshark capture and the window size from lwip keeps > decreasing by the packet length received by lwip for each transaction. > When it finally decreases to less than the packet size my s/w hiccups > because it expects a full packet. So this problem exposed a flaw in my > software. Is anyone else seeing teh window size decreasing? > -----Original Message----- > From: lwip-users-bounces+daves= > [mailto:lwip-users-bounces+daves=] On Behalf Of Bill Auerbach > Sent: Wednesday, October 14, 2009 8:13 AM > To: 'Mailing list for lwIP users' > Subject: RE: [lwip-users] TCP payload is doubled > >Occasionally, the payload in my TCP return packet sent from lwip is > > >more bytes than I'm expecting. > >It looks like it may be concatenating two copies of the payload. > Does this mean the data received by the application is bad or you're > just receiving more of it than you expected but it's all good? > Bill > _______________________________________________ > lwip-users mailing list > http://lists.nongnu.org/mailman/listinfo/lwip-users > _______________________________________________ > lwip-users mailing list > http://lists.nongnu.org/mailman/listinfo/lwip-users > ------------------------------ > _______________________________________________ > lwip-users mailing list > http://lists.nongnu.org/mailman/listinfo/lwip-users > End of lwip-users Digest, Vol 74, Issue 27 > ****************************************** > > _______________________________________________ lwip-users mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/lwip-users _______________________________________________ lwip-users mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/lwip-users
