1 /* SPDX-License-Identifier: GPL-2.0 */
2 /* Copyright (C) 2019-2021, Intel Corporation. */
3 
4 #ifndef _ICE_VSI_VLAN_LIB_H_
5 #define _ICE_VSI_VLAN_LIB_H_
6 
7 #include <linux/types.h>
8 #include "ice_vlan.h"
9 
10 struct ice_vsi_vlan_info {
11 	u8 sw_flags2;
12 	u8 inner_vlan_flags;
13 	u8 outer_vlan_flags;
14 };
15 
16 struct ice_vsi;
17 
18 int ice_vsi_add_vlan(struct ice_vsi *vsi, struct ice_vlan *vlan);
19 int ice_vsi_del_vlan(struct ice_vsi *vsi, struct ice_vlan *vlan);
20 
21 int ice_vsi_ena_inner_stripping(struct ice_vsi *vsi, u16 tpid);
22 int ice_vsi_dis_inner_stripping(struct ice_vsi *vsi);
23 int ice_vsi_ena_inner_insertion(struct ice_vsi *vsi, u16 tpid);
24 int ice_vsi_dis_inner_insertion(struct ice_vsi *vsi);
25 int ice_vsi_set_inner_port_vlan(struct ice_vsi *vsi, struct ice_vlan *vlan);
26 int ice_vsi_clear_inner_port_vlan(struct ice_vsi *vsi);
27 
28 int ice_vsi_ena_rx_vlan_filtering(struct ice_vsi *vsi);
29 int ice_vsi_dis_rx_vlan_filtering(struct ice_vsi *vsi);
30 int ice_vsi_ena_tx_vlan_filtering(struct ice_vsi *vsi);
31 int ice_vsi_dis_tx_vlan_filtering(struct ice_vsi *vsi);
32 
33 int ice_vsi_ena_outer_stripping(struct ice_vsi *vsi, u16 tpid);
34 int ice_vsi_dis_outer_stripping(struct ice_vsi *vsi);
35 int ice_vsi_ena_outer_insertion(struct ice_vsi *vsi, u16 tpid);
36 int ice_vsi_dis_outer_insertion(struct ice_vsi *vsi);
37 int ice_vsi_set_outer_port_vlan(struct ice_vsi *vsi, struct ice_vlan *vlan);
38 int ice_vsi_clear_outer_port_vlan(struct ice_vsi *vsi);
39 int ice_vsi_clear_port_vlan(struct ice_vsi *vsi);
40 
41 #endif /* _ICE_VSI_VLAN_LIB_H_ */
42