mirror of
https://github.com/containers/podman.git
synced 2025-06-20 09:03:43 +08:00
slirp4netns: set mtu to 65520
it improves significantly the performance of the slirp4netns network:
777bdcccef (iperf3-netns---host)
Closes: https://github.com/containers/libpod/issues/1732
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
@ -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{
|
||||
|
Reference in New Issue
Block a user