FD.io VPP  v21.01.1
Vector Packet Processing
vmxnet3.h File Reference
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  vmxnet3_rx_ring
 
struct  vmxnet3_rx_comp_ring
 
struct  vmxnet3_rxq_t
 
struct  vmxnet3_tx_ring
 
struct  vmxnet3_tx_comp_ring
 
struct  vmxnet3_txq_t
 
struct  vmxnet3_device_t
 
struct  vmxnet3_main_t
 
struct  vmxnet3_create_if_args_t
 
struct  vmxnet3_input_trace_t
 

Macros

#define foreach_vmxnet3_tx_func_error
 
#define foreach_vmxnet3_rxmode_flags
 
#define foreach_vmxnet3_show_entry
 
#define foreach_vmxnet3_feature_flags
 
#define foreach_vmxnet3_rss_hash_type
 
#define VMXNET3_RSS_HASH_FUNC_TOEPLITZ   1
 
#define VMXNET3_RSS_MAX_KEY_SZ   40
 
#define VMXNET3_RSS_MAX_IND_TABLE_SZ   128
 
#define VMXNET3_TXQ_MAX   8
 
#define VMXNET3_RXQ_MAX   16
 
#define VMXNET3_TX_START(vd)   ((vd)->queues)
 
#define VMXNET3_RX_START(vd)   ((vd)->queues + (vd)->num_tx_queues * sizeof (vmxnet3_tx_queue))
 
#define VMXNET3_REG_IMR   0x0000 /* Interrupt Mask Register */
 
#define VMXNET3_REG_TXPROD   0x0600 /* Tx Producer Index */
 
#define VMXNET3_REG_RXPROD   0x0800 /* Rx Producer Index for ring 1 */
 
#define VMXNET3_REG_RXPROD2   0x0A00 /* Rx Producer Index for ring 2 */
 
#define VMXNET3_REG_VRRS   0x0000 /* VMXNET3 Revision Report Selection */
 
#define VMXNET3_REG_UVRS   0x0008 /* UPT Version Report Selection */
 
#define VMXNET3_REG_DSAL   0x0010 /* Driver Shared Address Low */
 
#define VMXNET3_REG_DSAH   0x0018 /* Driver Shared Address High */
 
#define VMXNET3_REG_CMD   0x0020 /* Command */
 
#define VMXNET3_REG_MACL   0x0028 /* MAC Address Low */
 
#define VMXNET3_REG_MACH   0x0030 /* MAC Address High */
 
#define VMXNET3_REG_ICR   0x0038 /* Interrupt Cause Register */
 
#define VMXNET3_REG_ECR   0x0040 /* Event Cause Register */
 
#define VMXNET3_VLAN_LEN   4
 
#define VMXNET3_FCS_LEN   4
 
#define VMXNET3_MTU   (1514 + VMXNET3_VLAN_LEN + VMXNET3_FCS_LEN)
 
#define VMXNET3_RXF_BTYPE   (1 << 14) /* rx body buffer type */
 
#define VMXNET3_RXF_GEN   (1 << 31) /* rx generation */
 
#define VMXNET3_RXCF_CKSUM_MASK   (0xFFFF) /* rx checksum mask */
 
#define VMXNET3_RXCF_TUC   (1 << 16) /* rx udp/tcp checksum correct */
 
#define VMXNET3_RXCF_UDP   (1 << 17) /* rx udp packet */
 
#define VMXNET3_RXCF_TCP   (1 << 18) /* rx tcp packet */
 
#define VMXNET3_RXCF_IPC   (1 << 19) /* rx ip checksum correct */
 
#define VMXNET3_RXCF_IP6   (1 << 20) /* rx ip6 packet */
 
#define VMXNET3_RXCF_IP4   (1 << 21) /* rx ip4 packet */
 
#define VMXNET3_RXCF_CT   (0x7F << 24) /* rx completion type 24-30, 7 bits */
 
#define VMXNET3_RXCF_GEN   (1 << 31) /* rx completion generation */
 
#define VMXNET3_RXC_INDEX   (0xFFF) /* rx completion index mask */
 
#define foreach_vmxnet3_offload
 
#define VMXNET3_TXF_GEN   (1 << 14) /* tx generation */
 
#define VMXNET3_TXF_OM(x)   ((x) << 10) /* tx offload mode */
 
#define VMXNET3_TXF_MSSCOF(x)   ((x) << 18) /* tx MSS checksum offset, flags */
 
#define VMXNET3_TXF_EOP   (1 << 12) /* tx end of packet */
 
#define VMXNET3_TXF_CQ   (1 << 13) /* tx completion request */
 
#define VMXNET3_TXCF_GEN   (1 << 31) /* tx completion generation */
 
#define VMXNET3_TXC_INDEX   (0xFFF) /* tx completion index mask */
 
#define VMXNET3_RX_RING_SIZE   2
 
#define VMXNET3_INPUT_REFILL_THRESHOLD   32
 
#define VMXNET3_NUM_TX_DESC   1024
 
#define VMXNET3_NUM_TX_COMP   VMXNET3_NUM_TX_DESC
 
#define VMXNET3_NUM_RX_DESC   1024
 
#define VMXNET3_NUM_RX_COMP   VMXNET3_NUM_RX_DESC
 
#define VMXNET3_VERSION_MAGIC   0x69505845
 
#define VMXNET3_SHARED_MAGIC   0xbabefee1
 
#define VMXNET3_VERSION_SELECT   1
 
#define VMXNET3_UPT_VERSION_SELECT   1
 
#define VMXNET3_MAX_INTRS   25
 
#define VMXNET3_IC_DISABLE_ALL   0x1
 
#define VMXNET3_GOS_BITS_32   (1 << 0)
 
#define VMXNET3_GOS_BITS_64   (2 << 0)
 
#define VMXNET3_GOS_TYPE_LINUX   (1 << 2)
 
#define VMXNET3_RXCL_LEN_MASK   (0x3FFF)
 
#define VMXNET3_RXCL_ERROR   (1 << 14)
 
#define VMXNET3_RXCI_EOP   (1 << 14) /* end of packet */
 
#define VMXNET3_RXCI_SOP   (1 << 15) /* start of packet */
 
#define VMXNET3_RXCI_CNC   (1 << 30) /* Checksum not calculated */
 
#define VMXNET3_RXCOMP_TYPE   (3 << 24) /* RX completion descriptor */
 
#define VMXNET3_RXCOMP_TYPE_LRO   (4 << 24) /* RX completion descriptor for LRO */
 
#define VMXNET3_RXECF_MSS_MASK   (0xFFFF)
 
#define foreach_vmxnet3_device_flags
 
#define foreach_vmxnet3_set_cmds
 
#define foreach_vmxnet3_get_cmds
 
#define vmxnet3_log_debug(dev, f, ...)
 
#define vmxnet3_log_error(dev, f, ...)
 

Enumerations

enum  vmxnet3_tx_func_error_t { VMXNET3_TX_N_ERROR }
 
enum  { foreach_vmxnet3_rxmode_flags }
 
enum  { foreach_vmxnet3_show_entry }
 
enum  { foreach_vmxnet3_feature_flags }
 
enum  { foreach_vmxnet3_rss_hash_type }
 
enum  { foreach_vmxnet3_offload }
 
enum  { foreach_vmxnet3_device_flags }
 
enum  { foreach_vmxnet3_set_cmds }
 
enum  { foreach_vmxnet3_get_cmds }
 

Functions

typedef CLIB_PACKED (struct { u32 version;u32 guest_info;u32 version_support;u32 upt_version_support;u64 upt_features;u64 driver_data_address;u64 queue_desc_address;u32 driver_data_len;u32 queue_desc_len;u32 mtu;u16 max_num_rx_sg;u8 num_tx_queues;u8 num_rx_queues;u32 pad[4];}) vmxnet3_misc_config
 
typedef CLIB_PACKED (struct { u8 mask_mode;u8 num_intrs;u8 event_intr_index;u8 moderation_level[VMXNET3_MAX_INTRS];u32 control;u32 pad[2];}) vmxnet3_interrupt_config
 
typedef CLIB_PACKED (struct { u32 mode;u16 multicast_len;u16 pad;u64 multicast_address;u8 vlan_filter[512];}) vmxnet3_rx_filter_config
 
typedef CLIB_PACKED (struct { u32 version;u32 length;u64 address;}) vmxnet3_variable_config
 
typedef CLIB_PACKED (struct { u32 magic;u32 pad;vmxnet3_misc_config misc;vmxnet3_interrupt_config interrupt;vmxnet3_rx_filter_config rx_filter;vmxnet3_variable_config rss;vmxnet3_variable_config pattern;vmxnet3_variable_config plugin;u32 ecr;u32 pad1[5];}) vmxnet3_shared
 
typedef CLIB_PACKED (struct { u8 stopped;u8 pad[3];u32 error;}) vmxnet3_queue_status
 
typedef CLIB_PACKED (struct { u32 num_deferred;u32 threshold;u64 pad;}) vmxnet3_tx_queue_control
 
typedef CLIB_PACKED (struct { u64 desc_address;u64 data_address;u64 comp_address;u64 driver_data_address;u64 pad;u32 num_desc;u32 num_data;u32 num_comp;u32 driver_data_len;u8 intr_index;u8 pad1;u16 data_address_size;u8 pad2[4];}) vmxnet3_tx_queue_config
 
typedef CLIB_PACKED (struct { u64 tso_pkts;u64 tso_bytes;u64 ucast_pkts;u64 ucast_bytes;u64 mcast_pkts;u64 mcast_bytes;u64 bcast_pkts;u64 bcast_bytes;u64 error_pkts;u64 discard_pkts;}) vmxnet3_tx_stats
 
typedef CLIB_PACKED (struct { vmxnet3_tx_queue_control ctrl;vmxnet3_tx_queue_config cfg;vmxnet3_queue_status status;vmxnet3_tx_stats stats;u8 pad[88];}) vmxnet3_tx_queue
 
typedef CLIB_PACKED (struct { u8 update_prod;u8 pad[7];u64 pad1;}) vmxnet3_rx_queue_control
 
typedef CLIB_PACKED (struct { u64 desc_address[2];u64 comp_address;u64 driver_data_address;u64 data_address;u32 num_desc[2];u32 num_comp;u32 driver_data_len;u8 intr_index;u8 pad1;u16 data_address_size;u8 pad2[4];}) vmxnet3_rx_queue_config
 
typedef CLIB_PACKED (struct { u64 lro_pkts;u64 lro_bytes;u64 ucast_pkts;u64 ucast_bytes;u64 mcast_pkts;u64 mcast_bytes;u64 bcast_pkts;u64 bcast_bytes;u64 nobuf_pkts;u64 error_pkts;}) vmxnet3_rx_stats
 
typedef CLIB_PACKED (struct { vmxnet3_rx_queue_control ctrl;vmxnet3_rx_queue_config cfg;vmxnet3_queue_status status;vmxnet3_rx_stats stats;u8 pad[88];}) vmxnet3_rx_queue
 
typedef CLIB_PACKED (struct { u64 address;u32 flags;u32 pad;}) vmxnet3_rx_desc
 
typedef CLIB_PACKED (struct { u32 index;u32 rss;u32 len;u32 flags;}) vmxnet3_rx_comp
 
typedef CLIB_PACKED (struct { u32 dword1;u8 seg_cnt;u8 dup_ack_cnt;u16 ts_delta;u32 dword2;u32 flags;}) vmxnet3_rx_comp_ext
 
typedef CLIB_PACKED (struct { u32 index;u32 pad[2];u32 flags;}) vmxnet3_tx_comp
 
typedef CLIB_PACKED (struct { u64 address;u32 flags[2];}) vmxnet3_tx_desc
 
typedef CLIB_PACKED (struct { u16 hash_type;u16 hash_func;u16 hash_key_sz;u16 ind_table_sz;u8 hash_key[VMXNET3_RSS_MAX_KEY_SZ];u8 ind_table[VMXNET3_RSS_MAX_IND_TABLE_SZ];}) vmxnet3_rss_shared
 
void vmxnet3_create_if (vlib_main_t *vm, vmxnet3_create_if_args_t *args)
 
void vmxnet3_delete_if (vlib_main_t *vm, vmxnet3_device_t *ad)
 
clib_error_tvmxnet3_plugin_api_hookup (vlib_main_t *vm)
 
static_always_inline void vmxnet3_reg_write_inline (vmxnet3_device_t *vd, u8 bar, u32 addr, u32 val)
 
static_always_inline void vmxnet3_reg_write (vmxnet3_device_t *vd, u8 bar, u32 addr, u32 val)
 
static_always_inline u32 vmxnet3_reg_read (vmxnet3_device_t *vd, u8 bar, u32 addr)
 
static_always_inline uword vmxnet3_dma_addr (vlib_main_t *vm, vmxnet3_device_t *vd, void *p)
 
static_always_inline void vmxnet3_rx_ring_advance_produce (vmxnet3_rxq_t *rxq, vmxnet3_rx_ring *ring)
 
static_always_inline clib_error_tvmxnet3_rxq_refill_ring0 (vlib_main_t *vm, vmxnet3_device_t *vd, vmxnet3_rxq_t *rxq)
 
static_always_inline clib_error_tvmxnet3_rxq_refill_ring1 (vlib_main_t *vm, vmxnet3_device_t *vd, vmxnet3_rxq_t *rxq)
 

Variables

vmxnet3_main_t vmxnet3_main
 
vlib_node_registration_t vmxnet3_input_node
 (constructor) VLIB_REGISTER_NODE (vmxnet3_input_node) More...
 
vnet_device_class_t vmxnet3_device_class
 
format_function_t format_vmxnet3_device
 
format_function_t format_vmxnet3_device_name
 
format_function_t format_vmxnet3_input_trace
 

Macro Definition Documentation

◆ foreach_vmxnet3_device_flags

#define foreach_vmxnet3_device_flags
Value:
_(0, INITIALIZED, "initialized") \
_(1, ERROR, "error") \
_(2, ADMIN_UP, "admin-up") \
_(3, IOVA, "iova") \
_(4, LINK_UP, "link-up") \
_(5, SHARED_TXQ_LOCK, "shared-txq-lock") \
_(6, ELOG, "elog")
#define ELOG(em, f, data)
Definition: elog.h:474

Definition at line 187 of file vmxnet3.h.

◆ foreach_vmxnet3_feature_flags

#define foreach_vmxnet3_feature_flags
Value:
_(0, RXCSUM, "rx checksum") \
_(1, RSS, "RSS") \
_(2, RXVLAN, "rx VLAN") \
_(3, LRO, "LRO")

Definition at line 60 of file vmxnet3.h.

◆ foreach_vmxnet3_get_cmds

#define foreach_vmxnet3_get_cmds
Value:
_(0, GET_QUEUE_STATUS, "get queue status") \
_(1, GET_STATS, "get stats") \
_(2, GET_LINK, "get link") \
_(3, GET_PERM_MAC_LO, "get perm mac lo") \
_(4, GET_PERM_MAC_HI, "get perm mac hi") \
_(5, GET_DID_LO, "get did lo") \
_(6, GET_DID_HI, "get did hi") \
_(7, GET_DEV_EXTRA_INFO, "get dev extra info") \
_(8, GET_CONF_INTR, "get conf intr") \
_(9, GET_ADAPTIVE_RING_INFO, "get adaptive ring info") \
_(10, GET_TXDATA_DESC_SIZE, "get txdata desc size") \
_(11, RESERVED5, "reserved5")

Definition at line 228 of file vmxnet3.h.

◆ foreach_vmxnet3_offload

#define foreach_vmxnet3_offload
Value:
_(0, NONE, "none") \
_(2, CSUM, "checksum") \
_(3, TSO, "tso")

Definition at line 133 of file vmxnet3.h.

◆ foreach_vmxnet3_rss_hash_type

#define foreach_vmxnet3_rss_hash_type
Value:
_(0, IPV4, "ipv4") \
_(1, TCP_IPV4, "tcp ipv4") \
_(2, IPV6, "ipv6") \
_(3, TCP_IPV6, "tcp ipv6")

Definition at line 73 of file vmxnet3.h.

◆ foreach_vmxnet3_rxmode_flags

#define foreach_vmxnet3_rxmode_flags
Value:
_(0, UCAST, "unicast") \
_(1, MCAST, "multicast") \
_(2, BCAST, "broadcast") \
_(3, ALL_MULTI, "all multicast") \
_(4, PROMISC, "promiscuous")

Definition at line 32 of file vmxnet3.h.

◆ foreach_vmxnet3_set_cmds

#define foreach_vmxnet3_set_cmds
Value:
_(0, ACTIVATE_DEV, "activate device") \
_(1, QUIESCE_DEV, "quiesce device") \
_(2, RESET_DEV, "reset device") \
_(3, UPDATE_RX_MODE, "update rx mode") \
_(4, UPDATE_MAC_FILTERS, "update mac filters") \
_(5, UPDATE_VLAN_FILTERS, "update vlan filters") \
_(6, UPDATE_RSSIDT, "update rss idt") \
_(7, UPDATE_IML, "update iml") \
_(8, UPDATE_PMCFG, "update pm cfg") \
_(9, UPDATE_FEATURE, "update feature") \
_(10, STOP_EMULATION, "stop emulation") \
_(11, LOAD_PLUGIN, "load plugin") \
_(12, ACTIVATE_VF, "activate vf") \
_(13, RESERVED3, "reserved 3") \
_(14, RESERVED4, "reservced 4") \
_(15, REGISTER_MEMREGS, "register mem regs")

Definition at line 203 of file vmxnet3.h.

◆ foreach_vmxnet3_show_entry

#define foreach_vmxnet3_show_entry
Value:
_(RX_COMP, "rx comp") \
_(RX_DESC0, "rx desc 0") \
_(RX_DESC1, "rx desc 1") \
_(TX_COMP, "tx comp") \
_(TX_DESC, "tx desc")

Definition at line 46 of file vmxnet3.h.

◆ foreach_vmxnet3_tx_func_error

#define foreach_vmxnet3_tx_func_error
Value:
_(ERROR_PACKETS, "error packets") \
_(LINK_DOWN, "link down") \
_(NO_FREE_SLOTS, "no free tx slots")

Definition at line 19 of file vmxnet3.h.

◆ VMXNET3_FCS_LEN

#define VMXNET3_FCS_LEN   4

Definition at line 115 of file vmxnet3.h.

◆ VMXNET3_GOS_BITS_32

#define VMXNET3_GOS_BITS_32   (1 << 0)

Definition at line 172 of file vmxnet3.h.

◆ VMXNET3_GOS_BITS_64

#define VMXNET3_GOS_BITS_64   (2 << 0)

Definition at line 173 of file vmxnet3.h.

◆ VMXNET3_GOS_TYPE_LINUX

#define VMXNET3_GOS_TYPE_LINUX   (1 << 2)

Definition at line 174 of file vmxnet3.h.

◆ VMXNET3_IC_DISABLE_ALL

#define VMXNET3_IC_DISABLE_ALL   0x1

Definition at line 170 of file vmxnet3.h.

◆ VMXNET3_INPUT_REFILL_THRESHOLD

#define VMXNET3_INPUT_REFILL_THRESHOLD   32

Definition at line 159 of file vmxnet3.h.

◆ vmxnet3_log_debug

#define vmxnet3_log_debug (   dev,
  f,
  ... 
)
Value:
vlib_log (VLIB_LOG_LEVEL_DEBUG, vmxnet3_main.log_default, "%U: " f, \
format_vlib_pci_addr, &dev->pci_addr, \
## __VA_ARGS__)
vmxnet3_main_t vmxnet3_main
Definition: vmxnet3.c:28
vlib_log_class_t log_default
Definition: vmxnet3.h:594
void vlib_log(vlib_log_level_t level, vlib_log_class_t class, char *fmt,...)
Definition: log.c:131
format_function_t format_vlib_pci_addr
Definition: pci.h:326

Definition at line 634 of file vmxnet3.h.

◆ vmxnet3_log_error

#define vmxnet3_log_error (   dev,
  f,
  ... 
)
Value:
vlib_log (VLIB_LOG_LEVEL_ERR, vmxnet3_main.log_default, "%U: " f, \
format_vlib_pci_addr, &dev->pci_addr, \
## __VA_ARGS__)
vmxnet3_main_t vmxnet3_main
Definition: vmxnet3.c:28
vlib_log_class_t log_default
Definition: vmxnet3.h:594
void vlib_log(vlib_log_level_t level, vlib_log_class_t class, char *fmt,...)
Definition: log.c:131
format_function_t format_vlib_pci_addr
Definition: pci.h:326

Definition at line 639 of file vmxnet3.h.

◆ VMXNET3_MAX_INTRS

#define VMXNET3_MAX_INTRS   25

Definition at line 169 of file vmxnet3.h.

◆ VMXNET3_MTU

#define VMXNET3_MTU   (1514 + VMXNET3_VLAN_LEN + VMXNET3_FCS_LEN)

Definition at line 116 of file vmxnet3.h.

◆ VMXNET3_NUM_RX_COMP

#define VMXNET3_NUM_RX_COMP   VMXNET3_NUM_RX_DESC

Definition at line 163 of file vmxnet3.h.

◆ VMXNET3_NUM_RX_DESC

#define VMXNET3_NUM_RX_DESC   1024

Definition at line 162 of file vmxnet3.h.

◆ VMXNET3_NUM_TX_COMP

#define VMXNET3_NUM_TX_COMP   VMXNET3_NUM_TX_DESC

Definition at line 161 of file vmxnet3.h.

◆ VMXNET3_NUM_TX_DESC

#define VMXNET3_NUM_TX_DESC   1024

Definition at line 160 of file vmxnet3.h.

◆ VMXNET3_REG_CMD

#define VMXNET3_REG_CMD   0x0020 /* Command */

Definition at line 108 of file vmxnet3.h.

◆ VMXNET3_REG_DSAH

#define VMXNET3_REG_DSAH   0x0018 /* Driver Shared Address High */

Definition at line 107 of file vmxnet3.h.

◆ VMXNET3_REG_DSAL

#define VMXNET3_REG_DSAL   0x0010 /* Driver Shared Address Low */

Definition at line 106 of file vmxnet3.h.

◆ VMXNET3_REG_ECR

#define VMXNET3_REG_ECR   0x0040 /* Event Cause Register */

Definition at line 112 of file vmxnet3.h.

◆ VMXNET3_REG_ICR

#define VMXNET3_REG_ICR   0x0038 /* Interrupt Cause Register */

Definition at line 111 of file vmxnet3.h.

◆ VMXNET3_REG_IMR

#define VMXNET3_REG_IMR   0x0000 /* Interrupt Mask Register */

Definition at line 97 of file vmxnet3.h.

◆ VMXNET3_REG_MACH

#define VMXNET3_REG_MACH   0x0030 /* MAC Address High */

Definition at line 110 of file vmxnet3.h.

◆ VMXNET3_REG_MACL

#define VMXNET3_REG_MACL   0x0028 /* MAC Address Low */

Definition at line 109 of file vmxnet3.h.

◆ VMXNET3_REG_RXPROD

#define VMXNET3_REG_RXPROD   0x0800 /* Rx Producer Index for ring 1 */

Definition at line 99 of file vmxnet3.h.

◆ VMXNET3_REG_RXPROD2

#define VMXNET3_REG_RXPROD2   0x0A00 /* Rx Producer Index for ring 2 */

Definition at line 100 of file vmxnet3.h.

◆ VMXNET3_REG_TXPROD

#define VMXNET3_REG_TXPROD   0x0600 /* Tx Producer Index */

Definition at line 98 of file vmxnet3.h.

◆ VMXNET3_REG_UVRS

#define VMXNET3_REG_UVRS   0x0008 /* UPT Version Report Selection */

Definition at line 105 of file vmxnet3.h.

◆ VMXNET3_REG_VRRS

#define VMXNET3_REG_VRRS   0x0000 /* VMXNET3 Revision Report Selection */

Definition at line 104 of file vmxnet3.h.

◆ VMXNET3_RSS_HASH_FUNC_TOEPLITZ

#define VMXNET3_RSS_HASH_FUNC_TOEPLITZ   1

Definition at line 86 of file vmxnet3.h.

◆ VMXNET3_RSS_MAX_IND_TABLE_SZ

#define VMXNET3_RSS_MAX_IND_TABLE_SZ   128

Definition at line 88 of file vmxnet3.h.

◆ VMXNET3_RSS_MAX_KEY_SZ

#define VMXNET3_RSS_MAX_KEY_SZ   40

Definition at line 87 of file vmxnet3.h.

◆ VMXNET3_RX_RING_SIZE

#define VMXNET3_RX_RING_SIZE   2

Definition at line 158 of file vmxnet3.h.

◆ VMXNET3_RX_START

#define VMXNET3_RX_START (   vd)    ((vd)->queues + (vd)->num_tx_queues * sizeof (vmxnet3_tx_queue))

Definition at line 93 of file vmxnet3.h.

◆ VMXNET3_RXC_INDEX

#define VMXNET3_RXC_INDEX   (0xFFF) /* rx completion index mask */

Definition at line 131 of file vmxnet3.h.

◆ VMXNET3_RXCF_CKSUM_MASK

#define VMXNET3_RXCF_CKSUM_MASK   (0xFFFF) /* rx checksum mask */

Definition at line 121 of file vmxnet3.h.

◆ VMXNET3_RXCF_CT

#define VMXNET3_RXCF_CT   (0x7F << 24) /* rx completion type 24-30, 7 bits */

Definition at line 128 of file vmxnet3.h.

◆ VMXNET3_RXCF_GEN

#define VMXNET3_RXCF_GEN   (1 << 31) /* rx completion generation */

Definition at line 129 of file vmxnet3.h.

◆ VMXNET3_RXCF_IP4

#define VMXNET3_RXCF_IP4   (1 << 21) /* rx ip4 packet */

Definition at line 127 of file vmxnet3.h.

◆ VMXNET3_RXCF_IP6

#define VMXNET3_RXCF_IP6   (1 << 20) /* rx ip6 packet */

Definition at line 126 of file vmxnet3.h.

◆ VMXNET3_RXCF_IPC

#define VMXNET3_RXCF_IPC   (1 << 19) /* rx ip checksum correct */

Definition at line 125 of file vmxnet3.h.

◆ VMXNET3_RXCF_TCP

#define VMXNET3_RXCF_TCP   (1 << 18) /* rx tcp packet */

Definition at line 124 of file vmxnet3.h.

◆ VMXNET3_RXCF_TUC

#define VMXNET3_RXCF_TUC   (1 << 16) /* rx udp/tcp checksum correct */

Definition at line 122 of file vmxnet3.h.

◆ VMXNET3_RXCF_UDP

#define VMXNET3_RXCF_UDP   (1 << 17) /* rx udp packet */

Definition at line 123 of file vmxnet3.h.

◆ VMXNET3_RXCI_CNC

#define VMXNET3_RXCI_CNC   (1 << 30) /* Checksum not calculated */

Definition at line 180 of file vmxnet3.h.

◆ VMXNET3_RXCI_EOP

#define VMXNET3_RXCI_EOP   (1 << 14) /* end of packet */

Definition at line 178 of file vmxnet3.h.

◆ VMXNET3_RXCI_SOP

#define VMXNET3_RXCI_SOP   (1 << 15) /* start of packet */

Definition at line 179 of file vmxnet3.h.

◆ VMXNET3_RXCL_ERROR

#define VMXNET3_RXCL_ERROR   (1 << 14)

Definition at line 176 of file vmxnet3.h.

◆ VMXNET3_RXCL_LEN_MASK

#define VMXNET3_RXCL_LEN_MASK   (0x3FFF)

Definition at line 175 of file vmxnet3.h.

◆ VMXNET3_RXCOMP_TYPE

#define VMXNET3_RXCOMP_TYPE   (3 << 24) /* RX completion descriptor */

Definition at line 182 of file vmxnet3.h.

◆ VMXNET3_RXCOMP_TYPE_LRO

#define VMXNET3_RXCOMP_TYPE_LRO   (4 << 24) /* RX completion descriptor for LRO */

Definition at line 183 of file vmxnet3.h.

◆ VMXNET3_RXECF_MSS_MASK

#define VMXNET3_RXECF_MSS_MASK   (0xFFFF)

Definition at line 185 of file vmxnet3.h.

◆ VMXNET3_RXF_BTYPE

#define VMXNET3_RXF_BTYPE   (1 << 14) /* rx body buffer type */

Definition at line 118 of file vmxnet3.h.

◆ VMXNET3_RXF_GEN

#define VMXNET3_RXF_GEN   (1 << 31) /* rx generation */

Definition at line 119 of file vmxnet3.h.

◆ VMXNET3_RXQ_MAX

#define VMXNET3_RXQ_MAX   16

Definition at line 91 of file vmxnet3.h.

◆ VMXNET3_SHARED_MAGIC

#define VMXNET3_SHARED_MAGIC   0xbabefee1

Definition at line 166 of file vmxnet3.h.

◆ VMXNET3_TX_START

#define VMXNET3_TX_START (   vd)    ((vd)->queues)

Definition at line 92 of file vmxnet3.h.

◆ VMXNET3_TXC_INDEX

#define VMXNET3_TXC_INDEX   (0xFFF) /* tx completion index mask */

Definition at line 156 of file vmxnet3.h.

◆ VMXNET3_TXCF_GEN

#define VMXNET3_TXCF_GEN   (1 << 31) /* tx completion generation */

Definition at line 155 of file vmxnet3.h.

◆ VMXNET3_TXF_CQ

#define VMXNET3_TXF_CQ   (1 << 13) /* tx completion request */

Definition at line 152 of file vmxnet3.h.

◆ VMXNET3_TXF_EOP

#define VMXNET3_TXF_EOP   (1 << 12) /* tx end of packet */

Definition at line 151 of file vmxnet3.h.

◆ VMXNET3_TXF_GEN

#define VMXNET3_TXF_GEN   (1 << 14) /* tx generation */

Definition at line 146 of file vmxnet3.h.

◆ VMXNET3_TXF_MSSCOF

#define VMXNET3_TXF_MSSCOF (   x)    ((x) << 18) /* tx MSS checksum offset, flags */

Definition at line 150 of file vmxnet3.h.

◆ VMXNET3_TXF_OM

#define VMXNET3_TXF_OM (   x)    ((x) << 10) /* tx offload mode */

Definition at line 149 of file vmxnet3.h.

◆ VMXNET3_TXQ_MAX

#define VMXNET3_TXQ_MAX   8

Definition at line 90 of file vmxnet3.h.

◆ VMXNET3_UPT_VERSION_SELECT

#define VMXNET3_UPT_VERSION_SELECT   1

Definition at line 168 of file vmxnet3.h.

◆ VMXNET3_VERSION_MAGIC

#define VMXNET3_VERSION_MAGIC   0x69505845

Definition at line 165 of file vmxnet3.h.

◆ VMXNET3_VERSION_SELECT

#define VMXNET3_VERSION_SELECT   1

Definition at line 167 of file vmxnet3.h.

◆ VMXNET3_VLAN_LEN

#define VMXNET3_VLAN_LEN   4

Definition at line 114 of file vmxnet3.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
foreach_vmxnet3_rxmode_flags 

Definition at line 39 of file vmxnet3.h.

◆ anonymous enum

anonymous enum
Enumerator
foreach_vmxnet3_show_entry 

Definition at line 53 of file vmxnet3.h.

◆ anonymous enum

anonymous enum
Enumerator
foreach_vmxnet3_feature_flags 

Definition at line 66 of file vmxnet3.h.

◆ anonymous enum

anonymous enum
Enumerator
foreach_vmxnet3_rss_hash_type 

Definition at line 79 of file vmxnet3.h.

◆ anonymous enum

anonymous enum
Enumerator
foreach_vmxnet3_offload 

Definition at line 138 of file vmxnet3.h.

◆ anonymous enum

anonymous enum
Enumerator
foreach_vmxnet3_device_flags 

Definition at line 196 of file vmxnet3.h.

◆ anonymous enum

anonymous enum
Enumerator
foreach_vmxnet3_set_cmds 

Definition at line 221 of file vmxnet3.h.

◆ anonymous enum

anonymous enum
Enumerator
foreach_vmxnet3_get_cmds 

Definition at line 242 of file vmxnet3.h.

◆ vmxnet3_tx_func_error_t

Enumerator
VMXNET3_TX_N_ERROR 

Definition at line 24 of file vmxnet3.h.

Function Documentation

◆ CLIB_PACKED() [1/20]

typedef CLIB_PACKED ( struct { u32 version;u32 guest_info;u32 version_support;u32 upt_version_support;u64 upt_features;u64 driver_data_address;u64 queue_desc_address;u32 driver_data_len;u32 queue_desc_len;u32 mtu;u16 max_num_rx_sg;u8 num_tx_queues;u8 num_rx_queues;u32 pad[4];}  )

◆ CLIB_PACKED() [2/20]

typedef CLIB_PACKED ( struct { u8 mask_mode;u8 num_intrs;u8 event_intr_index;u8 moderation_level[VMXNET3_MAX_INTRS];u32 control;u32 pad[2];}  )

◆ CLIB_PACKED() [3/20]

typedef CLIB_PACKED ( struct { u32 mode;u16 multicast_len;u16 pad;u64 multicast_address;u8 vlan_filter[512];}  )

◆ CLIB_PACKED() [4/20]

typedef CLIB_PACKED ( struct { u32 version;u32 length;u64 address;}  )

◆ CLIB_PACKED() [5/20]

typedef CLIB_PACKED ( struct { u32 magic;u32 pad;vmxnet3_misc_config misc;vmxnet3_interrupt_config interrupt;vmxnet3_rx_filter_config rx_filter;vmxnet3_variable_config rss;vmxnet3_variable_config pattern;vmxnet3_variable_config plugin;u32 ecr;u32 pad1[5];}  )

◆ CLIB_PACKED() [6/20]

typedef CLIB_PACKED ( struct { u8 stopped;u8 pad[3];u32 error;}  )

◆ CLIB_PACKED() [7/20]

typedef CLIB_PACKED ( struct { u32 num_deferred;u32 threshold;u64 pad;}  )

◆ CLIB_PACKED() [8/20]

typedef CLIB_PACKED ( struct { u64 desc_address;u64 data_address;u64 comp_address;u64 driver_data_address;u64 pad;u32 num_desc;u32 num_data;u32 num_comp;u32 driver_data_len;u8 intr_index;u8 pad1;u16 data_address_size;u8 pad2[4];}  )

◆ CLIB_PACKED() [9/20]

typedef CLIB_PACKED ( struct { u64 tso_pkts;u64 tso_bytes;u64 ucast_pkts;u64 ucast_bytes;u64 mcast_pkts;u64 mcast_bytes;u64 bcast_pkts;u64 bcast_bytes;u64 error_pkts;u64 discard_pkts;}  )

◆ CLIB_PACKED() [10/20]

typedef CLIB_PACKED ( struct { vmxnet3_tx_queue_control ctrl;vmxnet3_tx_queue_config cfg;vmxnet3_queue_status status;vmxnet3_tx_stats stats;u8 pad[88];}  )

◆ CLIB_PACKED() [11/20]

typedef CLIB_PACKED ( struct { u8 update_prod;u8 pad[7];u64 pad1;}  )

◆ CLIB_PACKED() [12/20]

typedef CLIB_PACKED ( struct { u64 desc_address[2];u64 comp_address;u64 driver_data_address;u64 data_address;u32 num_desc[2];u32 num_comp;u32 driver_data_len;u8 intr_index;u8 pad1;u16 data_address_size;u8 pad2[4];}  )

◆ CLIB_PACKED() [13/20]

typedef CLIB_PACKED ( struct { u64 lro_pkts;u64 lro_bytes;u64 ucast_pkts;u64 ucast_bytes;u64 mcast_pkts;u64 mcast_bytes;u64 bcast_pkts;u64 bcast_bytes;u64 nobuf_pkts;u64 error_pkts;}  )

◆ CLIB_PACKED() [14/20]

typedef CLIB_PACKED ( struct { vmxnet3_rx_queue_control ctrl;vmxnet3_rx_queue_config cfg;vmxnet3_queue_status status;vmxnet3_rx_stats stats;u8 pad[88];}  )

◆ CLIB_PACKED() [15/20]

typedef CLIB_PACKED ( struct { u64 address;u32 flags;u32 pad;}  )

◆ CLIB_PACKED() [16/20]

typedef CLIB_PACKED ( struct { u32 index;u32 rss;u32 len;u32 flags;}  )

◆ CLIB_PACKED() [17/20]

typedef CLIB_PACKED ( struct { u32 dword1;u8 seg_cnt;u8 dup_ack_cnt;u16 ts_delta;u32 dword2;u32 flags;}  )

◆ CLIB_PACKED() [18/20]

typedef CLIB_PACKED ( struct { u32 index;u32 pad[2];u32 flags;}  )

◆ CLIB_PACKED() [19/20]

typedef CLIB_PACKED ( struct { u64 address;u32 flags[2];}  )

◆ CLIB_PACKED() [20/20]

typedef CLIB_PACKED ( struct { u16 hash_type;u16 hash_func;u16 hash_key_sz;u16 ind_table_sz;u8 hash_key[VMXNET3_RSS_MAX_KEY_SZ];u8 ind_table[VMXNET3_RSS_MAX_IND_TABLE_SZ];}  )

◆ vmxnet3_create_if()

void vmxnet3_create_if ( vlib_main_t vm,
vmxnet3_create_if_args_t args 
)

Definition at line 605 of file vmxnet3.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vmxnet3_delete_if()

void vmxnet3_delete_if ( vlib_main_t vm,
vmxnet3_device_t ad 
)

Definition at line 853 of file vmxnet3.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vmxnet3_dma_addr()

static_always_inline uword vmxnet3_dma_addr ( vlib_main_t vm,
vmxnet3_device_t vd,
void *  p 
)

Definition at line 670 of file vmxnet3.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vmxnet3_plugin_api_hookup()

clib_error_t* vmxnet3_plugin_api_hookup ( vlib_main_t vm)

Definition at line 236 of file vmxnet3_api.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vmxnet3_reg_read()

static_always_inline u32 vmxnet3_reg_read ( vmxnet3_device_t vd,
u8  bar,
u32  addr 
)

Definition at line 659 of file vmxnet3.h.

+ Here is the caller graph for this function:

◆ vmxnet3_reg_write()

static_always_inline void vmxnet3_reg_write ( vmxnet3_device_t vd,
u8  bar,
u32  addr,
u32  val 
)

Definition at line 652 of file vmxnet3.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vmxnet3_reg_write_inline()

static_always_inline void vmxnet3_reg_write_inline ( vmxnet3_device_t vd,
u8  bar,
u32  addr,
u32  val 
)

Definition at line 646 of file vmxnet3.h.

+ Here is the caller graph for this function:

◆ vmxnet3_rx_ring_advance_produce()

static_always_inline void vmxnet3_rx_ring_advance_produce ( vmxnet3_rxq_t rxq,
vmxnet3_rx_ring ring 
)

Definition at line 677 of file vmxnet3.h.

+ Here is the caller graph for this function:

◆ vmxnet3_rxq_refill_ring0()

static_always_inline clib_error_t* vmxnet3_rxq_refill_ring0 ( vlib_main_t vm,
vmxnet3_device_t vd,
vmxnet3_rxq_t rxq 
)

Definition at line 688 of file vmxnet3.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vmxnet3_rxq_refill_ring1()

static_always_inline clib_error_t* vmxnet3_rxq_refill_ring1 ( vlib_main_t vm,
vmxnet3_device_t vd,
vmxnet3_rxq_t rxq 
)

Definition at line 734 of file vmxnet3.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ format_vmxnet3_device

format_function_t format_vmxnet3_device

Definition at line 630 of file vmxnet3.h.

◆ format_vmxnet3_device_name

format_function_t format_vmxnet3_device_name

Definition at line 631 of file vmxnet3.h.

◆ format_vmxnet3_input_trace

format_function_t format_vmxnet3_input_trace

Definition at line 632 of file vmxnet3.h.

◆ vmxnet3_device_class

vnet_device_class_t vmxnet3_device_class

◆ vmxnet3_input_node

vlib_node_registration_t vmxnet3_input_node

(constructor) VLIB_REGISTER_NODE (vmxnet3_input_node)

Definition at line 488 of file input.c.

◆ vmxnet3_main

vmxnet3_main_t vmxnet3_main

Definition at line 28 of file vmxnet3.c.