Skip to content

Commit 6004784

Browse files
tohojoksacilotto
authored andcommitted
selftests/bpf/test_offload.py: Reset ethtool features after failed setting
BugLink: https://bugs.launchpad.net/bugs/1910822 [ Upstream commit 766e62b ] When setting the ethtool feature flag fails (as expected for the test), the kernel now tracks that the feature was requested to be 'off' and refuses to subsequently disable it again. So reset it back to 'on' so a subsequent disable (that's not supposed to fail) can succeed. Fixes: 417ec26 ("selftests/bpf: add offload test based on netdevsim") Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Jakub Kicinski <kuba@kernel.org> Link: https://lore.kernel.org/bpf/160752226280.110217.10696241563705667871.stgit@toke.dk Signed-off-by: Sasha Levin <sashal@kernel.org> Signed-off-by: Kamal Mostafa <kamal@canonical.com> Signed-off-by: Kelsey Skunberg <kelsey.skunberg@canonical.com>
1 parent cd2658f commit 6004784

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

tools/testing/selftests/bpf/test_offload.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -930,6 +930,7 @@ def test_multi_prog(simdev, sim, obj, modename, modeid):
930930
start_test("Test disabling TC offloads is rejected while filters installed...")
931931
ret, _ = sim.set_ethtool_tc_offloads(False, fail=False)
932932
fail(ret == 0, "Driver should refuse to disable TC offloads with filters installed...")
933+
sim.set_ethtool_tc_offloads(True)
933934

934935
start_test("Test qdisc removal frees things...")
935936
sim.tc_flush_filters()

0 commit comments

Comments
 (0)