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()
50 vlan->vid, vsi->vsi_num, err); in ice_vsi_add_vlan()
63 int ice_vsi_del_vlan(struct ice_vsi *vsi, struct ice_vlan *vlan) in ice_vsi_del_vlan() argument
69 if (!validate_vlan(vsi, vlan)) in ice_vsi_del_vlan()
74 err = ice_fltr_remove_vlan(vsi, vlan); in ice_vsi_del_vlan()
81 vlan->vid, vsi->vsi_num, err); in ice_vsi_del_vlan()
213 struct ice_vsi_vlan_info *vlan) in ice_save_vlan_info() argument
215 vlan->sw_flags2 = info->sw_flags2; in ice_save_vlan_info()
216 vlan->inner_vlan_flags = info->inner_vlan_flags; in ice_save_vlan_info()
217 vlan->outer_vlan_flags = info->outer_vlan_flags; in ice_save_vlan_info()
222 struct ice_vsi_vlan_info *vlan) in ice_restore_vlan_info() argument
224 info->sw_flags2 = vlan->sw_flags2; in ice_restore_vlan_info()
225 info->inner_vlan_flags = vlan->inner_vlan_flags; in ice_restore_vlan_info()
226 info->outer_vlan_flags = vlan->outer_vlan_flags; in ice_restore_vlan_info()
272 int ice_vsi_set_inner_port_vlan(struct ice_vsi *vsi, struct ice_vlan *vlan) in ice_vsi_set_inner_port_vlan() argument
276 if (vlan->tpid != ETH_P_8021Q) in ice_vsi_set_inner_port_vlan()
279 if (vlan->prio > 7) in ice_vsi_set_inner_port_vlan()
282 port_vlan_info = vlan->vid | (vlan->prio << VLAN_PRIO_SHIFT); in ice_vsi_set_inner_port_vlan()
747 int ice_vsi_set_outer_port_vlan(struct ice_vsi *vsi, struct ice_vlan *vlan) in ice_vsi_set_outer_port_vlan() argument
751 if (vlan->prio > (VLAN_PRIO_MASK >> VLAN_PRIO_SHIFT)) in ice_vsi_set_outer_port_vlan()
754 port_vlan_info = vlan->vid | (vlan->prio << VLAN_PRIO_SHIFT); in ice_vsi_set_outer_port_vlan()
756 return __ice_vsi_set_outer_port_vlan(vsi, port_vlan_info, vlan->tpid); in ice_vsi_set_outer_port_vlan()