summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/mscc/ocelot_police.h
diff options
context:
space:
mode:
authorXiaoliang Yang <xiaoliang.yang_1@nxp.com>2020-03-29 14:51:57 +0300
committerDavid S. Miller <davem@davemloft.net>2020-03-30 11:44:00 -0700
commitc9a7fe1238e5fb3d26cb541a12083f2e1f3b2356 (patch)
tree6ee58bbeb48b5c760b8d5b43582464365f037684 /drivers/net/ethernet/mscc/ocelot_police.h
parent0d5d6045a7dd1b36867020e95577a6aa457fee53 (diff)
downloadlinux-c9a7fe1238e5fb3d26cb541a12083f2e1f3b2356.tar.gz
linux-c9a7fe1238e5fb3d26cb541a12083f2e1f3b2356.tar.bz2
linux-c9a7fe1238e5fb3d26cb541a12083f2e1f3b2356.zip
net: mscc: ocelot: add action of police on vcap_is2
Ocelot has 384 policers that can be allocated to ingress ports, QoS classes per port, and VCAP IS2 entries. ocelot_police.c supports to set policers which can be allocated to police action of VCAP IS2. We allocate policers from maximum pol_id, and decrease the pol_id when add a new vcap_is2 entry which is police action. Signed-off-by: Xiaoliang Yang <xiaoliang.yang_1@nxp.com> Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mscc/ocelot_police.h')
-rw-r--r--drivers/net/ethernet/mscc/ocelot_police.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mscc/ocelot_police.h b/drivers/net/ethernet/mscc/ocelot_police.h
index ae9509229463..22025cce0a6a 100644
--- a/drivers/net/ethernet/mscc/ocelot_police.h
+++ b/drivers/net/ethernet/mscc/ocelot_police.h
@@ -19,4 +19,9 @@ int ocelot_port_policer_add(struct ocelot *ocelot, int port,
int ocelot_port_policer_del(struct ocelot *ocelot, int port);
+int ocelot_ace_policer_add(struct ocelot *ocelot, u32 pol_ix,
+ struct ocelot_policer *pol);
+
+int ocelot_ace_policer_del(struct ocelot *ocelot, u32 pol_ix);
+
#endif /* _MSCC_OCELOT_POLICE_H_ */