-
Notifications
You must be signed in to change notification settings - Fork 24
[OBSOLETE - TO_BE_DELETED] TODO: Use PCI Device as the immutable device and add network interface data as its (mutable) attributes #183
Conversation
…e data as it's attributes
|
So effectively the idea is here to use PCI addresses as the real device and update them depending on what we discover on the pci bus. This is far less likely to change but wondering if it's not ideal that we are adding a full dependence on it being a PCI device. Are there cases where a network device wouldn't be on a PCI lane? E.g dummy devices but that's not a convincing argument imo. |
|
You are correct and I personally am also a bit on the fence. It certainly isn't ideal. But I also think that there's lot of unknowns about how network interfaces relate to other hardware on machines and maybe we should start with building the most common use cases involving HPC/GPU/TPU machines and later on extend this as more cases come to light. I expect PCI devices should also play out well with how we extend this to SR-IOV #179. (I still want to test and research a bit more before I fully commit |
|
Working on an alternate approach. Please do not review this. Keeping it open for the sake of comparison for now. |
|
Going from a PCI Device to it's associated network device felt like lot's of unknowns right now. Trying to model this in the reverse manner of only picking network interfaces that have some "stable" identifier. Continuing in #194 |
|
I think that we do not need to overcomplicate this:
We want physical devices to be stable and do not disappear from the resourceslice, so we need to discover them from the pcibus, a gemini query tells me we can use the class for that, I double checked and indeed 0x02 is for network controllers https://sigops.acm.illinois.edu/old/roll_your_own/7.c.1.html In my example it works, it finds the 3 network devices, despite one of them is already in a namespace |
| } | ||
|
|
||
| devices := []resourceapi.Device{} | ||
| ifaces, err := nlHandle.LinkList() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this logic remains
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or we just use sys/class/net but we keep the existing behavior working, just we have two source of truth now, the sys/devices and (sys/class/net or netlink)
The e2e tests will fail and need changes, but I want to discuss the direction first before diving in too deep to modify the tests