summaryrefslogtreecommitdiff
path: root/libpod/networking_linux.go
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivan@redhat.com>2019-03-13 13:59:16 +0100
committerGiuseppe Scrivano <gscrivan@redhat.com>2019-03-14 08:29:41 +0100
commitac37fc149e158a0db781e48f41c299cc629f1572 (patch)
treed41a67b1390e0671b3b090e2f1eac13a7cf010e7 /libpod/networking_linux.go
parent7426d4fbbeaf5ebd3d55576add89b99cd3f3f760 (diff)
downloadpodman-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/networking_linux.go')
-rw-r--r--libpod/networking_linux.go4
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{