mirror of
https://github.com/ipxe/ipxe
synced 2025-12-07 09:50:26 +03:00
[gve] Add support for raw DMA addressing
Raw DMA addressing allows the transmit and receive descriptors to provide the DMA address of the data buffer directly, without requiring the use of a pre-registered queue page list. It is modelled in the device as a magic "raw DMA" queue page list (with QPL ID 0xffffffff) covering the whole of the DMA address space. When using raw DMA addressing, the transmit and receive datapaths could use the normal pattern of mapping I/O buffers directly, and avoid copying packet data into and out of the fixed queue page list ring buffer. However, since we must retain support for queue page list addressing (which requires this additional copying), we choose to minimise code size by continuing to use the fixed ring buffer even when using raw DMA addressing. Add support for using raw DMA addressing by setting the queue page list base device address appropriately, omitting the commands to register and unregister the queue page lists, and specifying the raw DMA QPL ID when creating the TX and RX queues. Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -533,6 +533,9 @@ struct gve_qpl {
|
||||
physaddr_t base;
|
||||
};
|
||||
|
||||
/** Raw DMA addressing queue page list ID */
|
||||
#define GVE_RAW_QPL 0xffffffff
|
||||
|
||||
/**
|
||||
* Maximum number of transmit buffers
|
||||
*
|
||||
@@ -676,9 +679,10 @@ struct gve_queue_type {
|
||||
* Populate command parameters to create queue
|
||||
*
|
||||
* @v queue Descriptor queue
|
||||
* @v qpl Queue page list ID
|
||||
* @v cmd Admin queue command
|
||||
*/
|
||||
void ( * param ) ( struct gve_queue *queue,
|
||||
void ( * param ) ( struct gve_queue *queue, uint32_t qpl,
|
||||
union gve_admin_command *cmd );
|
||||
/** Queue page list ID */
|
||||
uint32_t qpl;
|
||||
|
||||
Reference in New Issue
Block a user