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 BCA01A04DD; Thu, 2 Jan 2020 08:21:45 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 975B71BFD7; Thu, 2 Jan 2020 08:21:45 +0100 (CET) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id 2EFD31BFA7 for ; Thu, 2 Jan 2020 08:21:44 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 01 Jan 2020 23:21:43 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,385,1571727600"; d="scan'208";a="224715718" Received: from npg-dpdk-haiyue-1.sh.intel.com ([10.67.119.213]) by fmsmga001.fm.intel.com with ESMTP; 01 Jan 2020 23:21:42 -0800 From: Haiyue Wang To: dev@dpdk.org, xiaolong.ye@intel.com Cc: Haiyue Wang Date: Thu, 2 Jan 2020 15:14:57 +0800 Message-Id: <20200102071457.106137-1-haiyue.wang@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [dpdk-dev] [PATCH v1] net/ice: align with MAC address length definition 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" Use the standand MAC address length definition in PMD's scope. Signed-off-by: Haiyue Wang --- drivers/net/ice/ice_ethdev.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c index 2cbd82c94..80b422a27 100644 --- a/drivers/net/ice/ice_ethdev.c +++ b/drivers/net/ice/ice_ethdev.c @@ -873,7 +873,7 @@ ice_add_mac_filter(struct ice_vsi *vsi, struct rte_ether_addr *mac_addr) ret = -ENOMEM; goto DONE; } - rte_memcpy(&f->mac_info.mac_addr, mac_addr, ETH_ADDR_LEN); + rte_memcpy(&f->mac_info.mac_addr, mac_addr, RTE_ETHER_ADDR_LEN); TAILQ_INSERT_TAIL(&vsi->mac_list, f, next); vsi->mac_num++; @@ -1662,7 +1662,7 @@ ice_setup_vsi(struct ice_pf *pf, enum ice_vsi_type type) /* MAC configuration */ rte_memcpy(pf->dev_addr.addr_bytes, hw->port_info->mac.perm_addr, - ETH_ADDR_LEN); + RTE_ETHER_ADDR_LEN); rte_memcpy(&mac_addr, &pf->dev_addr, RTE_ETHER_ADDR_LEN); ret = ice_add_mac_filter(vsi, &mac_addr); @@ -3267,7 +3267,7 @@ static int ice_macaddr_set(struct rte_eth_dev *dev, PMD_DRV_LOG(ERR, "Failed to add mac filter"); return -EIO; } - memcpy(&pf->dev_addr, mac_addr, ETH_ADDR_LEN); + rte_memcpy(&pf->dev_addr, mac_addr, RTE_ETHER_ADDR_LEN); flags = ICE_AQC_MAN_MAC_UPDATE_LAA_WOL; ret = ice_aq_manage_mac_write(hw, mac_addr->addr_bytes, flags, NULL); -- 2.17.1