iPXE
Data Structures | Macros | Enumerations | Functions
vmxnet3.h File Reference

VMware vmxnet3 virtual NIC driver. More...

#include <ipxe/pci.h>

Go to the source code of this file.

Data Structures

struct  vmxnet3_misc_config
 Miscellaneous configuration descriptor. More...
 
struct  vmxnet3_interrupt_config
 Interrupt configuration. More...
 
struct  vmxnet3_rx_filter_config
 Receive filter configuration. More...
 
struct  vmxnet3_variable_config
 Variable-length configuration descriptor. More...
 
struct  vmxnet3_shared
 Driver shared area. More...
 
struct  vmxnet3_tx_desc
 Transmit descriptor. More...
 
struct  vmxnet3_tx_comp
 Transmit completion descriptor. More...
 
struct  vmxnet3_tx_queue_control
 Transmit queue control. More...
 
struct  vmxnet3_tx_queue_config
 Transmit queue configuration. More...
 
struct  vmxnet3_tx_stats
 Transmit queue statistics. More...
 
struct  vmxnet3_rx_desc
 Receive descriptor. More...
 
struct  vmxnet3_rx_comp
 Receive completion descriptor. More...
 
struct  vmxnet3_rx_queue_control
 Receive queue control. More...
 
struct  vmxnet3_rx_queue_config
 Receive queue configuration. More...
 
struct  vmxnet3_rx_stats
 Receive queue statistics. More...
 
struct  vmxnet3_queue_status
 Queue status. More...
 
struct  vmxnet3_tx_queue
 Transmit queue descriptor. More...
 
struct  vmxnet3_rx_queue
 Receive queue descriptor. More...
 
struct  vmxnet3_queues
 Queue descriptor set. More...
 
struct  vmxnet3_dma
 DMA areas. More...
 
struct  vmxnet3_counters
 Producer and consumer counters. More...
 
struct  vmxnet3_nic
 A vmxnet3 NIC. More...
 

Macros

#define VMXNET3_MAX_TX_QUEUES   8
 Maximum number of TX queues. More...
 
#define VMXNET3_MAX_RX_QUEUES   16
 Maximum number of RX queues. More...
 
#define VMXNET3_MAX_INTRS   25
 Maximum number of interrupts. More...
 
#define VMXNET3_MAX_PACKET_LEN   0x4000
 Maximum packet size. More...
 
#define VMXNET3_PT_BAR   PCI_BASE_ADDRESS_0
 "PT" PCI BAR address More...
 
#define VMXNET3_PT_LEN   0x1000
 "PT" PCI BAR size More...
 
#define VMXNET3_PT_IMR   0x0
 Interrupt Mask Register. More...
 
#define VMXNET3_PT_TXPROD   0x600
 Transmit producer index. More...
 
#define VMXNET3_PT_RXPROD   0x800
 Rx producer index for ring 1. More...
 
#define VMXNET3_PT_RXPROD2   0xa00
 Rx producer index for ring 2. More...
 
#define VMXNET3_VD_BAR   PCI_BASE_ADDRESS_1
 "VD" PCI BAR address More...
 
#define VMXNET3_VD_LEN   0x1000
 "VD" PCI BAR size More...
 
#define VMXNET3_VD_VRRS   0x0
 vmxnet3 Revision Report Selection More...
 
#define VMXNET3_VD_UVRS   0x8
 UPT Version Report Selection. More...
 
#define VMXNET3_VD_DSAL   0x10
 Driver Shared Address Low. More...
 
#define VMXNET3_VD_DSAH   0x18
 Driver Shared Address High. More...
 
#define VMXNET3_VD_CMD   0x20
 Command. More...
 
#define VMXNET3_VD_MACL   0x28
 MAC Address Low. More...
 
#define VMXNET3_VD_MACH   0x30
 MAC Address High. More...
 
#define VMXNET3_VD_ICR   0x38
 Interrupt Cause Register. More...
 
#define VMXNET3_VD_ECR   0x40
 Event Cause Register. More...
 
#define VMXNET3_VERSION_MAGIC   0x69505845
 Driver version magic. More...
 
#define VMXNET3_IC_DISABLE_ALL   0x1
 Interrupt control - disable all interrupts. More...
 
#define VMXNET3_SHARED_ALIGN   8
 Alignment of driver shared area. More...
 
#define VMXNET3_SHARED_MAGIC   0xbabefee1
 Driver shared area magic. More...
 
#define VMXNET3_TXF_GEN   0x00004000UL
 Transmit generation flag. More...
 
#define VMXNET3_TXF_EOP   0x000001000UL
 Transmit end-of-packet flag. More...
 
#define VMXNET3_TXF_CQ   0x000002000UL
 Transmit completion request flag. More...
 
#define VMXNET3_TXCF_GEN   0x80000000UL
 Transmit completion generation flag. More...
 
#define VMXNET3_RXF_GEN   0x80000000UL
 Receive generation flag. More...
 
#define VMXNET3_RXCF_GEN   0x80000000UL
 Receive completion generation flag. More...
 
#define VMXNET3_QUEUES_ALIGN   128
 Alignment of queue descriptor set. More...
 
#define VMXNET3_RING_ALIGN   512
 Alignment of rings. More...
 
#define VMXNET3_NUM_TX_DESC   32
 Number of TX descriptors. More...
 
#define VMXNET3_NUM_TX_COMP   32
 Number of TX completion descriptors. More...
 
#define VMXNET3_NUM_RX_DESC   32
 Number of RX descriptors. More...
 
#define VMXNET3_NUM_RX_COMP   32
 Number of RX completion descriptors. More...
 
#define VMXNET3_DMA_ALIGN   512
 DMA area alignment. More...
 
#define VMXNET3_VERSION_SELECT   1
 vmxnet3 version that we support More...
 
#define VMXNET3_UPT_VERSION_SELECT   1
 UPT version that we support. More...
 
#define VMXNET3_MTU   ( ETH_FRAME_LEN + 4 /* VLAN */ + 4 /* FCS */ )
 MTU size. More...
 
#define VMXNET3_TX_FILL   ( VMXNET3_NUM_TX_DESC - 1 )
 Transmit ring maximum fill level. More...
 
#define VMXNET3_RX_FILL   8
 Receive ring maximum fill level. More...
 
#define NET_IP_ALIGN   2
 Received packet alignment padding. More...
 

Enumerations

enum  vmxnet3_command {
  VMXNET3_CMD_FIRST_SET = 0xcafe0000, VMXNET3_CMD_ACTIVATE_DEV = VMXNET3_CMD_FIRST_SET, VMXNET3_CMD_QUIESCE_DEV, VMXNET3_CMD_RESET_DEV,
  VMXNET3_CMD_UPDATE_RX_MODE, VMXNET3_CMD_UPDATE_MAC_FILTERS, VMXNET3_CMD_UPDATE_VLAN_FILTERS, VMXNET3_CMD_UPDATE_RSSIDT,
  VMXNET3_CMD_UPDATE_IML, VMXNET3_CMD_UPDATE_PMCFG, VMXNET3_CMD_UPDATE_FEATURE, VMXNET3_CMD_LOAD_PLUGIN,
  VMXNET3_CMD_FIRST_GET = 0xf00d0000, VMXNET3_CMD_GET_QUEUE_STATUS = VMXNET3_CMD_FIRST_GET, VMXNET3_CMD_GET_STATS, VMXNET3_CMD_GET_LINK,
  VMXNET3_CMD_GET_PERM_MAC_LO, VMXNET3_CMD_GET_PERM_MAC_HI, VMXNET3_CMD_GET_DID_LO, VMXNET3_CMD_GET_DID_HI,
  VMXNET3_CMD_GET_DEV_EXTRA_INFO, VMXNET3_CMD_GET_CONF_INTR
}
 Commands. More...
 
enum  vmxnet3_event {
  VMXNET3_ECR_RQERR = 0x00000001, VMXNET3_ECR_TQERR = 0x00000002, VMXNET3_ECR_LINK = 0x00000004, VMXNET3_ECR_DIC = 0x00000008,
  VMXNET3_ECR_DEBUG = 0x00000010
}
 Events. More...
 
enum  vmxnet3_rx_filter_mode {
  VMXNET3_RXM_UCAST = 0x01, VMXNET3_RXM_MCAST = 0x02, VMXNET3_RXM_BCAST = 0x04, VMXNET3_RXM_ALL_MULTI = 0x08,
  VMXNET3_RXM_PROMISC = 0x10
}
 Receive filter mode. More...
 

Functions

 FILE_LICENCE (GPL2_OR_LATER_OR_UBDL)
 

Detailed Description

VMware vmxnet3 virtual NIC driver.

Definition in file vmxnet3.h.

Macro Definition Documentation

◆ VMXNET3_MAX_TX_QUEUES

#define VMXNET3_MAX_TX_QUEUES   8

Maximum number of TX queues.

Definition at line 39 of file vmxnet3.h.

◆ VMXNET3_MAX_RX_QUEUES

#define VMXNET3_MAX_RX_QUEUES   16

Maximum number of RX queues.

Definition at line 42 of file vmxnet3.h.

◆ VMXNET3_MAX_INTRS

#define VMXNET3_MAX_INTRS   25

Maximum number of interrupts.

Definition at line 45 of file vmxnet3.h.

◆ VMXNET3_MAX_PACKET_LEN

#define VMXNET3_MAX_PACKET_LEN   0x4000

Maximum packet size.

Definition at line 48 of file vmxnet3.h.

◆ VMXNET3_PT_BAR

#define VMXNET3_PT_BAR   PCI_BASE_ADDRESS_0

"PT" PCI BAR address

Definition at line 51 of file vmxnet3.h.

◆ VMXNET3_PT_LEN

#define VMXNET3_PT_LEN   0x1000

"PT" PCI BAR size

Definition at line 54 of file vmxnet3.h.

◆ VMXNET3_PT_IMR

#define VMXNET3_PT_IMR   0x0

Interrupt Mask Register.

Definition at line 57 of file vmxnet3.h.

◆ VMXNET3_PT_TXPROD

#define VMXNET3_PT_TXPROD   0x600

Transmit producer index.

Definition at line 60 of file vmxnet3.h.

◆ VMXNET3_PT_RXPROD

#define VMXNET3_PT_RXPROD   0x800

Rx producer index for ring 1.

Definition at line 63 of file vmxnet3.h.

◆ VMXNET3_PT_RXPROD2

#define VMXNET3_PT_RXPROD2   0xa00

Rx producer index for ring 2.

Definition at line 66 of file vmxnet3.h.

◆ VMXNET3_VD_BAR

#define VMXNET3_VD_BAR   PCI_BASE_ADDRESS_1

"VD" PCI BAR address

Definition at line 69 of file vmxnet3.h.

◆ VMXNET3_VD_LEN

#define VMXNET3_VD_LEN   0x1000

"VD" PCI BAR size

Definition at line 72 of file vmxnet3.h.

◆ VMXNET3_VD_VRRS

#define VMXNET3_VD_VRRS   0x0

vmxnet3 Revision Report Selection

Definition at line 75 of file vmxnet3.h.

◆ VMXNET3_VD_UVRS

#define VMXNET3_VD_UVRS   0x8

UPT Version Report Selection.

Definition at line 78 of file vmxnet3.h.

◆ VMXNET3_VD_DSAL

#define VMXNET3_VD_DSAL   0x10

Driver Shared Address Low.

Definition at line 81 of file vmxnet3.h.

◆ VMXNET3_VD_DSAH

#define VMXNET3_VD_DSAH   0x18

Driver Shared Address High.

Definition at line 84 of file vmxnet3.h.

◆ VMXNET3_VD_CMD

#define VMXNET3_VD_CMD   0x20

Command.

Definition at line 87 of file vmxnet3.h.

◆ VMXNET3_VD_MACL

#define VMXNET3_VD_MACL   0x28

MAC Address Low.

Definition at line 90 of file vmxnet3.h.

◆ VMXNET3_VD_MACH

#define VMXNET3_VD_MACH   0x30

MAC Address High.

Definition at line 93 of file vmxnet3.h.

◆ VMXNET3_VD_ICR

#define VMXNET3_VD_ICR   0x38

Interrupt Cause Register.

Definition at line 96 of file vmxnet3.h.

◆ VMXNET3_VD_ECR

#define VMXNET3_VD_ECR   0x40

Event Cause Register.

Definition at line 99 of file vmxnet3.h.

◆ VMXNET3_VERSION_MAGIC

#define VMXNET3_VERSION_MAGIC   0x69505845

Driver version magic.

Definition at line 170 of file vmxnet3.h.

◆ VMXNET3_IC_DISABLE_ALL

#define VMXNET3_IC_DISABLE_ALL   0x1

Interrupt control - disable all interrupts.

Definition at line 183 of file vmxnet3.h.

◆ VMXNET3_SHARED_ALIGN

#define VMXNET3_SHARED_ALIGN   8

Alignment of driver shared area.

Definition at line 240 of file vmxnet3.h.

◆ VMXNET3_SHARED_MAGIC

#define VMXNET3_SHARED_MAGIC   0xbabefee1

Driver shared area magic.

Definition at line 243 of file vmxnet3.h.

◆ VMXNET3_TXF_GEN

#define VMXNET3_TXF_GEN   0x00004000UL

Transmit generation flag.

Definition at line 254 of file vmxnet3.h.

◆ VMXNET3_TXF_EOP

#define VMXNET3_TXF_EOP   0x000001000UL

Transmit end-of-packet flag.

Definition at line 257 of file vmxnet3.h.

◆ VMXNET3_TXF_CQ

#define VMXNET3_TXF_CQ   0x000002000UL

Transmit completion request flag.

Definition at line 260 of file vmxnet3.h.

◆ VMXNET3_TXCF_GEN

#define VMXNET3_TXCF_GEN   0x80000000UL

Transmit completion generation flag.

Definition at line 273 of file vmxnet3.h.

◆ VMXNET3_RXF_GEN

#define VMXNET3_RXF_GEN   0x80000000UL

Receive generation flag.

Definition at line 325 of file vmxnet3.h.

◆ VMXNET3_RXCF_GEN

#define VMXNET3_RXCF_GEN   0x80000000UL

Receive completion generation flag.

Definition at line 340 of file vmxnet3.h.

◆ VMXNET3_QUEUES_ALIGN

#define VMXNET3_QUEUES_ALIGN   128

Alignment of queue descriptor set.

Definition at line 415 of file vmxnet3.h.

◆ VMXNET3_RING_ALIGN

#define VMXNET3_RING_ALIGN   512

Alignment of rings.

Definition at line 418 of file vmxnet3.h.

◆ VMXNET3_NUM_TX_DESC

#define VMXNET3_NUM_TX_DESC   32

Number of TX descriptors.

Definition at line 421 of file vmxnet3.h.

◆ VMXNET3_NUM_TX_COMP

#define VMXNET3_NUM_TX_COMP   32

Number of TX completion descriptors.

Definition at line 424 of file vmxnet3.h.

◆ VMXNET3_NUM_RX_DESC

#define VMXNET3_NUM_RX_DESC   32

Number of RX descriptors.

Definition at line 427 of file vmxnet3.h.

◆ VMXNET3_NUM_RX_COMP

#define VMXNET3_NUM_RX_COMP   32

Number of RX completion descriptors.

Definition at line 430 of file vmxnet3.h.

◆ VMXNET3_DMA_ALIGN

#define VMXNET3_DMA_ALIGN   512

DMA area alignment.

Definition at line 454 of file vmxnet3.h.

◆ VMXNET3_VERSION_SELECT

#define VMXNET3_VERSION_SELECT   1

vmxnet3 version that we support

Definition at line 488 of file vmxnet3.h.

◆ VMXNET3_UPT_VERSION_SELECT

#define VMXNET3_UPT_VERSION_SELECT   1

UPT version that we support.

Definition at line 491 of file vmxnet3.h.

◆ VMXNET3_MTU

#define VMXNET3_MTU   ( ETH_FRAME_LEN + 4 /* VLAN */ + 4 /* FCS */ )

MTU size.

Definition at line 494 of file vmxnet3.h.

◆ VMXNET3_TX_FILL

#define VMXNET3_TX_FILL   ( VMXNET3_NUM_TX_DESC - 1 )

Transmit ring maximum fill level.

Definition at line 497 of file vmxnet3.h.

◆ VMXNET3_RX_FILL

#define VMXNET3_RX_FILL   8

Receive ring maximum fill level.

Definition at line 500 of file vmxnet3.h.

◆ NET_IP_ALIGN

#define NET_IP_ALIGN   2

Received packet alignment padding.

Definition at line 503 of file vmxnet3.h.

Enumeration Type Documentation

◆ vmxnet3_command

Commands.

Enumerator
VMXNET3_CMD_FIRST_SET 
VMXNET3_CMD_ACTIVATE_DEV 
VMXNET3_CMD_QUIESCE_DEV 
VMXNET3_CMD_RESET_DEV 
VMXNET3_CMD_UPDATE_RX_MODE 
VMXNET3_CMD_UPDATE_MAC_FILTERS 
VMXNET3_CMD_UPDATE_VLAN_FILTERS 
VMXNET3_CMD_UPDATE_RSSIDT 
VMXNET3_CMD_UPDATE_IML 
VMXNET3_CMD_UPDATE_PMCFG 
VMXNET3_CMD_UPDATE_FEATURE 
VMXNET3_CMD_LOAD_PLUGIN 
VMXNET3_CMD_FIRST_GET 
VMXNET3_CMD_GET_QUEUE_STATUS 
VMXNET3_CMD_GET_STATS 
VMXNET3_CMD_GET_LINK 
VMXNET3_CMD_GET_PERM_MAC_LO 
VMXNET3_CMD_GET_PERM_MAC_HI 
VMXNET3_CMD_GET_DID_LO 
VMXNET3_CMD_GET_DID_HI 
VMXNET3_CMD_GET_DEV_EXTRA_INFO 
VMXNET3_CMD_GET_CONF_INTR 

Definition at line 102 of file vmxnet3.h.

102  {
103  VMXNET3_CMD_FIRST_SET = 0xcafe0000,
115 
116  VMXNET3_CMD_FIRST_GET = 0xf00d0000,
126 };

◆ vmxnet3_event

Events.

Enumerator
VMXNET3_ECR_RQERR 
VMXNET3_ECR_TQERR 
VMXNET3_ECR_LINK 
VMXNET3_ECR_DIC 
VMXNET3_ECR_DEBUG 

Definition at line 129 of file vmxnet3.h.

129  {
130  VMXNET3_ECR_RQERR = 0x00000001,
131  VMXNET3_ECR_TQERR = 0x00000002,
132  VMXNET3_ECR_LINK = 0x00000004,
133  VMXNET3_ECR_DIC = 0x00000008,
134  VMXNET3_ECR_DEBUG = 0x00000010,
135 };

◆ vmxnet3_rx_filter_mode

Receive filter mode.

Enumerator
VMXNET3_RXM_UCAST 

Unicast only.

VMXNET3_RXM_MCAST 

Multicast passing the filters.

VMXNET3_RXM_BCAST 

Broadcast only.

VMXNET3_RXM_ALL_MULTI 

All multicast.

VMXNET3_RXM_PROMISC 

Promiscuous.

Definition at line 200 of file vmxnet3.h.

200  {
201  VMXNET3_RXM_UCAST = 0x01, /**< Unicast only */
202  VMXNET3_RXM_MCAST = 0x02, /**< Multicast passing the filters */
203  VMXNET3_RXM_BCAST = 0x04, /**< Broadcast only */
204  VMXNET3_RXM_ALL_MULTI = 0x08, /**< All multicast */
205  VMXNET3_RXM_PROMISC = 0x10, /**< Promiscuous */
206 };
Broadcast only.
Definition: vmxnet3.h:203
Unicast only.
Definition: vmxnet3.h:201
All multicast.
Definition: vmxnet3.h:204
Promiscuous.
Definition: vmxnet3.h:205
Multicast passing the filters.
Definition: vmxnet3.h:202

Function Documentation

◆ FILE_LICENCE()

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL  )