From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id B1AC7A04AB; Mon, 31 Aug 2020 10:28:00 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B18A41515; Mon, 31 Aug 2020 10:27:59 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 52B9B137D for ; Mon, 31 Aug 2020 10:27:57 +0200 (CEST) IronPort-SDR: NKXf6ROa0fMbvOba8D4Npeozo444vXBsfFmwtvvu1aDJEb0/RbfohXn2tUn8M71apm1tfT+EHx wLd145/I7Vww== X-IronPort-AV: E=McAfee;i="6000,8403,9729"; a="157940228" X-IronPort-AV: E=Sophos;i="5.76,375,1592895600"; d="scan'208";a="157940228" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Aug 2020 01:27:55 -0700 IronPort-SDR: Yzm0jpPkulXZySFXjAFGwNnK9pi9/4/SsTvGajrccsZJVdtT4s+hrQOobag5+G5QnwEsgPOl7E HYwgJ4ubCKPg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,375,1592895600"; d="scan'208";a="404372330" Received: from fmsmsx604.amr.corp.intel.com ([10.18.126.84]) by fmsmga001.fm.intel.com with ESMTP; 31 Aug 2020 01:27:55 -0700 Received: from fmsmsx604.amr.corp.intel.com (10.18.126.84) by fmsmsx604.amr.corp.intel.com (10.18.126.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Mon, 31 Aug 2020 01:27:05 -0700 Received: from fmsmsx101.amr.corp.intel.com (10.18.124.199) by fmsmsx604.amr.corp.intel.com (10.18.126.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Mon, 31 Aug 2020 01:27:05 -0700 Received: from shsmsx154.ccr.corp.intel.com (10.239.6.54) by fmsmsx101.amr.corp.intel.com (10.18.124.199) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 31 Aug 2020 01:27:05 -0700 Received: from shsmsx107.ccr.corp.intel.com ([169.254.9.141]) by SHSMSX154.ccr.corp.intel.com ([169.254.7.115]) with mapi id 14.03.0439.000; Mon, 31 Aug 2020 16:27:02 +0800 From: "Zhang, Qi Z" To: Li Han , "Wu, Jingjing" , "Xing, Beilei" CC: "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH] net/iavf: fix default mac set fail issue Thread-Index: AQHWepIcF5BHRKJBcUqQLAxswCdj26lR64eA Date: Mon, 31 Aug 2020 08:27:01 +0000 Message-ID: <039ED4275CED7440929022BC67E706115522E52E@SHSMSX107.ccr.corp.intel.com> References: <1598324444-24734-1-git-send-email-han.li1@zte.com.cn> In-Reply-To: <1598324444-24734-1-git-send-email-han.li1@zte.com.cn> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.5.1.3 dlp-reaction: no-action x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] net/iavf: fix default mac set fail issue X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" > -----Original Message----- > From: dev On Behalf Of Li Han > Sent: Tuesday, August 25, 2020 11:01 AM > To: Wu, Jingjing ; Xing, Beilei > Cc: dev@dpdk.org; Li Han > Subject: [dpdk-dev] [PATCH] net/iavf: fix default mac set fail issue >=20 > rte_is_valid_assigned_ether_addr retrun true if the given ethernet addres= s is > valid. >=20 > Signed-off-by: Li Han > --- > drivers/net/iavf/iavf_ethdev.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethde= v.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; >=20 > /* 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; >=20 > ret =3D iavf_add_del_eth_addr(adapter, old_addr, false); > -- > 1.8.3.1