Skip to content
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

Increase the MTU on the virtual ethernet link #176

Merged
merged 6 commits into from
Jan 23, 2017
Merged

Conversation

djs55
Copy link
Collaborator

@djs55 djs55 commented Jan 23, 2017

This PR separates the MTU used for outgoing datagram traffic (for which we need to respect the Do Not Fragment bit) from the MTU used on the internal virtual ethernet link and bumps the latter to 8000. This should allow the TCP stack to use a larger segment size and to reduce the overhead per byte of payload.

This PR also allows the virtual ethernet MTU to be set via the database key com.docker.driver.amd64-linux/slirp/mtu

Note this PR references a port of mirage/mirage-protocols#4 and mirage/mirage-tcpip#288 but we need to do some rebasing work for the v3 release anyway.

There are currently 2 important uses of `mtu` in the current code:

1. the maximum UDP datagram size we promise to send without fragmentation.
   <-- this has been renamed `safe_outgoing_mtu`
2. the MTU on the virtual ethernet link to the VM. This is a link-local
   concern since we proxy the TCP streams.

Signed-off-by: David Scott <dave.scott@docker.com>
This adds support for the database key

  com.docker.driver.amd64-linux/slirp/mtu

The default value is unchanged (1500).

Signed-off-by: David Scott <dave.scott@docker.com>
This is from

mirage/mirage-tcpip#288
mirage/mirage-protocols#4

Signed-off-by: David Scott <dave.scott@docker.com>
The `connect` parameter is optional so we must supply it.

Signed-off-by: David Scott <dave.scott@docker.com>
This is the MTU on the local virtual ethernet link, not the "safe
outgoing MTU" which is used for datagram forwarding.

We would like the MTU on this link to be large to reduce the processing
overhead per byte of payload, however the maximum safe read and write
size on Hyper-V sockets seems to be 8192; therefore pick a round number
< 8192.

Signed-off-by: David Scott <dave.scott@docker.com>
Signed-off-by: David Scott <dave@recoil.org>
@djs55 djs55 merged commit 767ab11 into moby:master Jan 23, 2017
@djs55 djs55 deleted the add-mtu branch January 23, 2017 18:22
avsm pushed a commit to avsm/vpnkit that referenced this pull request May 5, 2017
Less verbose logging by default
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant