Struct Vport

Source
pub struct Vport<T: DeviceBacking> { /* private fields */ }
Expand description

A MANA vport.

Implementations§

Source§

impl<T: DeviceBacking> Vport<T>

Source

pub fn max_tx_queues(&self) -> u32

Returns the maximum number of transmit queues.

Source

pub fn max_rx_queues(&self) -> u32

Returns the maximum number of receive queues.

Source

pub fn mac_address(&self) -> MacAddress

Returns the assigned MAC address.

Source

pub fn gpa_mkey(&self) -> u32

Returns the memory key to refer to all of GPA space.

Source

pub fn id(&self) -> u32

Returns this vport’s id

Source

pub fn num_indirection_ent(&self) -> u32

Returns the number of indirection entries supported by the vport

Source

pub async fn new_eq( &self, arena: &mut ResourceArena, size: u32, cpu: u32, ) -> Result<BnicEq>

Creates a new event queue.

Source

pub async fn new_wq( &self, arena: &mut ResourceArena, is_send: bool, wq_size: u32, cq_size: u32, eq_id: u32, ) -> Result<BnicWq>

Creates a new work queue (transmit or receive).

Source

pub async fn config_tx(&self) -> Result<TxConfig>

Get the transmit configuration.

Source

pub async fn config_rx(&self, config: &RxConfig<'_>) -> Result<()>

Sets the receive configuration.

Source

pub async fn move_filter(&self, direction_to_vtl0: u8) -> Result<()>

Move filter between VTL2 VF vport and VTL0 VF vport

Source

pub async fn get_direction_to_vtl0(&self) -> Option<bool>

Get current filter state.

Source

pub async fn set_serial_no(&self, serial_no: u32) -> Result<()>

Set the vport serial number

Source

pub async fn query_stats(&self) -> Result<ManaQueryStatisticsResponse>

Gets stats. Note that these are adapter-wide and not really per-vport.

Source

pub async fn query_filter_state( &self, vport: u64, ) -> Result<ManaQueryFilterStateResponse>

Retrieves vport mac filter state from socamana

Source

pub async fn destroy(&self, arena: ResourceArena)

Destroys resources in arena.

Source

pub async fn retarget_interrupt( &self, eq_id: u32, cpu: u32, ) -> Result<Option<DeviceInterrupt>>

Changes the target CPU for the given eq to cpu.

Registers for link status notification updates.

Source

pub async fn dma_client(&self) -> Arc<dyn DmaClient>

Returns an object that can allocate dma memory to be shared with the device.

Auto Trait Implementations§

§

impl<T> Freeze for Vport<T>

§

impl<T> !RefUnwindSafe for Vport<T>

§

impl<T> Send for Vport<T>

§

impl<T> Sync for Vport<T>

§

impl<T> Unpin for Vport<T>

§

impl<T> !UnwindSafe for Vport<T>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more