Re: [PATCH v5] npiv: Auto-generate WWN if it's not specified

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2012/2/6 Eric Blake <eblake@xxxxxxxxxx>:
> On 02/06/2012 02:11 AM, Osier Yang wrote:
>> The auto-generated WWN comply with the new addressing schema of WWN:
>>
>> <quote>
>> the first nibble is either hex 5 or 6 followed by a 3-byte vendor
>> identifier and 36 bits for a vendor-specified serial number.
>> </quote>
>>
>> We choose hex 5 for the first nibble. And use Qumranet's OUI
>> (00:1A:4A) as the 3-byte vendor indentifier. The last 36 bits
>> are auto-generated.
>> ---
>>  src/conf/node_device_conf.c |   36 +++++++++++++++++++-----------------
>>  src/libvirt_private.syms    |    1 +
>>  src/util/virrandom.c        |   18 ++++++++++++++++++
>>  src/util/virrandom.h        |    1 +
>>  4 files changed, 39 insertions(+), 17 deletions(-)
>
>> +
>> +#define QUMRANET_OUI "001a4a"
>> +
>> +int
>> +virRandomGenerateWWN(char **wwn) {
>> +   if (virAsprintf(wwn, "5" QUMRANET_OUI "%09" PRIx64,
>> +                   virRandomBits(36)) < 0) {
>> +       virReportOOMError();
>> +       return -1;
>> +   }
>> +
>> +   return 0;
>
> ACK.  It looks a lot shorter than v4, which is a good thing :)
>

Maybe I miss something here because I didn't follow the whole version
history, but doesn't this result in using Qumranet's OUI for all
generated WWN's in libvirt, also for ESX and Hyper-V (assume the
drivers would support node devices yet) that might use different OUIs?
Or do I misunderstand this?

-- 
Matthias Bolte
http://photron.blogspot.com

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]