mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-02-01 17:35:19 +00:00
vm-virtio: Define a separate macro alias for ctrl queue devices
Now that we have factorized the common virtio pausable implementation, it's cleaner to have a dedicated macro for control queue devices rather than overload the macro prototype. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
This commit is contained in:
parent
2e2b1e4230
commit
bce76271c5
@ -203,8 +203,11 @@ macro_rules! virtio_pausable {
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
($type:ident, $ctrl_q:expr) => {
|
||||
#[macro_export]
|
||||
macro_rules! virtio_ctrl_q_pausable {
|
||||
($type:ident) => {
|
||||
virtio_pausable_trait!($type);
|
||||
|
||||
impl Pausable for $type {
|
||||
|
@ -583,6 +583,6 @@ impl VirtioDevice for Net {
|
||||
}
|
||||
}
|
||||
|
||||
virtio_pausable!(Net, true);
|
||||
virtio_ctrl_q_pausable!(Net);
|
||||
impl Snapshotable for Net {}
|
||||
impl Migratable for Net {}
|
||||
|
@ -361,6 +361,6 @@ impl VirtioDevice for Net {
|
||||
}
|
||||
}
|
||||
|
||||
virtio_pausable!(Net, true);
|
||||
virtio_ctrl_q_pausable!(Net);
|
||||
impl Snapshotable for Net {}
|
||||
impl Migratable for Net {}
|
||||
|
Loading…
x
Reference in New Issue
Block a user