This repository was archived by the owner on Dec 9, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 22
feat: Use PCI devices as the base for discovery #194
Merged
gauravkghildiyal
merged 13 commits into
google:main
from
gauravkghildiyal:discover-from-all-ns
Aug 27, 2025
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
182761c
feat: Use PCI devices as the base for discovery
gauravkghildiyal 651afcc
fix: Add a check to the CEL expression in default filter
gauravkghildiyal d441585
refactor: Introduce constants for device attributes
gauravkghildiyal f1ba313
fix: Add OriginalInterfaceName to PodCfg to allow restoration of the …
gauravkghildiyal bacf7cf
chore: Address review comments from michaelasp
gauravkghildiyal 0b6e7c9
fix: Do not publish network interface which has unknown PCI device
gauravkghildiyal c5c6550
docs: Add comment about usage of dra.net as the domain
gauravkghildiyal 4793314
feat: Extract embedded PCI DB file when needed
gauravkghildiyal 70cf828
refactor: Rename PodConfig subfields to have NetworkInterfaceConfigIn…
gauravkghildiyal 0be7289
fix: Don't aggregate new errors if we failed to get network interface…
gauravkghildiyal fba218f
fix: Check for existence of interface attributes before referring to …
gauravkghildiyal 202abcf
chore: Address review comments from BenTheElder
gauravkghildiyal cceb50a
build: Bump dep github.com/jaypipes/ghw to v0.19.0 to minimize other …
gauravkghildiyal File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| /* | ||
| Copyright 2025 Google LLC | ||
|
|
||
| Licensed under the Apache License, Version 2.0 (the "License"); | ||
| you may not use this file except in compliance with the License. | ||
| You may obtain a copy of the License at | ||
|
|
||
| https://www.apache.org/licenses/LICENSE-2.0 | ||
|
|
||
| Unless required by applicable law or agreed to in writing, software | ||
| distributed under the License is distributed on an "AS IS" BASIS, | ||
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| See the License for the specific language governing permissions and | ||
| limitations under the License. | ||
| */ | ||
|
|
||
| package apis | ||
|
|
||
| const ( | ||
| // TODO: Reconsider the domain being used when project becomes owned by some | ||
| // SIG. The issue with "dra.net" is that http://dra.net is an actual | ||
| // domain that is totally unrelated to this project and it can be a source | ||
| // of confusion and problems. | ||
| AttrPrefix = "dra.net" | ||
BenTheElder marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| // TODO: Document meaning of these attributes and re-evaluate if all are needed. | ||
| AttrInterfaceName = AttrPrefix + "/" + "ifName" | ||
| AttrPCIAddress = AttrPrefix + "/" + "pciAddress" | ||
| AttrMac = AttrPrefix + "/" + "mac" | ||
| AttrPCIVendor = AttrPrefix + "/" + "pciVendor" | ||
| AttrPCIDevice = AttrPrefix + "/" + "pciDevice" | ||
| AttrPCISubsystem = AttrPrefix + "/" + "pciSubsystem" | ||
| AttrNUMANode = AttrPrefix + "/" + "numaNode" | ||
| AttrMTU = AttrPrefix + "/" + "mtu" | ||
| AttrEncapsulation = AttrPrefix + "/" + "encapsulation" | ||
| AttrAlias = AttrPrefix + "/" + "alias" | ||
| AttrState = AttrPrefix + "/" + "state" | ||
| AttrType = AttrPrefix + "/" + "type" | ||
| AttrIPv4 = AttrPrefix + "/" + "ipv4" | ||
| AttrIPv6 = AttrPrefix + "/" + "ipv6" | ||
| AttrTCFilterNames = AttrPrefix + "/" + "tcFilterNames" | ||
| AttrTCXProgramNames = AttrPrefix + "/" + "tcxProgramNames" | ||
| AttrEBPF = AttrPrefix + "/" + "ebpf" | ||
| AttrSRIOV = AttrPrefix + "/" + "sriov" | ||
| AttrSRIOVVfs = AttrPrefix + "/" + "sriovVfs" | ||
| AttrVirtual = AttrPrefix + "/" + "virtual" | ||
| AttrRDMA = AttrPrefix + "/" + "rdma" | ||
| ) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.