-
Notifications
You must be signed in to change notification settings - Fork 243
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
[WIP] avocado-vt: add support for virtio-blk-vhost-user #4018
base: master
Are you sure you want to change the base?
Conversation
92e738d
to
9a764bc
Compare
add the following parameters in test case: The results were passed. |
Signed-off-by: Xueqiang Wei <[email protected]>
9a764bc
to
2282a3e
Compare
@@ -2547,6 +2547,8 @@ def define_hbas( | |||
protocol_cls = qdevices.QBlockdevProtocolFTP | |||
elif filename.startswith("vdpa:"): | |||
protocol_cls = qdevices.QBlockdevProtocolVirtioBlkVhostVdpa | |||
elif "vhost-user-blk" in filename: | |||
protocol_cls = qdevices.QBlockdevProtocolVirtioBlkVhostUser |
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.
Have a question here:
for vdpa "filename=/dev/vhost-vdpa-x" is defined by the system automatically as a device after loading the vhost-vdpa module.
But for virtio-blk-vhost-user, filename was defined in qsd, like: --export type=vhost-user-blk,id=export1,addr.type=unix,addr.path=/tmp/vhost-user-blk1.sock,node-name=fmt1 \
So if I set the socket name to addr.path=/tmp/test.sock, then no filename matched here, so no QBlockdevProtocolVirtioBlkVhostUser node created.
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, I see, it's just a draft. Currently it is only supported in this way. (path=/tmp/vhost-user-blk1.sock, path=/tmp/vhost-user-blk2.sock)
For the sake of program readability, I suggest that we fix the naming format. We can discuss it later.
@@ -211,6 +211,8 @@ def filename_to_file_opts(filename): | |||
elif filename.startswith("vdpa:"): | |||
# filename[7:] mean: remove the prefix "vdpa://" | |||
file_opts = {"driver": "virtio-blk-vhost-vdpa", "path": filename[7:]} | |||
elif "vhost-user-blk" in filename: | |||
file_opts = {"driver": "virtio-blk-vhost-user", "path": filename} |
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.
same comment as above.
Signed-off-by: Xueqiang Wei [email protected]