[intelxl] Separate virtual function driver definitions
Move knowledge of the virtual function data structures and admin command definitions from intelxl.h to intelxlvf.h. Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
+4
-206
@@ -305,183 +305,6 @@ struct intelxl_admin_link_params {
|
||||
/** Link is up */
|
||||
#define INTELXL_ADMIN_LINK_UP 0x01
|
||||
|
||||
/** Admin queue Send Message to PF command */
|
||||
#define INTELXL_ADMIN_SEND_TO_PF 0x0801
|
||||
|
||||
/** Admin queue Send Message to VF command */
|
||||
#define INTELXL_ADMIN_SEND_TO_VF 0x0802
|
||||
|
||||
/** Admin Queue VF Version opcode */
|
||||
#define INTELXL_ADMIN_VF_VERSION 0x00000001
|
||||
|
||||
/** Admin Queue VF Version data buffer */
|
||||
struct intelxl_admin_vf_version_buffer {
|
||||
/** Major version */
|
||||
uint32_t major;
|
||||
/** Minor version */
|
||||
uint32_t minor;
|
||||
} __attribute__ (( packed ));
|
||||
|
||||
/** Admin Queue VF Reset opcode */
|
||||
#define INTELXL_ADMIN_VF_RESET 0x00000002
|
||||
|
||||
/** Admin Queue VF Get Resources opcode */
|
||||
#define INTELXL_ADMIN_VF_GET_RESOURCES 0x00000003
|
||||
|
||||
/** Admin Queue VF Get Resources data buffer */
|
||||
struct intelxl_admin_vf_get_resources_buffer {
|
||||
/** Reserved */
|
||||
uint8_t reserved_a[20];
|
||||
/** VSI switching element ID */
|
||||
uint16_t vsi;
|
||||
/** Reserved */
|
||||
uint8_t reserved_b[8];
|
||||
/** MAC address */
|
||||
uint8_t mac[ETH_ALEN];
|
||||
} __attribute__ (( packed ));
|
||||
|
||||
/** Admin Queue VF Status Change Event opcode */
|
||||
#define INTELXL_ADMIN_VF_STATUS 0x00000011
|
||||
|
||||
/** Link status change event type */
|
||||
#define INTELXL_ADMIN_VF_STATUS_LINK 0x00000001
|
||||
|
||||
/** Link status change event data */
|
||||
struct intelxl_admin_vf_status_link {
|
||||
/** Link speed */
|
||||
uint32_t speed;
|
||||
/** Link status */
|
||||
uint8_t status;
|
||||
/** Reserved */
|
||||
uint8_t reserved[3];
|
||||
} __attribute__ (( packed ));
|
||||
|
||||
/** Admin Queue VF Status Change Event data buffer */
|
||||
struct intelxl_admin_vf_status_buffer {
|
||||
/** Event type */
|
||||
uint32_t event;
|
||||
/** Event data */
|
||||
union {
|
||||
/** Link change event data */
|
||||
struct intelxl_admin_vf_status_link link;
|
||||
} data;
|
||||
/** Reserved */
|
||||
uint8_t reserved[4];
|
||||
} __attribute__ (( packed ));
|
||||
|
||||
/** Admin Queue VF Configure Queues opcode */
|
||||
#define INTELXL_ADMIN_VF_CONFIGURE 0x00000006
|
||||
|
||||
/** Admin Queue VF Configure Queues data buffer */
|
||||
struct intelxl_admin_vf_configure_buffer {
|
||||
/** VSI switching element ID */
|
||||
uint16_t vsi;
|
||||
/** Number of queue pairs */
|
||||
uint16_t count;
|
||||
/** Reserved */
|
||||
uint8_t reserved_a[4];
|
||||
/** Transmit queue */
|
||||
struct {
|
||||
/** VSI switching element ID */
|
||||
uint16_t vsi;
|
||||
/** Queue ID */
|
||||
uint16_t id;
|
||||
/** Queue count */
|
||||
uint16_t count;
|
||||
/** Reserved */
|
||||
uint8_t reserved_a[2];
|
||||
/** Base address */
|
||||
uint64_t base;
|
||||
/** Reserved */
|
||||
uint8_t reserved_b[8];
|
||||
} __attribute__ (( packed )) tx;
|
||||
/** Receive queue */
|
||||
struct {
|
||||
/** VSI switching element ID */
|
||||
uint16_t vsi;
|
||||
/** Queue ID */
|
||||
uint16_t id;
|
||||
/** Queue count */
|
||||
uint32_t count;
|
||||
/** Reserved */
|
||||
uint8_t reserved_a[4];
|
||||
/** Data buffer length */
|
||||
uint32_t len;
|
||||
/** Maximum frame size */
|
||||
uint32_t mfs;
|
||||
/** Reserved */
|
||||
uint8_t reserved_b[4];
|
||||
/** Base address */
|
||||
uint64_t base;
|
||||
/** Reserved */
|
||||
uint8_t reserved_c[8];
|
||||
} __attribute__ (( packed )) rx;
|
||||
/** Reserved
|
||||
*
|
||||
* This field exists only due to a bug in the PF driver's
|
||||
* message validation logic, which causes it to miscalculate
|
||||
* the expected message length.
|
||||
*/
|
||||
uint8_t reserved_b[64];
|
||||
} __attribute__ (( packed ));
|
||||
|
||||
/** Admin Queue VF IRQ Map opcode */
|
||||
#define INTELXL_ADMIN_VF_IRQ_MAP 0x00000007
|
||||
|
||||
/** Admin Queue VF IRQ Map data buffer */
|
||||
struct intelxl_admin_vf_irq_map_buffer {
|
||||
/** Number of interrupt vectors */
|
||||
uint16_t count;
|
||||
/** VSI switching element ID */
|
||||
uint16_t vsi;
|
||||
/** Interrupt vector ID */
|
||||
uint16_t vec;
|
||||
/** Receive queue bitmap */
|
||||
uint16_t rxmap;
|
||||
/** Transmit queue bitmap */
|
||||
uint16_t txmap;
|
||||
/** Receive interrupt throttling index */
|
||||
uint16_t rxitr;
|
||||
/** Transmit interrupt throttling index */
|
||||
uint16_t txitr;
|
||||
/** Reserved
|
||||
*
|
||||
* This field exists only due to a bug in the PF driver's
|
||||
* message validation logic, which causes it to miscalculate
|
||||
* the expected message length.
|
||||
*/
|
||||
uint8_t reserved[12];
|
||||
} __attribute__ (( packed ));
|
||||
|
||||
/** Admin Queue VF Enable Queues opcode */
|
||||
#define INTELXL_ADMIN_VF_ENABLE 0x00000008
|
||||
|
||||
/** Admin Queue VF Disable Queues opcode */
|
||||
#define INTELXL_ADMIN_VF_DISABLE 0x00000009
|
||||
|
||||
/** Admin Queue VF Enable/Disable Queues data buffer */
|
||||
struct intelxl_admin_vf_queues_buffer {
|
||||
/** VSI switching element ID */
|
||||
uint16_t vsi;
|
||||
/** Reserved */
|
||||
uint8_t reserved[2];
|
||||
/** Receive queue bitmask */
|
||||
uint32_t rx;
|
||||
/** Transmit queue bitmask */
|
||||
uint32_t tx;
|
||||
} __attribute__ (( packed ));
|
||||
|
||||
/** Admin Queue VF Configure Promiscuous Mode opcode */
|
||||
#define INTELXL_ADMIN_VF_PROMISC 0x0000000e
|
||||
|
||||
/** Admin Queue VF Configure Promiscuous Mode data buffer */
|
||||
struct intelxl_admin_vf_promisc_buffer {
|
||||
/** VSI switching element ID */
|
||||
uint16_t vsi;
|
||||
/** Flags */
|
||||
uint16_t flags;
|
||||
} __attribute__ (( packed ));
|
||||
|
||||
/** Admin queue command parameters */
|
||||
union intelxl_admin_params {
|
||||
/** Additional data buffer command parameters */
|
||||
@@ -514,20 +337,6 @@ union intelxl_admin_buffer {
|
||||
struct intelxl_admin_switch_buffer sw;
|
||||
/** Get VSI Parameters data buffer */
|
||||
struct intelxl_admin_vsi_buffer vsi;
|
||||
/** VF Version data buffer */
|
||||
struct intelxl_admin_vf_version_buffer ver;
|
||||
/** VF Get Resources data buffer */
|
||||
struct intelxl_admin_vf_get_resources_buffer res;
|
||||
/** VF Status Change Event data buffer */
|
||||
struct intelxl_admin_vf_status_buffer stat;
|
||||
/** VF Configure Queues data buffer */
|
||||
struct intelxl_admin_vf_configure_buffer cfg;
|
||||
/** VF Enable/Disable Queues data buffer */
|
||||
struct intelxl_admin_vf_queues_buffer queues;
|
||||
/** VF Configure Promiscuous Mode data buffer */
|
||||
struct intelxl_admin_vf_promisc_buffer promisc;
|
||||
/*** VF IRQ Map data buffer */
|
||||
struct intelxl_admin_vf_irq_map_buffer irq;
|
||||
/** Alignment padding */
|
||||
uint8_t pad[INTELXL_ALIGN];
|
||||
} __attribute__ (( packed ));
|
||||
@@ -542,15 +351,10 @@ struct intelxl_admin_descriptor {
|
||||
uint16_t len;
|
||||
/** Return value */
|
||||
uint16_t ret;
|
||||
/** Opaque cookie / VF opcode */
|
||||
union {
|
||||
/** Cookie */
|
||||
uint32_t cookie;
|
||||
/** VF opcode */
|
||||
uint32_t vopcode;
|
||||
};
|
||||
/** VF return value */
|
||||
int32_t vret;
|
||||
/** Opaque cookie */
|
||||
uint32_t cookie;
|
||||
/** Reserved */
|
||||
uint8_t reserved[4];
|
||||
/** Parameters */
|
||||
union intelxl_admin_params params;
|
||||
} __attribute__ (( packed ));
|
||||
@@ -611,12 +415,6 @@ intelxl_init_admin ( struct intelxl_admin *admin, unsigned int base,
|
||||
/** Admin queue API major version */
|
||||
#define INTELXL_ADMIN_API_MAJOR 1
|
||||
|
||||
/** Admin queue VF API major version */
|
||||
#define INTELXL_ADMIN_VF_API_MAJOR 1
|
||||
|
||||
/** Admin queue VF API minor version */
|
||||
#define INTELXL_ADMIN_VF_API_MINOR 0
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* Transmit and receive queue context
|
||||
|
||||
Reference in New Issue
Block a user