提交 840bcd88 编写于 作者: M Michal Swiatkowski 提交者: Jeff Kirsher

ice: Restore VLAN switch rule if port VLAN existed before

The VLAN rule is lost when VM starts or the AVF driver (iavf.ko) is
reloaded. So it is necessary to add this rule again.
Signed-off-by: NMichal Swiatkowski <michal.swiatkowski@intel.com>
Signed-off-by: NAnirudh Venkataramanan <anirudh.venkataramanan@intel.com>
Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
上级 b0153fdd
...@@ -457,8 +457,10 @@ static int ice_alloc_vsi_res(struct ice_vf *vf) ...@@ -457,8 +457,10 @@ static int ice_alloc_vsi_res(struct ice_vf *vf)
vsi->hw_base_vector += 1; vsi->hw_base_vector += 1;
/* Check if port VLAN exist before, and restore it accordingly */ /* Check if port VLAN exist before, and restore it accordingly */
if (vf->port_vlan_id) if (vf->port_vlan_id) {
ice_vsi_manage_pvid(vsi, vf->port_vlan_id, true); ice_vsi_manage_pvid(vsi, vf->port_vlan_id, true);
ice_vsi_add_vlan(vsi, vf->port_vlan_id & ICE_VLAN_M);
}
eth_broadcast_addr(broadcast); eth_broadcast_addr(broadcast);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册