From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from proxy.6wind.com (host.76.145.23.62.rev.coltfrance.com [62.23.145.76]) by dpdk.org (Postfix) with ESMTP id A8C0C2C39 for ; Thu, 2 Feb 2017 17:18:23 +0100 (CET) Received: from 6wind.com (unknown [10.16.0.184]) by proxy.6wind.com (Postfix) with SMTP id 5E85D24F57; Thu, 2 Feb 2017 17:18:18 +0100 (CET) Received: by 6wind.com (sSMTP sendmail emulation); Thu, 02 Feb 2017 17:18:16 +0100 From: Pascal Mazon To: keith.wiles@intel.com Cc: dev@dpdk.org, Pascal Mazon Date: Thu, 2 Feb 2017 17:18:01 +0100 Message-Id: <04c59a74f849e628506df22124b19bb7b1ab50ac.1486026370.git.pascal.mazon@6wind.com> X-Mailer: git-send-email 2.8.0.rc0 In-Reply-To: <1485855778-15496-1-git-send-email-pascal.mazon@6wind.com> References: <1485855778-15496-1-git-send-email-pascal.mazon@6wind.com> In-Reply-To: <050aa06c03aa4b56f703d74a8d8a792de5e075f4.1486026370.git.pascal.mazon@6wind.com> References: <050aa06c03aa4b56f703d74a8d8a792de5e075f4.1486026370.git.pascal.mazon@6wind.com> Subject: [dpdk-dev] [PATCH v2 4/7] net/tap: keep kernel-assigned MAC address 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: , X-List-Received-Date: Thu, 02 Feb 2017 16:18:23 -0000 There's no point in having a different internal MAC address than the one provided by the kernel when creating the netdevice. Signed-off-by: Pascal Mazon --- drivers/net/tap/rte_eth_tap.c | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c index 3d15031008c6..f8b07b4a8fa1 100644 --- a/drivers/net/tap/rte_eth_tap.c +++ b/drivers/net/tap/rte_eth_tap.c @@ -552,28 +552,6 @@ pmd_mac_address(int fd, struct rte_eth_dev *dev, struct ether_addr *addr) return -1; } - /* Set the host based MAC address to this special MAC format */ - ifr.ifr_hwaddr.sa_data[0] = 'T'; - ifr.ifr_hwaddr.sa_data[1] = 'a'; - ifr.ifr_hwaddr.sa_data[2] = 'p'; - ifr.ifr_hwaddr.sa_data[3] = '-'; - ifr.ifr_hwaddr.sa_data[4] = dev->data->port_id; - ifr.ifr_hwaddr.sa_data[5] = dev->data->numa_node; - if (ioctl(fd, SIOCSIFHWADDR, &ifr) == -1) { - RTE_LOG(ERR, PMD, "%s: ioctl failed (SIOCSIFHWADDR) (%s)\n", - dev->data->name, ifr.ifr_name); - return -1; - } - - /* Set the local application MAC address, needs to be different then - * the host based MAC address. - */ - ifr.ifr_hwaddr.sa_data[0] = 'd'; - ifr.ifr_hwaddr.sa_data[1] = 'n'; - ifr.ifr_hwaddr.sa_data[2] = 'e'; - ifr.ifr_hwaddr.sa_data[3] = 't'; - ifr.ifr_hwaddr.sa_data[4] = dev->data->port_id; - ifr.ifr_hwaddr.sa_data[5] = dev->data->numa_node; rte_memcpy(addr, ifr.ifr_hwaddr.sa_data, ETH_ALEN); return 0; -- 2.8.0.rc0