[PATCH] net/iavf: fix old primary MAC deletion
Bruce Richardson
bruce.richardson at intel.com
Thu Mar 5 16:30:29 CET 2026
On Wed, Mar 04, 2026 at 11:43:12PM +0000, Mandal, Anurag wrote:
> Tested-by: Aliaksei Belovus <albe19021990 at gmail.com>
>
> Comments from submitter in Bugzilla-1897
>
> "This fix works at startup. The only thing that bothers me is the iavf_add_del_all_mac_addr method, which has no error handling and doesn't take its result into account when setting the mac_primary_set flag.
> But for me this fix is totally good. And my problem was fixed."
>
>
> > -----Original Message-----
> > From: Mandal, Anurag <anurag.mandal at intel.com>
> > Sent: 04 March 2026 16:46
> > To: dev at dpdk.org
> > Cc: Richardson, Bruce <bruce.richardson at intel.com>; Medvedkin, Vladimir
> > <vladimir.medvedkin at intel.com>; albe19021990 at gmail.com; Mandal,
> > Anurag <anurag.mandal at intel.com>; stable at dpdk.org
> > Subject: [PATCH] net/iavf: fix old primary MAC deletion
> >
> > Old Primary MAC removal operation fails while trying to set the default MAC
> > address on a VF via rte_eth_dev_default_mac_addr_set()
> > when VF is yet to be started post initialization.
> > This happens due to non-assignment of the old MAC as
> > VIRTCHNL_ETHER_ADDR_PRIMARY MAC on the VF as it did not invoke
> > iavf_dev_start() yet to do the same post initialization.
> > Logs indicate old primary MAC removal failure even though
> > rte_eth_dev_default_mac_addr_set() returns success causing ambiguity.
> >
> > This patch fixes the issue by introducing the flag "mac_primary_set"
> > in the iavf_adapter & is set to 'false' upon VF initialization.
> > It is set to 'true' when any MAC address gets assigned as
> > VIRTCHNL_ETHER_ADDR_PRIMARY MAC on the VF. This flags gets enabled
> > only once for a VF.
> >
> > Bugzilla ID: 1897
> > Fixes: b335e7203475 ("net/iavf: fix lack of MAC type when set MAC address")
> > Cc: stable at dpdk.org
> >
> > Signed-off-by: Anurag Mandal <anurag.mandal at intel.com>
> > ---
> > drivers/net/intel/iavf/iavf.h | 1 +
> > drivers/net/intel/iavf/iavf_ethdev.c | 19 ++++++++++++++-----
> > 2 files changed, 15 insertions(+), 5 deletions(-)
> >
Applied to next-net-intel. It would be good to have the additional cleanup
done in the next release, but this fixes the originally reported problem.
/Bruce
More information about the dev
mailing list