-
Notifications
You must be signed in to change notification settings - Fork 114
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
[switchdev 5/x] Add skipVFconfiguration option for generic_plugin #614
[switchdev 5/x] Add skipVFconfiguration option for generic_plugin #614
Conversation
Thanks for your PR,
To skip the vendors CIs use one of:
|
Pull Request Test Coverage Report for Build 7929101016Details
💛 - Coveralls |
e84e770
to
038c296
Compare
Thanks for your PR,
To skip the vendors CIs use one of:
|
038c296
to
bcb1885
Compare
Thanks for your PR,
To skip the vendors CIs use one of:
|
bcb1885
to
8af0d92
Compare
Thanks for your PR,
To skip the vendors CIs use one of:
|
8af0d92
to
d4aaea7
Compare
Thanks for your PR,
To skip the vendors CIs use one of:
|
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.
Left one minor comment. Overall PR LGTM
pkg/host/internal/sriov/sriov.go
Outdated
return nil | ||
} | ||
|
||
func (s *sriov) ConfigSriovDevice(iface *sriovnetworkv1.Interface, ifaceStatus *sriovnetworkv1.InterfaceExt, skipVFConfiguration bool) error { |
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.
can we make this function private and remove it from the interface?
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.
Sounds good. I made the function private.
Thanks for your PR,
To skip the vendors CIs use one of:
|
8f2a378
to
83208d8
Compare
Thanks for your PR,
To skip the vendors CIs use one of:
|
83208d8
to
cafbfef
Compare
Thanks for your PR,
To skip the vendors CIs use one of:
|
@zeeke thx for the review, I addressed your comment. |
pkg/host/internal/sriov/sriov.go
Outdated
return nil | ||
} | ||
|
||
func (s *sriov) configSriovDevice(iface *sriovnetworkv1.Interface, ifaceStatus *sriovnetworkv1.InterfaceExt, skipVFConfiguration bool) error { |
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.
still need to give this one a bit more thought ...
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.
We had an offline discussion about it. latest iteration is OK imo.
(had some concerns about how this plays out with Externally managed)
cafbfef
to
0668e47
Compare
Thanks for your PR,
To skip the vendors CIs use one of:
|
I updated PR to avoid usage of the information from the status field during the configuration. The status field may can contain outdated information because, for example, eswitch mode or VF count was changed by the previous step of the configuration. |
0668e47
to
96b29d7
Compare
Thanks for your PR,
To skip the vendors CIs use one of:
|
96b29d7
to
8035f32
Compare
Thanks for your PR,
To skip the vendors CIs use one of:
|
overall im LGTM. lets have a final pass after rebase. |
Signed-off-by: Yury Kulazhenkov <[email protected]>
Signed-off-by: Yury Kulazhenkov <[email protected]>
If skipVFConfiguration flag is set, the function will configure PF and create VFs on it, but will skip VFs configuration. This change is required to be able to use this function in the pre configuration phase in systemd mode. Signed-off-by: Yury Kulazhenkov <[email protected]>
Signed-off-by: Yury Kulazhenkov <[email protected]>
If WithSkipVFConfiguration() option is passed during the plugin initialization, then the plugin will configure PFs and create VFs, but will skip VF configuration phase. This is required to support pre configuration phase in systemd mode. Signed-off-by: Yury Kulazhenkov <[email protected]>
During the pre phase the plugin should be called with WithSkipVFConfiguration option to prevent VF configuration. In the post phase plugin should be executed as is. Signed-off-by: Yury Kulazhenkov <[email protected]>
8035f32
to
2fe88a3
Compare
Thanks for your PR,
To skip the vendors CIs use one of:
|
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.
LGTM
@@ -258,8 +258,8 @@ func (s *sriov) DiscoverSriovDevices(storeManager store.ManagerInterface) ([]sri | |||
iface.Name = name | |||
iface.Mac = s.networkHelper.GetNetDevMac(name) | |||
iface.LinkSpeed = s.networkHelper.GetNetDevLinkSpeed(name) | |||
iface.LinkType = s.GetLinkType(name) |
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.
we can get mtu, mac, link type from netlink Link obj and avoid a bunch of file operations.
not related to this PR. i will submit a small refactor to DiscoverSriovDevices.
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.
LGTM!
Add skipVFconfiguration option for generic_plugin
If
WithSkipVFConfiguration()
option is passed during the plugin initialization, then the plugin will configure PFs and create VFs, but will skip VF configuration phase.This option is used by the systemd service during the
pre
phase. At this point we only need to create VFs but not configure them(e.g. bind to driver, create VDPA device, etc)In the
post
phase the plugin will be called without this option and as a result will execute full plugin flow, meaning it will re-check that VFs are create and will continue configurations of VFs.cc @adrianchiris @zeeke @SchSeba