Hello,

I try to connect to a Wiznet Ethernet Module (W3100A). It is intended,
that I can connect to that device and the device sends data (chunks of
3800 bytes). Unfortunately my client (Linux 2.6.11.4-21.13-default,
172.16.1.1) does not seem to be able to receive the data properly. After
a while I have no ACK's anymore in my ethereal dump:

665 1.235954 172.16.1.2 172.16.1.1 TCP
2111 > 8482 [PSH, ACK] Seq=548661 Ack=2 Win=8192 Len=1460
666 1.236094 172.16.1.2 172.16.1.1 TCP
2111 > 8482 [PSH, ACK] Seq=550121 Ack=2 Win=8192 Len=880
667 1.236115 172.16.1.1 172.16.1.2 TCP
8482 > 2111 [ACK] Seq=2 Ack=551001 Win=32767 Len=0
668 1.237328 172.16.1.2 172.16.1.1 TCP
2111 > 8482 [PSH, ACK] Seq=551001 Ack=2 Win=8192 Len=1460
669 1.237568 172.16.1.2 172.16.1.1 TCP
2111 > 8482 [PSH, ACK] Seq=552461 Ack=2 Win=8192 Len=1460
670 1.237592 172.16.1.1 172.16.1.2 TCP
8482 > 2111 [ACK] Seq=2 Ack=553921 Win=32767 Len=0
671 1.237716 172.16.1.2 172.16.1.1 TCP
2111 > 8482 [PSH, ACK] Seq=553921 Ack=2 Win=8192 Len=880
672 1.238949 172.16.1.2 172.16.1.1 TCP
2111 > 8482 [PSH, ACK] Seq=554801 Ack=2 Win=8192 Len=1460
673 1.239180 172.16.1.2 172.16.1.1 TCP
2111 > 8482 [PSH, ACK] Seq=556261 Ack=2 Win=8192 Len=1460
674 1.239320 172.16.1.2 172.16.1.1 TCP
2111 > 8482 [PSH, ACK] Seq=557721 Ack=2 Win=8192 Len=880
675 1.240554 172.16.1.2 172.16.1.1 TCP
2111 > 8482 [PSH, ACK] Seq=558601 Ack=2 Win=8192 Len=1460
676 1.240793 172.16.1.2 172.16.1.1 TCP
2111 > 8482 [PSH, ACK] Seq=560061 Ack=2 Win=8192 Len=1460
677 1.240934 172.16.1.2 172.16.1.1 TCP
2111 > 8482 [PSH, ACK] Seq=561521 Ack=2 Win=8192 Len=880
678 1.242168 172.16.1.2 172.16.1.1 TCP
2111 > 8482 [PSH, ACK] Seq=562401 Ack=2 Win=8192 Len=1460


Sometimes I also receive as the last paket from the client:
131 1.273184 172.16.1.1 172.16.1.2 TCP
[TCP ZeroWindow] 20470 > 2111 [ACK] Seq=2 Ack=109321 Win=0 Len=0
132 1.346565 172.16.1.1 172.16.1.2 TCP
[TCP Window Update] 20470 > 2111 [ACK] Seq=2 Ack=109321 Win=11680 Len=0

I think this means, that the receiver buffer is full? But the data rate
is not that high (around 2 MBit/s) and CPU/mem usage low. My client code:


.....
while(1)
{
int r;
r=recv(s, buf, BUFFER_SIZE, 0);
if (r==-1)
{
perror("rcv error");
exit(2);
}
else
{
fwrite(buf,r,1,f);
}
}
.....

The number of received bytes (r) is usually 1460, 1460+880 or 3800, but
after some packets it is rapidly increasing:
...
...
r=880
r=7600
r=216600
r=333520

After that recv does not return anymore.

Any hints?

Regards,

Norbert