Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

expose SRIOV information as PCI devices #315

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Commits on Jul 21, 2023

  1. pci: align to the left the loop

    simplify the code without change in behaviour, using
    a flow without `else` to reduce the blocks.
    
    Signed-off-by: Francesco Romani <fromani@redhat.com>
    ffromani committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    193a1aa View commit details
    Browse the repository at this point in the history
  2. sriov: add support as special PCI devices

    Add support to report SRIOV devices.
    Differently from GPU devices, we model SRIOV devices as special
    PCI devices, extending the `pci` package instead of introducing
    a new top-level package.
    This design emerged during the review of a previous proposal:
    jaypipes@9058f61#r755312597
    
    SRIOV devices are either Physical Functions or Virtual functions.
    The preferred representation for ghw is Physical Functions, whose
    dependent devices will be Virtual Functions; however, for the sake of
    practicality, the API also exposes soft references to Virtual Functions,
    so consumers of the API can access them directly and not navigating
    the parent devices.
    
    This patch also adds support in `ghwc`, to report the sriov information,
    and in the `snapshot` package, to make sure to capture all the files
    in sysfs that ghw cares about.
    
    Last but not least, lacking access to suitable non-linux systems,
    support is provided only on linux OS, even though the API tries hard
    not to be linux-specific.
    
    Resolves: jaypipes#92
    Signed-off-by: Francesco Romani <fromani@redhat.com>
    ffromani committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    318b6b3 View commit details
    Browse the repository at this point in the history