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 64CF52BAE for ; Tue, 31 Jan 2017 10:44:57 +0100 (CET) Received: from 6wind.com (unknown [10.16.0.184]) by proxy.6wind.com (Postfix) with SMTP id 1D326265AF; Tue, 31 Jan 2017 10:44:52 +0100 (CET) Received: by 6wind.com (sSMTP sendmail emulation); Tue, 31 Jan 2017 10:43:15 +0100 From: Pascal Mazon To: keith.wiles@intel.com Cc: dev@dpdk.org, Pascal Mazon Date: Tue, 31 Jan 2017 10:42:56 +0100 Message-Id: <1485855778-15496-4-git-send-email-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> Subject: [dpdk-dev] [PATCH 4/6] 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: Tue, 31 Jan 2017 09:44:57 -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