Re: bhyve code question, pci_virtio_net.c

2015-05-23 Thread Julian Elischer

On 5/17/15 3:01 AM, Peter Grehan wrote:



 My rough plan to move forward with this is that any new non-virtio 
NIC emulation will get the FreeBSD OUI and perhaps a different 
default algorithm. virtio-net will continue to use the existing one, 
but maybe in the future a legacy-mac option will be required to 
use the old algorithm, and then it can be phased out.


 Yet another option is an auto-generated MAC is placed in a config 
file on first boot, ala VMWare. That could be the solution when 
config file work arrives.
I generate my macs based on the inode number of the root image. 
(through a lookup-file..)




later,

Peter.
___
freebsd-virtualization@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
freebsd-virtualization-unsubscr...@freebsd.org





___
freebsd-virtualization@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
freebsd-virtualization-unsubscr...@freebsd.org


Re: bhyve code question, pci_virtio_net.c

2015-05-16 Thread John-Mark Gurney
Allan Jude wrote this message on Sat, May 16, 2015 at 13:02 -0400:
 While looking at the code, I noticed the following comment:
 
   /*
* The default MAC address is the standard NetApp OUI of 00-a0-98,
* followed by an MD5 of the PCI slot/func number and dev name
*/
   if (!mac_provided) {
   snprintf(nstr, sizeof(nstr), %d-%d-%s, pi-pi_slot,
   pi-pi_func, vmname);
 
 
 which raised 2 questions:
 1) According to the comment, the mac address should be based on the md5
 of the DEVICE name, not the VM name. Which is correct? Which is more
 desirable?
 
 I suppose most people's VMs will have similar slot/func numbers for the
 NIC (especially with certain config engines that always assign devices
 in a specific order), and so the VM name is more likely to be unique
 than the name of the tap device.

Correct, VM name makes the most sense here...

 Would it make sense to include more unique information in this hash?
 like the host's UUID or something, to prevent the chance of more than 1
 VM on the same LAN having the same MAC if they have the same VM Name?

Sure...

 2) Should bhyve instead use the FreeBSD assigned OUI for these MAC
 addresses?

Depends, if NetApp gave us permission to use them here, then we might
as well keep using them.  gnn would be the persion to talk to about
this..

-- 
  John-Mark Gurney  Voice: +1 415 225 5579

 All that I will do, has been done, All that I have, has not.
___
freebsd-virtualization@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
freebsd-virtualization-unsubscr...@freebsd.org