1 /* SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0 */
2 /* Copyright (c) 2020 Marvell International Ltd. All rights reserved. */
3 
4 #ifndef _PRESTERA_FLOW_H_
5 #define _PRESTERA_FLOW_H_
6 
7 #include <net/flow_offload.h>
8 
9 struct prestera_port;
10 struct prestera_switch;
11 struct prestera_flower_template;
12 
13 struct prestera_flow_block_binding {
14 	struct list_head list;
15 	struct prestera_port *port;
16 	int span_id;
17 };
18 
19 struct prestera_flow_block {
20 	struct list_head binding_list;
21 	struct prestera_switch *sw;
22 	struct net *net;
23 	struct prestera_acl_ruleset *ruleset_zero;
24 	struct flow_block_cb *block_cb;
25 	struct prestera_flower_template *tmplt;
26 	unsigned int rule_count;
27 };
28 
29 int prestera_flow_block_setup(struct prestera_port *port,
30 			      struct flow_block_offload *f);
31 
32 #endif /* _PRESTERA_FLOW_H_ */
33