From: Guojia Liao liaoguojia@huawei.com
driver inclusion category: bugfix bugzilla: NA CVE: NA
------------------------------
Using "ip link set <pf> vf <vf id> vlan <vid> qos <vlaue>" to set port base vlan "Tag" and "Qos" for VF. And if set the vlan Tag as 0 and Qos 0 from Tag as 0 and Qos as 1, due to the error recording state of port base vlan, the command will never take effect. This patch fixes it.
Signed-off-by: Guojia Liao liaoguojia@huawei.com Reviewed-by: Peng Li lipeng321@huawei.com Reviewed-by: Weiwei Deng dengweiwei@huawei.com Reviewed-by: Junxin Chen chenjunxin1@huawei.com Signed-off-by: Shengzui You youshengzui@huawei.com Signed-off-by: Yang Yingliang yangyingliang@huawei.com --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c index fd9534a6d466..f630cec28997 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c @@ -9120,14 +9120,13 @@ int hclge_update_port_base_vlan_cfg(struct hclge_vport *vport, u16 state, if (ret) return ret;
- /* update state only when disable/enable port based VLAN */ +update: vport->port_base_vlan_cfg.state = state; if (state == HNAE3_PORT_BASE_VLAN_DISABLE) nic->port_base_vlan_state = HNAE3_PORT_BASE_VLAN_DISABLE; else nic->port_base_vlan_state = HNAE3_PORT_BASE_VLAN_ENABLE;
-update: vport->port_base_vlan_cfg.old_vlan_info.vlan_tag = old_vlan_info->vlan_tag; vport->port_base_vlan_cfg.old_vlan_info.qos =