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 
12 struct prestera_flow_block_binding {
13 	struct list_head list;
14 	struct prestera_port *port;
15 	int span_id;
16 };
17 
18 struct prestera_flow_block {
19 	struct list_head binding_list;
20 	struct prestera_switch *sw;
21 	struct net *net;
22 	struct prestera_acl_ruleset *ruleset_zero;
23 	struct flow_block_cb *block_cb;
24 	struct list_head template_list;
25 	unsigned int rule_count;
26 	bool ingress;
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