[PATCH v2] xen-netback: allow changing the MAC address of the interface

Subsystems: networking drivers, the rest, xen network backend driver

STALE4941d REVIEWED: 1 (0M)

1 review trailer.

3 messages, 3 authors, 2013-01-22 · open the first message on its own page

[PATCH v2] xen-netback: allow changing the MAC address of the interface

From: Matt Wilson <hidden>
Date: 2013-01-22 18:08:38

Sometimes it is useful to be able to change the MAC address of the
interface for netback devices. For example, when using ebtables it may
be useful to be able to distinguish traffic from different interfaces
without depending on the interface name.

Reported-by: Nikita Borzykh <redacted>
Reported-by: Paul Harvey <redacted>
Cc: netdev@vger.kernel.org
Cc: xen-devel@lists.xen.org
Cc: Konrad Rzeszutek Wilk <redacted>
Acked-by: Ian Campbell <redacted>
Signed-off-by: Matt Wilson <redacted>

---
Changes since v1:
 * No code changes, only updated commit message
---
 drivers/net/xen-netback/interface.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/net/xen-netback/interface.c b/drivers/net/xen-netback/interface.c
index b7d41f8..f733cae 100644
--- a/drivers/net/xen-netback/interface.c
+++ b/drivers/net/xen-netback/interface.c
@@ -238,6 +238,8 @@ static const struct net_device_ops xenvif_netdev_ops = {
 	.ndo_stop	= xenvif_close,
 	.ndo_change_mtu	= xenvif_change_mtu,
 	.ndo_fix_features = xenvif_fix_features,
+	.ndo_set_mac_address = eth_mac_addr,
+	.ndo_validate_addr   = eth_validate_addr,
 };
 
 struct xenvif *xenvif_alloc(struct device *parent, domid_t domid,
-- 
1.7.4.5

Re: [PATCH v2] xen-netback: allow changing the MAC address of the interface

From: Konrad Rzeszutek Wilk <hidden>
Date: 2013-01-22 20:21:37

On Tue, Jan 22, 2013 at 06:08:25PM +0000, Matt Wilson wrote:
Sometimes it is useful to be able to change the MAC address of the
interface for netback devices. For example, when using ebtables it may
be useful to be able to distinguish traffic from different interfaces
without depending on the interface name.

Reported-by: Nikita Borzykh <redacted>
Reported-by: Paul Harvey <redacted>
Cc: netdev@vger.kernel.org
Cc: xen-devel@lists.xen.org
Cc: Konrad Rzeszutek Wilk <redacted>
Reviewed-by: Konrad Rzeszutek Wilk <redacted>
quoted hunk
Acked-by: Ian Campbell <redacted>
Signed-off-by: Matt Wilson <redacted>

---
Changes since v1:
 * No code changes, only updated commit message
---
 drivers/net/xen-netback/interface.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/net/xen-netback/interface.c b/drivers/net/xen-netback/interface.c
index b7d41f8..f733cae 100644
--- a/drivers/net/xen-netback/interface.c
+++ b/drivers/net/xen-netback/interface.c
@@ -238,6 +238,8 @@ static const struct net_device_ops xenvif_netdev_ops = {
 	.ndo_stop	= xenvif_close,
 	.ndo_change_mtu	= xenvif_change_mtu,
 	.ndo_fix_features = xenvif_fix_features,
+	.ndo_set_mac_address = eth_mac_addr,
+	.ndo_validate_addr   = eth_validate_addr,
 };
 
 struct xenvif *xenvif_alloc(struct device *parent, domid_t domid,
-- 
1.7.4.5

Re: [PATCH v2] xen-netback: allow changing the MAC address of the interface

From: David Miller <davem@davemloft.net>
Date: 2013-01-22 20:29:40

From: Matt Wilson <redacted>
Date: Tue, 22 Jan 2013 18:08:25 +0000
Sometimes it is useful to be able to change the MAC address of the
interface for netback devices. For example, when using ebtables it may
be useful to be able to distinguish traffic from different interfaces
without depending on the interface name.

Reported-by: Nikita Borzykh <redacted>
Reported-by: Paul Harvey <redacted>
Cc: netdev@vger.kernel.org
Cc: xen-devel@lists.xen.org
Cc: Konrad Rzeszutek Wilk <redacted>
Acked-by: Ian Campbell <redacted>
Signed-off-by: Matt Wilson <redacted>
Applied to net-next, thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help