diff options
author | Ray Kinsella <mdr@ashroe.eu> | 2021-11-02 13:33:44 +0000 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2021-11-02 22:25:40 +0000 |
commit | 5714a49f14b93fc51185c6d37af101d24fc5dbd2 (patch) | |
tree | 705eb6dca55d31bb563e1a210544dbf7c82ac239 /src/vlib/pci/pci.h | |
parent | 6efe025ce58c092e513e1f7f10556a3fa394438d (diff) |
vlib: retrieve the root bus of a given pci device
Added a function to parse sysfs, determine the root bus & domain of a given pci
device.
Type: improvement
Signed-off-by: Ray Kinsella <mdr@ashroe.eu>
Change-Id: I36778116ecaa2d591617450fe5ae0bdb46b4424b
Diffstat (limited to 'src/vlib/pci/pci.h')
-rw-r--r-- | src/vlib/pci/pci.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/vlib/pci/pci.h b/src/vlib/pci/pci.h index 01f7d5b9669..1dc4ce6ea36 100644 --- a/src/vlib/pci/pci.h +++ b/src/vlib/pci/pci.h @@ -96,9 +96,11 @@ typedef struct vlib_pci_device_info typedef u32 vlib_pci_dev_handle_t; -vlib_pci_device_info_t *vlib_pci_get_device_info (vlib_main_t * vm, - vlib_pci_addr_t * addr, - clib_error_t ** error); +vlib_pci_device_info_t *vlib_pci_get_device_info (vlib_main_t *vm, + vlib_pci_addr_t *addr, + clib_error_t **error); +clib_error_t *vlib_pci_get_device_root_bus (vlib_pci_addr_t *addr, + vlib_pci_addr_t *root_bus); vlib_pci_addr_t *vlib_pci_get_all_dev_addrs (); vlib_pci_addr_t *vlib_pci_get_addr (vlib_main_t * vm, vlib_pci_dev_handle_t h); |