-
Notifications
You must be signed in to change notification settings - Fork 42
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
feat: Add supports for vDPA interface #98
Conversation
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.
Thank you for your contribution. Please also doc this new feature in this file
pkg/apis/virt/v1alpha1/types.go
Outdated
@@ -115,6 +116,11 @@ type InterfaceMasquerade struct { | |||
type InterfaceSRIOV struct { | |||
} | |||
|
|||
type InterfaceVDPA struct { | |||
NumQueues int `json:"numQueues,omitempty"` | |||
Iommu bool `json:"iommu,omitempty"` |
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.
Better name it IOMMU to keep it in Golang style
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.
The VdpaConfig struct and other structs in pkg/cloudhypervisor/client.go used Iommu too.
type VdpaConfig struct {
Id string `json:"id,omitempty"`
Iommu bool `json:"iommu,omitempty"`
NumQueues int `json:"num_queues"`
Path string `json:"path"`
PciSegment int16 `json:"pci_segment,omitempty"`
}
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.
Yes, that's generated. For non-generated code, better keep them in style
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.
@fengye87 I updated the doc and IOMMU.
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #98 +/- ##
==========================================
- Coverage 34.11% 34.08% -0.04%
==========================================
Files 6 6
Lines 1952 1957 +5
==========================================
+ Hits 666 667 +1
- Misses 1182 1185 +3
- Partials 104 105 +1 ☔ View full report in Codecov by Sentry. |
Signed-off-by: Ziteng Liu <[email protected]>
Tested with SR-IOV Network Device Plugin and modified kube-ovn(ovs-dpdk offload to our DPU).
Live migration previously tested in Kubevirt(with qemu).
VM spec
SR-IOV device plugin config
NetworkAttachmentDefinition Spec
Pod network status
VM after dhclient