pub trait IovaTranslator: Send + Sync {
// Required method
fn translate_addr(&self, addr: usize, len: usize) -> Result<Iova, Error>;
}
Expand description
Something that can translate process addresses into IOVAs.
Required Methods§
Sourcefn translate_addr(&self, addr: usize, len: usize) -> Result<Iova, Error>
fn translate_addr(&self, addr: usize, len: usize) -> Result<Iova, Error>
Determines the base IOVA corresponding to the given process address range.
If the transport requires memory to be mapped prior to use but the address doesn’t belong to
a mapped memory region, an Err
will be returned.
The addr..addr + len
range must not cross memory region boundaries, otherwise Err
is
returned.