OS-6536: Expose vendor-name/device-name/subsystem-name as props on pciexfn topo nodes

Details

Issue Type:Improvement
Priority:4 - Normal
Status:Resolved
Created at:2017-12-21T15:37:54.188Z
Updated at:2018-06-06T16:21:22.992Z

People

Created by:Former user
Reported by:Former user
Assigned to:Former user

Resolution

Fixed: A fix for this issue is checked into the tree and tested.
(Resolution Date: 2018-02-02T17:08:33.262Z)

Fix Versions

2018-02-01 Kalm (Release Date: 2018-02-01)

Related Issues

Description

It would be nice if the values of the vendor-name and device-name could be pulled out of libpcidb (similar to what prtconf does) and then exposed as topo properties on the corresponding pciexfn nodes in the topo tree.  This is would make it easier to associate the nodes with the actual PCIe devices and would make the output of things like "fmtopo" a bit more intuitive.

Comments

Comment by Former user
Created at 2017-12-21T20:09:09.048Z

I would also reccomend including the subvendor/subdevice id if one exists.


Comment by Former user
Created at 2017-12-22T08:03:07.397Z

Agree - I'll also include that.


Comment by Former user
Created at 2018-01-29T19:34:18.071Z
Updated at 2018-01-30T19:42:35.177Z

Testing

To test, I built a platform image with these changes and then booted a handul of systems in the lab and verified the values of the vendor-name, device name and subvendor-name properties.

From a Joyent-Storage-Platform-7001:

[root@magma ~]# fmtopo -P pci "*pciexfn=[0-9]"
TIME                 UUID
Jan 29 19:31:42 480dc518-8f94-e73a-e8e1-886935386424

hc://:product-id=Joyent-Storage-Platform-7001:server-id=magma:chassis-id=S247158X6A07720/motherboard=0/hostbridge=2/pciexrc=2/pciexbus=3/pciexdev=0/pciexfn=0
  group: pci                            version: 1   stability: Private/Private
    device-id         string    97
    extended-capabilities string    pciexdev
    class-code        string    10700
    vendor-id         string    1000
    assigned-addresses uint32[]  [ 2164457488 0 24576 0 256 2198011924 0 3345219584 0 65536 2198011932 0 3344957440 0 262144 ]
    vendor-name       string    LSI Logic / Symbios Logic
    device-name       string    SAS3008 PCI-Express Fusion-MPT SAS-3

hc://:product-id=Joyent-Storage-Platform-7001:server-id=magma:chassis-id=S247158X6A07720/motherboard=0/hostbridge=4/pciexrc=4/pciexbus=5/pciexdev=0/pciexfn=0
  group: pci                            version: 1   stability: Private/Private
    device-id         string    1528
    extended-capabilities string    pciexdev
    class-code        string    20000
    vendor-id         string    8086
    assigned-addresses uint32[]  [ 3271884816 0 3351248896 0 2097152 2164588568 0 20512 0 32 3271884832 0 3353362432 0 16384 ]
    vendor-name       string    Intel Corporation
    device-name       string    Ethernet Controller 10-Gigabit X540-AT2

hc://:product-id=Joyent-Storage-Platform-7001:server-id=magma:chassis-id=S247158X6A07720/motherboard=0/hostbridge=4/pciexrc=4/pciexbus=5/pciexdev=0/pciexfn=1
  group: pci                            version: 1   stability: Private/Private
    device-id         string    1528
    extended-capabilities string    pciexdev
    class-code        string    20000
    vendor-id         string    8086
    assigned-addresses uint32[]  [ 3271885072 0 3349151744 0 2097152 2164588824 0 20480 0 32 3271885088 0 3353346048 0 16384 ]
    vendor-name       string    Intel Corporation
    device-name       string    Ethernet Controller 10-Gigabit X540-AT2

hc://:product-id=Joyent-Storage-Platform-7001:server-id=magma:chassis-id=S247158X6A07720/motherboard=0/hostbridge=6/pciexrc=6/pciexbus=8/pciexdev=0/pciexfn=0
  group: pci                            version: 1   stability: Private/Private
    device-id         string    1150
    extended-capabilities string    pcibus
    class-code        string    60400
    vendor-id         string    1a03
    vendor-name       string    ASPEED Technology, Inc.
    device-name       string    AST1150 PCI-to-PCI Bridge

[root@magma ~]# fmtopo -P pci "*pcifn=[0-9]"
TIME                 UUID
Jan 30 19:41:45 915f4b55-d70c-682d-b10c-fa5ca8ccac98

hc://:product-id=Joyent-Storage-Platform-7001:server-id=magma:chassis-id=S247158X6A07720/motherboard=0/hostbridge=6/pciexrc=6/pciexbus=8/pciexdev=0/pciexfn=0/pcibus=9/pcidev=0/pcifn=0
  group: pci                            version: 1   stability: Private/Private
    device-id         string    2000
    class-code        string    30000
    vendor-id         string    1a03
    assigned-addresses uint32[]  [ 2181627920 0 3321888768 0 16777216 2181627924 0 3338665984 0 131072 2164850712 0 16384 0 128 2701721600 0 944 0 12 2701721600 0 960 0 32 2718498816 0 655360 0 131072 ]
    vendor-name       string    ASPEED Technology, Inc.
    device-name       string    ASPEED Graphics Family


Comment by Former user
Created at 2018-01-30T19:32:17.776Z

From an Intel NuC

[root@estel ~]# fmtopo -P pci "*pciexfn=[0-9]"
TIME                 UUID
Jan 30 19:23:08 0053485b-fc26-49b6-b609-83c88051c7fe

hc://:server-id=estel/motherboard=0/hostbridge=1/pciexrc=1/pciexbus=2/pciexdev=0/pciexfn=0
  group: pci                            version: 1   stability: Private/Private
    device-id         string    8621
    extended-capabilities string    pciexdev
    class-code        string    80501
    vendor-id         string    1217
    assigned-addresses uint32[]  [ 2181169168 0 3694137344 0 4096 2181169172 0 3694133248 0 2048 ]
    vendor-name       string    O2 Micro, Inc.
    device-name       string    SD/MMC Card Reader Controller

hc://:server-id=estel/motherboard=0/hostbridge=2/pciexrc=2/pciexbus=3/pciexdev=0/pciexfn=0
  group: pci                            version: 1   stability: Private/Private
    device-id         string    24f3
    extended-capabilities string    pciexdev
    class-code        string    28000
    vendor-id         string    8086
    assigned-addresses uint32[]  [ 2198011920 0 3693084672 0 8192 ]
    vendor-name       string    Intel Corporation
    device-name       string    Wireless 8260

hc://:server-id=estel/motherboard=0/hostbridge=4/pciexrc=4/pciexbus=61/pciexdev=0/pciexfn=0
  group: pci                            version: 1   stability: Private/Private
    device-id         string    a802
    extended-capabilities string    pciexdev
    class-code        string    10802
    vendor-id         string    144d
    assigned-addresses uint32[]  [ 2201813008 0 3692101632 0 16384 2168258584 0 57344 0 256 ]
    vendor-name       string    Samsung Electronics Co Ltd
    device-name       string    NVMe SSD Controller SM951/PM951

hc://:server-id=estel/motherboard=0/hostbridge=5/pciexrc=5/pciexbus=62/pciexdev=0/pciexfn=0
  group: pci                            version: 1   stability: Private/Private
    device-id         string    a804
    extended-capabilities string    pciexdev
    class-code        string    10802
    vendor-id         string    144d
    assigned-addresses uint32[]  [ 2201878544 0 3690987520 0 16384 ]
    vendor-name       string    Samsung Electronics Co Ltd
    device-name       string    NVMe SSD Controller SM961/PM961

Comment by Former user
Created at 2018-01-30T19:39:26.181Z

From an SmartOS VM running in VirtualBox:

[root@smartos-vbox ~]# fmtopo -P pci "*pcifn=[0-9]"
TIME                 UUID
Jan 30 19:37:47 a4bd1ba6-4b3a-ef43-9f28-e501e20c5dc4

hc://:product-id=VirtualBox:server-id=smartos-vbox:chassis-id=0/motherboard=0/hostbridge=0/pcibus=0/pcidev=0/pcifn=0
  group: pci                            version: 1   stability: Private/Private
    device-id         string    1237
    class-code        string    60000
    vendor-id         string    8086
    vendor-name       string    Intel Corporation
    device-name       string    440FX - 82441FX PMC [Natoma]

hc://:product-id=VirtualBox:server-id=smartos-vbox:chassis-id=0/motherboard=0/hostbridge=0/pcibus=0/pcidev=1/pcifn=0
  group: pci                            version: 1   stability: Private/Private
    device-id         string    7000
    class-code        string    60100
    vendor-id         string    8086
    vendor-name       string    Intel Corporation
    device-name       string    82371SB PIIX3 ISA [Natoma/Triton II]

hc://:product-id=VirtualBox:server-id=smartos-vbox:chassis-id=0/motherboard=0/hostbridge=0/pcibus=0/pcidev=2/pcifn=0
  group: pci                            version: 1   stability: Private/Private
    device-id         string    beef
    class-code        string    30000
    vendor-id         string    80ee
    assigned-addresses uint32[]  [ 3254784016 0 3758096384 0 16777216 2701135872 0 944 0 12 2701135872 0 960 0 32 2717913088 0 655360 0 131072 ]
    vendor-name       string    InnoTek Systemberatung GmbH
    device-name       string    VirtualBox Graphics Adapter

hc://:product-id=VirtualBox:server-id=smartos-vbox:chassis-id=0/motherboard=0/hostbridge=0/pcibus=0/pcidev=3/pcifn=0
  group: pci                            version: 1   stability: Private/Private
    device-id         string    100e
    class-code        string    20000
    vendor-id         string    8086
    assigned-addresses uint32[]  [ 2181044240 0 4026531840 0 131072 2164267032 0 53248 0 8 ]
    vendor-name       string    Intel Corporation
    device-name       string    82540EM Gigabit Ethernet Controller
    subsystem-name    string    PRO/1000 MT Desktop Adapter

hc://:product-id=VirtualBox:server-id=smartos-vbox:chassis-id=0/motherboard=0/hostbridge=0/pcibus=0/pcidev=4/pcifn=0
  group: pci                            version: 1   stability: Private/Private
    device-id         string    cafe
    class-code        string    88000
    vendor-id         string    80ee
    assigned-addresses uint32[]  [ 2164269072 0 53280 0 32 2181046292 0 4030726144 0 4194304 3254788120 0 4034920448 0 16384 ]
    vendor-name       string    InnoTek Systemberatung GmbH
    device-name       string    VirtualBox Guest Service

hc://:product-id=VirtualBox:server-id=smartos-vbox:chassis-id=0/motherboard=0/hostbridge=0/pcibus=0/pcidev=5/pcifn=0
  group: pci                            version: 1   stability: Private/Private
    device-id         string    2415
    class-code        string    40100
    vendor-id         string    8086
    assigned-addresses uint32[]  [ 2164271120 0 53504 0 256 2164271124 0 53760 0 64 ]
    vendor-name       string    Intel Corporation
    device-name       string    82801AA AC'97 Audio Controller

hc://:product-id=VirtualBox:server-id=smartos-vbox:chassis-id=0/motherboard=0/hostbridge=0/pcibus=0/pcidev=6/pcifn=0
  group: pci                            version: 1   stability: Private/Private
    device-id         string    3f
    class-code        string    c0310
    vendor-id         string    106b
    assigned-addresses uint32[]  [ 2181050384 0 4034936832 0 4096 ]
    vendor-name       string    Apple Inc.
    device-name       string    KeyLargo/Intrepid USB

hc://:product-id=VirtualBox:server-id=smartos-vbox:chassis-id=0/motherboard=0/hostbridge=0/pcibus=0/pcidev=7/pcifn=0
  group: pci                            version: 1   stability: Private/Private
    device-id         string    7113
    class-code        string    68000
    vendor-id         string    8086
    vendor-name       string    Intel Corporation
    device-name       string    82371AB/EB/MB PIIX4 ACPI

hc://:product-id=VirtualBox:server-id=smartos-vbox:chassis-id=0/motherboard=0/hostbridge=0/pcibus=0/pcidev=11/pcifn=0
  group: pci                            version: 1   stability: Private/Private
    device-id         string    265c
    class-code        string    c0320
    vendor-id         string    8086
    assigned-addresses uint32[]  [ 2181060624 0 4034940928 0 4096 ]
    vendor-name       string    Intel Corporation
    device-name       string    82801FB/FBM/FR/FW/FRW (ICH6 Family) USB2 EHCI C

hc://:product-id=VirtualBox:server-id=smartos-vbox:chassis-id=0/motherboard=0/hostbridge=0/pcibus=0/pcidev=13/pcifn=0
  group: pci                            version: 1   stability: Private/Private
    device-id         string    2829
    class-code        string    10601
    vendor-id         string    8086
    assigned-addresses uint32[]  [ 2164287504 0 53824 0 8 2164287508 0 53832 0 4 2164287512 0 53840 0 8 2164287516 0 53848 0 4 2164287520 0 53856 0 16 2181064740 0 4034945024 0 8192 ]
    vendor-name       string    Intel Corporation
    device-name       string    82801HM/HEM (ICH8M/ICH8M-E) SATA Controller [AH

Comment by Former user
Created at 2018-01-31T19:53:54.527Z

From CoaL running under Vmware Fusion 8.x

[root@headnode (coal-1) ~]# /usr/lib/fm/fmd/fmtopo -P pci "*pcifn*"
TIME                 UUID
Jan 31 19:52:38 1fbe4815-8271-cf7b-b8a1-b76b05d0090a

hc://:product-id=VMware-Virtual-Platform:server-id=headnode:chassis-id=VMware-56-4d-f4-36-63-f1-04-1b-5c-c4-26-f7-17-b7-d8-8b/motherboard=0/hostbridge=1/pcibus=2/pcidev=0/pcifn=0
  group: pci                            version: 1   stability: Private/Private
    device-id         string    100f
    class-code        string    20000
    vendor-id         string    8086
    assigned-addresses uint32[]  [ 2197946384 0 4250664960 0 131072 2197946392 0 4261347328 0 65536 2164391968 0 8192 0 64 ]
    vendor-name       string    Intel Corporation
    device-name       string    82545EM Gigabit Ethernet Controller (Copper)
    subsystem-name    string    PRO/1000 MT Single Port Adapter

hc://:product-id=VMware-Virtual-Platform:server-id=headnode:chassis-id=VMware-56-4d-f4-36-63-f1-04-1b-5c-c4-26-f7-17-b7-d8-8b/motherboard=0/hostbridge=1/pcibus=2/pcidev=1/pcifn=0
  group: pci                            version: 1   stability: Private/Private
    device-id         string    100f
    class-code        string    20000
    vendor-id         string    8086
    assigned-addresses uint32[]  [ 2197948432 0 4250533888 0 131072 2197948440 0 4261281792 0 65536 2164394016 0 8256 0 64 ]
    vendor-name       string    Intel Corporation
    device-name       string    82545EM Gigabit Ethernet Controller (Copper)
    subsystem-name    string    PRO/1000 MT Single Port Adapter

hc://:product-id=VMware-Virtual-Platform:server-id=headnode:chassis-id=VMware-56-4d-f4-36-63-f1-04-1b-5c-c4-26-f7-17-b7-d8-8b/motherboard=0/hostbridge=1/pcibus=2/pcidev=32/pcifn=0
  group: pci                            version: 1   stability: Private/Private
    device-id         string    790
    class-code        string    60401
    vendor-id         string    15ad
    vendor-name       string    VMware
    device-name       string    PCI bridge


Comment by Jira Bot
Created at 2018-02-02T03:52:32.142Z

illumos-joyent commit ffa9defc1d3296f24ed42b3d7f6c331d241aae4a (branch master, by Rob Johnston)

OS-6536 Expose vendor-name/device-name/subsystem-name as props on pciexfn topo nodes
Reviewed by: Robert Mustacchi <rm@joyent.com>
Approved by: Robert Mustacchi <rm@joyent.com>


Comment by Former user
Created at 2018-06-06T16:21:22.992Z

Upstreamed to illumos-gate via the following commit:

commit 66d053586622b793fb2252b5365f76dd38610b97
Author: Rob Johnston <rob.johnston@joyent.com>
Date: Wed Feb 14 16:51:19 2018 -0800

9113 Expose vendor-name/device-name/subsystem-name as props on pcifn/pciexfn topo nodes
Reviewed by: Toomas Soome <tsoome@me.com>
Reviewed by: Yuri Pankov <yuripv@yuripv.net>
Reviewed by: Ben Sims <ben.sims@tegile.com>
Approved by: Richard Lowe <richlowe@richlowe.net>