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
BUG 1854775: Improve the MTU set/reset logic #286
Conversation
pliurh
commented
Jul 8, 2020
- When reseting PF MTU, the daemon reset it to actual initial value.
- When setting MTU, the daemon always set the MTU of VF to the desired value.
- Set the VF MTU to PF's if MTU is not provided by users.
|
@pliurh: This pull request references Bugzilla bug 1854775, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker. 3 validation(s) were run on this bug
In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
pkg/utils/utils.go
Outdated
| } | ||
| } | ||
| for _, vf := range ifaceStatus.VFs { | ||
| if vf.Mtu != mtu && vf.Driver != "vfio-pci" { |
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.
Maybe use sriovnetworkv1.StringInArray(vf.Driver, DpdkDrivers) to check whether it's a dpdk driver?
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
| glog.V(0).Infof("Run(): start writer") | ||
| msg := Message{} | ||
| if runonce { | ||
| glog.V(0).Info("Run(): once") | ||
| if err := writer.pollNicStatus(); err != nil { | ||
| glog.Errorf("Run(): first poll failed: %v", err) | ||
| } | ||
| writer.setNodeStateStatus(msg) | ||
| ns, _ := writer.setNodeStateStatus(msg) | ||
| writer.writeCheckpointFile(ns, destDir) |
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.
Should we consider removing this file when daemon exits?
This might not be useful when config daemon exits for normal rebooting, but it cleans up the file when operator is undeployed.
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 am not sure whether we should do it. Imaging the upgrade scenario, some PFs have modified. The old pod is terminated then the new pod will be spawned. If we remove the file when the old pod is terminated, the new pod cannot get the correct initial state of those PFs.
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 PF is modified after SR-IOV Operator is deployed, should we restore the modified PF value or the original initial value?
1. When reseting PF MTU, the daemon reset it to actual initial value. 2. When setting MTU, the daemon always set the MTU of VF to the desired value. 3. Set the VF MTU to PF's if MTU is not provided by users.
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: pliurh, zshi-redhat The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
1 similar comment
|
/retest Please review the full test history for this PR and help us cut down flakes. |
|
@pliurh: All pull requests linked via external trackers have merged: openshift/sriov-network-operator#286. Bugzilla bug 1854775 has been moved to the MODIFIED state. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
/cherry-pick release-4.5 |
|
@pliurh: #286 failed to apply on top of branch "release-4.5": In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |