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)
 
 FILE_SECBOOT (PERMITTED)
 
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 16 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 24 of file intelxlvf.h.

◆ INTELXLVF_QTX_TAIL

#define INTELXLVF_QTX_TAIL   0x00000

Transmit Queue Tail Register.

Definition at line 27 of file intelxlvf.h.

◆ INTELXLVF_QRX_TAIL

#define INTELXLVF_QRX_TAIL   0x02000

Receive Queue Tail Register.

Definition at line 30 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 33 of file intelxlvf.h.

◆ INTELXLVF_VFINT_DYN_CTL0

#define INTELXLVF_VFINT_DYN_CTL0   0x5c00

VF Interrupt Zero Dynamic Control Register.

Definition at line 36 of file intelxlvf.h.

◆ INTELXLVF_ADMIN

#define INTELXLVF_ADMIN   0x6000

VF Admin Queue register block.

Definition at line 39 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 42 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 45 of file intelxlvf.h.

◆ INTELXLVF_ADMIN_CMD_LEN

#define INTELXLVF_ADMIN_CMD_LEN   0x0800

Admin Command Queue Length Register (offset)

Definition at line 48 of file intelxlvf.h.

◆ INTELXLVF_ADMIN_CMD_HEAD

#define INTELXLVF_ADMIN_CMD_HEAD   0x0400

Admin Command Queue Head Register (offset)

Definition at line 51 of file intelxlvf.h.

◆ INTELXLVF_ADMIN_CMD_TAIL

#define INTELXLVF_ADMIN_CMD_TAIL   0x2400

Admin Command Queue Tail Register (offset)

Definition at line 54 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 57 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 60 of file intelxlvf.h.

◆ INTELXLVF_ADMIN_EVT_LEN

#define INTELXLVF_ADMIN_EVT_LEN   0x2000

Admin Event Queue Length Register (offset)

Definition at line 63 of file intelxlvf.h.

◆ INTELXLVF_ADMIN_EVT_HEAD

#define INTELXLVF_ADMIN_EVT_HEAD   0x1400

Admin Event Queue Head Register (offset)

Definition at line 66 of file intelxlvf.h.

◆ INTELXLVF_ADMIN_EVT_TAIL

#define INTELXLVF_ADMIN_EVT_TAIL   0x1000

Admin Event Queue Tail Register (offset)

Definition at line 69 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 72 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 75 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 78 of file intelxlvf.h.

◆ INTELXLVF_ADMIN_VERSION

#define INTELXLVF_ADMIN_VERSION   0x00000001

Admin Queue VF Version opcode.

Definition at line 81 of file intelxlvf.h.

◆ INTELXLVF_ADMIN_API_MAJOR

#define INTELXLVF_ADMIN_API_MAJOR   1

Admin queue VF API major version.

Definition at line 92 of file intelxlvf.h.

◆ INTELXLVF_ADMIN_API_MINOR

#define INTELXLVF_ADMIN_API_MINOR   1

Admin queue VF API minor version.

Definition at line 95 of file intelxlvf.h.

◆ INTELXLVF_ADMIN_RESET

#define INTELXLVF_ADMIN_RESET   0x00000002

Admin Queue VF Reset opcode.

Definition at line 98 of file intelxlvf.h.

◆ INTELXLVF_ADMIN_GET_RESOURCES

#define INTELXLVF_ADMIN_GET_RESOURCES   0x00000003

Admin Queue VF Get Resources opcode.

Definition at line 101 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 132 of file intelxlvf.h.

◆ INTELXLVF_ADMIN_CAP_RQPS

#define INTELXLVF_ADMIN_CAP_RQPS   0x00000040

Request Queues capabilities.

Definition at line 135 of file intelxlvf.h.

◆ INTELXLVF_ADMIN_STATUS

#define INTELXLVF_ADMIN_STATUS   0x00000011

Admin Queue VF Status Change Event opcode.

Definition at line 138 of file intelxlvf.h.

◆ INTELXLVF_ADMIN_STATUS_LINK

#define INTELXLVF_ADMIN_STATUS_LINK   0x00000001

Link status change event type.

Definition at line 141 of file intelxlvf.h.

◆ INTELXLVF_ADMIN_CONFIGURE

#define INTELXLVF_ADMIN_CONFIGURE   0x00000006

Admin Queue VF Configure Queues opcode.

Definition at line 167 of file intelxlvf.h.

◆ INTELXLVF_ADMIN_IRQ_MAP

#define INTELXLVF_ADMIN_IRQ_MAP   0x00000007

Admin Queue VF IRQ Map opcode.

Definition at line 223 of file intelxlvf.h.

◆ INTELXLVF_ADMIN_ENABLE

#define INTELXLVF_ADMIN_ENABLE   0x00000008

Admin Queue VF Enable Queues opcode.

Definition at line 251 of file intelxlvf.h.

◆ INTELXLVF_ADMIN_DISABLE

#define INTELXLVF_ADMIN_DISABLE   0x00000009

Admin Queue VF Disable Queues opcode.

Definition at line 254 of file intelxlvf.h.

◆ INTELXLVF_ADMIN_PROMISC

#define INTELXLVF_ADMIN_PROMISC   0x0000000e

Admin Queue VF Configure Promiscuous Mode opcode.

Definition at line 269 of file intelxlvf.h.

◆ INTELXLVF_ADMIN_GET_STATS

#define INTELXLVF_ADMIN_GET_STATS   0x0000000f

Admin Queue VF Get Statistics opcode.

Definition at line 280 of file intelxlvf.h.

◆ INTELXLVF_ADMIN_REQUEST_QPS

#define INTELXLVF_ADMIN_REQUEST_QPS   0x0000001d

Admin Queue VF Request Queues opcode.

Definition at line 307 of file intelxlvf.h.

◆ INTELXLVF_VFGEN_RSTAT

#define INTELXLVF_VFGEN_RSTAT   0x8800

VF Reset Status Register.

Definition at line 396 of file intelxlvf.h.

◆ INTELXLVF_VFGEN_RSTAT_VFR_STATE

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

Definition at line 397 of file intelxlvf.h.

◆ INTELXLVF_VFGEN_RSTAT_VFR_STATE_ACTIVE

#define INTELXLVF_VFGEN_RSTAT_VFR_STATE_ACTIVE   0x2

Definition at line 398 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 401 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 404 of file intelxlvf.h.

Function Documentation

◆ FILE_LICENCE()

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL  )

◆ FILE_SECBOOT()

FILE_SECBOOT ( PERMITTED  )

◆ 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 374 of file intelxlvf.h.

374  {
375  struct intelxl_admin_descriptor *xlcmd =
377 
378  return container_of ( xlcmd, struct intelxlvf_admin_descriptor, xl );
379 }
struct intelxl_admin_descriptor * intelxl_admin_command_descriptor(struct intelxl_nic *intelxl)
Get next admin command queue descriptor.
Definition: intelxl.c:222
#define container_of(ptr, type, field)
Get containing structure.
Definition: stddef.h:36
Admin queue descriptor.
Definition: intelxlvf.h:342
Admin queue descriptor.
Definition: intelxl.h:416

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 388 of file intelxlvf.h.

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

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 415 of file intelxlvf.h.

416  {
417 
418  ring->len = ( count * len );
419  ring->tail = tail;
420 }
size_t len
Length (in bytes)
Definition: intelxl.h:778
ring len
Length.
Definition: dwmac.h:231
static unsigned int count
Number of entries.
Definition: dwmac.h:225
unsigned int tail
Tail register.
Definition: intelxl.h:776

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

Referenced by intelxlvf_probe().