> -----Original Message----- > From: dev <[email protected]> On Behalf Of Li Han > Sent: Tuesday, August 25, 2020 11:01 AM > To: Wu, Jingjing <[email protected]>; Xing, Beilei <[email protected]> > Cc: [email protected]; Li Han <[email protected]> > Subject: [dpdk-dev] [PATCH] net/iavf: fix default mac set fail issue > > rte_is_valid_assigned_ether_addr retrun true if the given ethernet address is > valid. > > Signed-off-by: Li Han <[email protected]> > --- > drivers/net/iavf/iavf_ethdev.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c > index c3aa4cd..18ce809 100644 > --- a/drivers/net/iavf/iavf_ethdev.c > +++ b/drivers/net/iavf/iavf_ethdev.c > @@ -973,7 +973,7 @@ static int iavf_config_rx_queues_irqs(struct > rte_eth_dev *dev, > return 0; > > /* If the MAC address is configured by host, skip the setting */ > - if (rte_is_valid_assigned_ether_addr(perm_addr)) > + if (!rte_is_valid_assigned_ether_addr(perm_addr)) A valid mac address means it already be configured by host, so it should be skipped. > return -EPERM; > > ret = iavf_add_del_eth_addr(adapter, old_addr, false); > -- > 1.8.3.1

