mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-10-25 06:05:36 +00:00
vhost-user: add blk device support
Introduce basic vhost-user-blk-pci support. In adding this, cleaned up the QemuParams function to use a more appropriate switch statement. Similarly, cleanup up the Valid() logic. We still need to look into parameterization of the block parameter fields as well as introducing multiqueue support for the vhost-user devices. Signed-off-by: Eric Ernst <eric.ernst@intel.com>
This commit is contained in:
@@ -267,8 +267,19 @@ func TestAppendDeviceBlock(t *testing.T) {
|
||||
|
||||
var deviceVhostUserNetString = "-chardev socket,id=char1,path=/tmp/nonexistentsocket.socket -netdev type=vhost-user,id=net1,chardev=char1,vhostforce -device virtio-net-pci,netdev=net1,mac=00:11:22:33:44:55"
|
||||
var deviceVhostUserSCSIString = "-chardev socket,id=char1,path=/tmp/nonexistentsocket.socket -device vhost-user-scsi-pci,id=scsi1,chardev=char1"
|
||||
var deviceVhostUserBlkString = "-chardev socket,id=char2,path=/tmp/nonexistentsocket.socket -device vhost-user-blk-pci,logical_block_size=4096,size=512M,chardev=char2"
|
||||
|
||||
func TestAppendDeviceVhostUser(t *testing.T) {
|
||||
|
||||
vhostuserBlkDevice := VhostUserDevice{
|
||||
SocketPath: "/tmp/nonexistentsocket.socket",
|
||||
CharDevID: "char2",
|
||||
TypeDevID: "",
|
||||
Address: "",
|
||||
VhostUserType: VhostUserBlk,
|
||||
}
|
||||
testAppend(vhostuserBlkDevice, deviceVhostUserBlkString, t)
|
||||
|
||||
vhostuserSCSIDevice := VhostUserDevice{
|
||||
SocketPath: "/tmp/nonexistentsocket.socket",
|
||||
CharDevID: "char1",
|
||||
|
||||
Reference in New Issue
Block a user