Skip to content

Commit

Permalink
netdevsim: Change dummy reporter auto recover default
Browse files Browse the repository at this point in the history
Health reporters should be registered with auto recover set to true.
Align dummy reporter behaviour with that, as in later patch the option to
set auto recover behaviour will be removed.

In addition, align netdevsim selftest to the new default value.

Signed-off-by: Eran Ben Elisha <eranbe@mellanox.com>
Reviewed-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Eran Ben Elisha authored and David S. Miller committed Mar 30, 2020
1 parent 62582a7 commit c7f0d4c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/netdevsim/health.c
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ int nsim_dev_health_init(struct nsim_dev *nsim_dev, struct devlink *devlink)
health->dummy_reporter =
devlink_health_reporter_create(devlink,
&nsim_dev_dummy_reporter_ops,
0, false, health);
0, true, health);
if (IS_ERR(health->dummy_reporter)) {
err = PTR_ERR(health->dummy_reporter);
goto err_empty_reporter_destroy;
Expand Down
5 changes: 5 additions & 0 deletions tools/testing/selftests/drivers/net/netdevsim/devlink.sh
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,11 @@ dummy_reporter_test()
{
RET=0

check_reporter_info dummy healthy 0 0 0 true

devlink health set $DL_HANDLE reporter dummy auto_recover false
check_err $? "Failed to dummy reporter auto_recover option"

check_reporter_info dummy healthy 0 0 0 false

local BREAK_MSG="foo bar"
Expand Down

0 comments on commit c7f0d4c

Please sign in to comment.