xref: /linux/drivers/net/ethernet/intel/ice/ice_vsi_vlan_lib.h (revision 1d227fcc72223cbdd34d0ce13541cbaab5e0d72f)
1bc42afa9SBrett Creeley /* SPDX-License-Identifier: GPL-2.0 */
2bc42afa9SBrett Creeley /* Copyright (C) 2019-2021, Intel Corporation. */
3bc42afa9SBrett Creeley 
4bc42afa9SBrett Creeley #ifndef _ICE_VSI_VLAN_LIB_H_
5bc42afa9SBrett Creeley #define _ICE_VSI_VLAN_LIB_H_
6bc42afa9SBrett Creeley 
7bc42afa9SBrett Creeley #include <linux/types.h>
8fb05ba12SBrett Creeley #include "ice_vlan.h"
9bc42afa9SBrett Creeley 
102946204bSMichal Swiatkowski struct ice_vsi_vlan_info {
112946204bSMichal Swiatkowski 	u8 sw_flags2;
122946204bSMichal Swiatkowski 	u8 inner_vlan_flags;
132946204bSMichal Swiatkowski 	u8 outer_vlan_flags;
142946204bSMichal Swiatkowski };
152946204bSMichal Swiatkowski 
16bc42afa9SBrett Creeley struct ice_vsi;
17bc42afa9SBrett Creeley 
18fb05ba12SBrett Creeley int ice_vsi_add_vlan(struct ice_vsi *vsi, struct ice_vlan *vlan);
19fb05ba12SBrett Creeley int ice_vsi_del_vlan(struct ice_vsi *vsi, struct ice_vlan *vlan);
20bc42afa9SBrett Creeley 
217bd527aaSBrett Creeley int ice_vsi_ena_inner_stripping(struct ice_vsi *vsi, u16 tpid);
227bd527aaSBrett Creeley int ice_vsi_dis_inner_stripping(struct ice_vsi *vsi);
237bd527aaSBrett Creeley int ice_vsi_ena_inner_insertion(struct ice_vsi *vsi, u16 tpid);
247bd527aaSBrett Creeley int ice_vsi_dis_inner_insertion(struct ice_vsi *vsi);
257bd527aaSBrett Creeley int ice_vsi_set_inner_port_vlan(struct ice_vsi *vsi, struct ice_vlan *vlan);
262946204bSMichal Swiatkowski int ice_vsi_clear_inner_port_vlan(struct ice_vsi *vsi);
27bc42afa9SBrett Creeley 
28bc42afa9SBrett Creeley int ice_vsi_ena_rx_vlan_filtering(struct ice_vsi *vsi);
29bc42afa9SBrett Creeley int ice_vsi_dis_rx_vlan_filtering(struct ice_vsi *vsi);
30bc42afa9SBrett Creeley int ice_vsi_ena_tx_vlan_filtering(struct ice_vsi *vsi);
31bc42afa9SBrett Creeley int ice_vsi_dis_tx_vlan_filtering(struct ice_vsi *vsi);
32bc42afa9SBrett Creeley 
33c31af68aSBrett Creeley int ice_vsi_ena_outer_stripping(struct ice_vsi *vsi, u16 tpid);
34c31af68aSBrett Creeley int ice_vsi_dis_outer_stripping(struct ice_vsi *vsi);
35c31af68aSBrett Creeley int ice_vsi_ena_outer_insertion(struct ice_vsi *vsi, u16 tpid);
36c31af68aSBrett Creeley int ice_vsi_dis_outer_insertion(struct ice_vsi *vsi);
37c31af68aSBrett Creeley int ice_vsi_set_outer_port_vlan(struct ice_vsi *vsi, struct ice_vlan *vlan);
382946204bSMichal Swiatkowski int ice_vsi_clear_outer_port_vlan(struct ice_vsi *vsi);
39*d019b1a9SMichal Swiatkowski int ice_vsi_clear_port_vlan(struct ice_vsi *vsi);
40c31af68aSBrett Creeley 
41bc42afa9SBrett Creeley #endif /* _ICE_VSI_VLAN_LIB_H_ */
42