1
0
Fork 0
mirror of https://github.com/kubernetes-sigs/node-feature-discovery.git synced 2024-12-14 11:57:51 +00:00

source/pci: detect intel-iommu/version

Discover "iommu/intel-iommu/version" sysfs attribute for pci devices.
This information is available for custom label rules.

An example custom rule:

  - name: "iommu version rule"
    labels:
      iommu.version_1: "true"
    matchFeatures:
      - feature: pci.device
        matchExpressions:
          "iommu/intel-iommu/version": {op: In, value: ["1:0"]}
This commit is contained in:
Markus Lehtonen 2022-01-11 12:32:45 +02:00
parent f6d4804152
commit 64b3838579
2 changed files with 2 additions and 2 deletions

View file

@ -516,7 +516,7 @@ The following features are available for matching:
| | | **`name`** | string | Name of the network interface
| | | **`<sysfs-attribute>`** | string | Sysfs network interface attribute, available attributes: `operstate`, `speed`, `sriov_numvfs`, `sriov_totalvfs`
| **`pci.device`** | instance | | | PCI devices present in the system
| | | **`<sysfs-attribute>`** | string | Value of the sysfs device attribute, available attributes: `class`, `vendor`, `device`, `subsystem_vendor`, `subsystem_device`, `sriov_totalvfs`, `iommu_group/type`
| | | **`<sysfs-attribute>`** | string | Value of the sysfs device attribute, available attributes: `class`, `vendor`, `device`, `subsystem_vendor`, `subsystem_device`, `sriov_totalvfs`, `iommu_group/type`, `iommu/intel-iommu/version`
| **`storage.device`** | instance | | | Block storage devices present in the system
| | | **`name`** | string | Name of the block device
| | | **`<sysfs-attribute>`** | string | Sysfs network interface attribute, available attributes: `dax`, `rotational`, `nr_zones`, `zoned`

View file

@ -29,7 +29,7 @@ import (
)
var mandatoryDevAttrs = []string{"class", "vendor", "device", "subsystem_vendor", "subsystem_device"}
var optionalDevAttrs = []string{"sriov_totalvfs", "iommu_group/type"}
var optionalDevAttrs = []string{"sriov_totalvfs", "iommu_group/type", "iommu/intel-iommu/version"}
// Read a single PCI device attribute
// A PCI attribute in this context, maps to the corresponding sysfs file