diff options
author | Ido Schimmel <idosch@mellanox.com> | 2020-08-03 19:11:34 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-08-03 18:06:46 -0700 |
commit | c88e11e04716ab4ed51d5972ea04c7b70b6e9d8a (patch) | |
tree | c1706574e56c5f55265c9f6c4dc2a7f37269709b /include/net | |
parent | 08e335f6ad35a019f4cb1a74badc2f4bceb63bcf (diff) | |
download | lwn-c88e11e04716ab4ed51d5972ea04c7b70b6e9d8a.tar.gz lwn-c88e11e04716ab4ed51d5972ea04c7b70b6e9d8a.zip |
devlink: Pass extack when setting trap's action and group's parameters
A later patch will refuse to set the action of certain traps in mlxsw
and also to change the policer binding of certain groups. Pass extack so
that failure could be communicated clearly to user space.
Reviewed-by: Petr Machata <petrm@mellanox.com>
Reviewed-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: Petr Machata <petrm@mellanox.com>
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/devlink.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/net/devlink.h b/include/net/devlink.h index fd3ae0760492..8f3c8a443238 100644 --- a/include/net/devlink.h +++ b/include/net/devlink.h @@ -1077,7 +1077,8 @@ struct devlink_ops { */ int (*trap_action_set)(struct devlink *devlink, const struct devlink_trap *trap, - enum devlink_trap_action action); + enum devlink_trap_action action, + struct netlink_ext_ack *extack); /** * @trap_group_init: Trap group initialization function. * @@ -1094,7 +1095,8 @@ struct devlink_ops { */ int (*trap_group_set)(struct devlink *devlink, const struct devlink_trap_group *group, - const struct devlink_trap_policer *policer); + const struct devlink_trap_policer *policer, + struct netlink_ext_ack *extack); /** * @trap_policer_init: Trap policer initialization function. * |