-
Notifications
You must be signed in to change notification settings - Fork 44
PoC code for SWIFT v2 addition to Kata #424
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
base: msft-main
Are you sure you want to change the base?
Conversation
b325f56 to
640e3bf
Compare
| } | ||
|
|
||
| if isPhysical { | ||
| if s.config.HypervisorConfig.ColdPlugVFIO == config.NoPort { |
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.
Shouldn't that still be 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.
It is still needed, but this check was moved into "createPhysicalEndpoint" because the VFIO Disabled config flag only applies to VFIO interfaces, and we can't check the VFIO Disabled config flag before we know the interface is an actual VFIO interface. In the previous code, the flow assumed that "isPhysical" automatically means "is VFIO", which is what I changed here, so this check cannot be done as early in the code anymore.
| } else { | ||
| // The network namespace would have been deleted at this point | ||
| // if it has not been created by virtcontainers. | ||
| if !netNsCreated { |
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 add some 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.
I am on the fence for this one. I took the same approach as the existing veth code:
| if !netNsCreated { |
Adding logging here can significantly increase the number of log lines but the usefulness of the log line may be arguable (the netNsCreated flag is an internal flag to prevent detaching a network interface multiple times, as "Detach" can be called multiple times, so, if we add a log line here, we will see a call with "netNsCreated" for both the successful deletion, and the harmless subsequent calls to Detach. This may make the logs confusing).
640e3bf to
a406af4
Compare
Merge Checklist
Summary
This PR captures the PoC code for SWIFT v2 support in Kata. The code does two things:
The code mostly modifies the physical network path to provide the above support. It also uses the same approach as VETH for all the non-VF / non SR-IOV network adapters that are being added to a Kata UVM.
Associated issues
Links to CVEs
Test Methodology
Manual validation of the PoC. No regression testing (this is pure PoC code)