On Mon, Sep 27, 2021 at 10:30:51PM +0300, Dmitrii Shcherbakov wrote:
* XML serialization and deserialization of PCI VPD resources;
* PCI VPD capability flags added and used in relevant places;
* XML to XML tests for the added capability.
Signed-off-by: Dmitrii Shcherbakov <dmitrii.shcherbakov(a)canonical.com>
diff --git a/tests/nodedevschemadata/pci_0000_42_00_0_vpd.xml
b/tests/nodedevschemadata/pci_0000_42_00_0_vpd.xml
new file mode 100644
index 0000000000..831b6feb24
--- /dev/null
+++ b/tests/nodedevschemadata/pci_0000_42_00_0_vpd.xml
@@ -0,0 +1,33 @@
+<device>
+ <name>pci_0000_42_00_0</name>
+ <capability type='pci'>
+ <class>0x020000</class>
+ <domain>0</domain>
+ <bus>66</bus>
+ <slot>0</slot>
+ <function>0</function>
+ <product id='0xa2d6'>MT42822 BlueField-2 integrated ConnectX-6 Dx
network controller</product>
+ <vendor id='0x15b3'>Mellanox Technologies</vendor>
+ <capability type='virt_functions' maxCount='16'/>
+ <capability type='vpd'>
+ <resource type='string'>BlueField-2 DPU 25GbE Dual-Port SFP56,
Crypto Enabled, 16GB on-board DDR, 1GbE OOB management, Tall Bracket</resource>
+ <resource type='vpd-r'>
+ <field keyword='EC'>B1</field>
+ <field keyword='PN'>MBF2H332A-AEEOT</field>
+ <field keyword='SN'>MT2113X00000</field>
+ <field keyword='V0'>PCIeGen4 x8</field>
+ <field keyword='V2'>MBF2H332A-AEEOT</field>
+ <field
keyword='V3'>3c53d07eec484d8aab34dabd24fe575aa</field>
+ <field
keyword='VA'>MLX:MN=MLNX:CSKU=V2:UUID=V3:PCI=V0:MODL=BF2H332A</field>
I've got a general comment about what do any of these 2-letter
keywords actually mean. I presume they are explaned in the
PCI spec, but AFAICT the spec is not publically available for
free.
So at the very least we need to document each one's meaning
in libvirt docs IMHO.
If I had insight into what they meant, then I might also
suggest giving them meaningful names in libvirt. These two
level codes are presumably chosen for reasons of space
efficiency at the low level. This is not a constraint
we especially care about in libvirt, where ease of
understanding is usually more important.
Regards,
Daniel
--
|:
https://berrange.com -o-
https://www.flickr.com/photos/dberrange :|
|:
https://libvirt.org -o-
https://fstop138.berrange.com :|
|:
https://entangle-photo.org -o-
https://www.instagram.com/dberrange :|