• Jian Shen's avatar
    net: hns3: fix set port based VLAN for PF · 21e043cd
    Jian Shen authored
    In original codes, ndo_set_vf_vlan() in hns3 driver was implemented
    wrong. It adds or removes VLAN into VLAN filter for VF, but VF is
    unaware of it.
    
    Indeed, ndo_set_vf_vlan() is expected to enable or disable port based
    VLAN (hardware inserts a specified VLAN tag to all TX packets for a
    specified VF) . When enable port based VLAN, we use port based VLAN id
    as VLAN filter entry. When disable port based VLAN, we use VLAN id of
    VLAN device.
    
    This patch fixes it for PF, enable/disable port based VLAN when calls
    ndo_set_vf_vlan().
    
    Fixes: 46a3df9f ("net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support")
    Signed-off-by: default avatarJian Shen <shenjian15@huawei.com>
    Signed-off-by: default avatarHuazhong Tan <tanhuazhong@huawei.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    21e043cd
hclge_mbx.c 18.6 KB