1 /* SPDX-License-Identifier: BSD-3-Clause */
2 /* Copyright (C) 2023 Microchip Technology Inc. and its subsidiaries.
3  * Microchip VCAP TC
4  */
5 
6 #ifndef __VCAP_TC__
7 #define __VCAP_TC__
8 
9 struct vcap_tc_flower_parse_usage {
10 	struct flow_cls_offload *fco;
11 	struct flow_rule *frule;
12 	struct vcap_rule *vrule;
13 	struct vcap_admin *admin;
14 	u16 l3_proto;
15 	u8 l4_proto;
16 	u16 tpid;
17 	unsigned int used_keys;
18 };
19 
20 int vcap_tc_flower_handler_ethaddr_usage(struct vcap_tc_flower_parse_usage *st);
21 int vcap_tc_flower_handler_ipv4_usage(struct vcap_tc_flower_parse_usage *st);
22 int vcap_tc_flower_handler_ipv6_usage(struct vcap_tc_flower_parse_usage *st);
23 int vcap_tc_flower_handler_portnum_usage(struct vcap_tc_flower_parse_usage *st);
24 int vcap_tc_flower_handler_cvlan_usage(struct vcap_tc_flower_parse_usage *st);
25 int vcap_tc_flower_handler_vlan_usage(struct vcap_tc_flower_parse_usage *st,
26 				      enum vcap_key_field vid_key,
27 				      enum vcap_key_field pcp_key);
28 int vcap_tc_flower_handler_tcp_usage(struct vcap_tc_flower_parse_usage *st);
29 int vcap_tc_flower_handler_arp_usage(struct vcap_tc_flower_parse_usage *st);
30 int vcap_tc_flower_handler_ip_usage(struct vcap_tc_flower_parse_usage *st);
31 
32 #endif /* __VCAP_TC__ */
33