netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [net-next PATCH] igb: Use Intel OUI for VF MAC addresses
@ 2009-09-11  1:48 Jeff Kirsher
  2009-09-11  2:07 ` Stephen Hemminger
  0 siblings, 1 reply; 15+ messages in thread
From: Jeff Kirsher @ 2009-09-11  1:48 UTC (permalink / raw)
  To: davem; +Cc: netdev, gospo, Greg Rose, Jeff Kirsher, Don Skidmore

From: Gregory Rose <gregory.v.rose@intel.com>

This patch changes the default VF MAC address generation to use an Intel
Organizational Unit Identifier (OUI), instead of a fully randomized
Ethernet address.  This is to help prevent accidental MAC address
collisions.

Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
---

 drivers/net/igb/igb.h      |    1 +
 drivers/net/igb/igb_main.c |    2 ++
 2 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/net/igb/igb.h b/drivers/net/igb/igb.h
index 7126fea..463d178 100644
--- a/drivers/net/igb/igb.h
+++ b/drivers/net/igb/igb.h
@@ -65,6 +65,7 @@ struct igb_adapter;
 #define IGB_MAX_VF_MC_ENTRIES              30
 #define IGB_MAX_VF_FUNCTIONS               8
 #define IGB_MAX_VFTA_ENTRIES               128
+#define OUI_LEN                            3
 
 struct vf_data_storage {
 	unsigned char vf_mac_addresses[ETH_ALEN];
diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c
index 943186b..290555c 100644
--- a/drivers/net/igb/igb_main.c
+++ b/drivers/net/igb/igb_main.c
@@ -1315,6 +1315,7 @@ static int __devinit igb_probe(struct pci_dev *pdev,
 		unsigned int num_vfs = (max_vfs > 7) ? 7 : max_vfs;
 		int i;
 		unsigned char mac_addr[ETH_ALEN];
+		unsigned char oui[OUI_LEN] = {0x02, 0xAA, 0x00};
 
 		if (num_vfs) {
 			adapter->vf_data = kcalloc(num_vfs,
@@ -1335,6 +1336,7 @@ static int __devinit igb_probe(struct pci_dev *pdev,
 					     i < adapter->vfs_allocated_count;
 					     i++) {
 						random_ether_addr(mac_addr);
+						memcpy(mac_addr, oui, OUI_LEN);
 						igb_set_vf_mac(adapter, i,
 						               mac_addr);
 					}


^ permalink raw reply related	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2009-09-13  6:40 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-11  1:48 [net-next PATCH] igb: Use Intel OUI for VF MAC addresses Jeff Kirsher
2009-09-11  2:07 ` Stephen Hemminger
2009-09-11  3:02   ` Joe Perches
2009-09-11 19:15     ` David Miller
2009-09-11 20:20       ` [net-next PATCH] etherdevice.h: random_ether_addr update Joe Perches
2009-09-11 20:44         ` [net-next PATCH V2] " Joe Perches
2009-09-11 21:13           ` Rose, Gregory V
2009-09-11 21:15         ` [net-next PATCH] " Stephen Hemminger
2009-09-12  0:57           ` Joe Perches
2009-09-13  0:14             ` Mark Smith
2009-09-13  0:33               ` Mark Smith
2009-09-13  0:44                 ` Joe Perches
2009-09-13  3:47                   ` Mark Smith
2009-09-13  6:09                     ` Joe Perches
2009-09-13  6:39                       ` Mark Smith

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).