Question about ORs stub driver behavior
Hi, When ORe stub driver initializes virtual interface in l4x_ore_init_device() function, It tries to allocate hardware MAC address for all devices EXCEPT "lo" device: if (strcmp(devname, "lo")) priv->config.ro_keep_device_mac = 1; else priv->config.ro_keep_device_mac = 0; Here if devname=="lo" then strcmp() returns 0 and we tries to get virtual MAC for "lo". Is it intended behavior? Why do we need HW MAC for HW NIC and virtual one for "lo"? How in this case several Linux instances will use the same HW MAC? Best Regards, Alexander Valitov -- View this message in context: http://www.nabble.com/Question-about-ORs-stub-driver-behavior-tp22326115p223... Sent from the L4 mailing list archive at Nabble.com.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi,
Is it intended behavior?
Yes. The idea is that if you have a setup with L4Linux running in a single instance on top of Fiasco, you want it to reuse the NICs MAC, so that it really behaves as if it was Linux running on your local machine (e.g. with MAC-based DHCP setups). For the lo interface, there is no physical NIC you could reuse. (Note, that using ORe's lo from L4Linux is not the same as using Linux' own lo interface.)
Why do we need HW MAC for HW NIC and virtual one for "lo"? How in this case several Linux instances will use the same HW MAC?
The keep_device_mac option is a hint to the ORe server and it will only allocate the physical MAC to one of its clients, all others will get a virtual one even if they try to request the physical MAC. (pkg/ore/server/clients.c:72) Currently, this goes out to the first client trying to get it, you could extend ORe to make it configurable if necessary. Hth, Bjoern -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkmuSI0ACgkQP5ijxgQLUNmbeACgieSJ4pzUlSVeDelPT4Aldlye cLEAn01a5kMwP1oBm1Ng+AkICprhZlJD =pztg -----END PGP SIGNATURE-----
participants (2)
-
Alexander Valitov -
Björn Döbel