[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] TCP windows Full
From: |
brak brak2 |
Subject: |
Re: [lwip-users] TCP windows Full |
Date: |
Tue, 12 Jul 2011 08:55:18 +0200 |
> Lack of pbufs to send a packet?
How can I check pbuf availability?
I release pbuf of received package until I process whole received data.
Then I call pbuf_free:
SYS_ARCH_PROTECT(lev);
pbuf_free(gpBufsToRelease[i]); //pointer to received data pbuf
SYS_ARCH_UNPROTECT(lev);
> An error called tcp_recved() (although
> you say this is not the problem)?
> The fact that even after a long idle
> period the advertised window is not getting back to 4096 (its starting
> value) suggests to me that there could well be a problem with your use
> of tcp_recved().
I call tcp_recved for every processed pbuf in the received data chain.
It looks like this in log:
Package received: 1460 //total among of received data in tcp_recv
Package received: 1460
tcp_recved called: 202 //among of data in tcp_recved call
tcp_recved called: 256
tcp_recved called: 256
tcp_recved called: 256
Package received: 951
tcp_recved called: 256
tcp_recved called: 234
tcp_recved called: 202
tcp_recved called: 256
tcp_recved called: 256
tcp_recved called: 256
tcp_recved called: 256
tcp_recved called: 234
tcp_recved called: 202
tcp_recved called: 256
tcp_recved called: 256
tcp_recved called: 237
The call of recved is surrounded with protecting code:
SYS_ARCH_PROTECT(lev);
tcp_recved(gTcpRecAck[i].pcb, gTcpRecAck[i].length);
SYS_ARCH_UNPROTECT(lev);
So no lwip core code could interrupt execution of tcp_recved.
> For full details of when lwIP will send an explicit window update, take
> a look at the source (start in tcp_recved()), but to summarise: if we
> can increase the advertised window by a significant amount (e.g. 1 MSS)
> then we do.
But it is done only in recved or is it check in one of the timer also?
Best regards
Tomasz