Merge pull request #109 from cloudnativelabs/ip-ip-tunnel-perf

reduce ipip tunnel MTU by 20 bytes to accommodate the tunnel overhead
This commit is contained in:
Murali Reddy 2017-08-07 19:43:10 +05:30 committed by GitHub
commit cbfe8e3790

View File

@ -390,6 +390,10 @@ func (nrc *NetworkRoutingController) injectRoute(path *table.Path) error {
if err := netlink.LinkSetUp(link); err != nil {
return errors.New("Failed to bring tunnel interface " + tunnelName + " up due to: " + err.Error())
}
// reduce the MTU by 20 bytes to accommodate ipip tunnel overhead
if err := netlink.LinkSetMTU(link, link.Attrs().MTU-20); err != nil {
return errors.New("Failed to set MTU of tunnel interface " + tunnelName + " up due to: " + err.Error())
}
} else {
glog.Infof("Tunnel interface: " + tunnelName + " for the node " + nexthop.String() + " already exists.")
}