Skip to content

Commit c1f77c7

Browse files
harshanavkisjiangliu
authored andcommitted
Inflight I/O: Make struct members public
Signed-off-by: Harshavardhan Unnibhavi <[email protected]>
1 parent 99fbfc9 commit c1f77c7

File tree

1 file changed

+28
-28
lines changed

1 file changed

+28
-28
lines changed

src/vhost_user/message.rs

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -786,13 +786,13 @@ impl VhostUserMsgValidator for VhostUserFSSlaveMsg {
786786
#[derive(Clone, Copy, Default)]
787787
pub struct DescStateSplit {
788788
/// Indicate whether this descriptor (only head) is inflight or not.
789-
inflight: u8,
789+
pub inflight: u8,
790790
/// Padding
791791
padding: [u8; 5],
792792
/// List of last batch of used descriptors, only when batching is used for submitting
793-
next: u16,
793+
pub next: u16,
794794
/// Preserve order of fetching available descriptors, only for head descriptor
795-
counter: u64,
795+
pub counter: u64,
796796
}
797797

798798
impl DescStateSplit {
@@ -807,17 +807,17 @@ impl DescStateSplit {
807807
#[repr(packed)]
808808
pub struct QueueRegionSplit {
809809
/// Features flags of this region
810-
features: u64,
810+
pub features: u64,
811811
/// Version of this region
812-
version: u16,
812+
pub version: u16,
813813
/// Number of DescStateSplit entries
814-
desc_num: u16,
814+
pub desc_num: u16,
815815
/// List to track last batch of used descriptors
816-
last_batch_head: u16,
816+
pub last_batch_head: u16,
817817
/// Idx value of used ring
818-
used_idx: u16,
818+
pub used_idx: u16,
819819
/// Pointer to an array of DescStateSplit entries
820-
desc: u64,
820+
pub desc: u64,
821821
}
822822

823823
impl QueueRegionSplit {
@@ -839,25 +839,25 @@ impl QueueRegionSplit {
839839
#[derive(Clone, Copy, Default)]
840840
pub struct DescStatePacked {
841841
/// Indicate whether this descriptor (only head) is inflight or not.
842-
inflight: u8,
842+
pub inflight: u8,
843843
/// Padding
844844
padding: u8,
845845
/// Link to next free entry
846-
next: u16,
846+
pub next: u16,
847847
/// Link to last entry of descriptor list, only for head
848-
last: u16,
848+
pub last: u16,
849849
/// Length of descriptor list, only for head
850-
num: u16,
850+
pub num: u16,
851851
/// Preserve order of fetching avail descriptors, only for head
852-
counter: u64,
852+
pub counter: u64,
853853
/// Buffer ID
854-
id: u16,
854+
pub id: u16,
855855
/// Descriptor flags
856-
flags: u16,
856+
pub flags: u16,
857857
/// Buffer length
858-
len: u32,
858+
pub len: u32,
859859
/// Buffer address
860-
addr: u64,
860+
pub addr: u64,
861861
}
862862

863863
impl DescStatePacked {
@@ -872,27 +872,27 @@ impl DescStatePacked {
872872
#[repr(packed)]
873873
pub struct QueueRegionPacked {
874874
/// Features flags of this region
875-
features: u64,
875+
pub features: u64,
876876
/// version of this region
877-
version: u16,
877+
pub version: u16,
878878
/// size of descriptor state array
879-
desc_num: u16,
879+
pub desc_num: u16,
880880
/// head of free DescStatePacked entry list
881-
free_head: u16,
881+
pub free_head: u16,
882882
/// old head of free DescStatePacked entry list
883-
old_free_head: u16,
883+
pub old_free_head: u16,
884884
/// used idx of descriptor ring
885-
used_idx: u16,
885+
pub used_idx: u16,
886886
/// old used idx of descriptor ring
887-
old_used_idx: u16,
887+
pub old_used_idx: u16,
888888
/// device ring wrap counter
889-
used_wrap_counter: u8,
889+
pub used_wrap_counter: u8,
890890
/// old device ring wrap counter
891-
old_used_wrap_counter: u8,
891+
pub old_used_wrap_counter: u8,
892892
/// Padding
893893
padding: [u8; 7],
894894
/// Pointer to array tracking state of each descriptor from descriptor ring
895-
desc: u64,
895+
pub desc: u64,
896896
}
897897

898898
impl QueueRegionPacked {

0 commit comments

Comments
 (0)