Skip to content

Commit

Permalink
Merge pull request #109 from cloudnativelabs/ip-ip-tunnel-perf
Browse files Browse the repository at this point in the history
reduce ipip tunnel MTU by 20 bytes to accommodate the tunnel overhead
  • Loading branch information
murali-reddy committed Aug 7, 2017
2 parents fcac507 + 898d78d commit cbfe8e3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/controllers/network_routes_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.")
}
Expand Down

0 comments on commit cbfe8e3

Please sign in to comment.