Skip to content

Commit

Permalink
Merge pull request #8774 from tomastigera/auto-pick-of-#8746-upstream…
Browse files Browse the repository at this point in the history
…-release-v3.28

[release-v3.28] Auto pick #8746: Revert "Disable VXLAN checksum offload by default."
  • Loading branch information
tomastigera committed Apr 30, 2024
2 parents d63c56c + 2c9bd9a commit 09e19ed
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 13 deletions.
4 changes: 3 additions & 1 deletion felix/environment/feature_detect_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ var (
v3Dot10Dot0 = MustParseVersion("3.10.0")
// v3Dot14Dot0 added the random-fully feature on the iptables interface.
v3Dot14Dot0 = MustParseVersion("3.14.0")
// v5Dot7Dot0 contains a fix for checksum offloading.
v5Dot7Dot0 = MustParseVersion("5.7.0")
// v5Dot14Dot0 is the fist kernel version that IPIP tunnels acts like other L3
// devices where bpf programs only see inner IP header. In RHEL based distros,
// kernel 4.18.0 (v4Dot18Dot0_330) is the first one with this behavior.
Expand Down Expand Up @@ -130,7 +132,7 @@ func (d *FeatureDetector) refreshFeaturesLockHeld() {
SNATFullyRandom: iptV.Compare(v1Dot6Dot0) >= 0 && kerV.Compare(v3Dot14Dot0) >= 0,
MASQFullyRandom: iptV.Compare(v1Dot6Dot2) >= 0 && kerV.Compare(v3Dot14Dot0) >= 0,
RestoreSupportsLock: iptV.Compare(v1Dot6Dot2) >= 0,
ChecksumOffloadBroken: true, // Was supposed to be fixed in v5.7 but still seems to be broken.
ChecksumOffloadBroken: kerV.Compare(v5Dot7Dot0) <= 0,
IPIPDeviceIsL3: d.ipipDeviceIsL3(),
KernelSideRouteFiltering: netlinkSupportsStrict,
}
Expand Down
28 changes: 16 additions & 12 deletions felix/environment/feature_detect_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,16 @@ func TestFeatureDetection(t *testing.T) {
ChecksumOffloadBroken: true,
},
},
{
"iptables v1.8.4",
"Linux version 5.8.0",
Features{
RestoreSupportsLock: true,
SNATFullyRandom: true,
MASQFullyRandom: true,
ChecksumOffloadBroken: false,
},
},
} {
tst := tst
t.Run("iptables version "+tst.iptablesVersion+" kernel "+tst.kernelVersion, func(t *testing.T) {
Expand Down Expand Up @@ -507,32 +517,28 @@ func TestBPFFeatureDetection(t *testing.T) {
{
"Linux version 5.10.0 - ubuntu",
Features{
IPIPDeviceIsL3: false,
ChecksumOffloadBroken: true,
IPIPDeviceIsL3: false,
},
map[string]string{},
},
{
"Linux version 5.14.0 - something else",
Features{
IPIPDeviceIsL3: true,
ChecksumOffloadBroken: true,
IPIPDeviceIsL3: true,
},
map[string]string{},
},
{
"Linux version 5.15.0",
Features{
IPIPDeviceIsL3: true,
ChecksumOffloadBroken: true,
IPIPDeviceIsL3: true,
},
map[string]string{},
},
{
"Linux version 5.10.0 - Default",
Features{
IPIPDeviceIsL3: true,
ChecksumOffloadBroken: true,
IPIPDeviceIsL3: true,
},
map[string]string{
"IPIPDeviceIsL3": "true",
Expand All @@ -541,8 +547,7 @@ func TestBPFFeatureDetection(t *testing.T) {
{
"Linux version 5.14.0",
Features{
IPIPDeviceIsL3: false,
ChecksumOffloadBroken: true,
IPIPDeviceIsL3: false,
},
map[string]string{
"IPIPDeviceIsL3": "false",
Expand All @@ -551,8 +556,7 @@ func TestBPFFeatureDetection(t *testing.T) {
{
"Linux version 5.16.0 - Ubuntu",
Features{
IPIPDeviceIsL3: false,
ChecksumOffloadBroken: true,
IPIPDeviceIsL3: false,
},
map[string]string{
"IPIPDeviceIsL3": "false",
Expand Down

0 comments on commit 09e19ed

Please sign in to comment.