Skip to content

Commit

Permalink
fix: disable checksum offload for ovn0 to prevent kernel issue
Browse files Browse the repository at this point in the history
  • Loading branch information
oilbeater committed Mar 25, 2021
1 parent 5940303 commit 983831e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion pkg/daemon/ovs.go
Original file line number Diff line number Diff line change
Expand Up @@ -258,9 +258,15 @@ func configureNodeNic(portName, ip, gw string, macAddr net.HardwareAddr, mtu int
if err = netlink.LinkSetTxQLen(hostLink, 1000); err != nil {
return fmt.Errorf("can not set host nic %s qlen %v", util.NodeNic, err)
}
// Double nat may lead kernel udp checksum error, disable offload to prevent this issue
// https://github.com/kubernetes/kubernetes/pull/92035
output, err := exec.Command("ethtool", "-K", "ovn0", "tx", "off").CombinedOutput()
if err != nil {
klog.Errorf("failed to disable checksum offload on ovn0, %v %q", err, output)
return err
}

// ping gw to activate the flow
var output []byte
protocol := util.CheckProtocol(gw)
if protocol == kubeovnv1.ProtocolDual {
gws := strings.Split(gw, ",")
Expand Down

0 comments on commit 983831e

Please sign in to comment.