iPXE
Data Structures | Defines | 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...

Defines

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

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.


Define Documentation

#define VMXNET3_MAX_TX_QUEUES   8

Maximum number of TX queues.

Definition at line 39 of file vmxnet3.h.

#define VMXNET3_MAX_RX_QUEUES   16

Maximum number of RX queues.

Definition at line 42 of file vmxnet3.h.

#define VMXNET3_MAX_INTRS   25

Maximum number of interrupts.

Definition at line 45 of file vmxnet3.h.

#define VMXNET3_MAX_PACKET_LEN   0x4000

Maximum packet size.

Definition at line 48 of file vmxnet3.h.

Referenced by vmxnet3_poll_rx().

"PT" PCI BAR address

Definition at line 51 of file vmxnet3.h.

Referenced by vmxnet3_probe().

#define VMXNET3_PT_LEN   0x1000

"PT" PCI BAR size

Definition at line 54 of file vmxnet3.h.

Referenced by vmxnet3_probe().

#define VMXNET3_PT_IMR   0x0

Interrupt Mask Register.

Definition at line 57 of file vmxnet3.h.

#define VMXNET3_PT_TXPROD   0x600

Transmit producer index.

Definition at line 60 of file vmxnet3.h.

Referenced by vmxnet3_transmit().

#define VMXNET3_PT_RXPROD   0x800

Rx producer index for ring 1.

Definition at line 63 of file vmxnet3.h.

Referenced by vmxnet3_refill_rx().

#define VMXNET3_PT_RXPROD2   0xa00

Rx producer index for ring 2.

Definition at line 66 of file vmxnet3.h.

"VD" PCI BAR address

Definition at line 69 of file vmxnet3.h.

Referenced by vmxnet3_probe().

#define VMXNET3_VD_LEN   0x1000

"VD" PCI BAR size

Definition at line 72 of file vmxnet3.h.

Referenced by vmxnet3_probe().

#define VMXNET3_VD_VRRS   0x0

vmxnet3 Revision Report Selection

Definition at line 75 of file vmxnet3.h.

Referenced by vmxnet3_check_version().

#define VMXNET3_VD_UVRS   0x8

UPT Version Report Selection.

Definition at line 78 of file vmxnet3.h.

Referenced by vmxnet3_check_version().

#define VMXNET3_VD_DSAL   0x10

Driver Shared Address Low.

Definition at line 81 of file vmxnet3.h.

Referenced by vmxnet3_open().

#define VMXNET3_VD_DSAH   0x18

Driver Shared Address High.

Definition at line 84 of file vmxnet3.h.

Referenced by vmxnet3_open().

#define VMXNET3_VD_CMD   0x20

Command.

Definition at line 87 of file vmxnet3.h.

Referenced by vmxnet3_command().

#define VMXNET3_VD_MACL   0x28

MAC Address Low.

Definition at line 90 of file vmxnet3.h.

Referenced by vmxnet3_set_ll_addr().

#define VMXNET3_VD_MACH   0x30

MAC Address High.

Definition at line 93 of file vmxnet3.h.

Referenced by vmxnet3_set_ll_addr().

#define VMXNET3_VD_ICR   0x38

Interrupt Cause Register.

Definition at line 96 of file vmxnet3.h.

#define VMXNET3_VD_ECR   0x40

Event Cause Register.

Definition at line 99 of file vmxnet3.h.

Referenced by vmxnet3_poll_events().

#define VMXNET3_VERSION_MAGIC   0x69505845

Driver version magic.

Definition at line 170 of file vmxnet3.h.

Referenced by vmxnet3_open().

#define VMXNET3_IC_DISABLE_ALL   0x1

Interrupt control - disable all interrupts.

Definition at line 183 of file vmxnet3.h.

Referenced by vmxnet3_open().

#define VMXNET3_SHARED_ALIGN   8

Alignment of driver shared area.

Definition at line 240 of file vmxnet3.h.

#define VMXNET3_SHARED_MAGIC   0xbabefee1

Driver shared area magic.

Definition at line 243 of file vmxnet3.h.

Referenced by vmxnet3_open().

#define VMXNET3_TXF_GEN   0x00004000UL

Transmit generation flag.

Definition at line 254 of file vmxnet3.h.

Referenced by vmxnet3_transmit().

#define VMXNET3_TXF_EOP   0x000001000UL

Transmit end-of-packet flag.

Definition at line 257 of file vmxnet3.h.

Referenced by vmxnet3_transmit().

#define VMXNET3_TXF_CQ   0x000002000UL

Transmit completion request flag.

Definition at line 260 of file vmxnet3.h.

Referenced by vmxnet3_transmit().

#define VMXNET3_TXCF_GEN   0x80000000UL

Transmit completion generation flag.

Definition at line 273 of file vmxnet3.h.

Referenced by vmxnet3_poll_tx().

#define VMXNET3_RXF_GEN   0x80000000UL

Receive generation flag.

Definition at line 325 of file vmxnet3.h.

Referenced by vmxnet3_refill_rx().

#define VMXNET3_RXCF_GEN   0x80000000UL

Receive completion generation flag.

Definition at line 340 of file vmxnet3.h.

Referenced by vmxnet3_poll_rx().

#define VMXNET3_QUEUES_ALIGN   128

Alignment of queue descriptor set.

Definition at line 415 of file vmxnet3.h.

#define VMXNET3_RING_ALIGN   512

Alignment of rings.

Definition at line 418 of file vmxnet3.h.

#define VMXNET3_NUM_TX_DESC   32

Number of TX descriptors.

Definition at line 421 of file vmxnet3.h.

Referenced by vmxnet3_flush_tx(), vmxnet3_open(), vmxnet3_poll_tx(), and vmxnet3_transmit().

#define VMXNET3_NUM_TX_COMP   32

Number of TX completion descriptors.

Definition at line 424 of file vmxnet3.h.

Referenced by vmxnet3_open(), and vmxnet3_poll_tx().

#define VMXNET3_NUM_RX_DESC   32

Number of RX descriptors.

Definition at line 427 of file vmxnet3.h.

Referenced by vmxnet3_flush_rx(), vmxnet3_open(), vmxnet3_poll_rx(), and vmxnet3_refill_rx().

#define VMXNET3_NUM_RX_COMP   32

Number of RX completion descriptors.

Definition at line 430 of file vmxnet3.h.

Referenced by vmxnet3_open(), and vmxnet3_poll_rx().

#define VMXNET3_DMA_ALIGN   512

DMA area alignment.

Definition at line 454 of file vmxnet3.h.

Referenced by vmxnet3_open().

#define VMXNET3_VERSION_SELECT   1

vmxnet3 version that we support

Definition at line 488 of file vmxnet3.h.

Referenced by vmxnet3_check_version(), and vmxnet3_open().

UPT version that we support.

Definition at line 491 of file vmxnet3.h.

Referenced by vmxnet3_check_version(), and vmxnet3_open().

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

MTU size.

Definition at line 494 of file vmxnet3.h.

Referenced by vmxnet3_open(), and vmxnet3_refill_rx().

#define VMXNET3_TX_FILL   ( VMXNET3_NUM_TX_DESC - 1 )

Transmit ring maximum fill level.

Definition at line 497 of file vmxnet3.h.

Referenced by vmxnet3_transmit().

#define VMXNET3_RX_FILL   8

Receive ring maximum fill level.

Definition at line 500 of file vmxnet3.h.

Referenced by vmxnet3_refill_rx().

#define NET_IP_ALIGN   2

Received packet alignment padding.

Definition at line 503 of file vmxnet3.h.

Referenced by atl1e_clean_rx_irq(), and vmxnet3_refill_rx().


Enumeration Type Documentation

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.

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.

                   {
        VMXNET3_ECR_RQERR = 0x00000001,
        VMXNET3_ECR_TQERR = 0x00000002,
        VMXNET3_ECR_LINK = 0x00000004,
        VMXNET3_ECR_DIC = 0x00000008,
        VMXNET3_ECR_DEBUG = 0x00000010,
};

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.

                            {
        VMXNET3_RXM_UCAST       = 0x01,  /**< Unicast only */
        VMXNET3_RXM_MCAST       = 0x02,  /**< Multicast passing the filters */
        VMXNET3_RXM_BCAST       = 0x04,  /**< Broadcast only */
        VMXNET3_RXM_ALL_MULTI   = 0x08,  /**< All multicast */
        VMXNET3_RXM_PROMISC     = 0x10,  /**< Promiscuous */
};

Function Documentation

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL  )