pub struct FillQueue { /* private fields */ }
Expand description
Implementations
sourceimpl FillQueue
impl FillQueue
sourcepub unsafe fn produce(&mut self, descs: &[FrameDesc]) -> usize
pub unsafe fn produce(&mut self, descs: &[FrameDesc]) -> usize
Let the kernel know that the Umem
frames described by
descs
may be used to receive data. Returns the number of
frames submitted to the kernel.
Note that if the length of descs
is greater than the number
of available spaces on the underlying ring buffer then no
frames at all will be handed over to the kernel.
Once the frames have been submitted to this queue they should
not be used again until consumed via the RxQueue
.
Safety
This function is unsafe as it is possible to cause a data race
if used improperly. For example, by simultaneously submitting
the same frame descriptor to this FillQueue
and the
TxQueue
.
Furthermore, the frames passed to this queue must belong to
the same Umem
that this FillQueue
instance is tied to.
sourcepub unsafe fn produce_one(&mut self, desc: &FrameDesc) -> usize
pub unsafe fn produce_one(&mut self, desc: &FrameDesc) -> usize
sourcepub unsafe fn produce_and_wakeup(
&mut self,
descs: &[FrameDesc],
socket_fd: &mut Fd,
poll_timeout: i32
) -> Result<usize>
pub unsafe fn produce_and_wakeup(
&mut self,
descs: &[FrameDesc],
socket_fd: &mut Fd,
poll_timeout: i32
) -> Result<usize>
sourcepub unsafe fn produce_one_and_wakeup(
&mut self,
desc: &FrameDesc,
socket_fd: &mut Fd,
poll_timeout: i32
) -> Result<usize>
pub unsafe fn produce_one_and_wakeup(
&mut self,
desc: &FrameDesc,
socket_fd: &mut Fd,
poll_timeout: i32
) -> Result<usize>
sourcepub fn wakeup(&self, fd: &mut Fd, poll_timeout: i32) -> Result<()>
pub fn wakeup(&self, fd: &mut Fd, poll_timeout: i32) -> Result<()>
Wake up the kernel to let it know it can continue using the fill ring to process received data.
See produce_and_wakeup
for link to docs with further
explanation.
sourcepub fn needs_wakeup(&self) -> bool
pub fn needs_wakeup(&self) -> bool
Check if the XDP_USE_NEED_WAKEUP
flag is set on the fill
ring. If so then this means a call to wakeup
will be
required to continue processing received data.
See produce_and_wakeup
for a link to docs with further
explanation.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for FillQueue
impl Send for FillQueue
impl !Sync for FillQueue
impl Unpin for FillQueue
impl UnwindSafe for FillQueue
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more