summaryrefslogtreecommitdiffhomepage
path: root/runsc/sandbox/network.go
diff options
context:
space:
mode:
authorFabricio Voznika <fvoznika@google.com>2019-04-23 16:10:05 -0700
committerShentubot <shentubot@google.com>2019-04-23 16:10:54 -0700
commit908edee04f92055a8c53a63d1b8d57ffe56aa682 (patch)
tree18d9e67a6d603cd332164056305d06a094e7843c /runsc/sandbox/network.go
parentdf21460cfdf589299e98171407741e3c253debe4 (diff)
Replace os.File with fd.FD in fsgofer
os.NewFile() accounts for 38% of CPU time in localFile.Walk(). This change switchs to use fd.FD which is much cheaper to create. Now, fd.New() in localFile.Walk() accounts for only 4%. PiperOrigin-RevId: 244944983 Change-Id: Ic892df96cf2633e78ad379227a213cb93ee0ca46
Diffstat (limited to 'runsc/sandbox/network.go')
-rw-r--r--runsc/sandbox/network.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/runsc/sandbox/network.go b/runsc/sandbox/network.go
index be924ae25..e52a51569 100644
--- a/runsc/sandbox/network.go
+++ b/runsc/sandbox/network.go
@@ -257,6 +257,8 @@ func createInterfacesAndRoutesFromNS(conn *urpc.Client, nsPath string, enableGSO
return fmt.Errorf("unable to enable the PACKET_VNET_HDR option: %v", err)
}
link.GSOMaxSize = ifaceLink.Attrs().GSOMaxSize
+ } else {
+ log.Infof("GSO not available in host.")
}
}