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
source/pci: add iommu_group/type attribute #705
source/pci: add iommu_group/type attribute #705
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: marquiz The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Depends on #677 |
/assign zvonkok |
I have a VM without an IOMMU and it gives
does it mean there's also Might be useful to have more capabilities supported too, e.g., amd vs intel IOMMU and IOMMU version |
Hmm, interesting 🧐 Want to take a closer look at that, what is the value of the type then?
Yup, those will have the same property.
We could add e.g. |
Maybe it the instructions to see if iommu is enabled should then be
|
3260d62
to
3547670
Compare
Rebased. Changed the instructions in the first commit message |
/unhold |
/test all |
tested with go test ./cmd/... ./pkg/... ./source/...
? sigs.k8s.io/node-feature-discovery/cmd/nfd-master [no test files]
ok sigs.k8s.io/node-feature-discovery/cmd/nfd-topology-updater 0.010s
ok sigs.k8s.io/node-feature-discovery/cmd/nfd-worker 0.009s
? sigs.k8s.io/node-feature-discovery/pkg/api/feature [no test files]
? sigs.k8s.io/node-feature-discovery/pkg/apihelper [no test files]
ok sigs.k8s.io/node-feature-discovery/pkg/apis/nfd/v1alpha1 0.009s
? sigs.k8s.io/node-feature-discovery/pkg/cpuid [no test files]
? sigs.k8s.io/node-feature-discovery/pkg/generated/clientset/versioned [no test files]
? sigs.k8s.io/node-feature-discovery/pkg/generated/clientset/versioned/fake [no test files]
? sigs.k8s.io/node-feature-discovery/pkg/generated/clientset/versioned/scheme [no test files]
? sigs.k8s.io/node-feature-discovery/pkg/generated/clientset/versioned/typed/nfd/v1alpha1 [no test files]
? sigs.k8s.io/node-feature-discovery/pkg/generated/clientset/versioned/typed/nfd/v1alpha1/fake [no test files]
? sigs.k8s.io/node-feature-discovery/pkg/generated/informers/externalversions [no test files]
? sigs.k8s.io/node-feature-discovery/pkg/generated/informers/externalversions/internalinterfaces [no test files]
? sigs.k8s.io/node-feature-discovery/pkg/generated/informers/externalversions/nfd [no test files]
? sigs.k8s.io/node-feature-discovery/pkg/generated/informers/externalversions/nfd/v1alpha1 [no test files]
? sigs.k8s.io/node-feature-discovery/pkg/generated/listers/nfd/v1alpha1 [no test files]
ok sigs.k8s.io/node-feature-discovery/pkg/kubeconf 0.015s
? sigs.k8s.io/node-feature-discovery/pkg/labeler [no test files]
? sigs.k8s.io/node-feature-discovery/pkg/nfd-client [no test files]
ok sigs.k8s.io/node-feature-discovery/pkg/nfd-client/topology-updater 0.020s
ok sigs.k8s.io/node-feature-discovery/pkg/nfd-client/worker 3.105s
ok sigs.k8s.io/node-feature-discovery/pkg/nfd-master 0.021s
? sigs.k8s.io/node-feature-discovery/pkg/podres [no test files]
ok sigs.k8s.io/node-feature-discovery/pkg/resourcemonitor 0.027s
? sigs.k8s.io/node-feature-discovery/pkg/topologypolicy [no test files]
? sigs.k8s.io/node-feature-discovery/pkg/topologyupdater [no test files]
ok sigs.k8s.io/node-feature-discovery/pkg/utils 0.022s
? sigs.k8s.io/node-feature-discovery/pkg/version [no test files]
ok sigs.k8s.io/node-feature-discovery/source 0.017s
ok sigs.k8s.io/node-feature-discovery/source/cpu 0.009s
? sigs.k8s.io/node-feature-discovery/source/custom [no test files]
? sigs.k8s.io/node-feature-discovery/source/custom/rules [no test files]
? sigs.k8s.io/node-feature-discovery/source/fake [no test files]
? sigs.k8s.io/node-feature-discovery/source/iommu [no test files]
ok sigs.k8s.io/node-feature-discovery/source/kernel 0.005s
ok sigs.k8s.io/node-feature-discovery/source/local 0.011s
ok sigs.k8s.io/node-feature-discovery/source/memory 0.024s
ok sigs.k8s.io/node-feature-discovery/source/network 0.045s
ok sigs.k8s.io/node-feature-discovery/source/pci 0.020s
ok sigs.k8s.io/node-feature-discovery/source/storage 0.020s
ok sigs.k8s.io/node-feature-discovery/source/system 0.006s
ok sigs.k8s.io/node-feature-discovery/source/usb 0.012s -/- Ran 3 of 230 Specs in 26.624 seconds
SUCCESS! -- 3 Passed | 0 Failed | 0 Pending | 227 Skipped
--- PASS: TestE2E (26.64s)
PASS
ok sigs.k8s.io/node-feature-discovery/test/e2e 26.677s |
Add "iommu_group/type" to the list of PCI device attributes that are discovered. The value is the raw value from sysfs (i.e DMA, DMA-FQ or identity). No built-in (automatic) labels are generated based on this, but, the attribute is available for custom label rules to use. Examples of custom rules: - name: "iommu enabled rule" labels: iommu.enabled: "true" matchFeatures: - feature: pci.device matchExpressions: "iommu_group/type": {op: NotIn, value: ["unknown"]} - name: "iommu passthrough rule" labels: iommu.passthrough: "true" matchFeatures: - feature: pci.device matchExpressions: "iommu_group/type": {op: In, value: ["identity"]}
3547670
to
865bc43
Compare
Rebased, updated docs |
|
This is a fair question to which I don't have an answer 🧐 I guess why I added this to network, too, was just following sr-iov. The sriov attributes are available for both pci and network devices. |
865bc43
to
152f353
Compare
Dropped the patch for source/network. Now only concerns source/pci. /retitle source/pci: add iommu_group/type attribute |
Network part now submitted separately in #717 |
/lgtm thanks! |
@mythi: changing LGTM is restricted to collaborators In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/lgtm |
Add
iommu_group/type
to the list of PCI device attributes that arediscovered. The value is the raw value from sysfs (i.e DMA, DMA-FQ or
identity).
No built-in (automatic) labels are generated based on this, but, the
attribute is available for custom label rules to use. Examples of custom
rules: