162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */
262306a36Sopenharmony_ci/*
362306a36Sopenharmony_ci * RSS and Classifier definitions for Marvell PPv2 Network Controller
462306a36Sopenharmony_ci *
562306a36Sopenharmony_ci * Copyright (C) 2014 Marvell
662306a36Sopenharmony_ci *
762306a36Sopenharmony_ci * Marcin Wojtas <mw@semihalf.com>
862306a36Sopenharmony_ci */
962306a36Sopenharmony_ci
1062306a36Sopenharmony_ci#ifndef _MVPP2_CLS_H_
1162306a36Sopenharmony_ci#define _MVPP2_CLS_H_
1262306a36Sopenharmony_ci
1362306a36Sopenharmony_ci#include "mvpp2.h"
1462306a36Sopenharmony_ci#include "mvpp2_prs.h"
1562306a36Sopenharmony_ci
1662306a36Sopenharmony_ci/* Classifier constants */
1762306a36Sopenharmony_ci#define MVPP2_CLS_FLOWS_TBL_SIZE	512
1862306a36Sopenharmony_ci#define MVPP2_CLS_FLOWS_TBL_DATA_WORDS	3
1962306a36Sopenharmony_ci#define MVPP2_CLS_LKP_TBL_SIZE		64
2062306a36Sopenharmony_ci#define MVPP2_CLS_RX_QUEUES		256
2162306a36Sopenharmony_ci
2262306a36Sopenharmony_ci/* Classifier flow constants */
2362306a36Sopenharmony_ci
2462306a36Sopenharmony_ci#define MVPP2_FLOW_N_FIELDS		4
2562306a36Sopenharmony_ci
2662306a36Sopenharmony_cienum mvpp2_cls_engine {
2762306a36Sopenharmony_ci	MVPP22_CLS_ENGINE_C2 = 1,
2862306a36Sopenharmony_ci	MVPP22_CLS_ENGINE_C3A,
2962306a36Sopenharmony_ci	MVPP22_CLS_ENGINE_C3B,
3062306a36Sopenharmony_ci	MVPP22_CLS_ENGINE_C4,
3162306a36Sopenharmony_ci	MVPP22_CLS_ENGINE_C3HA = 6,
3262306a36Sopenharmony_ci	MVPP22_CLS_ENGINE_C3HB = 7,
3362306a36Sopenharmony_ci};
3462306a36Sopenharmony_ci
3562306a36Sopenharmony_ci#define MVPP22_CLS_HEK_OPT_MAC_DA	BIT(0)
3662306a36Sopenharmony_ci#define MVPP22_CLS_HEK_OPT_VLAN_PRI	BIT(1)
3762306a36Sopenharmony_ci#define MVPP22_CLS_HEK_OPT_VLAN		BIT(2)
3862306a36Sopenharmony_ci#define MVPP22_CLS_HEK_OPT_L3_PROTO	BIT(3)
3962306a36Sopenharmony_ci#define MVPP22_CLS_HEK_OPT_IP4SA	BIT(4)
4062306a36Sopenharmony_ci#define MVPP22_CLS_HEK_OPT_IP4DA	BIT(5)
4162306a36Sopenharmony_ci#define MVPP22_CLS_HEK_OPT_IP6SA	BIT(6)
4262306a36Sopenharmony_ci#define MVPP22_CLS_HEK_OPT_IP6DA	BIT(7)
4362306a36Sopenharmony_ci#define MVPP22_CLS_HEK_OPT_L4SIP	BIT(8)
4462306a36Sopenharmony_ci#define MVPP22_CLS_HEK_OPT_L4DIP	BIT(9)
4562306a36Sopenharmony_ci#define MVPP22_CLS_HEK_N_FIELDS		10
4662306a36Sopenharmony_ci
4762306a36Sopenharmony_ci#define MVPP22_CLS_HEK_L4_OPTS	(MVPP22_CLS_HEK_OPT_L4SIP | \
4862306a36Sopenharmony_ci				 MVPP22_CLS_HEK_OPT_L4DIP)
4962306a36Sopenharmony_ci
5062306a36Sopenharmony_ci#define MVPP22_CLS_HEK_IP4_2T	(MVPP22_CLS_HEK_OPT_IP4SA | \
5162306a36Sopenharmony_ci				 MVPP22_CLS_HEK_OPT_IP4DA)
5262306a36Sopenharmony_ci
5362306a36Sopenharmony_ci#define MVPP22_CLS_HEK_IP6_2T	(MVPP22_CLS_HEK_OPT_IP6SA | \
5462306a36Sopenharmony_ci				 MVPP22_CLS_HEK_OPT_IP6DA)
5562306a36Sopenharmony_ci
5662306a36Sopenharmony_ci/* The fifth tuple in "5T" is the L4_Info field */
5762306a36Sopenharmony_ci#define MVPP22_CLS_HEK_IP4_5T	(MVPP22_CLS_HEK_IP4_2T | \
5862306a36Sopenharmony_ci				 MVPP22_CLS_HEK_L4_OPTS)
5962306a36Sopenharmony_ci
6062306a36Sopenharmony_ci#define MVPP22_CLS_HEK_IP6_5T	(MVPP22_CLS_HEK_IP6_2T | \
6162306a36Sopenharmony_ci				 MVPP22_CLS_HEK_L4_OPTS)
6262306a36Sopenharmony_ci
6362306a36Sopenharmony_ci#define MVPP22_CLS_HEK_TAGGED	(MVPP22_CLS_HEK_OPT_VLAN | \
6462306a36Sopenharmony_ci				 MVPP22_CLS_HEK_OPT_VLAN_PRI)
6562306a36Sopenharmony_ci
6662306a36Sopenharmony_cienum mvpp2_cls_field_id {
6762306a36Sopenharmony_ci	MVPP22_CLS_FIELD_MAC_DA = 0x03,
6862306a36Sopenharmony_ci	MVPP22_CLS_FIELD_VLAN_PRI = 0x05,
6962306a36Sopenharmony_ci	MVPP22_CLS_FIELD_VLAN = 0x06,
7062306a36Sopenharmony_ci	MVPP22_CLS_FIELD_L3_PROTO = 0x0f,
7162306a36Sopenharmony_ci	MVPP22_CLS_FIELD_IP4SA = 0x10,
7262306a36Sopenharmony_ci	MVPP22_CLS_FIELD_IP4DA = 0x11,
7362306a36Sopenharmony_ci	MVPP22_CLS_FIELD_IP6SA = 0x17,
7462306a36Sopenharmony_ci	MVPP22_CLS_FIELD_IP6DA = 0x1a,
7562306a36Sopenharmony_ci	MVPP22_CLS_FIELD_L4SIP = 0x1d,
7662306a36Sopenharmony_ci	MVPP22_CLS_FIELD_L4DIP = 0x1e,
7762306a36Sopenharmony_ci};
7862306a36Sopenharmony_ci
7962306a36Sopenharmony_ci/* Classifier C2 engine constants */
8062306a36Sopenharmony_ci#define MVPP22_CLS_C2_TCAM_EN(data)		((data) << 16)
8162306a36Sopenharmony_ci
8262306a36Sopenharmony_cienum mvpp22_cls_c2_action {
8362306a36Sopenharmony_ci	MVPP22_C2_NO_UPD = 0,
8462306a36Sopenharmony_ci	MVPP22_C2_NO_UPD_LOCK,
8562306a36Sopenharmony_ci	MVPP22_C2_UPD,
8662306a36Sopenharmony_ci	MVPP22_C2_UPD_LOCK,
8762306a36Sopenharmony_ci};
8862306a36Sopenharmony_ci
8962306a36Sopenharmony_cienum mvpp22_cls_c2_fwd_action {
9062306a36Sopenharmony_ci	MVPP22_C2_FWD_NO_UPD = 0,
9162306a36Sopenharmony_ci	MVPP22_C2_FWD_NO_UPD_LOCK,
9262306a36Sopenharmony_ci	MVPP22_C2_FWD_SW,
9362306a36Sopenharmony_ci	MVPP22_C2_FWD_SW_LOCK,
9462306a36Sopenharmony_ci	MVPP22_C2_FWD_HW,
9562306a36Sopenharmony_ci	MVPP22_C2_FWD_HW_LOCK,
9662306a36Sopenharmony_ci	MVPP22_C2_FWD_HW_LOW_LAT,
9762306a36Sopenharmony_ci	MVPP22_C2_FWD_HW_LOW_LAT_LOCK,
9862306a36Sopenharmony_ci};
9962306a36Sopenharmony_ci
10062306a36Sopenharmony_cienum mvpp22_cls_c2_color_action {
10162306a36Sopenharmony_ci	MVPP22_C2_COL_NO_UPD = 0,
10262306a36Sopenharmony_ci	MVPP22_C2_COL_NO_UPD_LOCK,
10362306a36Sopenharmony_ci	MVPP22_C2_COL_GREEN,
10462306a36Sopenharmony_ci	MVPP22_C2_COL_GREEN_LOCK,
10562306a36Sopenharmony_ci	MVPP22_C2_COL_YELLOW,
10662306a36Sopenharmony_ci	MVPP22_C2_COL_YELLOW_LOCK,
10762306a36Sopenharmony_ci	MVPP22_C2_COL_RED,		/* Drop */
10862306a36Sopenharmony_ci	MVPP22_C2_COL_RED_LOCK,		/* Drop */
10962306a36Sopenharmony_ci};
11062306a36Sopenharmony_ci
11162306a36Sopenharmony_ci#define MVPP2_CLS_C2_TCAM_WORDS			5
11262306a36Sopenharmony_ci#define MVPP2_CLS_C2_ATTR_WORDS			5
11362306a36Sopenharmony_ci
11462306a36Sopenharmony_cistruct mvpp2_cls_c2_entry {
11562306a36Sopenharmony_ci	u32 index;
11662306a36Sopenharmony_ci	/* TCAM lookup key */
11762306a36Sopenharmony_ci	u32 tcam[MVPP2_CLS_C2_TCAM_WORDS];
11862306a36Sopenharmony_ci	/* Actions to perform upon TCAM match */
11962306a36Sopenharmony_ci	u32 act;
12062306a36Sopenharmony_ci	/* Attributes relative to the actions to perform */
12162306a36Sopenharmony_ci	u32 attr[MVPP2_CLS_C2_ATTR_WORDS];
12262306a36Sopenharmony_ci	/* Entry validity */
12362306a36Sopenharmony_ci	u8 valid;
12462306a36Sopenharmony_ci};
12562306a36Sopenharmony_ci
12662306a36Sopenharmony_ci#define MVPP22_FLOW_ETHER_BIT	BIT(0)
12762306a36Sopenharmony_ci#define MVPP22_FLOW_IP4_BIT	BIT(1)
12862306a36Sopenharmony_ci#define MVPP22_FLOW_IP6_BIT	BIT(2)
12962306a36Sopenharmony_ci#define MVPP22_FLOW_TCP_BIT	BIT(3)
13062306a36Sopenharmony_ci#define MVPP22_FLOW_UDP_BIT	BIT(4)
13162306a36Sopenharmony_ci
13262306a36Sopenharmony_ci#define MVPP22_FLOW_TCP4	(MVPP22_FLOW_ETHER_BIT | MVPP22_FLOW_IP4_BIT | MVPP22_FLOW_TCP_BIT)
13362306a36Sopenharmony_ci#define MVPP22_FLOW_TCP6	(MVPP22_FLOW_ETHER_BIT | MVPP22_FLOW_IP6_BIT | MVPP22_FLOW_TCP_BIT)
13462306a36Sopenharmony_ci#define MVPP22_FLOW_UDP4	(MVPP22_FLOW_ETHER_BIT | MVPP22_FLOW_IP4_BIT | MVPP22_FLOW_UDP_BIT)
13562306a36Sopenharmony_ci#define MVPP22_FLOW_UDP6	(MVPP22_FLOW_ETHER_BIT | MVPP22_FLOW_IP6_BIT | MVPP22_FLOW_UDP_BIT)
13662306a36Sopenharmony_ci#define MVPP22_FLOW_IP4		(MVPP22_FLOW_ETHER_BIT | MVPP22_FLOW_IP4_BIT)
13762306a36Sopenharmony_ci#define MVPP22_FLOW_IP6		(MVPP22_FLOW_ETHER_BIT | MVPP22_FLOW_IP6_BIT)
13862306a36Sopenharmony_ci#define MVPP22_FLOW_ETHERNET	(MVPP22_FLOW_ETHER_BIT)
13962306a36Sopenharmony_ci
14062306a36Sopenharmony_ci/* Classifier C2 engine entries */
14162306a36Sopenharmony_ci#define MVPP22_CLS_C2_N_ENTRIES		256
14262306a36Sopenharmony_ci
14362306a36Sopenharmony_ci/* Number of per-port dedicated entries in the C2 TCAM */
14462306a36Sopenharmony_ci#define MVPP22_CLS_C2_PORT_N_FLOWS	MVPP2_N_RFS_ENTRIES_PER_FLOW
14562306a36Sopenharmony_ci
14662306a36Sopenharmony_ci/* Each port has one range per flow type + one entry controlling the global RSS
14762306a36Sopenharmony_ci * setting and the default rx queue
14862306a36Sopenharmony_ci */
14962306a36Sopenharmony_ci#define MVPP22_CLS_C2_PORT_RANGE	(MVPP22_CLS_C2_PORT_N_FLOWS + 1)
15062306a36Sopenharmony_ci#define MVPP22_CLS_C2_PORT_FIRST(p)	((p) * MVPP22_CLS_C2_PORT_RANGE)
15162306a36Sopenharmony_ci#define MVPP22_CLS_C2_RSS_ENTRY(p)	(MVPP22_CLS_C2_PORT_FIRST((p) + 1) - 1)
15262306a36Sopenharmony_ci
15362306a36Sopenharmony_ci#define MVPP22_CLS_C2_PORT_FLOW_FIRST(p)	(MVPP22_CLS_C2_PORT_FIRST(p))
15462306a36Sopenharmony_ci
15562306a36Sopenharmony_ci#define MVPP22_CLS_C2_RFS_LOC(p, loc)	(MVPP22_CLS_C2_PORT_FLOW_FIRST(p) + (loc))
15662306a36Sopenharmony_ci
15762306a36Sopenharmony_ci/* Packet flow ID */
15862306a36Sopenharmony_cienum mvpp2_prs_flow {
15962306a36Sopenharmony_ci	MVPP2_FL_START = 8,
16062306a36Sopenharmony_ci	MVPP2_FL_IP4_TCP_NF_UNTAG = MVPP2_FL_START,
16162306a36Sopenharmony_ci	MVPP2_FL_IP4_UDP_NF_UNTAG,
16262306a36Sopenharmony_ci	MVPP2_FL_IP4_TCP_NF_TAG,
16362306a36Sopenharmony_ci	MVPP2_FL_IP4_UDP_NF_TAG,
16462306a36Sopenharmony_ci	MVPP2_FL_IP6_TCP_NF_UNTAG,
16562306a36Sopenharmony_ci	MVPP2_FL_IP6_UDP_NF_UNTAG,
16662306a36Sopenharmony_ci	MVPP2_FL_IP6_TCP_NF_TAG,
16762306a36Sopenharmony_ci	MVPP2_FL_IP6_UDP_NF_TAG,
16862306a36Sopenharmony_ci	MVPP2_FL_IP4_TCP_FRAG_UNTAG,
16962306a36Sopenharmony_ci	MVPP2_FL_IP4_UDP_FRAG_UNTAG,
17062306a36Sopenharmony_ci	MVPP2_FL_IP4_TCP_FRAG_TAG,
17162306a36Sopenharmony_ci	MVPP2_FL_IP4_UDP_FRAG_TAG,
17262306a36Sopenharmony_ci	MVPP2_FL_IP6_TCP_FRAG_UNTAG,
17362306a36Sopenharmony_ci	MVPP2_FL_IP6_UDP_FRAG_UNTAG,
17462306a36Sopenharmony_ci	MVPP2_FL_IP6_TCP_FRAG_TAG,
17562306a36Sopenharmony_ci	MVPP2_FL_IP6_UDP_FRAG_TAG,
17662306a36Sopenharmony_ci	MVPP2_FL_IP4_UNTAG, /* non-TCP, non-UDP, same for below */
17762306a36Sopenharmony_ci	MVPP2_FL_IP4_TAG,
17862306a36Sopenharmony_ci	MVPP2_FL_IP6_UNTAG,
17962306a36Sopenharmony_ci	MVPP2_FL_IP6_TAG,
18062306a36Sopenharmony_ci	MVPP2_FL_NON_IP_UNTAG,
18162306a36Sopenharmony_ci	MVPP2_FL_NON_IP_TAG,
18262306a36Sopenharmony_ci	MVPP2_FL_LAST,
18362306a36Sopenharmony_ci};
18462306a36Sopenharmony_ci
18562306a36Sopenharmony_ci/* LU Type defined for all engines, and specified in the flow table */
18662306a36Sopenharmony_ci#define MVPP2_CLS_LU_TYPE_MASK			0x3f
18762306a36Sopenharmony_ci
18862306a36Sopenharmony_cienum mvpp2_cls_lu_type {
18962306a36Sopenharmony_ci	/* rule->loc is used as a lu-type for the entries 0 - 62. */
19062306a36Sopenharmony_ci	MVPP22_CLS_LU_TYPE_ALL = 63,
19162306a36Sopenharmony_ci};
19262306a36Sopenharmony_ci
19362306a36Sopenharmony_ci#define MVPP2_N_FLOWS		(MVPP2_FL_LAST - MVPP2_FL_START)
19462306a36Sopenharmony_ci
19562306a36Sopenharmony_cistruct mvpp2_cls_flow {
19662306a36Sopenharmony_ci	/* The L2-L4 traffic flow type */
19762306a36Sopenharmony_ci	int flow_type;
19862306a36Sopenharmony_ci
19962306a36Sopenharmony_ci	/* The first id in the flow table for this flow */
20062306a36Sopenharmony_ci	u16 flow_id;
20162306a36Sopenharmony_ci
20262306a36Sopenharmony_ci	/* The supported HEK fields for this flow */
20362306a36Sopenharmony_ci	u16 supported_hash_opts;
20462306a36Sopenharmony_ci
20562306a36Sopenharmony_ci	/* The Header Parser result_info that matches this flow */
20662306a36Sopenharmony_ci	struct mvpp2_prs_result_info prs_ri;
20762306a36Sopenharmony_ci};
20862306a36Sopenharmony_ci
20962306a36Sopenharmony_ci#define MVPP2_CLS_FLT_ENTRIES_PER_FLOW		(MVPP2_MAX_PORTS + 1 + 16)
21062306a36Sopenharmony_ci#define MVPP2_CLS_FLT_FIRST(id)			(((id) - MVPP2_FL_START) * \
21162306a36Sopenharmony_ci						 MVPP2_CLS_FLT_ENTRIES_PER_FLOW)
21262306a36Sopenharmony_ci
21362306a36Sopenharmony_ci#define MVPP2_CLS_FLT_C2_RFS(port, id, rfs_n)	(MVPP2_CLS_FLT_FIRST(id) + \
21462306a36Sopenharmony_ci						 ((port) * MVPP2_MAX_PORTS) + \
21562306a36Sopenharmony_ci						 (rfs_n))
21662306a36Sopenharmony_ci
21762306a36Sopenharmony_ci#define MVPP2_CLS_FLT_C2_RSS_ENTRY(id)		(MVPP2_CLS_FLT_C2_RFS(MVPP2_MAX_PORTS, id, 0))
21862306a36Sopenharmony_ci#define MVPP2_CLS_FLT_HASH_ENTRY(port, id)	(MVPP2_CLS_FLT_C2_RSS_ENTRY(id) + 1 + (port))
21962306a36Sopenharmony_ci#define MVPP2_CLS_FLT_LAST(id)			(MVPP2_CLS_FLT_FIRST(id) + \
22062306a36Sopenharmony_ci						 MVPP2_CLS_FLT_ENTRIES_PER_FLOW - 1)
22162306a36Sopenharmony_ci
22262306a36Sopenharmony_ci/* Iterate on each classifier flow id. Sets 'i' to be the index of the first
22362306a36Sopenharmony_ci * entry in the cls_flows table for each different flow_id.
22462306a36Sopenharmony_ci * This relies on entries having the same flow_id in the cls_flows table being
22562306a36Sopenharmony_ci * contiguous.
22662306a36Sopenharmony_ci */
22762306a36Sopenharmony_ci#define for_each_cls_flow_id(i)						      \
22862306a36Sopenharmony_ci	for ((i) = 0; (i) < MVPP2_N_PRS_FLOWS; (i)++)			      \
22962306a36Sopenharmony_ci		if ((i) > 0 &&						      \
23062306a36Sopenharmony_ci		    cls_flows[(i)].flow_id == cls_flows[(i) - 1].flow_id)       \
23162306a36Sopenharmony_ci			continue;					      \
23262306a36Sopenharmony_ci		else
23362306a36Sopenharmony_ci
23462306a36Sopenharmony_ci/* Iterate on each classifier flow that has a given flow_type. Sets 'i' to be
23562306a36Sopenharmony_ci * the index of the first entry in the cls_flow table for each different flow_id
23662306a36Sopenharmony_ci * that has the given flow_type. This allows to operate on all flows that
23762306a36Sopenharmony_ci * matches a given ethtool flow type.
23862306a36Sopenharmony_ci */
23962306a36Sopenharmony_ci#define for_each_cls_flow_id_with_type(i, type)				      \
24062306a36Sopenharmony_ci	for_each_cls_flow_id((i))					      \
24162306a36Sopenharmony_ci		if (cls_flows[(i)].flow_type != (type))			      \
24262306a36Sopenharmony_ci			continue;					      \
24362306a36Sopenharmony_ci		else
24462306a36Sopenharmony_ci
24562306a36Sopenharmony_ci#define for_each_cls_flow_id_containing_type(i, type)			      \
24662306a36Sopenharmony_ci	for_each_cls_flow_id((i))					      \
24762306a36Sopenharmony_ci		if ((cls_flows[(i)].flow_type & (type)) != (type))	      \
24862306a36Sopenharmony_ci			continue;					      \
24962306a36Sopenharmony_ci		else
25062306a36Sopenharmony_ci
25162306a36Sopenharmony_cistruct mvpp2_cls_flow_entry {
25262306a36Sopenharmony_ci	u32 index;
25362306a36Sopenharmony_ci	u32 data[MVPP2_CLS_FLOWS_TBL_DATA_WORDS];
25462306a36Sopenharmony_ci};
25562306a36Sopenharmony_ci
25662306a36Sopenharmony_cistruct mvpp2_cls_lookup_entry {
25762306a36Sopenharmony_ci	u32 lkpid;
25862306a36Sopenharmony_ci	u32 way;
25962306a36Sopenharmony_ci	u32 data;
26062306a36Sopenharmony_ci};
26162306a36Sopenharmony_ci
26262306a36Sopenharmony_ciint mvpp22_port_rss_init(struct mvpp2_port *port);
26362306a36Sopenharmony_ci
26462306a36Sopenharmony_ciint mvpp22_port_rss_enable(struct mvpp2_port *port);
26562306a36Sopenharmony_ciint mvpp22_port_rss_disable(struct mvpp2_port *port);
26662306a36Sopenharmony_ci
26762306a36Sopenharmony_ciint mvpp22_port_rss_ctx_create(struct mvpp2_port *port, u32 *rss_ctx);
26862306a36Sopenharmony_ciint mvpp22_port_rss_ctx_delete(struct mvpp2_port *port, u32 rss_ctx);
26962306a36Sopenharmony_ci
27062306a36Sopenharmony_ciint mvpp22_port_rss_ctx_indir_set(struct mvpp2_port *port, u32 rss_ctx,
27162306a36Sopenharmony_ci				  const u32 *indir);
27262306a36Sopenharmony_ciint mvpp22_port_rss_ctx_indir_get(struct mvpp2_port *port, u32 rss_ctx,
27362306a36Sopenharmony_ci				  u32 *indir);
27462306a36Sopenharmony_ci
27562306a36Sopenharmony_ciint mvpp2_ethtool_rxfh_get(struct mvpp2_port *port, struct ethtool_rxnfc *info);
27662306a36Sopenharmony_ciint mvpp2_ethtool_rxfh_set(struct mvpp2_port *port, struct ethtool_rxnfc *info);
27762306a36Sopenharmony_ci
27862306a36Sopenharmony_civoid mvpp2_cls_init(struct mvpp2 *priv);
27962306a36Sopenharmony_ci
28062306a36Sopenharmony_civoid mvpp2_cls_port_config(struct mvpp2_port *port);
28162306a36Sopenharmony_ci
28262306a36Sopenharmony_civoid mvpp2_cls_oversize_rxq_set(struct mvpp2_port *port);
28362306a36Sopenharmony_ci
28462306a36Sopenharmony_ciint mvpp2_cls_flow_eng_get(struct mvpp2_cls_flow_entry *fe);
28562306a36Sopenharmony_ci
28662306a36Sopenharmony_ciu16 mvpp2_flow_get_hek_fields(struct mvpp2_cls_flow_entry *fe);
28762306a36Sopenharmony_ci
28862306a36Sopenharmony_ciconst struct mvpp2_cls_flow *mvpp2_cls_flow_get(int flow);
28962306a36Sopenharmony_ci
29062306a36Sopenharmony_ciu32 mvpp2_cls_flow_hits(struct mvpp2 *priv, int index);
29162306a36Sopenharmony_ci
29262306a36Sopenharmony_civoid mvpp2_cls_flow_read(struct mvpp2 *priv, int index,
29362306a36Sopenharmony_ci			 struct mvpp2_cls_flow_entry *fe);
29462306a36Sopenharmony_ci
29562306a36Sopenharmony_ciu32 mvpp2_cls_lookup_hits(struct mvpp2 *priv, int index);
29662306a36Sopenharmony_ci
29762306a36Sopenharmony_civoid mvpp2_cls_lookup_read(struct mvpp2 *priv, int lkpid, int way,
29862306a36Sopenharmony_ci			   struct mvpp2_cls_lookup_entry *le);
29962306a36Sopenharmony_ci
30062306a36Sopenharmony_ciu32 mvpp2_cls_c2_hit_count(struct mvpp2 *priv, int c2_index);
30162306a36Sopenharmony_ci
30262306a36Sopenharmony_civoid mvpp2_cls_c2_read(struct mvpp2 *priv, int index,
30362306a36Sopenharmony_ci		       struct mvpp2_cls_c2_entry *c2);
30462306a36Sopenharmony_ci
30562306a36Sopenharmony_ciint mvpp2_ethtool_cls_rule_get(struct mvpp2_port *port,
30662306a36Sopenharmony_ci			       struct ethtool_rxnfc *rxnfc);
30762306a36Sopenharmony_ci
30862306a36Sopenharmony_ciint mvpp2_ethtool_cls_rule_ins(struct mvpp2_port *port,
30962306a36Sopenharmony_ci			       struct ethtool_rxnfc *info);
31062306a36Sopenharmony_ci
31162306a36Sopenharmony_ciint mvpp2_ethtool_cls_rule_del(struct mvpp2_port *port,
31262306a36Sopenharmony_ci			       struct ethtool_rxnfc *info);
31362306a36Sopenharmony_ci
31462306a36Sopenharmony_ci#endif
315