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 6DC8DA04D8; Tue, 11 Aug 2020 08:49:58 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 8B15D1C0B5; Tue, 11 Aug 2020 08:49:35 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id E6CD31C0B3 for ; Tue, 11 Aug 2020 08:49:33 +0200 (CEST) IronPort-SDR: iCj3oov0SAu0Kmao/9AJft7U7B845WT6MegGlyIU41Ke1e6zsijVJ1QmxswlwU6CiRgkDe/NEx Ov1HyIBIK9Nw== X-IronPort-AV: E=McAfee;i="6000,8403,9709"; a="171722167" X-IronPort-AV: E=Sophos;i="5.75,460,1589266800"; d="scan'208";a="171722167" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Aug 2020 23:49:33 -0700 IronPort-SDR: uea6Jhikq0m6mJPQGszsQDcJBoBX4l42wPAnzGFYKR8yw0nxfGEN1g709QcYeuG6CYWSp8OZMS o4WsJ8z4l0YA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,460,1589266800"; d="scan'208";a="398445751" Received: from intel-npg-odc-srv01.cd.intel.com ([10.240.178.134]) by fmsmga001.fm.intel.com with ESMTP; 10 Aug 2020 23:49:32 -0700 From: SteveX Yang To: jingjing.wu@intel.com, beilei.xing@intel.com, dev@dpdk.org Cc: SteveX Yang Date: Tue, 11 Aug 2020 06:29:14 +0000 Message-Id: <20200811062917.7007-5-stevex.yang@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200811062917.7007-1-stevex.yang@intel.com> References: <20200811062917.7007-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