xref: /linux/drivers/net/ethernet/mscc/ocelot_vcap.h (revision 0e9bb4e9d93f2711897b8e2a613899f7b8a15a3b)
13c83654fSVladimir Oltean /* SPDX-License-Identifier: (GPL-2.0 OR MIT) */
23c83654fSVladimir Oltean /* Microsemi Ocelot Switch driver
33c83654fSVladimir Oltean  * Copyright (c) 2019 Microsemi Corporation
43c83654fSVladimir Oltean  */
53c83654fSVladimir Oltean 
6aae4e500SVladimir Oltean #ifndef _MSCC_OCELOT_VCAP_H_
7aae4e500SVladimir Oltean #define _MSCC_OCELOT_VCAP_H_
83c83654fSVladimir Oltean 
93c83654fSVladimir Oltean #include "ocelot.h"
10*0e9bb4e9SVladimir Oltean #include <soc/mscc/ocelot_vcap.h>
11*0e9bb4e9SVladimir Oltean #include <net/flow_offload.h>
123c83654fSVladimir Oltean 
13ea9d1f30SVladimir Oltean #define OCELOT_POLICER_DISCARD 0x17f
14ea9d1f30SVladimir Oltean 
15aae4e500SVladimir Oltean int ocelot_vcap_filter_stats_update(struct ocelot *ocelot,
16aae4e500SVladimir Oltean 				    struct ocelot_vcap_filter *rule);
17085f5b91SVladimir Oltean struct ocelot_vcap_filter *
18085f5b91SVladimir Oltean ocelot_vcap_block_find_filter_by_id(struct ocelot_vcap_block *block, int id);
193c83654fSVladimir Oltean 
2020968054SVladimir Oltean void ocelot_detect_vcap_constants(struct ocelot *ocelot);
21aae4e500SVladimir Oltean int ocelot_vcap_init(struct ocelot *ocelot);
223c83654fSVladimir Oltean 
233c83654fSVladimir Oltean int ocelot_setup_tc_cls_flower(struct ocelot_port_private *priv,
243c83654fSVladimir Oltean 			       struct flow_cls_offload *f,
253c83654fSVladimir Oltean 			       bool ingress);
263c83654fSVladimir Oltean 
27aae4e500SVladimir Oltean #endif /* _MSCC_OCELOT_VCAP_H_ */
28