pub struct Vport<T: DeviceBacking> { /* private fields */ }
Expand description
A MANA vport.
Implementations§
Source§impl<T: DeviceBacking> Vport<T>
impl<T: DeviceBacking> Vport<T>
Sourcepub fn max_tx_queues(&self) -> u32
pub fn max_tx_queues(&self) -> u32
Returns the maximum number of transmit queues.
Sourcepub fn max_rx_queues(&self) -> u32
pub fn max_rx_queues(&self) -> u32
Returns the maximum number of receive queues.
Sourcepub fn mac_address(&self) -> MacAddress
pub fn mac_address(&self) -> MacAddress
Returns the assigned MAC address.
Sourcepub fn num_indirection_ent(&self) -> u32
pub fn num_indirection_ent(&self) -> u32
Returns the number of indirection entries supported by the vport
Sourcepub async fn new_eq(
&self,
arena: &mut ResourceArena,
size: u32,
cpu: u32,
) -> Result<BnicEq>
pub async fn new_eq( &self, arena: &mut ResourceArena, size: u32, cpu: u32, ) -> Result<BnicEq>
Creates a new event queue.
Sourcepub async fn new_wq(
&self,
arena: &mut ResourceArena,
is_send: bool,
wq_size: u32,
cq_size: u32,
eq_id: u32,
) -> Result<BnicWq>
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).
Sourcepub async fn config_rx(&self, config: &RxConfig<'_>) -> Result<()>
pub async fn config_rx(&self, config: &RxConfig<'_>) -> Result<()>
Sets the receive configuration.
Sourcepub async fn move_filter(&self, direction_to_vtl0: u8) -> Result<()>
pub async fn move_filter(&self, direction_to_vtl0: u8) -> Result<()>
Move filter between VTL2 VF vport and VTL0 VF vport
Sourcepub async fn get_direction_to_vtl0(&self) -> Option<bool>
pub async fn get_direction_to_vtl0(&self) -> Option<bool>
Get current filter state.
Sourcepub async fn set_serial_no(&self, serial_no: u32) -> Result<()>
pub async fn set_serial_no(&self, serial_no: u32) -> Result<()>
Set the vport serial number
Sourcepub async fn query_stats(&self) -> Result<ManaQueryStatisticsResponse>
pub async fn query_stats(&self) -> Result<ManaQueryStatisticsResponse>
Gets stats. Note that these are adapter-wide and not really per-vport.
Sourcepub async fn query_filter_state(
&self,
vport: u64,
) -> Result<ManaQueryFilterStateResponse>
pub async fn query_filter_state( &self, vport: u64, ) -> Result<ManaQueryFilterStateResponse>
Retrieves vport mac filter state from socamana
Sourcepub async fn destroy(&self, arena: ResourceArena)
pub async fn destroy(&self, arena: ResourceArena)
Destroys resources in arena
.
Sourcepub async fn retarget_interrupt(
&self,
eq_id: u32,
cpu: u32,
) -> Result<Option<DeviceInterrupt>>
pub async fn retarget_interrupt( &self, eq_id: u32, cpu: u32, ) -> Result<Option<DeviceInterrupt>>
Changes the target CPU for the given eq to cpu
.
Sourcepub async fn register_link_status_notifier(&self, sender: Sender<bool>)
pub async fn register_link_status_notifier(&self, sender: Sender<bool>)
Registers for link status notification updates.
Sourcepub async fn dma_client(&self) -> Arc<dyn DmaClient>
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> 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