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:
Samuel Ortiz 2020-01-27 19:38:27 +01:00 committed by Sebastien Boeuf
parent 2e2b1e4230
commit bce76271c5
3 changed files with 6 additions and 3 deletions

View File

@ -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 {

View File

@ -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 {}

View File

@ -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 {}