Skip to content

Commit

Permalink
selftests/bpf/test_offload.py: Reset ethtool features after failed se…
Browse files Browse the repository at this point in the history
…tting

[ 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>
  • Loading branch information
tohojo authored and gregkh committed Dec 30, 2020
1 parent 3b79aea commit 2107658
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tools/testing/selftests/bpf/test_offload.py
Expand Up @@ -930,6 +930,7 @@ def test_multi_prog(simdev, sim, obj, modename, modeid):
start_test("Test disabling TC offloads is rejected while filters installed...")
ret, _ = sim.set_ethtool_tc_offloads(False, fail=False)
fail(ret == 0, "Driver should refuse to disable TC offloads with filters installed...")
sim.set_ethtool_tc_offloads(True)

start_test("Test qdisc removal frees things...")
sim.tc_flush_filters()
Expand Down

0 comments on commit 2107658

Please sign in to comment.