Skip to content

Commit

Permalink
net/bnxt: fix restoring VLAN filtering after recovery
Browse files Browse the repository at this point in the history
[ upstream commit 8717548 ]

During port start, driver calls bnxt_vlan_offload_set_op()
to program VLAN Filter/VLAN Strip setting to the HW. This
in turns add the vlan filters.

This results in a failure when bnxt_restore_filters() invokes
bnxt_restore_vlan_filters() during the recovery as the vlans are
already programmed.

Fix to ignore the error(-EEXIST).

Fixes: 151c824 ("net/bnxt: restore VLAN filters during reset recovery")

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
  • Loading branch information
Kalesh AP authored and bluca committed Feb 14, 2022
1 parent 7275db8 commit fa8cc81
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/net/bnxt/bnxt_ethdev.c
Expand Up @@ -4113,8 +4113,9 @@ static int bnxt_restore_filters(struct bnxt *bp)
if (ret)
return ret;

/* if vlans are already programmed, this can fail with -EEXIST */
ret = bnxt_restore_vlan_filters(bp);
if (ret)
if (ret && ret != -EEXIST)
return ret;

ret = bnxt_restore_mcast_mac_filters(bp);
Expand Down

0 comments on commit fa8cc81

Please sign in to comment.