All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pascal Mazon <pascal.mazon@6wind.com>
To: keith.wiles@intel.com
Cc: dev@dpdk.org, Pascal Mazon <pascal.mazon@6wind.com>
Subject: [PATCH 4/6] net/tap: keep kernel-assigned MAC address
Date: Tue, 31 Jan 2017 10:42:56 +0100	[thread overview]
Message-ID: <1485855778-15496-4-git-send-email-pascal.mazon@6wind.com> (raw)
In-Reply-To: <1485855778-15496-1-git-send-email-pascal.mazon@6wind.com>

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 <pascal.mazon@6wind.com>
---
 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

  parent reply	other threads:[~2017-01-31  9:44 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-31  9:42 [PATCH 1/6] net/tap: use correct tap name Pascal Mazon
2017-01-31  9:42 ` [PATCH 2/6] net/tap: use correct channel for error logs Pascal Mazon
2017-01-31 13:07   ` Ferruh Yigit
2017-01-31 16:58     ` Stephen Hemminger
2017-01-31 17:04       ` Wiles, Keith
2017-01-31  9:42 ` [PATCH 3/6] net/tap: don't set fd value overwritten just below Pascal Mazon
2017-01-31  9:42 ` Pascal Mazon [this message]
2017-01-31 13:13   ` [PATCH 4/6] net/tap: keep kernel-assigned MAC address Ferruh Yigit
2017-01-31  9:42 ` [PATCH 5/6] net/tap: display tap name after parsing Pascal Mazon
2017-01-31 13:16   ` Ferruh Yigit
2017-01-31  9:42 ` [PATCH 6/6] net/tap: implement link up and down callbacks Pascal Mazon
2017-01-31 13:21   ` Ferruh Yigit
2017-01-31 14:31     ` Pascal Mazon
2017-01-31 13:06 ` [PATCH 1/6] net/tap: use correct tap name Ferruh Yigit
2017-01-31 14:23   ` Pascal Mazon
2017-01-31 15:28     ` Ferruh Yigit
2017-01-31 15:30       ` Pascal Mazon
2017-01-31 15:38         ` Ferruh Yigit
2017-01-31 15:44           ` Wiles, Keith
2017-01-31 15:44             ` Pascal Mazon
2017-01-31 16:06               ` Wiles, Keith
2017-01-31 16:39                 ` Pascal Mazon
2017-01-31 23:29                   ` Wiles, Keith
2017-02-01  8:11                     ` Pascal Mazon
2017-02-01 15:25                       ` Wiles, Keith
2017-02-01 15:40                         ` Pascal Mazon
2017-02-01 15:55                           ` Wiles, Keith
2017-02-01 17:50                             ` Ferruh Yigit
2017-02-02  8:05                               ` Pascal Mazon
2017-02-02  8:25                                 ` Pascal Mazon
2017-02-02 10:23                                   ` Ferruh Yigit
2017-01-31 14:52 ` Wiles, Keith
2017-01-31 15:14   ` Ferruh Yigit
2017-01-31 15:19     ` Wiles, Keith
2017-02-02 13:46 ` Wiles, Keith
2017-02-02 16:17 ` [PATCH v2 1/7] " Pascal Mazon
2017-02-02 16:17   ` [PATCH v2 2/7] net/tap: use correct channel for error logs Pascal Mazon
2017-02-02 16:18   ` [PATCH v2 3/7] net/tap: don't set fd value overwritten just below Pascal Mazon
2017-02-02 16:18   ` [PATCH v2 4/7] net/tap: keep kernel-assigned MAC address Pascal Mazon
2017-02-02 16:18   ` [PATCH v2 5/7] net/tap: display tap name after parsing Pascal Mazon
2017-02-02 16:18   ` [PATCH v2 6/7] net/tap: implement link up and down callbacks Pascal Mazon
2017-02-02 16:18   ` [PATCH v2 7/7] net/tap: support promiscuous and allmulti setting Pascal Mazon
2017-02-02 16:23   ` [PATCH v2 1/7] net/tap: use correct tap name Wiles, Keith
2017-02-02 16:24     ` Wiles, Keith
2017-02-02 21:55       ` Ferruh Yigit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1485855778-15496-4-git-send-email-pascal.mazon@6wind.com \
    --to=pascal.mazon@6wind.com \
    --cc=dev@dpdk.org \
    --cc=keith.wiles@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.