From c9a7fe1238e5fb3d26cb541a12083f2e1f3b2356 Mon Sep 17 00:00:00 2001 From: Xiaoliang Yang Date: Sun, 29 Mar 2020 14:51:57 +0300 Subject: 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 Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller --- drivers/net/ethernet/mscc/ocelot_police.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'drivers/net/ethernet/mscc/ocelot_police.h') 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_ */ -- cgit v1.2.3