提交 3a3c95bb 编写于 作者: S shenhao 提交者: Yang Yingliang

net: hns3: Increase vlan tag0 when close the port_base_vlan

driver inclusion
category: debug
bugzilla: NA
CVE: NA

----------------------------------------------------------

This patch increase vlan tag0 when close the port_base_vlan
Signed-off-by: Nliaoguojia <liaoguojia@huawei.com>
Signed-off-by: Nshenhao <shenhao21@huawei.com>
Reviewed-by: NZhong Zhaohui <zhongzhaohui@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 2eeca9da
......@@ -9045,8 +9045,10 @@ static int hclge_update_vlan_filter_entries(struct hclge_vport *vport,
if (port_base_vlan_state == HNAE3_PORT_BASE_VLAN_ENABLE) {
hclge_rm_vport_all_vlan_table(vport, false);
/* force clear vlan 0 */
hclge_set_vf_vlan_common(hdev, vport->vport_id, true, 0,
htons(ETH_P_8021Q));
ret = hclge_set_vf_vlan_common(hdev, vport->vport_id, true, 0,
htons(ETH_P_8021Q));
if (ret)
return ret;
return hclge_set_vlan_filter_hw(hdev,
htons(new_info->vlan_proto),
vport->vport_id,
......@@ -9055,6 +9057,12 @@ static int hclge_update_vlan_filter_entries(struct hclge_vport *vport,
}
vport->port_base_vlan_cfg.tbl_sta = false;
/* force add vlan 0 */
ret = hclge_set_vf_vlan_common(hdev, vport->vport_id, false, 0,
htons(ETH_P_8021Q));
if (ret)
return ret;
ret = hclge_set_vlan_filter_hw(hdev, htons(old_info->vlan_proto),
vport->vport_id, old_info->vlan_tag,
true);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册