-
Notifications
You must be signed in to change notification settings - Fork 111
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 8/x] Add support for switchdev configuration to sriov pkg #642
[switchdev 8/x] Add support for switchdev configuration to sriov pkg #642
Conversation
Thanks for your PR,
To skip the vendors CIs use one of:
|
Pull Request Test Coverage Report for Build 8076878900Details
💛 - Coveralls |
4cbf027
to
5282b87
Compare
Thanks for your PR,
To skip the vendors CIs use one of:
|
5282b87
to
d2c215f
Compare
Thanks for your PR,
To skip the vendors CIs use one of:
|
d2c215f
to
6a8c00d
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
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 a few minor comments. Overall PR shape looks good to me.
This code is a "dead" code at the moment and will never run (except tests), because all switchdev devices are filtered by the upper layer.
what is the upper layer that filters the devices?
pkg/host/internal/sriov/sriov.go
Outdated
@@ -330,6 +342,45 @@ func (s *sriov) configSriovPFDevice(iface *sriovnetworkv1.Interface) error { | |||
return nil | |||
} | |||
|
|||
func (s *sriov) configureHWOptionsForPF(iface *sriovnetworkv1.Interface) 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.
nit: this function is all about settings for switchdev mode. right? if so, please rename to configureHWOptionsForSwitchdev
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.
done
pkg/host/internal/sriov/sriov.go
Outdated
devLink, err := s.netlinkLib.DevLinkGetDeviceByName("pci", pciAddress) | ||
if err != nil { | ||
if errors.Is(err, syscall.ENODEV) { | ||
// the device doesn't support devlink | ||
return "", nil | ||
log.Log.V(2).Info("GetNicSriovMode(): device doesn't support devlink, assume legacy mode", "device", pciAddress) |
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 can produce many log lines. We fixed it in:
I'd avoid logging here
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.
ok, I removed this line
Signed-off-by: Yury Kulazhenkov <ykulazhenkov@nvidia.com>
6a8c00d
to
84963fb
Compare
Thanks for your PR,
To skip the vendors CIs use one of:
|
84963fb
to
6d37264
Compare
Thanks for your PR,
To skip the vendors CIs use one of:
|
Signed-off-by: Yury Kulazhenkov <ykulazhenkov@nvidia.com>
6d37264
to
d324d46
Compare
Thanks for your PR,
To skip the vendors CIs use one of:
|
@zeeke thx for the review
I'm talking about skipVF logic in generic_plugin, which filters NICs with switchdev configurations In this PR, skipVF logic is still there this means that NICs with switchdev config will not be passed to ConfigSriovInterfaces function. |
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
@zeeke Could you take another look at this PR? thx |
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 support for switchdev configuration to sriov pkg
This PR introduce required logic to handle switchdev configuration by the sriov pkg.
This code is a "dead" code at the moment and will never run (except tests), because all switchdev devices are filtered by the upper layer.
Depends on #633 and #628.
Only two last commits are relevant to the PR.
cc @adrianchiris @SchSeba @zeeke