diff mbox series

[02/18] net/bnxt: fix to restore mcast macs during reset recovery

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

Checks

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 reset recovery, driver is not restoring the multicast
mac addresses. Added code to restore them during reset recovery.

Fixes: b02f1573cd07 ("net/bnxt: restore MAC 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 | 20 +++++++++++++++++++-
 1 file changed, 19 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 50ffa30..bac9600 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -4261,6 +4261,18 @@  static int bnxt_restore_mac_filters(struct bnxt *bp)
 	return 0;
 }
 
+static int bnxt_restore_mcast_mac_filters(struct bnxt *bp)
+{
+	int ret = 0;
+
+	ret = bnxt_dev_set_mc_addr_list_op(bp->eth_dev, bp->mcast_addr_list,
+					   bp->nb_mc_addr);
+	if (ret)
+		PMD_DRV_LOG(ERR, "Failed to restore multicast MAC addreeses\n");
+
+	return ret;
+}
+
 static int bnxt_restore_filters(struct bnxt *bp)
 {
 	struct rte_eth_dev *dev = bp->eth_dev;
@@ -4282,7 +4294,13 @@  static int bnxt_restore_filters(struct bnxt *bp)
 		return ret;
 
 	ret = bnxt_restore_vlan_filters(bp);
-	/* TODO restore other filters as well */
+	if (ret)
+		return ret;
+
+	ret = bnxt_restore_mcast_mac_filters(bp);
+	if (ret)
+		return ret;
+
 	return ret;
 }