Skip to content

Commit

Permalink
net: Add support for CHANGEUPPER notifier error injection
Browse files Browse the repository at this point in the history
Since CHANGEUPPER can now fail, add support for it in the newly
introduced netdev notifier error injection infrastructure.

Signed-off-by: Ido Schimmel <[email protected]>
Signed-off-by: Jiri Pirko <[email protected]>
Acked-by: Nikolay Aleksandrov <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
idosch authored and davem330 committed Dec 3, 2015
1 parent b03804e commit c39d045
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions Documentation/fault-injection/notifier-error-inject.txt
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ Netdevice notifier events which can be failed are:
* NETDEV_POST_INIT
* NETDEV_PRECHANGEMTU
* NETDEV_PRECHANGEUPPER
* NETDEV_CHANGEUPPER

Example: Inject netdevice mtu change error (-22 == -EINVAL)

Expand Down
1 change: 1 addition & 0 deletions lib/netdev-notifier-error-inject.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ static struct notifier_err_inject netdev_notifier_err_inject = {
{ NOTIFIER_ERR_INJECT_ACTION(NETDEV_POST_INIT) },
{ NOTIFIER_ERR_INJECT_ACTION(NETDEV_PRECHANGEMTU) },
{ NOTIFIER_ERR_INJECT_ACTION(NETDEV_PRECHANGEUPPER) },
{ NOTIFIER_ERR_INJECT_ACTION(NETDEV_CHANGEUPPER) },
{}
}
};
Expand Down

0 comments on commit c39d045

Please sign in to comment.