-
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
Add support for BF2 in connectX mode #353
Add support for BF2 in connectX mode #353
Conversation
Thanks for your PR,
To skip the vendors CIs use one of:
|
/cc @adrianchiris @e0ne @zshi-redhat @bn222 @zshi-redhat @zeeke please have a look |
84aa891
to
1c010a2
Compare
Thanks for your PR,
To skip the vendors CIs use one of:
|
1c010a2
to
c12eef3
Compare
Thanks for your PR,
To skip the vendors CIs use one of:
|
Pull Request Test Coverage Report for Build 3097548519
💛 - Coveralls |
// Create a map with all the PFs we will need to configure | ||
// we need to create it here before we access the host file system using the chroot function | ||
// because the SkipConfigVf needs the mstconfig package that exist only inside the sriov-config-daemon file system | ||
vfsToConfig := map[string]bool{} |
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.
please, rename this variable (and parameter) to vfsToSkip
or something like that, as its entries seem to be true when the Virtual Functions must not be configured.
Another solution may be to make utils.SyncNodeState(...)
receive ifSpecs []sriovnetworkv1.Interface, ifStatuses []sriovnetworkv1.InterfaceExt
and filter out the to-skip interfcaes before calling it.
pkg/utils/utils_mlx.go
Outdated
return bluefield2Conntexd, nil | ||
} | ||
|
||
return -1, fmt.Errorf("MellanoxBlueFieldMode(): unknow card status for %s", 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.
SP: unknown
return 0, fmt.Errorf("failed to find %s in the mstconfig output command", internalCPUOffloadEngine) | ||
} | ||
|
||
// check for DPU |
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.
Just a comment: These registers aren't available with some versions of mstflint.
INTERNAL_CPU_MODEL should also be 1 as well. This is true for both DPU mode and NIC mode. Maybe we should add a check here just to be safe.
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.
@wizhaoredhat if for both it will be 1 why do we need to check it?
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.
It is possible that the NIC was incorrectly set to Separated Host Mode which will have a value of zero.
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 done
c12eef3
to
9a35de5
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.
I still need to test this PR. With this change we introduce more platform-specific and NIC-specific code which is used across the operator instead of in s specific plugins
pkg/utils/utils.go
Outdated
return false, nil | ||
} | ||
|
||
glog.V(2).Infof("SkipConfigVf(): skip config VF for BF2 device on DPU mode") |
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.
Neet to confirm that such use-case is not needed
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.
what is the use case you refer ?
// Create a map with all the PFs we will need to configure | ||
// we need to create it here before we access the host file system using the chroot function | ||
// because the SkipConfigVf needs the mstconfig package that exist only inside the sriov-config-daemon file system | ||
vfsToSkip := map[string]bool{} |
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: it would be good to move this code into the separate 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.
done
9a35de5
to
9b5717d
Compare
Thanks for your PR,
To skip the vendors CIs use one of:
|
I agree but I was not able to find a different solution, but I am optimistic that the rework I am doing will make stuff simpler |
glog.V(2).Infof("MellanoxBlueFieldMode():card %s in ConnectX mode", PciAddress) | ||
return bluefield2Conntexd, nil | ||
} | ||
|
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.
Just a suggestion. I believe it would help with debugging if who have some logs here (in the case of failure) what the actual mstconfig is.
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
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 deeper look.
one thing in mind is creating an interface to provide NIC information (e,g if its DPU or non DPU)
then keeping the vendor specific logic in plugin.
pkg/utils/utils.go
Outdated
return false, nil | ||
} | ||
|
||
glog.V(2).Infof("SkipConfigVf(): skip config VF for BF2 device on DPU mode") |
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.
what is the use case you refer ?
@adrianchiris about your comment
what do you mean? |
9b5717d
to
29997e3
Compare
@bn222 done |
Thanks for your PR,
To skip the vendors CIs use one of:
|
29997e3
to
374d929
Compare
Thanks for your PR,
To skip the vendors CIs use one of:
|
/test-all |
374d929
to
e3492d1
Compare
Thanks for your PR,
To skip the vendors CIs use one of:
|
/test-all |
Signed-off-by: Sebastian Sch <[email protected]>
…riov-network-operator/pull/240/files#r808624002 Allow to use BF in connectX mode also for OCP platform. This is needed until we support the systemd configuration Signed-off-by: Sebastian Sch [email protected]
e3492d1
to
42eb7e9
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.
Verified with vanilla k8s 1.25
lgtm |
Thanks for the review folks I am going to merge this PR |
Fix the issue introduced in https://github.com/k8snetworkplumbingwg/sriov-network-operator/pull/240/files#r808624002
Allow to use BF in connectX mode also for OCP platform.
This is needed until we support the systemd configuration
Signed-off-by: Sebastian Sch [email protected]