iPXE
Data Structures | Macros | Functions
intelxlvf.h File Reference

Intel 40 Gigabit Ethernet virtual function network card driver. More...

#include "intelxl.h"

Go to the source code of this file.

Data Structures

struct  intelxlvf_admin_version_buffer
 Admin Queue VF Version data buffer. More...
 
struct  intelxlvf_admin_capabilities_buffer
 Admin Queue VF Capabilities data buffer. More...
 
struct  intelxlvf_admin_get_resources_buffer
 Admin Queue VF Get Resources data buffer. More...
 
struct  intelxlvf_admin_status_link
 Link status change event data. More...
 
struct  intelxlvf_admin_status_buffer
 Admin Queue VF Status Change Event data buffer. More...
 
struct  intelxlvf_admin_configure_buffer
 Admin Queue VF Configure Queues data buffer. More...
 
struct  intelxlvf_admin_irq_map_buffer
 Admin Queue VF IRQ Map data buffer. More...
 
struct  intelxlvf_admin_queues_buffer
 Admin Queue VF Enable/Disable Queues data buffer. More...
 
struct  intelxlvf_admin_promisc_buffer
 Admin Queue VF Configure Promiscuous Mode data buffer. More...
 
struct  intelxlvf_admin_stats
 VF statistics. More...
 
struct  intelxlvf_admin_stats_buffer
 Admin Queue VF Get Statistics data buffer. More...
 
struct  intelxlvf_admin_request_qps_buffer
 Admin Queue VF Request Queues data buffer. More...
 
union  intelxlvf_admin_buffer
 Admin queue data buffer. More...
 
struct  intelxlvf_admin_descriptor
 Admin queue descriptor. More...
 

Macros

#define INTELXLVF_BAR_SIZE   0x10000
 BAR size. More...
 
#define INTELXLVF_MSIX_VECTOR   1
 MSI-X vector. More...
 
#define INTELXLVF_QTX_TAIL   0x00000
 Transmit Queue Tail Register. More...
 
#define INTELXLVF_QRX_TAIL   0x02000
 Receive Queue Tail Register. More...
 
#define INTELXLVF_VFINT_DYN_CTLN(x)   ( 0x3800 + ( 0x4 * ( (x) - 1 ) ) )
 VF Interrupt N Dynamic Control Register. More...
 
#define INTELXLVF_VFINT_DYN_CTL0   0x5c00
 VF Interrupt Zero Dynamic Control Register. More...
 
#define INTELXLVF_ADMIN   0x6000
 VF Admin Queue register block. More...
 
#define INTELXLVF_ADMIN_CMD_BAL   0x1c00
 Admin Command Queue Base Address Low Register (offset) More...
 
#define INTELXLVF_ADMIN_CMD_BAH   0x1800
 Admin Command Queue Base Address High Register (offset) More...
 
#define INTELXLVF_ADMIN_CMD_LEN   0x0800
 Admin Command Queue Length Register (offset) More...
 
#define INTELXLVF_ADMIN_CMD_HEAD   0x0400
 Admin Command Queue Head Register (offset) More...
 
#define INTELXLVF_ADMIN_CMD_TAIL   0x2400
 Admin Command Queue Tail Register (offset) More...
 
#define INTELXLVF_ADMIN_EVT_BAL   0x0c00
 Admin Event Queue Base Address Low Register (offset) More...
 
#define INTELXLVF_ADMIN_EVT_BAH   0x0000
 Admin Event Queue Base Address High Register (offset) More...
 
#define INTELXLVF_ADMIN_EVT_LEN   0x2000
 Admin Event Queue Length Register (offset) More...
 
#define INTELXLVF_ADMIN_EVT_HEAD   0x1400
 Admin Event Queue Head Register (offset) More...
 
#define INTELXLVF_ADMIN_EVT_TAIL   0x1000
 Admin Event Queue Tail Register (offset) More...
 
#define INTELXLVF_ADMIN_MAX_WAIT_MS   2000
 Maximum time to wait for a VF admin request to complete. More...
 
#define INTELXLVF_ADMIN_SEND_TO_PF   0x0801
 Admin queue Send Message to PF command. More...
 
#define INTELXLVF_ADMIN_SEND_TO_VF   0x0802
 Admin queue Send Message to VF command. More...
 
#define INTELXLVF_ADMIN_VERSION   0x00000001
 Admin Queue VF Version opcode. More...
 
#define INTELXLVF_ADMIN_API_MAJOR   1
 Admin queue VF API major version. More...
 
#define INTELXLVF_ADMIN_API_MINOR   1
 Admin queue VF API minor version. More...
 
#define INTELXLVF_ADMIN_RESET   0x00000002
 Admin Queue VF Reset opcode. More...
 
#define INTELXLVF_ADMIN_GET_RESOURCES   0x00000003
 Admin Queue VF Get Resources opcode. More...
 
#define INTELXLVF_ADMIN_CAP_L2   0x00000001
 Layer 2 capabilities (add/remove MAC, configure promiscuous mode) More...
 
#define INTELXLVF_ADMIN_CAP_RQPS   0x00000040
 Request Queues capabilities. More...
 
#define INTELXLVF_ADMIN_STATUS   0x00000011
 Admin Queue VF Status Change Event opcode. More...
 
#define INTELXLVF_ADMIN_STATUS_LINK   0x00000001
 Link status change event type. More...
 
#define INTELXLVF_ADMIN_CONFIGURE   0x00000006
 Admin Queue VF Configure Queues opcode. More...
 
#define INTELXLVF_ADMIN_IRQ_MAP   0x00000007
 Admin Queue VF IRQ Map opcode. More...
 
#define INTELXLVF_ADMIN_ENABLE   0x00000008
 Admin Queue VF Enable Queues opcode. More...
 
#define INTELXLVF_ADMIN_DISABLE   0x00000009
 Admin Queue VF Disable Queues opcode. More...
 
#define INTELXLVF_ADMIN_PROMISC   0x0000000e
 Admin Queue VF Configure Promiscuous Mode opcode. More...
 
#define INTELXLVF_ADMIN_GET_STATS   0x0000000f
 Admin Queue VF Get Statistics opcode. More...
 
#define INTELXLVF_ADMIN_REQUEST_QPS   0x0000001d
 Admin Queue VF Request Queues opcode. More...
 
#define INTELXLVF_VFGEN_RSTAT   0x8800
 VF Reset Status Register. More...
 
#define INTELXLVF_VFGEN_RSTAT_VFR_STATE(x)   ( (x) & 0x3 )
 
#define INTELXLVF_VFGEN_RSTAT_VFR_STATE_ACTIVE   0x2
 
#define INTELXLVF_RESET_DELAY_MS   100
 Minimum time to wait for reset to complete. More...
 
#define INTELXLVF_RESET_MAX_WAIT_MS   1000
 Maximum time to wait for reset to complete. More...
 

Functions

 FILE_LICENCE (GPL2_OR_LATER_OR_UBDL)
 
struct intelxlvf_admin_descriptorintelxlvf_admin_command_descriptor (struct intelxl_nic *intelxl)
 Get next admin command queue descriptor. More...
 
static union intelxlvf_admin_bufferintelxlvf_admin_command_buffer (struct intelxl_nic *intelxl)
 Get next admin command queue data buffer. More...
 
static void intelxlvf_init_ring (struct intelxl_ring *ring, unsigned int count, size_t len, unsigned int tail)
 Initialise descriptor ring. More...
 

Detailed Description

Intel 40 Gigabit Ethernet virtual function network card driver.

Definition in file intelxlvf.h.

Macro Definition Documentation

◆ INTELXLVF_BAR_SIZE

#define INTELXLVF_BAR_SIZE   0x10000

BAR size.

Definition at line 15 of file intelxlvf.h.

◆ INTELXLVF_MSIX_VECTOR

#define INTELXLVF_MSIX_VECTOR   1

MSI-X vector.

The 100 Gigabit physical function driver requires a virtual function driver to request that transmit and receive queues are mapped to MSI-X vector 1 or higher.

Definition at line 23 of file intelxlvf.h.

◆ INTELXLVF_QTX_TAIL

#define INTELXLVF_QTX_TAIL   0x00000

Transmit Queue Tail Register.

Definition at line 26 of file intelxlvf.h.

◆ INTELXLVF_QRX_TAIL

#define INTELXLVF_QRX_TAIL   0x02000

Receive Queue Tail Register.

Definition at line 29 of file intelxlvf.h.

◆ INTELXLVF_VFINT_DYN_CTLN

#define INTELXLVF_VFINT_DYN_CTLN (   x)    ( 0x3800 + ( 0x4 * ( (x) - 1 ) ) )

VF Interrupt N Dynamic Control Register.

Definition at line 32 of file intelxlvf.h.

◆ INTELXLVF_VFINT_DYN_CTL0

#define INTELXLVF_VFINT_DYN_CTL0   0x5c00

VF Interrupt Zero Dynamic Control Register.

Definition at line 35 of file intelxlvf.h.

◆ INTELXLVF_ADMIN

#define INTELXLVF_ADMIN   0x6000

VF Admin Queue register block.

Definition at line 38 of file intelxlvf.h.

◆ INTELXLVF_ADMIN_CMD_BAL

#define INTELXLVF_ADMIN_CMD_BAL   0x1c00

Admin Command Queue Base Address Low Register (offset)

Definition at line 41 of file intelxlvf.h.

◆ INTELXLVF_ADMIN_CMD_BAH

#define INTELXLVF_ADMIN_CMD_BAH   0x1800

Admin Command Queue Base Address High Register (offset)

Definition at line 44 of file intelxlvf.h.

◆ INTELXLVF_ADMIN_CMD_LEN

#define INTELXLVF_ADMIN_CMD_LEN   0x0800

Admin Command Queue Length Register (offset)

Definition at line 47 of file intelxlvf.h.

◆ INTELXLVF_ADMIN_CMD_HEAD

#define INTELXLVF_ADMIN_CMD_HEAD   0x0400

Admin Command Queue Head Register (offset)

Definition at line 50 of file intelxlvf.h.

◆ INTELXLVF_ADMIN_CMD_TAIL

#define INTELXLVF_ADMIN_CMD_TAIL   0x2400

Admin Command Queue Tail Register (offset)

Definition at line 53 of file intelxlvf.h.

◆ INTELXLVF_ADMIN_EVT_BAL

#define INTELXLVF_ADMIN_EVT_BAL   0x0c00

Admin Event Queue Base Address Low Register (offset)

Definition at line 56 of file intelxlvf.h.

◆ INTELXLVF_ADMIN_EVT_BAH

#define INTELXLVF_ADMIN_EVT_BAH   0x0000

Admin Event Queue Base Address High Register (offset)

Definition at line 59 of file intelxlvf.h.

◆ INTELXLVF_ADMIN_EVT_LEN

#define INTELXLVF_ADMIN_EVT_LEN   0x2000

Admin Event Queue Length Register (offset)

Definition at line 62 of file intelxlvf.h.

◆ INTELXLVF_ADMIN_EVT_HEAD

#define INTELXLVF_ADMIN_EVT_HEAD   0x1400

Admin Event Queue Head Register (offset)

Definition at line 65 of file intelxlvf.h.

◆ INTELXLVF_ADMIN_EVT_TAIL

#define INTELXLVF_ADMIN_EVT_TAIL   0x1000

Admin Event Queue Tail Register (offset)

Definition at line 68 of file intelxlvf.h.

◆ INTELXLVF_ADMIN_MAX_WAIT_MS

#define INTELXLVF_ADMIN_MAX_WAIT_MS   2000

Maximum time to wait for a VF admin request to complete.

Definition at line 71 of file intelxlvf.h.

◆ INTELXLVF_ADMIN_SEND_TO_PF

#define INTELXLVF_ADMIN_SEND_TO_PF   0x0801

Admin queue Send Message to PF command.

Definition at line 74 of file intelxlvf.h.

◆ INTELXLVF_ADMIN_SEND_TO_VF

#define INTELXLVF_ADMIN_SEND_TO_VF   0x0802

Admin queue Send Message to VF command.

Definition at line 77 of file intelxlvf.h.

◆ INTELXLVF_ADMIN_VERSION

#define INTELXLVF_ADMIN_VERSION   0x00000001

Admin Queue VF Version opcode.

Definition at line 80 of file intelxlvf.h.

◆ INTELXLVF_ADMIN_API_MAJOR

#define INTELXLVF_ADMIN_API_MAJOR   1

Admin queue VF API major version.

Definition at line 91 of file intelxlvf.h.

◆ INTELXLVF_ADMIN_API_MINOR

#define INTELXLVF_ADMIN_API_MINOR   1

Admin queue VF API minor version.

Definition at line 94 of file intelxlvf.h.

◆ INTELXLVF_ADMIN_RESET

#define INTELXLVF_ADMIN_RESET   0x00000002

Admin Queue VF Reset opcode.

Definition at line 97 of file intelxlvf.h.

◆ INTELXLVF_ADMIN_GET_RESOURCES

#define INTELXLVF_ADMIN_GET_RESOURCES   0x00000003

Admin Queue VF Get Resources opcode.

Definition at line 100 of file intelxlvf.h.

◆ INTELXLVF_ADMIN_CAP_L2

#define INTELXLVF_ADMIN_CAP_L2   0x00000001

Layer 2 capabilities (add/remove MAC, configure promiscuous mode)

Definition at line 131 of file intelxlvf.h.

◆ INTELXLVF_ADMIN_CAP_RQPS

#define INTELXLVF_ADMIN_CAP_RQPS   0x00000040

Request Queues capabilities.

Definition at line 134 of file intelxlvf.h.

◆ INTELXLVF_ADMIN_STATUS

#define INTELXLVF_ADMIN_STATUS   0x00000011

Admin Queue VF Status Change Event opcode.

Definition at line 137 of file intelxlvf.h.

◆ INTELXLVF_ADMIN_STATUS_LINK

#define INTELXLVF_ADMIN_STATUS_LINK   0x00000001

Link status change event type.

Definition at line 140 of file intelxlvf.h.

◆ INTELXLVF_ADMIN_CONFIGURE

#define INTELXLVF_ADMIN_CONFIGURE   0x00000006

Admin Queue VF Configure Queues opcode.

Definition at line 166 of file intelxlvf.h.

◆ INTELXLVF_ADMIN_IRQ_MAP

#define INTELXLVF_ADMIN_IRQ_MAP   0x00000007

Admin Queue VF IRQ Map opcode.

Definition at line 222 of file intelxlvf.h.

◆ INTELXLVF_ADMIN_ENABLE

#define INTELXLVF_ADMIN_ENABLE   0x00000008

Admin Queue VF Enable Queues opcode.

Definition at line 250 of file intelxlvf.h.

◆ INTELXLVF_ADMIN_DISABLE

#define INTELXLVF_ADMIN_DISABLE   0x00000009

Admin Queue VF Disable Queues opcode.

Definition at line 253 of file intelxlvf.h.

◆ INTELXLVF_ADMIN_PROMISC

#define INTELXLVF_ADMIN_PROMISC   0x0000000e

Admin Queue VF Configure Promiscuous Mode opcode.

Definition at line 268 of file intelxlvf.h.

◆ INTELXLVF_ADMIN_GET_STATS

#define INTELXLVF_ADMIN_GET_STATS   0x0000000f

Admin Queue VF Get Statistics opcode.

Definition at line 279 of file intelxlvf.h.

◆ INTELXLVF_ADMIN_REQUEST_QPS

#define INTELXLVF_ADMIN_REQUEST_QPS   0x0000001d

Admin Queue VF Request Queues opcode.

Definition at line 306 of file intelxlvf.h.

◆ INTELXLVF_VFGEN_RSTAT

#define INTELXLVF_VFGEN_RSTAT   0x8800

VF Reset Status Register.

Definition at line 395 of file intelxlvf.h.

◆ INTELXLVF_VFGEN_RSTAT_VFR_STATE

#define INTELXLVF_VFGEN_RSTAT_VFR_STATE (   x)    ( (x) & 0x3 )

Definition at line 396 of file intelxlvf.h.

◆ INTELXLVF_VFGEN_RSTAT_VFR_STATE_ACTIVE

#define INTELXLVF_VFGEN_RSTAT_VFR_STATE_ACTIVE   0x2

Definition at line 397 of file intelxlvf.h.

◆ INTELXLVF_RESET_DELAY_MS

#define INTELXLVF_RESET_DELAY_MS   100

Minimum time to wait for reset to complete.

Definition at line 400 of file intelxlvf.h.

◆ INTELXLVF_RESET_MAX_WAIT_MS

#define INTELXLVF_RESET_MAX_WAIT_MS   1000

Maximum time to wait for reset to complete.

Definition at line 403 of file intelxlvf.h.

Function Documentation

◆ FILE_LICENCE()

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL  )

◆ intelxlvf_admin_command_descriptor()

struct intelxlvf_admin_descriptor* intelxlvf_admin_command_descriptor ( struct intelxl_nic intelxl)

Get next admin command queue descriptor.

Parameters
intelxlIntel device
Return values
cmdCommand descriptor

Definition at line 373 of file intelxlvf.h.

373  {
374  struct intelxl_admin_descriptor *xlcmd =
376 
377  return container_of ( xlcmd, struct intelxlvf_admin_descriptor, xl );
378 }
struct intelxl_admin_descriptor * intelxl_admin_command_descriptor(struct intelxl_nic *intelxl)
Get next admin command queue descriptor.
Definition: intelxl.c:239
#define container_of(ptr, type, field)
Get containing structure.
Definition: stddef.h:35
Admin queue descriptor.
Definition: intelxlvf.h:341
Admin queue descriptor.
Definition: intelxl.h:415

References container_of, and intelxl_admin_command_descriptor().

Referenced by intelxlvf_admin_configure(), intelxlvf_admin_get_resources(), intelxlvf_admin_irq_map(), intelxlvf_admin_promisc(), intelxlvf_admin_queues(), intelxlvf_admin_request_qps(), intelxlvf_admin_stats(), intelxlvf_admin_version(), and intelxlvf_reset_admin().

◆ intelxlvf_admin_command_buffer()

static union intelxlvf_admin_buffer* intelxlvf_admin_command_buffer ( struct intelxl_nic intelxl)
static

Get next admin command queue data buffer.

Parameters
intelxlIntel device
Return values
bufData buffer

Definition at line 387 of file intelxlvf.h.

387  {
388  union intelxl_admin_buffer *xlbuf =
389  intelxl_admin_command_buffer ( intelxl );
390 
391  return container_of ( xlbuf, union intelxlvf_admin_buffer, xl );
392 }
Admin queue data buffer.
Definition: intelxlvf.h:315
union intelxl_admin_buffer * intelxl_admin_command_buffer(struct intelxl_nic *intelxl)
Get next admin command queue data buffer.
Definition: intelxl.c:256
#define container_of(ptr, type, field)
Get containing structure.
Definition: stddef.h:35
Admin queue data buffer.
Definition: intelxl.h:401

References container_of, and intelxl_admin_command_buffer().

Referenced by intelxlvf_admin_configure(), intelxlvf_admin_get_resources(), intelxlvf_admin_irq_map(), intelxlvf_admin_promisc(), intelxlvf_admin_queues(), intelxlvf_admin_request_qps(), intelxlvf_admin_stats(), and intelxlvf_admin_version().

◆ intelxlvf_init_ring()

static void intelxlvf_init_ring ( struct intelxl_ring ring,
unsigned int  count,
size_t  len,
unsigned int  tail 
)
inlinestatic

Initialise descriptor ring.

Parameters
ringDescriptor ring
countNumber of descriptors
lenLength of a single descriptor
tailTail register offset

Definition at line 414 of file intelxlvf.h.

415  {
416 
417  ring->len = ( count * len );
418  ring->tail = tail;
419 }
size_t len
Length (in bytes)
Definition: intelxl.h:777
uint32_t len
Length.
Definition: ena.h:14
uint16_t count
Number of entries.
Definition: ena.h:22
unsigned int tail
Tail register.
Definition: intelxl.h:775

References count, len, intelxl_ring::len, and intelxl_ring::tail.

Referenced by intelxlvf_probe().