diff mbox series

[05/18] net/bnxt: fix restoring VLAN filtering after recovery

Message ID 20220104083824.23001-6-kalesh-anakkur.purayil@broadcom.com (mailing list archive)
State Accepted, archived
Delegated to: Ajit Khaparde
Headers show
Series bnxt PMD fixes | expand


Context Check Description
ci/checkpatch success coding style OK

Commit Message

Kalesh A P Jan. 4, 2022, 8:38 a.m. UTC
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>

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: 151c8240ac6a ("net/bnxt: restore VLAN filters during reset recovery")
Cc: stable@dpdk.org

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>
 drivers/net/bnxt/bnxt_ethdev.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series


diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index dcf2839..99a7d35 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -4308,8 +4308,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);