From 28a4888d9eb9fc2ef5352b9c1bf7f43afdd829f5 Mon Sep 17 00:00:00 2001 From: hzma Date: Tue, 18 Jul 2023 18:39:08 +0800 Subject: [PATCH] set genev_sys_6081 tx checksum off (#3045) --- cmd/daemon/init.go | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/cmd/daemon/init.go b/cmd/daemon/init.go index aa7822db7b1..bf094065afd 100644 --- a/cmd/daemon/init.go +++ b/cmd/daemon/init.go @@ -3,7 +3,20 @@ 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 affect cni pod running if failed, just record err log + klog.Error(err) + } return nil }