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 BF586A04C9; Tue, 11 Aug 2020 10:10:19 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 756091C0B4; Tue, 11 Aug 2020 10:09:59 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id A224F1C0B3 for ; Tue, 11 Aug 2020 10:09:57 +0200 (CEST) IronPort-SDR: QaAjtvyh1QqZL2dLXJqJG4Clg4ylC3p/EOUCaqRMayss36zGq45PQRRUiSC/iUlY1IyFVBNicK x/M6EejTmJPg== X-IronPort-AV: E=McAfee;i="6000,8403,9709"; a="133226894" X-IronPort-AV: E=Sophos;i="5.75,460,1589266800"; d="scan'208";a="133226894" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Aug 2020 01:09:57 -0700 IronPort-SDR: a6c7Brpw0q39cUZW8/fnbloKHF8d8TGlhg5ZCDCOiqUDA2qqDygejisa9iRAiaYJLltKYnPi+U By0Do/Fksokw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,460,1589266800"; d="scan'208";a="308335340" Received: from intel-npg-odc-srv01.cd.intel.com ([10.240.178.134]) by orsmga002.jf.intel.com with ESMTP; 11 Aug 2020 01:09:55 -0700 From: SteveX Yang To: jingjing.wu@intel.com, beilei.xing@intel.com, dev@dpdk.org Cc: qiming.yang@intel.com, SteveX Yang Date: Tue, 11 Aug 2020 07:59:07 +0000 Message-Id: <20200811075910.20954-5-stevex.yang@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200811075910.20954-1-stevex.yang@intel.com> References: <20200811075910.20954-1-stevex.yang@intel.com> Subject: [dpdk-dev] [PATCH 4/7] net/iavf: fix setting of MAC address on iavf 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" When setting the MAC address, the ethdev layer copies the new mac address in dev->data->mac_addrs[0] before calling the dev_ops. Therefore, is_same_ether_addr(mac_addr, dev->data->mac_addrs) was always true, and the MAC was never set. Remove this test to fix the issue. Fixes: 538da7a1cad2 ("net: add rte prefix to ether functions") Signed-off-by: SteveX Yang --- drivers/net/iavf/iavf_ethdev.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c index 349c82cae..f16aff531 100644 --- a/drivers/net/iavf/iavf_ethdev.c +++ b/drivers/net/iavf/iavf_ethdev.c @@ -978,9 +978,6 @@ iavf_dev_set_default_mac_addr(struct rte_eth_dev *dev, old_addr = (struct rte_ether_addr *)hw->mac.addr; perm_addr = (struct rte_ether_addr *)hw->mac.perm_addr; - if (rte_is_same_ether_addr(mac_addr, old_addr)) - return 0; - /* If the MAC address is configured by host, skip the setting */ if (rte_is_valid_assigned_ether_addr(perm_addr)) return -EPERM; -- 2.17.1