From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, gospo@redhat.com,
Greg Rose <gregory.v.rose@intel.com>,
Jeff Kirsher <jeffrey.t.kirsher@intel.com>,
Don Skidmore <donald.c.skidmore@intel.com>
Subject: [net-next PATCH] igb: Use Intel OUI for VF MAC addresses
Date: Thu, 10 Sep 2009 18:48:27 -0700 [thread overview]
Message-ID: <20090911014757.19631.66570.stgit@localhost.localdomain> (raw)
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);
}
next reply other threads:[~2009-09-11 1:48 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-11 1:48 Jeff Kirsher [this message]
2009-09-11 2:07 ` [net-next PATCH] igb: Use Intel OUI for VF MAC addresses 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
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=20090911014757.19631.66570.stgit@localhost.localdomain \
--to=jeffrey.t.kirsher@intel.com \
--cc=davem@davemloft.net \
--cc=donald.c.skidmore@intel.com \
--cc=gospo@redhat.com \
--cc=gregory.v.rose@intel.com \
--cc=netdev@vger.kernel.org \
/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.