mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-07-03 02:26:37 +00:00
virtcontainers: hypervisor: Add capability regarding multiqueue support
Each hypervisor is different and supports different options regarding the network interface it creates. In particular, the multiqueue option is not supported by Firecracker and should not be assumed by default. Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
parent
0bcd221fad
commit
a227ab852a
@ -8,6 +8,7 @@ package virtcontainers
|
||||
const (
|
||||
blockDeviceSupport = 1 << iota
|
||||
blockDeviceHotplugSupport
|
||||
multiQueueSupport
|
||||
)
|
||||
|
||||
type capabilities struct {
|
||||
@ -35,3 +36,14 @@ func (caps *capabilities) isBlockDeviceHotplugSupported() bool {
|
||||
func (caps *capabilities) setBlockDeviceHotplugSupport() {
|
||||
caps.flags |= blockDeviceHotplugSupport
|
||||
}
|
||||
|
||||
func (caps *capabilities) isMultiQueueSupported() bool {
|
||||
if caps.flags&multiQueueSupport != 0 {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (caps *capabilities) setMultiQueueSupport() {
|
||||
caps.flags |= multiQueueSupport
|
||||
}
|
||||
|
@ -108,6 +108,8 @@ func (q *qemuAmd64) capabilities() capabilities {
|
||||
caps.setBlockDeviceHotplugSupport()
|
||||
}
|
||||
|
||||
caps.setMultiQueueSupport()
|
||||
|
||||
return caps
|
||||
}
|
||||
|
||||
|
@ -237,6 +237,7 @@ func (q *qemuArchBase) kernelParameters(debug bool) []Param {
|
||||
func (q *qemuArchBase) capabilities() capabilities {
|
||||
var caps capabilities
|
||||
caps.setBlockDeviceHotplugSupport()
|
||||
caps.setMultiQueueSupport()
|
||||
return caps
|
||||
}
|
||||
|
||||
|
@ -94,6 +94,8 @@ func (q *qemuPPC64le) capabilities() capabilities {
|
||||
caps.setBlockDeviceHotplugSupport()
|
||||
}
|
||||
|
||||
caps.setMultiQueueSupport()
|
||||
|
||||
return caps
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user