Skip to contentSkip to conversation

xen-netback: allow changing the MAC address of the interface

PATCH Applied Matt Wilson 3 participants 5 messages Jan 22, 2013

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 xen-netback: allow changing the MAC address of the interface

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.

---
Changes since v1:
* No code changes, only updated commit message

---
 drivers/net/xen-netback/interface.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
drivers/net/xen-netback/interface.c +2 -0
index b7d41f8..f733cae 100644
@@ -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,
Signature · 1 line
1.7.4.5
Reviewed-by on v2 1/1
#1 lore raw
Quoted 10 lines · Matt Wilson

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.

Quoted 26 lines

---
Changes since v1:
* No code changes, only updated commit message

---
 drivers/net/xen-netback/interface.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
drivers/net/xen-netback/interface.c +2 -0
index b7d41f8..f733cae 100644
@@ -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,
Signature · 1 line
1.7.4.5
Reviewed-by on v2 1/1
#2 lore raw
In reply to Matt Wilson
Quoted 10 lines · Matt Wilson

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.

Quoted 26 lines

---
Changes since v1:
* No code changes, only updated commit message

---
 drivers/net/xen-netback/interface.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
drivers/net/xen-netback/interface.c +2 -0
index b7d41f8..f733cae 100644
@@ -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,
Signature · 1 line
1.7.4.5
maintainer Applied
#3 lore raw
In reply to Matt Wilson

From: Matt Wilson <[email protected]>
Date: Tue, 22 Jan 2013 18:08:25 +0000

Quoted 5 lines

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.

Quoted 7 lines

Applied to net-next, thanks.

maintainer Applied
#4 lore raw
In reply to Matt Wilson

From: Matt Wilson <[email protected]>
Date: Tue, 22 Jan 2013 18:08:25 +0000

Quoted 5 lines

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.

Quoted 7 lines

Applied to net-next, thanks.