summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarshavardhan Unnibhavi <harshanavkis@gmail.com>2021-07-25 21:37:17 +0200
committerJiang Liu <gerry@linux.alibaba.com>2021-07-26 17:07:02 +0800
commitc1f77c778bc482395bb1f9d0d4961e67f30c83eb (patch)
tree2e403d348b8a7673363765d294a79c39b2fd378d
parent99fbfc969287ea87398d3755bd2613c14d77579f (diff)
downloadvmm_vhost-c1f77c778bc482395bb1f9d0d4961e67f30c83eb.tar.gz
Inflight I/O: Make struct members public
Signed-off-by: Harshavardhan Unnibhavi <harshanavkis@gmail.com>
-rw-r--r--src/vhost_user/message.rs56
1 files changed, 28 insertions, 28 deletions
diff --git a/src/vhost_user/message.rs b/src/vhost_user/message.rs
index 618940e..f6eead2 100644
--- a/src/vhost_user/message.rs
+++ b/src/vhost_user/message.rs
@@ -786,13 +786,13 @@ impl VhostUserMsgValidator for VhostUserFSSlaveMsg {
#[derive(Clone, Copy, Default)]
pub struct DescStateSplit {
/// Indicate whether this descriptor (only head) is inflight or not.
- inflight: u8,
+ pub inflight: u8,
/// Padding
padding: [u8; 5],
/// List of last batch of used descriptors, only when batching is used for submitting
- next: u16,
+ pub next: u16,
/// Preserve order of fetching available descriptors, only for head descriptor
- counter: u64,
+ pub counter: u64,
}
impl DescStateSplit {
@@ -807,17 +807,17 @@ impl DescStateSplit {
#[repr(packed)]
pub struct QueueRegionSplit {
/// Features flags of this region
- features: u64,
+ pub features: u64,
/// Version of this region
- version: u16,
+ pub version: u16,
/// Number of DescStateSplit entries
- desc_num: u16,
+ pub desc_num: u16,
/// List to track last batch of used descriptors
- last_batch_head: u16,
+ pub last_batch_head: u16,
/// Idx value of used ring
- used_idx: u16,
+ pub used_idx: u16,
/// Pointer to an array of DescStateSplit entries
- desc: u64,
+ pub desc: u64,
}
impl QueueRegionSplit {
@@ -839,25 +839,25 @@ impl QueueRegionSplit {
#[derive(Clone, Copy, Default)]
pub struct DescStatePacked {
/// Indicate whether this descriptor (only head) is inflight or not.
- inflight: u8,
+ pub inflight: u8,
/// Padding
padding: u8,
/// Link to next free entry
- next: u16,
+ pub next: u16,
/// Link to last entry of descriptor list, only for head
- last: u16,
+ pub last: u16,
/// Length of descriptor list, only for head
- num: u16,
+ pub num: u16,
/// Preserve order of fetching avail descriptors, only for head
- counter: u64,
+ pub counter: u64,
/// Buffer ID
- id: u16,
+ pub id: u16,
/// Descriptor flags
- flags: u16,
+ pub flags: u16,
/// Buffer length
- len: u32,
+ pub len: u32,
/// Buffer address
- addr: u64,
+ pub addr: u64,
}
impl DescStatePacked {
@@ -872,27 +872,27 @@ impl DescStatePacked {
#[repr(packed)]
pub struct QueueRegionPacked {
/// Features flags of this region
- features: u64,
+ pub features: u64,
/// version of this region
- version: u16,
+ pub version: u16,
/// size of descriptor state array
- desc_num: u16,
+ pub desc_num: u16,
/// head of free DescStatePacked entry list
- free_head: u16,
+ pub free_head: u16,
/// old head of free DescStatePacked entry list
- old_free_head: u16,
+ pub old_free_head: u16,
/// used idx of descriptor ring
- used_idx: u16,
+ pub used_idx: u16,
/// old used idx of descriptor ring
- old_used_idx: u16,
+ pub old_used_idx: u16,
/// device ring wrap counter
- used_wrap_counter: u8,
+ pub used_wrap_counter: u8,
/// old device ring wrap counter
- old_used_wrap_counter: u8,
+ pub old_used_wrap_counter: u8,
/// Padding
padding: [u8; 7],
/// Pointer to array tracking state of each descriptor from descriptor ring
- desc: u64,
+ pub desc: u64,
}
impl QueueRegionPacked {