Skip to content

Commit

Permalink
net/bnxt: fix multicast MAC restore during reset recovery
Browse files Browse the repository at this point in the history
[ upstream commit 04689bd ]

During reset recovery, driver is not restoring the multicast
mac addresses. Added code to restore them during reset recovery.

Fixes: b02f157 ("net/bnxt: restore MAC 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 kevintraynor committed Feb 21, 2022
1 parent 5e35fae commit f4d1e64
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion drivers/net/bnxt/bnxt_ethdev.c
Expand Up @@ -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;
Expand All @@ -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;
}

Expand Down

0 comments on commit f4d1e64

Please sign in to comment.