summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/marvell/prestera/prestera_acl.h
diff options
context:
space:
mode:
authorVolodymyr Mytnyk <volodymyr.mytnyk@plvision.eu>2022-04-27 14:05:48 +0200
committerJakub Kicinski <kuba@kernel.org>2022-04-29 03:37:55 +0200
commitdde2daa0a279623a6f769b258339df744cc0fdd6 (patch)
tree8480ad590b7711c37f34a9d1e79f96f3614b5d3f /drivers/net/ethernet/marvell/prestera/prestera_acl.h
parentnet: phy: Deduplicate interrupt disablement on PHY attach (diff)
downloadlinux-dde2daa0a279623a6f769b258339df744cc0fdd6.tar.xz
linux-dde2daa0a279623a6f769b258339df744cc0fdd6.zip
net: prestera: add police action support
- Add HW api to configure policer: - SR TCM policer mode is only supported for now. - Policer ingress/egress direction support. - Add police action support into flower Signed-off-by: Volodymyr Mytnyk <volodymyr.mytnyk@plvision.eu> Link: https://lore.kernel.org/r/1651061148-21321-1-git-send-email-volodymyr.mytnyk@plvision.eu Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/ethernet/marvell/prestera/prestera_acl.h')
-rw-r--r--drivers/net/ethernet/marvell/prestera/prestera_acl.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/net/ethernet/marvell/prestera/prestera_acl.h b/drivers/net/ethernet/marvell/prestera/prestera_acl.h
index 6d2ad27682d1..f963e1e0c0f0 100644
--- a/drivers/net/ethernet/marvell/prestera/prestera_acl.h
+++ b/drivers/net/ethernet/marvell/prestera/prestera_acl.h
@@ -56,6 +56,7 @@ enum prestera_acl_rule_action {
PRESTERA_ACL_RULE_ACTION_TRAP = 2,
PRESTERA_ACL_RULE_ACTION_JUMP = 5,
PRESTERA_ACL_RULE_ACTION_COUNT = 7,
+ PRESTERA_ACL_RULE_ACTION_POLICE = 8,
PRESTERA_ACL_RULE_ACTION_MAX
};
@@ -74,6 +75,10 @@ struct prestera_acl_action_jump {
u32 index;
};
+struct prestera_acl_action_police {
+ u32 id;
+};
+
struct prestera_acl_action_count {
u32 id;
};
@@ -86,6 +91,7 @@ struct prestera_acl_rule_entry_key {
struct prestera_acl_hw_action_info {
enum prestera_acl_rule_action id;
union {
+ struct prestera_acl_action_police police;
struct prestera_acl_action_count count;
struct prestera_acl_action_jump jump;
};
@@ -107,6 +113,12 @@ struct prestera_acl_rule_entry_arg {
} jump;
struct {
u8 valid:1;
+ u64 rate;
+ u64 burst;
+ bool ingress;
+ } police;
+ struct {
+ u8 valid:1;
u32 client;
} count;
};