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 <venkatkumar.duvvuru@broadcom.com>
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
* 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);