Crate nic_queues

source ·
Expand description

Defines the receive and transmit queues that store a ring of DMA descriptors and related information.

Receive and transmit queues are used across all NICs to keep track of incoming and outgoing packets. HW queues used by the NIC only consist of the ring of DMA descriptors. The SW queues defined here hold the ring of DMA descriptors that it shares with the HW, as well as other information such as the buffers received from the queues, the tail register for each queue and the cpu the queue is mapped to.

Structs

  • A struct that holds all information for one receive queue. There should be one such object per queue.
  • A struct that holds all information for a transmit queue. There should be one such object per queue.

Traits

  • The register trait that gives access to only those registers required for receiving a packet. The Rx queue control registers can only be accessed by the physical NIC.
  • The register trait that gives access to only those registers required for sending a packet. The Tx queue control registers can only be accessed by the physical NIC.