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 | struct { |
26 | u32 prio_min; |
27 | u32 prio_max; |
28 | bool bound; |
29 | } mall; |
30 | unsigned int rule_count; |
31 | bool ingress; |
32 | }; |
33 | |
34 | int prestera_flow_block_setup(struct prestera_port *port, |
35 | struct flow_block_offload *f); |
36 | |
37 | #endif /* _PRESTERA_FLOW_H_ */ |
38 |