Commit 5ac6f91d authored by Mitch A Williams's avatar Mitch A Williams Committed by Jeff Kirsher

igb: Don't give VFs random MAC addresses

If the user has not assigned a MAC address to a VM, then don't give it a
random one. Instead, just give it zeros and let it figure out what to do
with them.
Signed-off-by: default avatarMitch Williams <mitch.a.williams@intel.com>
CC: Andy Gospodarek <andy@greyhouse.net>
CC: Stefan Assmann <sassmann@kpanic.de>
Tested-by: default avatarAaron Brown <aaron.f.brown@intel.com>
Tested-by: default avatarStefan Assmann <sassmann@redhat.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent aa19c295
...@@ -5197,7 +5197,7 @@ static int igb_vf_configure(struct igb_adapter *adapter, int vf) ...@@ -5197,7 +5197,7 @@ static int igb_vf_configure(struct igb_adapter *adapter, int vf)
{ {
unsigned char mac_addr[ETH_ALEN]; unsigned char mac_addr[ETH_ALEN];
eth_random_addr(mac_addr); eth_zero_addr(mac_addr);
igb_set_vf_mac(adapter, vf, mac_addr); igb_set_vf_mac(adapter, vf, mac_addr);
return 0; return 0;
...@@ -5550,9 +5550,9 @@ static void igb_vf_reset_event(struct igb_adapter *adapter, u32 vf) ...@@ -5550,9 +5550,9 @@ static void igb_vf_reset_event(struct igb_adapter *adapter, u32 vf)
{ {
unsigned char *vf_mac = adapter->vf_data[vf].vf_mac_addresses; unsigned char *vf_mac = adapter->vf_data[vf].vf_mac_addresses;
/* generate a new mac address as we were hotplug removed/added */ /* clear mac address as we were hotplug removed/added */
if (!(adapter->vf_data[vf].flags & IGB_VF_FLAG_PF_SET_MAC)) if (!(adapter->vf_data[vf].flags & IGB_VF_FLAG_PF_SET_MAC))
eth_random_addr(vf_mac); eth_zero_addr(vf_mac);
/* process remaining reset events */ /* process remaining reset events */
igb_vf_reset(adapter, vf); igb_vf_reset(adapter, vf);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment