Skip to content

Commit

Permalink
set genev_sys_6081 tx checksum off
Browse files Browse the repository at this point in the history
  • Loading branch information
hongzhen-ma committed Jul 18, 2023
1 parent b40c35b commit 7def5cc
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion cmd/daemon/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,21 @@

package daemon

import (
"fmt"
"os/exec"

"k8s.io/klog/v2"
)

func initForOS() error {
// nothing to do on Linux
// disable checksum for genev_sys_6081 as default
cmd := exec.Command("sh", "-c", "ethtool -K genev_sys_6081 tx off")
if err := cmd.Run(); err != nil {
err := fmt.Errorf("failed to set checksum off for genev_sys_6081, %v", err)
// should not influence cni pod running if failed, just record err log
klog.Error(err)
}
klog.Infof("succeed to set tx checksum off for genev_sys_6081")
return nil
}

0 comments on commit 7def5cc

Please sign in to comment.