[libvirt] udev node device backend

Dave Allan dallan at redhat.com
Wed Nov 4 20:22:02 UTC 2009


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
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 0001-Add-several-fields-to-node-device-capabilities.patch
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20091104/fe4b396e/attachment-0004.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 0002-Implement-a-node-device-backend-using-libudev.patch
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20091104/fe4b396e/attachment-0005.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 0003-Add-scsi_target-device-type.patch
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20091104/fe4b396e/attachment-0006.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 0004-Remove-DevKit-node-device-backend.patch
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20091104/fe4b396e/attachment-0007.ksh>


More information about the libvir-list mailing list