TCP: don't hardcode a maximum write of 4000 bytes#492
TCP: don't hardcode a maximum write of 4000 bytes#492djs55 wants to merge 1 commit intomirage:mainfrom
Conversation
This allows larger MTUs to be used, which helps when there is large per-packet overhead. For example - qemu when using the socket network device - Apple virtualization.framework both expose ethernet frames over SOCK_DGRAM file descriptors, which leads to one syscall per frame. Signed-off-by: David Scott <[email protected]>
|
That's nice ! |
|
Looks write to me (geddit?). I originally set that 4000 as a placeholder to make sure we don't overflow an Io_page, but that shouldn't be an issue any more. Would be good to have one test case with the higher MTU though. |
|
It looks like this existing test sends a 7000 byte buffer and receives exactly a 7000 byte buffer. I added a pcap around it and it's correct even without this patch. I think what's happening is that write internally loops to fragment the buffer, but it's then being coalesced somewhere else (compactbufs?). In my vpnkit code I'm somehow able to transmit the fragments as they accumulate, so the compaction isn't effective? I'm not sure. (As an aside it's a pity compactbufs is a |
- mirage/mirage-tcpip#492 : remove 4000 byte maximum - mirage/mirage-tcpip#493 : avoid stall with large MSS Signed-off-by: David Scott <[email protected]>
- mirage/mirage-tcpip#492 : remove 4000 byte maximum - mirage/mirage-tcpip#493 : avoid stall with large MSS Signed-off-by: David Scott <[email protected]>
- mirage/mirage-tcpip#492 : remove 4000 byte maximum - mirage/mirage-tcpip#493 : avoid stall with large MSS Signed-off-by: David Scott <[email protected]>
- mirage/mirage-tcpip#492 : remove 4000 byte maximum - mirage/mirage-tcpip#493 : avoid stall with large MSS Signed-off-by: David Scott <[email protected]>
This allows larger MTUs to be used, which helps when there is large per-packet overhead. For example
both expose ethernet frames over SOCK_DGRAM file descriptors, which leads to one syscall per frame.
There doesn't seem to be any assumption that the MTU must fit inside a 4096 byte page, so remove the
min.Signed-off-by: David Scott [email protected]