net: hns3: fix software vlan talbe of vlan 0 inconsistent with hardware
commit 7ed258f12ec5ce855f15cdfb5710361dc82fe899 upstream.
When user delete vlan 0, as driver will not delete vlan 0 for hardware in
function hclge_set_vlan_filter_hw(), so vlan 0 in software vlan talbe should
not be deleted.
Fixes: fe4144d47e
("net: hns3: sync VLAN filter entries when kill VLAN ID failed")
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
2a548fbf09
commit
b0c0f40570
@ -8344,11 +8344,11 @@ int hclge_set_vlan_filter(struct hnae3_handle *handle, __be16 proto,
|
||||
}
|
||||
|
||||
if (!ret) {
|
||||
if (is_kill)
|
||||
hclge_rm_vport_vlan_table(vport, vlan_id, false);
|
||||
else
|
||||
if (!is_kill)
|
||||
hclge_add_vport_vlan_table(vport, vlan_id,
|
||||
writen_to_tbl);
|
||||
else if (is_kill && vlan_id != 0)
|
||||
hclge_rm_vport_vlan_table(vport, vlan_id, false);
|
||||
} else if (is_kill) {
|
||||
/* when remove hw vlan filter failed, record the vlan id,
|
||||
* and try to remove it from hw later, to be consistence
|
||||
|
Loading…
Reference in New Issue
Block a user