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>
This commit is contained in:

committed by
David S. Miller

parent
08e335f6ad
commit
c88e11e047
@@ -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.
|
||||
*
|
||||
|
Reference in New Issue
Block a user