Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

selftests/bpf/test_offload.py: Reset ethtool features after failed setting

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: 417ec26477a5 ("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

authored by

Toke Høiland-Jørgensen and committed by
Daniel Borkmann
766e62b7 852c2ee3

+1
+1
tools/testing/selftests/bpf/test_offload.py
··· 946 946 start_test("Test disabling TC offloads is rejected while filters installed...") 947 947 ret, _ = sim.set_ethtool_tc_offloads(False, fail=False) 948 948 fail(ret == 0, "Driver should refuse to disable TC offloads with filters installed...") 949 + sim.set_ethtool_tc_offloads(True) 949 950 950 951 start_test("Test qdisc removal frees things...") 951 952 sim.tc_flush_filters()