Date: Sat, 16 May 2015 11:36:14 -0700 From: John-Mark Gurney <jmg@funkthat.com> To: Allan Jude <allanjude@freebsd.org> Cc: virtualization@freebsd.org, "George V. Neville-Neil" <gnn@freebsd.org> Subject: Re: bhyve code question, pci_virtio_net.c Message-ID: <20150516183614.GL37063@funkthat.com> In-Reply-To: <55577814.6040202@freebsd.org> References: <55577814.6040202@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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."
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20150516183614.GL37063>