diff options
author | Ioana Ciornei <ioana.ciornei@nxp.com> | 2020-10-01 18:11:46 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-10-02 16:31:56 -0700 |
commit | c50bf2be7306cd37e4a8228acfe0fee36b9097dc (patch) | |
tree | bff2c8e62caeb0a77d4d2a655d8d3c9a7c3ce347 /include | |
parent | 10c24eb23da0dc67934fcc9b5b0f201750ff8cd8 (diff) | |
download | linux-c50bf2be7306cd37e4a8228acfe0fee36b9097dc.tar.bz2 |
devlink: add .trap_group_action_set() callback
Add a new devlink callback, .trap_group_action_set(), which can be used
by device drivers which do not support controlling the action (drop,
trap) on each trap but rather on the entire group trap.
If this new callback is populated, it will take precedence over the
.trap_action_set() callback when the user requests a change of all the
traps in a group.
Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/net/devlink.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/net/devlink.h b/include/net/devlink.h index 1f5004a5c9f9..89ede1ce3a3a 100644 --- a/include/net/devlink.h +++ b/include/net/devlink.h @@ -1243,6 +1243,16 @@ struct devlink_ops { const struct devlink_trap_policer *policer, struct netlink_ext_ack *extack); /** + * @trap_group_action_set: Trap group action set function. + * + * If this callback is populated, it will take precedence over looping + * over all traps in a group and calling .trap_action_set(). + */ + int (*trap_group_action_set)(struct devlink *devlink, + const struct devlink_trap_group *group, + enum devlink_trap_action action, + struct netlink_ext_ack *extack); + /** * @trap_policer_init: Trap policer initialization function. * * Should be used by device drivers to initialize the trap policer in |