-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TCP: don't hardcode a maximum write of 4000 bytes #492
base: main
Are you sure you want to change the base?
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]