mirror of
https://github.com/ipxe/ipxe
synced 2026-02-14 02:31:26 +03:00
[gve] Allow for descriptor and completion lengths to vary by mode
The descriptors and completions in the DQO operating mode are not the same sizes as the equivalent structures in the GQI operating mode. Allow the queue stride size to vary by operating mode (and therefore to be known only after reading the device descriptor and selecting the operating mode). Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -622,6 +622,14 @@ struct gve_gqi_rx_completion {
|
||||
/** Padding at the start of all received packets */
|
||||
#define GVE_RX_PAD 2
|
||||
|
||||
/** Queue strides */
|
||||
struct gve_queue_stride {
|
||||
/** Descriptor ring stride */
|
||||
uint8_t desc;
|
||||
/** Completion ring stride */
|
||||
uint8_t cmplt;
|
||||
};
|
||||
|
||||
/** A descriptor queue */
|
||||
struct gve_queue {
|
||||
/** Descriptor ring */
|
||||
@@ -654,6 +662,8 @@ struct gve_queue {
|
||||
|
||||
/** Queue type */
|
||||
const struct gve_queue_type *type;
|
||||
/** Queue strides */
|
||||
struct gve_queue_stride stride;
|
||||
/** Number of descriptors (must be a power of two) */
|
||||
unsigned int count;
|
||||
/** Maximum fill level (must be a power of two) */
|
||||
@@ -701,10 +711,11 @@ struct gve_queue_type {
|
||||
uint8_t irq;
|
||||
/** Maximum fill level */
|
||||
uint8_t fill;
|
||||
/** Descriptor size */
|
||||
uint8_t desc_len;
|
||||
/** Completion size */
|
||||
uint8_t cmplt_len;
|
||||
/** Queue strides */
|
||||
struct {
|
||||
/** In-order queue strides */
|
||||
struct gve_queue_stride gqi;
|
||||
} stride;
|
||||
/** Command to create queue */
|
||||
uint8_t create;
|
||||
/** Command to destroy queue */
|
||||
|
||||
Reference in New Issue
Block a user