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 766e62b7fcd2cf1d43e6594ba37c659dc48f7ddb ]

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 <[email protected]>
Signed-off-by: Daniel Borkmann <[email protected]>
Acked-by: Jakub Kicinski <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
Signed-off-by: Sasha Levin <[email protected]>
  • Loading branch information
tohojo authored and gregkh committed Dec 30, 2020
1 parent 5239367 commit 1303a9f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tools/testing/selftests/bpf/test_offload.py
Original file line number Diff line number Diff line change
Expand Up @@ -787,6 +787,7 @@ def test_spurios_extack(sim, obj, skip_hw, needle):
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 1303a9f

Please sign in to comment.