pub struct Napi(/* private fields */);Expand description
NAPI busy-poll configuration for
Submitter::register_napi and
Submitter::unregister_napi.
On (un)register the kernel writes the previous settings back into the value, which
can be read with busy_poll_timeout and
prefer_busy_poll.
Available since Linux 6.9.
Implementations§
Source§impl Napi
impl Napi
pub const fn new() -> Self
Sourcepub const fn set_busy_poll_timeout(self, micros: u32) -> Self
pub const fn set_busy_poll_timeout(self, micros: u32) -> Self
Set the busy-poll timeout, in microseconds.
Sourcepub const fn set_prefer_busy_poll(self, enabled: bool) -> Self
pub const fn set_prefer_busy_poll(self, enabled: bool) -> Self
Set whether the kernel should prefer busy-polling over interrupts.
Sourcepub const fn set_tracking(self, strategy: NapiTracking) -> Self
pub const fn set_tracking(self, strategy: NapiTracking) -> Self
Set the tracking strategy.
Sourcepub const fn busy_poll_timeout(&self) -> u32
pub const fn busy_poll_timeout(&self) -> u32
The busy-poll timeout, in microseconds.
Sourcepub const fn prefer_busy_poll(&self) -> bool
pub const fn prefer_busy_poll(&self) -> bool
Whether busy-polling is preferred over interrupts.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Napi
impl RefUnwindSafe for Napi
impl Send for Napi
impl Sync for Napi
impl Unpin for Napi
impl UnsafeUnpin for Napi
impl UnwindSafe for Napi
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more