mirror of
https://github.com/rust-vmm/vhost-device.git
synced 2025-12-27 23:48:55 +00:00
vsock: Set BACKEND_EVENT based on NUM_QUEUES
BACKEND_EVENT value depends on NUM_QUEUES, because it is the next value of NUM_QUEUES, so set it based on NUM_QUEUES Signed-off-by: Jeongik Cha <jeongik@google.com>
This commit is contained in:
parent
9f10349f99
commit
f2acb05c33
@ -37,10 +37,12 @@ const TX_QUEUE_EVENT: u16 = 1;
|
||||
const EVT_QUEUE_EVENT: u16 = 2;
|
||||
|
||||
/// Notification coming from the backend.
|
||||
pub(crate) const BACKEND_EVENT: u16 = 3;
|
||||
/// Event range [0...num_queues] is reserved for queues and exit event.
|
||||
/// So NUM_QUEUES + 1 is used.
|
||||
pub(crate) const BACKEND_EVENT: u16 = (NUM_QUEUES + 1) as u16;
|
||||
|
||||
/// Notification coming from the sibling VM.
|
||||
pub(crate) const SIBLING_VM_EVENT: u16 = 4;
|
||||
pub(crate) const SIBLING_VM_EVENT: u16 = BACKEND_EVENT + 1;
|
||||
|
||||
/// CID of the host
|
||||
pub(crate) const VSOCK_HOST_CID: u64 = 2;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user