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
dragonball: add vhost-user connection management logic #8450
dragonball: add vhost-user connection management logic #8450
Conversation
Can one of the admins verify this patch? |
/test |
1 similar comment
/test |
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.
Thanks @adamqqqplay, a few comments here.
// Reexport timerfd public interfaces. | ||
pub mod timerfd { | ||
pub use timerfd::*; | ||
} | ||
|
||
// Reexport vmm_sys_util public interfaces. | ||
pub use vmm_sys_util::{aio, errno, eventfd, fallocate, ioctl, tempdir, tempfile, terminal}; |
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.
Are these re-export interfaces necessary? Shall we remove them?
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.
OK, fixed.
@@ -125,6 +125,32 @@ pub enum ActivateError { | |||
InvalidQueueConfig, | |||
#[error("IO: {0}.")] | |||
IOError(#[from] IOError), | |||
#[error("VirtIo error")] | |||
VirtIoError(Error), | |||
#[error("VirtIo error")] |
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.
Is error message correct?
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.
Fixed.
#[error("VirtIo error")] | ||
EpollMgr(dbs_utils::epoll_manager::Error), | ||
#[cfg(feature = "vhost")] | ||
#[error("VirtIo error")] |
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.
Is error message correct?
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.
Fixed.
@@ -155,6 +181,9 @@ pub enum Error { | |||
/// Guest gave us a descriptor that was too big to use. | |||
#[error("descriptor length too big.")] | |||
DescriptorLengthTooBig, | |||
/// Error from the epoll event manager | |||
#[error("dbs_utils error: {0}.")] |
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.
#[error("dbs_utils error: {0}.")] | |
#[error("dbs_utils error: {0:?}.")] |
Use it to print error stack.
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.
Fixed.
|
||
#[cfg(feature = "vhost")] | ||
/// Error from the vhost subsystem | ||
#[error("Vhost error: {0}")] |
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.
Ditto.
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.
Fixed.
VhostError(vhost_rs::Error), | ||
#[cfg(feature = "vhost")] | ||
/// Error from the vhost user subsystem | ||
#[error("Vhost-user error: {0}")] |
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.
Ditto.
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.
Fixed.
src/dragonball/src/dbs_virtio_devices/src/vhost/vhost_user/connection.rs
Outdated
Show resolved
Hide resolved
f8753b2
to
4a3823c
Compare
/test |
1 similar comment
/test |
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.
Lgtm, thanks @adamqqqplay!
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.
Please replace VirtIoXxx
with VirtioXxx
, see: #8465.
The vhost-user connection management logic will be used by the upcoming features: vhost-user-net, vhost-user-blk and vhost-user-fs. Fixes: kata-containers#8448 Signed-off-by: Liu Jiang <gerry@linux.alibaba.com> Signed-off-by: Qinqi Qu <quqinqi@linux.alibaba.com> Signed-off-by: Huang Jianan <jnhuang@linux.alibaba.com>
The test utils will be used by the upcoming feature tests: vhost-user-net, vhost-user-blk and vhost-user-fs. Signed-off-by: Beiyue <beiyue@linux.alibaba.com> Signed-off-by: Huang Jianan <jnhuang@linux.alibaba.com>
4a3823c
to
a957139
Compare
@justxuewei Fixed, PTAL. |
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.
Lgtm, thanks!
/test |
/test-s390x |
The vhost-user connection management logic will be used by
the upcoming features: vhost-user-net, vhost-user-blk and
vhost-user-fs.
Fixes: #8448