@@ -181,13 +181,12 @@ static void print_nonzero_bytes(void *ptr, size_t size)
static int reset_flow_steering(void)
{
- int ret = 0;
-
- ret = run_command("sudo ethtool -K %s ntuple off >&2", ifname);
- if (ret)
- return ret;
-
- return run_command("sudo ethtool -K %s ntuple on >&2", ifname);
+ run_command("sudo ethtool -K %s ntuple off >&2", ifname);
+ run_command("sudo ethtool -K %s ntuple on >&2", ifname);
+ run_command(
+ "sudo ethtool -n %s | grep 'Filter:' | awk '{print $2}' | xargs -n1 ethtool -N %s delete >&2",
+ ifname, ifname);
+ return 0;
}
static int configure_headersplit(bool on)
ntuple off/on might be not enough to do it on all NICs. Add a bunch of shell crap to explicitly remove the rules. Cc: Mina Almasry <almasrymina@google.com> Signed-off-by: Stanislav Fomichev <sdf@fomichev.me> --- tools/testing/selftests/net/ncdevmem.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-)