From 037cc747d1323548a2ff86fac603175435692b6a Mon Sep 17 00:00:00 2001 From: Venkat Duvvuru Date: Thu, 24 Oct 2019 13:14:22 +0530 Subject: [PATCH] net/bnxt: fix default MAC check bnxt_set_hwrm_vnic_filters programs default mac addr and the same default mac is added by mac_add_addr_op routine as well. This redundant mac add is avoided by checking if the default mac is already added. However, that check is wrong. The check should consider the mac index as well to determine the default mac. This patch fixes it by using mac index to determine the default mac. Fixes: 68f589f2c728 ("net/bnxt: fix setting primary MAC address") Cc: stable@dpdk.org Signed-off-by: Venkat Duvvuru Signed-off-by: Somnath Kotur Signed-off-by: Ajit Khaparde --- drivers/net/bnxt/bnxt_ethdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c index ce3a03abec..820005cc06 100644 --- a/drivers/net/bnxt/bnxt_ethdev.c +++ b/drivers/net/bnxt/bnxt_ethdev.c @@ -1023,7 +1023,7 @@ static int bnxt_add_mac_filter(struct bnxt *bp, struct bnxt_vnic_info *vnic, * hw-vlan-filter is turned OFF from ON, default * MAC filter should be restored */ - if (filter->dflt) + if (index == 0 && filter->dflt) return 0; filter = bnxt_alloc_filter(bp); -- 2.20.1