Struct mlx_ethernet::command_queue::CommandQueue
source · pub struct CommandQueue { /* private fields */ }
Expand description
A buffer of fixed-size entries that is used to pass commands to the HCA. It resides in a physically contiguous 4 KiB memory chunk. (Section 8.24.1: HCA Command Queue)
Implementations§
source§impl CommandQueue
impl CommandQueue
sourcepub fn create(
entries: BorrowedSliceMappedPages<CommandQueueEntry, Mutable>,
num_cmdq_entries: usize
) -> Result<CommandQueue, &'static str>
pub fn create( entries: BorrowedSliceMappedPages<CommandQueueEntry, Mutable>, num_cmdq_entries: usize ) -> Result<CommandQueue, &'static str>
Create a command queue object.
Arguments
entries
: physically contiguous memory that is mapped as a slice of command queue entries.num_cmdq_entries
: number of entries in the queue.
sourcepub fn create_and_execute_command(
&mut self,
parameters: CommandBuilder,
init_segment: &mut InitializationSegment
) -> Result<Command<{ CmdState::Completed }>, CommandQueueError>
pub fn create_and_execute_command( &mut self, parameters: CommandBuilder, init_segment: &mut InitializationSegment ) -> Result<Command<{ CmdState::Completed }>, CommandQueueError>
Find an command queue entry that is not in use
sourcepub fn wait_for_command_completion(
&self,
command: &Command<{ CmdState::Posted }>
)
pub fn wait_for_command_completion( &self, command: &Command<{ CmdState::Posted }> )
Waits for ownership bit to be cleared, and then returns the command delivery status and the command return status.
pub fn get_command_status( &mut self, command: Command<{ CmdState::Completed }> ) -> Result<CommandCompletionStatus, CommandQueueError>
sourcepub fn get_port_type(
&mut self,
command: Command<{ CmdState::Completed }>
) -> Result<(HcaPortType, CommandCompletionStatus), CommandQueueError>
pub fn get_port_type( &mut self, command: Command<{ CmdState::Completed }> ) -> Result<(HcaPortType, CommandCompletionStatus), CommandQueueError>
Get the number of pages requested by the NIC, which is the output of the CommandOpcode::QueryHcaCap
command.
sourcepub fn get_device_capabilities(
&mut self,
command: Command<{ CmdState::Completed }>
) -> Result<(HCACapabilities, CommandCompletionStatus), CommandQueueError>
pub fn get_device_capabilities( &mut self, command: Command<{ CmdState::Completed }> ) -> Result<(HCACapabilities, CommandCompletionStatus), CommandQueueError>
Get the device capabilities, which is the output of the CommandOpcode::QueryHcaCap
command.
sourcepub fn get_query_issi_command_output(
&mut self,
command: Command<{ CmdState::Completed }>
) -> Result<(u16, u8, CommandCompletionStatus), CommandQueueError>
pub fn get_query_issi_command_output( &mut self, command: Command<{ CmdState::Completed }> ) -> Result<(u16, u8, CommandCompletionStatus), CommandQueueError>
Get the current ISSI version and the supported ISSI versions, which is the output of the CommandOpcode::QueryIssi
command.
sourcepub fn get_query_pages_command_output(
&mut self,
command: Command<{ CmdState::Completed }>
) -> Result<(u32, CommandCompletionStatus), CommandQueueError>
pub fn get_query_pages_command_output( &mut self, command: Command<{ CmdState::Completed }> ) -> Result<(u32, CommandCompletionStatus), CommandQueueError>
Get the number of pages requested by the NIC, which is the output of the CommandOpcode::QueryPages
command.
sourcepub fn get_max_mtu(
&mut self,
command: Command<{ CmdState::Completed }>
) -> Result<(u16, CommandCompletionStatus), CommandQueueError>
pub fn get_max_mtu( &mut self, command: Command<{ CmdState::Completed }> ) -> Result<(u16, CommandCompletionStatus), CommandQueueError>
Get the maximum value the MTU can be set to, which is the output of the CommandOpcode::AccessRegister
command
when accessing [NetworkPortRegisters::PMTU
].
sourcepub fn get_uar(
&mut self,
command: Command<{ CmdState::Completed }>
) -> Result<(u32, CommandCompletionStatus), CommandQueueError>
pub fn get_uar( &mut self, command: Command<{ CmdState::Completed }> ) -> Result<(u32, CommandCompletionStatus), CommandQueueError>
Get the User Access Region (UAR) number, which is the output of the CommandOpcode::AllocUar
command.
sourcepub fn get_protection_domain(
&mut self,
command: Command<{ CmdState::Completed }>
) -> Result<(Pd, CommandCompletionStatus), CommandQueueError>
pub fn get_protection_domain( &mut self, command: Command<{ CmdState::Completed }> ) -> Result<(Pd, CommandCompletionStatus), CommandQueueError>
Get the protection domain number, which is the output of the CommandOpcode::AllocPd
command.
sourcepub fn get_transport_domain(
&mut self,
command: Command<{ CmdState::Completed }>
) -> Result<(Td, CommandCompletionStatus), CommandQueueError>
pub fn get_transport_domain( &mut self, command: Command<{ CmdState::Completed }> ) -> Result<(Td, CommandCompletionStatus), CommandQueueError>
Get the transport domain number, which is the output of the CommandOpcode::AllocTransportDomain
command.
sourcepub fn get_reserved_lkey(
&mut self,
command: Command<{ CmdState::Completed }>
) -> Result<(Lkey, CommandCompletionStatus), CommandQueueError>
pub fn get_reserved_lkey( &mut self, command: Command<{ CmdState::Completed }> ) -> Result<(Lkey, CommandCompletionStatus), CommandQueueError>
Get the value of the reserved Lkey for Base Memory Management Extension, which is used when we are using physical addresses.
It is taken as the output of the CommandOpcode::QuerySpecialContexts
command.
sourcepub fn get_vport_state(
&mut self,
command: Command<{ CmdState::Completed }>
) -> Result<(u16, u8, u8, CommandCompletionStatus), CommandQueueError>
pub fn get_vport_state( &mut self, command: Command<{ CmdState::Completed }> ) -> Result<(u16, u8, u8, CommandCompletionStatus), CommandQueueError>
Get the Vport state in the format (max_tx_speed, admin_state, state)
It is taken as the output of the CommandOpcode::QueryVportState
command.
sourcepub fn get_vport_mac_address(
&mut self,
command: Command<{ CmdState::Completed }>
) -> Result<([u8; 6], CommandCompletionStatus), CommandQueueError>
pub fn get_vport_mac_address( &mut self, command: Command<{ CmdState::Completed }> ) -> Result<([u8; 6], CommandCompletionStatus), CommandQueueError>
Get the port mac address, which is the output of the CommandOpcode::QueryNicVportContext
command.