Lines Matching refs:vlan
24 static bool validate_vlan(struct ice_vsi *vsi, struct ice_vlan *vlan) in validate_vlan() argument
26 if (vlan->tpid != ETH_P_8021Q && vlan->tpid != ETH_P_8021AD && in validate_vlan()
27 vlan->tpid != ETH_P_QINQ1 && (vlan->tpid || vlan->vid)) { in validate_vlan()
28 print_invalid_tpid(vsi, vlan->tpid); in validate_vlan()
40 int ice_vsi_add_vlan(struct ice_vsi *vsi, struct ice_vlan *vlan) in ice_vsi_add_vlan() argument
44 if (!validate_vlan(vsi, vlan)) in ice_vsi_add_vlan()
47 err = ice_fltr_add_vlan(vsi, vlan); in ice_vsi_add_vlan()
54 vlan->vid, vsi->vsi_num, err); in ice_vsi_add_vlan()
64 int ice_vsi_del_vlan(struct ice_vsi *vsi, struct ice_vlan *vlan) in ice_vsi_del_vlan() argument
70 if (!validate_vlan(vsi, vlan)) in ice_vsi_del_vlan()
75 err = ice_fltr_remove_vlan(vsi, vlan); in ice_vsi_del_vlan()
82 vlan->vid, vsi->vsi_num, err); in ice_vsi_del_vlan()
214 struct ice_vsi_vlan_info *vlan) in ice_save_vlan_info() argument
216 vlan->sw_flags2 = info->sw_flags2; in ice_save_vlan_info()
217 vlan->inner_vlan_flags = info->inner_vlan_flags; in ice_save_vlan_info()
218 vlan->outer_vlan_flags = info->outer_vlan_flags; in ice_save_vlan_info()
223 struct ice_vsi_vlan_info *vlan) in ice_restore_vlan_info() argument
225 info->sw_flags2 = vlan->sw_flags2; in ice_restore_vlan_info()
226 info->inner_vlan_flags = vlan->inner_vlan_flags; in ice_restore_vlan_info()
227 info->outer_vlan_flags = vlan->outer_vlan_flags; in ice_restore_vlan_info()
273 int ice_vsi_set_inner_port_vlan(struct ice_vsi *vsi, struct ice_vlan *vlan) in ice_vsi_set_inner_port_vlan() argument
277 if (vlan->tpid != ETH_P_8021Q) in ice_vsi_set_inner_port_vlan()
280 if (vlan->prio > 7) in ice_vsi_set_inner_port_vlan()
283 port_vlan_info = vlan->vid | (vlan->prio << VLAN_PRIO_SHIFT); in ice_vsi_set_inner_port_vlan()
745 int ice_vsi_set_outer_port_vlan(struct ice_vsi *vsi, struct ice_vlan *vlan) in ice_vsi_set_outer_port_vlan() argument
749 if (vlan->prio > (VLAN_PRIO_MASK >> VLAN_PRIO_SHIFT)) in ice_vsi_set_outer_port_vlan()
752 port_vlan_info = vlan->vid | (vlan->prio << VLAN_PRIO_SHIFT); in ice_vsi_set_outer_port_vlan()
754 return __ice_vsi_set_outer_port_vlan(vsi, port_vlan_info, vlan->tpid); in ice_vsi_set_outer_port_vlan()