On Fri Sep 1 21:00:19 2023 +0000, Paul Gofman wrote:
Happens on Testbot machines before Win8. Here is the run of my patch without this check: https://testbot.winehq.org/JobDetails.pl?Key=136940#k207 . This also notably (and maybe expectedly) leads to missing the last 4096 bytes (so it is like Windows doesn't effectively use smaller buffers with async I/O). Also, it can happen on Linux if one configure smaller default buffer size in /proc/sys/net/core/rmem_default
Oh, I actually misread this test... now that I can properly tell which calls are SNDBUF and which are RCVBUF, I'm confused. Partly as to why we're bothering to test the default value of RCVBUF in the first place, but also: if the point is to test that small values of RCVBUF don't result in dropping packets, don't those test results contradict that assertion? Or are the applications depending on this simply broken on Windows < 8?
One additional thing that bothers me about this, now that I look—one thing that *also* changed between 7 and 8 is that TCP loopback got some sort of fast path that results in its packets always being synchronous. I wonder if "packets are never dropped despite RCVBUF" is actually just a consequence of loopback, and is not actually true if packets come over the network.