@@ -23,8 +23,7 @@ use super::super::transport::mmio::{ComCfg, NotifCfg, NotifCtrl};
2323use super :: super :: transport:: pci:: { ComCfg , NotifCfg , NotifCtrl } ;
2424use super :: error:: VirtqError ;
2525use super :: {
26- AvailBufferToken , BufferType , MemDescrId , MemPool , TransferToken , UsedBufferToken , Virtq ,
27- VirtqPrivate ,
26+ AvailBufferToken , BufferType , MemPool , TransferToken , UsedBufferToken , Virtq , VirtqPrivate ,
2827} ;
2928use crate :: arch:: mm:: paging:: { BasePageSize , PageSize } ;
3029use crate :: mm:: device_alloc:: DeviceAlloc ;
@@ -214,11 +213,11 @@ impl DescriptorRing {
214213 & mut self ,
215214 raw_tkn : TransferToken < pvirtq:: Desc > ,
216215 start : u16 ,
217- buff_id : MemDescrId ,
216+ buff_id : u16 ,
218217 first_flags : DescF ,
219218 ) {
220219 // provide reference, in order to let TransferToken know upon finish.
221- self . tkn_ref_ring [ usize:: from ( buff_id. 0 ) ] = Some ( raw_tkn) ;
220+ self . tkn_ref_ring [ usize:: from ( buff_id) ] = Some ( raw_tkn) ;
222221 // The driver performs a suitable memory barrier to ensure the device sees the updated descriptor table and available ring before the next step.
223222 // See Virtio specification v1.1. - 2.7.21
224223 fence ( Ordering :: SeqCst ) ;
@@ -304,7 +303,7 @@ impl ReadCtrl<'_> {
304303 for _ in 0 ..tkn. num_consuming_descr ( ) {
305304 self . incrmt ( ) ;
306305 }
307- self . desc_ring . mem_pool . ret_id ( MemDescrId ( buff_id) ) ;
306+ self . desc_ring . mem_pool . ret_id ( buff_id) ;
308307
309308 Some ( ( tkn, write_len) )
310309 } else {
@@ -341,7 +340,7 @@ struct WriteCtrl<'a> {
341340 /// The [pvirtq::Desc::flags] value for the first descriptor, the write of which is deferred.
342341 first_flags : DescF ,
343342 /// Buff ID of this write
344- buff_id : MemDescrId ,
343+ buff_id : u16 ,
345344
346345 desc_ring : & ' a mut DescriptorRing ,
347346}
@@ -371,7 +370,7 @@ impl WriteCtrl<'_> {
371370
372371 /// Completes the descriptor flags and id, and writes into the queue at the correct position.
373372 fn write_desc ( & mut self , mut incomplete_desc : pvirtq:: Desc ) {
374- incomplete_desc. id = self . buff_id . 0 . into ( ) ;
373+ incomplete_desc. id = self . buff_id . into ( ) ;
375374 if self . start == self . position {
376375 // We save what the flags value for the first descriptor will be to be able
377376 // to write it later when all the other descriptors are written (so that
0 commit comments