-
Notifications
You must be signed in to change notification settings - Fork 788
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
Support DeviceID on Auxiliary Bus #1003
Conversation
@@ -53,6 +56,9 @@ type NetConf struct { | |||
RuntimeConfig struct { | |||
DeviceID string `json:"deviceID,omitempty"` | |||
} `json:"runtimeConfig,omitempty"` | |||
|
|||
// for internal use | |||
AuxDevice string `json:"-"` // Auxiliary device name as appears on Auxiliary bus (/sys/bus/auxiliary) |
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.
If this is internal, it the first word should be lower-cased. Yay golang.
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.
sure, will align.
noticed that NetConf.DPDKMode
may also need to be internal as its inferred from the system[1].
but anyhow, not related to this PR.
[1]
n.DPDKMode, err = hasDpdkDriver(n.PCIAddr) |
ecf00fc
to
5531eac
Compare
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.
Looks good to me, thanks @adrianchiris !
@squeed PTAL again? |
@adrianchiris hi, CI (Lint) has some error. Could you please take a look into it? |
@s1061123 we should merge : #1009 then ill rebase this one and we should be good. the lint issues not related to this PR but rather because linter version bumped in CI. |
Device plugins may allocate network device on a bus different than PCI. sriov-network-device-plugin supports the allocation of network devices over Auxiliary bus[1][2][3]. extend host-device CNI to support such devices if provided through runtime config. - Check if device provided by DeviceID runtime config is present on either PCI bus or Auxiliary bus - extend getLink method to support getting netdev link obj from auxiliary bus - add unit-test to cover the new flow [1] https://github.com/k8snetworkplumbingwg/sriov-network-device-plugin/tree/master?tab=readme-ov-file#auxiliary-network-devices-selectors [2] https://github.com/k8snetworkplumbingwg/sriov-network-device-plugin/tree/master/docs/subfunctions [3] https://docs.kernel.org/networking/devlink/devlink-port.html Signed-off-by: adrianc <adrianc@nvidia.com>
5531eac
to
d34720b
Compare
Device plugins may allocate network device on a bus different than PCI.
sriov-network-device-plugin supports the allocation of network devices over Auxiliary bus[1][2][3].
extend host-device CNI to support such devices if provided through runtime config.
[1] https://github.com/k8snetworkplumbingwg/sriov-network-device-plugin/tree/master?tab=readme-ov-file#auxiliary-network-devices-selectors
[2] https://github.com/k8snetworkplumbingwg/sriov-network-device-plugin/tree/master/docs/subfunctions
[3] https://docs.kernel.org/networking/devlink/devlink-port.html