mirror of
https://github.com/cloudnativelabs/kube-router.git
synced 2025-10-12 02:11:17 +02:00
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:
commit
cbfe8e3790
@ -390,6 +390,10 @@ func (nrc *NetworkRoutingController) injectRoute(path *table.Path) error {
|
|||||||
if err := netlink.LinkSetUp(link); err != nil {
|
if err := netlink.LinkSetUp(link); err != nil {
|
||||||
return errors.New("Failed to bring tunnel interface " + tunnelName + " up due to: " + err.Error())
|
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 {
|
} else {
|
||||||
glog.Infof("Tunnel interface: " + tunnelName + " for the node " + nexthop.String() + " already exists.")
|
glog.Infof("Tunnel interface: " + tunnelName + " for the node " + nexthop.String() + " already exists.")
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user