From: Pascal Mazon Date: Thu, 2 Feb 2017 16:18:01 +0000 (+0100) Subject: net/tap: keep kernel-assigned MAC address X-Git-Tag: spdx-start~4552 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=634dbc7aa7850157914fa61bd707c310b51c85eb;p=dpdk.git net/tap: keep kernel-assigned MAC address 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 Acked-by: Keith Wiles --- diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c index 8811716c7e..b39730832d 100644 --- a/drivers/net/tap/rte_eth_tap.c +++ b/drivers/net/tap/rte_eth_tap.c @@ -553,28 +553,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;