• Jian Shen's avatar
    net: hns3: add support for modify VLAN filter state · 2ba30662
    Jian Shen authored
    Previously, with hardware limitation, the port VLAN filter are
    effective for both PF and its VFs simultaneously, so a single
    function is not able to enable/disable separately, and the VLAN
    filter state is default enabled. Now some device supports each
    function to bypass port VLAN filter, then each function can
    switch VLAN filter separately. Add capability flag to check
    whether the device supports modify VLAN filter state. If flag
    on, user will be able to modify the VLAN filter state by ethtool
    -K.
    
    Furtherly, the default VLAN filter state is also changed
    according to whether non-zero VLAN used. Then the device can
    receive packet with any VLAN tag if only VLAN 0 used.
    
    The function hclge_need_enable_vport_vlan_filter() is used to
    help implement above changes. And the VLAN filter handle for
    promisc mode can also be simplified by this function.
    Signed-off-by: default avatarJian Shen <shenjian15@huawei.com>
    Signed-off-by: default avatarHuazhong Tan <tanhuazhong@huawei.com>
    Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
    2ba30662
hclge_cmd.c 15.8 KB