diff options
author | Giuseppe Scrivano <gscrivan@redhat.com> | 2019-03-13 13:59:16 +0100 |
---|---|---|
committer | Giuseppe Scrivano <gscrivan@redhat.com> | 2019-03-14 08:29:41 +0100 |
commit | ac37fc149e158a0db781e48f41c299cc629f1572 (patch) | |
tree | d41a67b1390e0671b3b090e2f1eac13a7cf010e7 /libpod | |
parent | 7426d4fbbeaf5ebd3d55576add89b99cd3f3f760 (diff) | |
download | podman-ac37fc149e158a0db781e48f41c299cc629f1572.tar.gz podman-ac37fc149e158a0db781e48f41c299cc629f1572.tar.bz2 podman-ac37fc149e158a0db781e48f41c299cc629f1572.zip |
slirp4netns: set mtu to 65520
it improves significantly the performance of the slirp4netns network:
https://github.com/rootless-containers/slirp4netns/tree/777bdccceffa5bee38dbfd9eefc06628cc160ff6#iperf3-netns---host
Closes: https://github.com/containers/libpod/issues/1732
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Diffstat (limited to 'libpod')
-rw-r--r-- | libpod/networking_linux.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libpod/networking_linux.go b/libpod/networking_linux.go index 80d7d8213..b7f1c2f1b 100644 --- a/libpod/networking_linux.go +++ b/libpod/networking_linux.go @@ -162,9 +162,9 @@ func (r *Runtime) setupRootlessNetNS(ctr *Container) (err error) { var cmd *exec.Cmd if havePortMapping { // if we need ports to be mapped from the host, create a API socket to use for communicating with slirp4netns. - cmd = exec.Command(path, "-c", "-e", "3", "-r", "4", "--api-socket", apiSocket, fmt.Sprintf("%d", ctr.state.PID), "tap0") + cmd = exec.Command(path, "--mtu", "65520", "-c", "-e", "3", "-r", "4", "--api-socket", apiSocket, fmt.Sprintf("%d", ctr.state.PID), "tap0") } else { - cmd = exec.Command(path, "-c", "-e", "3", "-r", "4", fmt.Sprintf("%d", ctr.state.PID), "tap0") + cmd = exec.Command(path, "--mtu", "65520", "-c", "-e", "3", "-r", "4", fmt.Sprintf("%d", ctr.state.PID), "tap0") } cmd.SysProcAttr = &syscall.SysProcAttr{ |