I'm using lwip socket API to implement an HTTP server to transfer a file of about 4MB from PC to the embedded device. I use an application-level crc16 checksum to verify the file. The verification seldom fails if there is a direct Ethernet link, but it frequently fails when a network switch is used. Wireshark shows a lof of TCP zero window messages. I also let Wireshark to validate the TCP checksums, and the TCP checksums are correct.
Since TCP should be reliable, poor network should not affect the correctness of TCP data transfer. So there must be a software bug, either in application or in the lwip TCP stack. I want to know whether it is the wrong configuration of lwip that causes the bug. In the bsp library provided by the chip vendor, lwip2.1.1 is used. In its lwipopts.h, TCP_MSS is 1460 and TCP_WND is 2048. I've read opts.h comment `TCP_WND: This must be at least * (2 * TCP_MSS) for things to work well.` But I'm not sure whether this is mandatory, since there is no compile error for that configuration. Does lwip work with TCP_WND < 2 * TCP_MSS? Thanks very much! _______________________________________________ lwip-users mailing list lwip-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/lwip-users