1 /* SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB */
2 /* Copyright (c) 2020 Mellanox Technologies Inc. All rights reserved. */
3 
4 #ifndef __MLX5_ESWITCH_ACL_HELPER_H__
5 #define __MLX5_ESWITCH_ACL_HELPER_H__
6 
7 #include "eswitch.h"
8 
9 /* General acl helper functions */
10 struct mlx5_flow_table *
11 esw_acl_table_create(struct mlx5_eswitch *esw, struct mlx5_vport *vport, int ns, int size);
12 
13 /* Egress acl helper functions */
14 void esw_acl_egress_table_destroy(struct mlx5_vport *vport);
15 int esw_egress_acl_vlan_create(struct mlx5_eswitch *esw, struct mlx5_vport *vport,
16 			       struct mlx5_flow_destination *fwd_dest,
17 			       u16 vlan_id, u32 flow_action);
18 void esw_acl_egress_vlan_destroy(struct mlx5_vport *vport);
19 int esw_acl_egress_vlan_grp_create(struct mlx5_eswitch *esw, struct mlx5_vport *vport);
20 void esw_acl_egress_vlan_grp_destroy(struct mlx5_vport *vport);
21 
22 /* Ingress acl helper functions */
23 void esw_acl_ingress_table_destroy(struct mlx5_vport *vport);
24 void esw_acl_ingress_allow_rule_destroy(struct mlx5_vport *vport);
25 
26 #endif /* __MLX5_ESWITCH_ACL_HELPER_H__ */
27