-
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 design doc for switchdev mode refactoring #559
add design doc for switchdev mode refactoring #559
Conversation
Thanks for your PR,
To skip the vendors CIs use one of:
|
@adrianchiris @SchSeba @e0ne please, take a look |
Pull Request Test Coverage Report for Build 7475965250
💛 - Coveralls |
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.
looking good @ykulazhenkov, added a few comments/questions.
1a27f69
to
0c6163a
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! great wok @ykulazhenkov
Just dropping an idea that could simplify here: At the moment, the field We can make the pod apply the configuration despite the field value, which only enables the systemd service. The service does the same logic as the pod, but it does that early in the boot process. This could remove some if/then/else statements and simplify some workflows. It can be addressed and discussed in a different PR/design_doc if deemed out of scope. |
I like the idea. This means that This refactoring can be easily implemented on top of the changes that are proposed in this PR, but I prefer to discuss them separately to reduce the scope a bit. |
I like this idea. We can add some note in this design doc as a further improvement action item but this is out of scope of propesed idea |
+1 on having systemd service "assisting" config daemon, in case systemd failed we shoud take care to report that (e.g via event on srionetworknodestate) and allow config daemon to align configuration. that said, i do not think this is related to switchdev refactoring directly and can be added on top. |
Thanks for the quick feedback. I'll take care of starting a discussion on this |
@ykulazhenkov, I'm not familiar with the switchdev related code but I've seen that the k8s plugin has some config for that. This plugin is not mentioned in the proposal. Will this be affected? What's the impact? |
@mlguerrero12 |
cool, thanks for the clarification |
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 like the idea!
but one think we need to cover is when we apply a policy and we are in systemd mode we must reboot the host because the user may need to vfs on boot .
also with your solution it me be a bit slower as we will apply the config (create the vfs with the daemon) then reboot the node systemd will configure it again and then daemon will just pass because everything is in place
Both services run bash scripts. The script from the first service is responsible for VFs creation and for | ||
switching a NIC to the switchdev eSwitch mode. The script from the second service binds VFs to the required drivers. | ||
|
||
If a NIC has _**switchdev**_ configuration, then `configurationMode` of the operator does not affect 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.
Hi think that is because the switchdev was only to support HWoffload right? we didn't had any other support in the operator because we don't have any CNI for 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.
Right. But now we want to propose support for additional use cases for NICs in switchdev mode(with separate discussion and design docs). That is why we want to align switched configs with configurationMode
and systemd
.
The operator should behave for these configurations the same way as it does now. | ||
|
||
Users using NICs with _**switchdev**_ configurations will need to explicitly set operator's | ||
`configurationMode` to `systemd` if they expect the configuration of the NIC to happen |
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 add a comment here "to continue and support the hwoffload use-case"
because after we implement this design we should be able and configure switchdev even in daemon 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.
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.
@SchSeba can you elaborate what is hwoffload use-case ?
as i see it, for now its switching nic to switchdev and configuring sriov which after this enhancement can be done in either daemon or systemd mode,
for Openshift current use-case the latter will satisfy he requirement doesnt 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.
discussed in community meeting. my question is answered.
hwoffload == setting up systemd service to enable hw-offload config in ovs.
Change in the operator's behavior: `configurationMode` option now have effect | ||
on NICs with _**switchdev**_ configurations. | ||
|
||
### Implementation Details/Notes/Constraints |
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 also consider to have a special controller to handle the case of HWoffload?
meaning switch the daemon to systemd 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.
can we also consider to have a special controller to handle the case of HWoffload? meaning switch the daemon to systemd mode?
Sorry, I didn't get the point. If you want to configure NIC to switchdev
on boot, you should simply configure the sriov operator to systemd
mode(by changing the OperatorConfig CR, the same way as it works now). The generic plugin will be extended to do the required actions for HW offload (tc offload enabling, vdpa device creation, etc)
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.
as discussed in community meeting: its best to reduce complexity and have users explicitly setting the daemon to systemd.
users that use hwoffload (we dont know if/how-many there are) can:
- scale down controller
- update operator config to move to systemd mode
- upgrade operator
- scaleup opeator deployment
0c6163a
to
0d22d52
Compare
Thanks for your PR,
To skip the vendors CIs use one of:
|
Signed-off-by: Yury Kulazhenkov <ykulazhenkov@nvidia.com>
0d22d52
to
6508c69
Compare
Thanks for your PR,
To skip the vendors CIs use one of:
|
while I was coding POC I discovered that we will need a minor change in the API - add vdpaType field to the interface status. I updated the design doc to reflect that this change is needed. @e0ne @adrianchiris please, re-review the PR |
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.
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.
LGTM
We need to refactor the implementation used for NICs in switchdev mode and align its behavior with the systemd
mode of the operator. The refactoring is required to simplify the development of the new switchdev-related
features for the sriov-network-operator.