> -----Original Message----- > From: dev <dev-boun...@dpdk.org> On Behalf Of Li Han > Sent: Tuesday, August 25, 2020 11:01 AM > To: Wu, Jingjing <jingjing...@intel.com>; Xing, Beilei <beilei.x...@intel.com> > Cc: dev@dpdk.org; Li Han <han....@zte.com.cn> > 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 <han....@zte.com.cn> > --- > 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