[libvirt] udev node device backend

Dave Allan dallan at redhat.com
Wed Nov 4 22:26:15 UTC 2009

Dave Allan wrote:
> Chris Lalancette wrote:
>> Daniel P. Berrange wrote:
>>> On Wed, Oct 28, 2009 at 12:16:40PM +0100, Chris Lalancette wrote:
>>>> Dave Allan wrote:
>>>>> Attached is a fully functional version of the node device udev 
>>>>> based backend, incorporating all the feedback from earlier 
>>>>> revisions.  I broke the new capability fields out into a separate 
>>>>> patch per Dan's suggestion, and I have also included a patch 
>>>>> removing the DevKit backend.
>>>> 3)  I took a look at how the network is represented in the XML.  In 
>>>> the HAL
>>>> backend, we get something that looks like:
>>>> <device>
>>>>   <name>net_00_13_20_f5_fa_e3</name>
>>>>   <parent>pci_8086_10bd</parent>
>>>>   <capability type='net'>
>>>>     <interface>eth0</interface>
>>>>     <address>00:13:20:f5:fa:e3</address>
>>>>     <capability type='80203'/>
>>>>   </capability>
>>>> </device>
>>>> That "<capability type='80203'/>" looks to be bogus (although I 
>>>> could be wrong;
>>>> that same XML is encoded into the tests, so maybe there is something 
>>>> else going
>>>> on).  You are already in a <capability> block, so that should 
>>>> probably just be
>>>> "<type='80203'/>".  The same problem occurs in the udev backend.
>>> Why do you think the '<capability type='80203'/>'  bit is bogus ?   
>>> That looks
>>> correct to me, showing that eth0 is a ethernet device (as opposed to 
>>> a 80211
>>> wireless, or neither)
>> Oh, I think the concept is useful, it's just that the way it is 
>> represented in
>> the XML looks weird:
>> <capability type='net'>
>>     ...
>>     <capability type='80203'/>
>> </capability>
>> Shouldn't this rather be:
>> <capability type='net'>
>>     ...
>>     <type>80203</type>
>> </capability>
>> Or:
>> <capability type='net' subtype='80203'>
>>     ...
>> </capability>
>> Or something like that?
> Here's the latest version of the udev backend.  I think I've addressed 
> all of everybody's concerns, except for the translation of PCI ids to 
> strings and the bogosity in the ethernet types.  I've got working code 
> for the PCI ids translation, but it's completely separate and involves 
> modifying the build system again, so I'd like to get this set of patches 
> in first.  I'll sort out the ethernet types in a follow up patch as 
> well.  There's some additional follow up work to make the device tree 
> look really nice, but that's also completely separate.
> Dave

Attached are two additional patches.  The first fixes a bug I found 
where I was reading the wrong sysfs attribute name, so the PCI device ID 
wasn't getting populated.  The second uses libpciaccess to translate the 
PCI vendor and device IDs into their human readable names.


-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 0001-Fix-mis-named-PCI-device-ID-property.patch
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20091104/7eccfecc/attachment-0002.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 0002-Add-translation-of-PCI-vendor-and-product-IDs.patch
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20091104/7eccfecc/attachment-0003.ksh>

More information about the libvir-list mailing list