Date: Sat, 16 May 2015 13:02:12 -0400 From: Allan Jude <allanjude@freebsd.org> To: virtualization@freebsd.org Subject: bhyve code question, pci_virtio_net.c Message-ID: <55577814.6040202@freebsd.org>
next in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --8x2KDc8as1P1b2kThjDTc4b3mG4npEPAT Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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. 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? 2) Should bhyve instead use the FreeBSD assigned OUI for these MAC addresses? --=20 Allan Jude --8x2KDc8as1P1b2kThjDTc4b3mG4npEPAT Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (MingW32) iQIcBAEBAgAGBQJVV3gXAAoJEJrBFpNRJZKfZqMP/j3BNJt1zTF73eNTvYyyiJ69 TeweBfzJbaTjXibOlZlqgo/Fq0cwmyhosUz09FBFOnTdBRZOdXgslKe5RAdaS9dP 6ZaO9g7EPrctw3XhodEys29VRKt4qvwJ6wY2FPyFe5k/YpY7Vt2S2xzuc8t3hc3Q jX0x8r3IIJb/XtMyPzMTZWG4JN5mjsEVnZ5IkGxEMleLKaShWKexpxCdieSBwKUx YXnL9KMMmdrh0ucd2b2Cal/VnQTqVIP+JBd3eoZJIryf1vIwuxKsL8dQ981FRJLN L6n1DAj2lPDeunxdpW+FfjM+VU8KDGSZIMv2RupoHCb0th0bfN2Pg4OMvsPMbgI1 s5E7qCXWfvoqsMXrXQQgfudcSsZqTjRRFeZ+8U3AD8DRVwSbHBOttfz9a5MII4O+ XJFaBiRS5dxwidUaVOhUkOBim/v0A33aAKnWos+TfQnhhJOxfSCSdnAsyxcohY4o sVIj+53MZET61jbSEIwp38E+ybe+evRKNJWPNRhJwuwl54hHZEdr3gWTD5GvIU6i Tv9PTgLXK6uqLJteD0kRcmDTe9q5AuL/pYs771SsX6Op5y8CyKUrs6800sPtNm/m BmrpFQDe9H5Jd9KhwlBR6vdpSfHe9BcI8Kxt12PJTijyFcji6VIg9VnyWJPKgOxS n5DzoiK+K+t1rLO7CXoA =/I7T -----END PGP SIGNATURE----- --8x2KDc8as1P1b2kThjDTc4b3mG4npEPAT--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?55577814.6040202>