Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions | Variables
vmxnet3_int.h File Reference
#include <linux/bitops.h>
#include <linux/ethtool.h>
#include <linux/delay.h>
#include <linux/netdevice.h>
#include <linux/pci.h>
#include <linux/compiler.h>
#include <linux/slab.h>
#include <linux/spinlock.h>
#include <linux/ioport.h>
#include <linux/highmem.h>
#include <linux/init.h>
#include <linux/timer.h>
#include <linux/skbuff.h>
#include <linux/interrupt.h>
#include <linux/workqueue.h>
#include <linux/uaccess.h>
#include <asm/dma.h>
#include <asm/page.h>
#include <linux/tcp.h>
#include <linux/udp.h>
#include <linux/ip.h>
#include <linux/ipv6.h>
#include <linux/in.h>
#include <linux/etherdevice.h>
#include <asm/checksum.h>
#include <linux/if_vlan.h>
#include <linux/if_arp.h>
#include <linux/inetdevice.h>
#include <linux/log2.h>
#include "vmxnet3_defs.h"

Go to the source code of this file.

Data Structures

struct  vmxnet3_cmd_ring
 
struct  vmxnet3_comp_ring
 
struct  vmxnet3_tx_data_ring
 
struct  vmxnet3_tx_buf_info
 
struct  vmxnet3_tq_driver_stats
 
struct  vmxnet3_tx_ctx
 
struct  vmxnet3_tx_queue
 
struct  vmxnet3_rx_buf_info
 
struct  vmxnet3_rx_ctx
 
struct  vmxnet3_rq_driver_stats
 
struct  vmxnet3_rx_queue
 
struct  vmxnet3_intr
 
struct  vmxnet3_adapter
 

Macros

#define VMXNET3_DRIVER_VERSION_REPORT   VMXNET3_DRIVER_VERSION_STRING"-NAPI"
 
#define VMXNET3_DRIVER_VERSION_STRING   "1.1.29.0-k"
 
#define VMXNET3_DRIVER_VERSION_NUM   0x01011D00
 
#define PCI_VENDOR_ID_VMWARE   0x15AD
 
#define PCI_DEVICE_ID_VMWARE_VMXNET3   0x07B0
 
#define MAX_ETHERNET_CARDS   10
 
#define MAX_PCI_PASSTHRU_DEVICE   6
 
#define VMXNET3_DEVICE_MAX_TX_QUEUES   8
 
#define VMXNET3_DEVICE_MAX_RX_QUEUES   8 /* Keep this value as a power of 2 */
 
#define VMXNET3_RSS_IND_TABLE_SIZE   (VMXNET3_DEVICE_MAX_RX_QUEUES * 4)
 
#define VMXNET3_LINUX_MAX_MSIX_VECT
 
#define VMXNET3_LINUX_MIN_MSIX_VECT   2 /* 1 for tx-rx pair and 1 for event */
 
#define VMXNET3_INTR_BUDDYSHARE   0 /* Corresponding tx,rx queues share irq */
 
#define VMXNET3_INTR_TXSHARE   1 /* All tx queues share one irq */
 
#define VMXNET3_INTR_DONTSHARE   2 /* each queue has its own irq */
 
#define VMXNET3_STATE_BIT_RESETTING   0
 
#define VMXNET3_STATE_BIT_QUIESCED   1
 
#define VMXNET3_WRITE_BAR0_REG(adapter, reg, val)   writel((val), (adapter)->hw_addr0 + (reg))
 
#define VMXNET3_READ_BAR0_REG(adapter, reg)   readl((adapter)->hw_addr0 + (reg))
 
#define VMXNET3_WRITE_BAR1_REG(adapter, reg, val)   writel((val), (adapter)->hw_addr1 + (reg))
 
#define VMXNET3_READ_BAR1_REG(adapter, reg)   readl((adapter)->hw_addr1 + (reg))
 
#define VMXNET3_WAKE_QUEUE_THRESHOLD(tq)   (5)
 
#define VMXNET3_RX_ALLOC_THRESHOLD(rq, ring_idx, adapter)   ((rq)->rx_ring[ring_idx].size >> 3)
 
#define VMXNET3_GET_ADDR_LO(dma)   ((u32)(dma))
 
#define VMXNET3_GET_ADDR_HI(dma)   ((u32)(((u64)(dma)) >> 32))
 
#define VMXNET3_DEF_TX_RING_SIZE   512
 
#define VMXNET3_DEF_RX_RING_SIZE   256
 
#define VMXNET3_MAX_ETH_HDR_SIZE   22
 
#define VMXNET3_MAX_SKB_BUF_SIZE   (3*1024)
 

Enumerations

enum  {
  VMNET_CAP_SG = 0x0001, VMNET_CAP_IP4_CSUM = 0x0002, VMNET_CAP_HW_CSUM = 0x0004, VMNET_CAP_HIGH_DMA = 0x0008,
  VMNET_CAP_TOE = 0x0010, VMNET_CAP_TSO = 0x0020, VMNET_CAP_SW_TSO = 0x0040, VMNET_CAP_VMXNET_APROM = 0x0080,
  VMNET_CAP_HW_TX_VLAN = 0x0100, VMNET_CAP_HW_RX_VLAN = 0x0200, VMNET_CAP_SW_VLAN = 0x0400, VMNET_CAP_WAKE_PCKT_RCV = 0x0800,
  VMNET_CAP_ENABLE_INT_INLINE = 0x1000, VMNET_CAP_ENABLE_HEADER_COPY = 0x2000, VMNET_CAP_TX_CHAIN = 0x4000, VMNET_CAP_RX_CHAIN = 0x8000,
  VMNET_CAP_LPD = 0x10000, VMNET_CAP_BPF = 0x20000, VMNET_CAP_SG_SPAN_PAGES = 0x40000, VMNET_CAP_IP6_CSUM = 0x80000,
  VMNET_CAP_TSO6 = 0x100000, VMNET_CAP_TSO256k = 0x200000, VMNET_CAP_UPT = 0x400000
}
 
enum  vmxnet3_buf_map_type { VMXNET3_MAP_INVALID = 0, VMXNET3_MAP_NONE, VMXNET3_MAP_SINGLE, VMXNET3_MAP_PAGE }
 
enum  vmxnet3_rx_buf_type { VMXNET3_RX_BUF_NONE = 0, VMXNET3_RX_BUF_SKB = 1, VMXNET3_RX_BUF_PAGE = 2 }
 

Functions

struct vmxnet3_tx_queue __attribute__ ((__aligned__(SMP_CACHE_BYTES)))
 
int vmxnet3_quiesce_dev (struct vmxnet3_adapter *adapter)
 
int vmxnet3_activate_dev (struct vmxnet3_adapter *adapter)
 
void vmxnet3_force_close (struct vmxnet3_adapter *adapter)
 
void vmxnet3_reset_dev (struct vmxnet3_adapter *adapter)
 
void vmxnet3_tq_destroy_all (struct vmxnet3_adapter *adapter)
 
void vmxnet3_rq_destroy_all (struct vmxnet3_adapter *adapter)
 
int vmxnet3_set_features (struct net_device *netdev, netdev_features_t features)
 
int vmxnet3_create_queues (struct vmxnet3_adapter *adapter, u32 tx_ring_size, u32 rx_ring_size, u32 rx_ring2_size)
 
void vmxnet3_set_ethtool_ops (struct net_device *netdev)
 
struct rtnl_link_stats64vmxnet3_get_stats64 (struct net_device *dev, struct rtnl_link_stats64 *stats)
 

Variables

char name [IFNAMSIZ+8]
 
struct vmxnet3_adapteradapter
 
spinlock_t tx_lock
 
struct vmxnet3_cmd_ring tx_ring
 
struct vmxnet3_tx_buf_infobuf_info
 
struct vmxnet3_tx_data_ring data_ring
 
struct vmxnet3_comp_ring comp_ring
 
struct Vmxnet3_TxQueueCtrlshared
 
struct vmxnet3_tq_driver_stats stats
 
bool stopped
 
int num_stop
 
int qid
 
enum vmxnet3_rx_buf_type __attribute__
 
struct napi_struct napi
 
struct vmxnet3_cmd_ring rx_ring [2]
 
struct vmxnet3_rx_ctx rx_ctx
 
u32 qid2
 
u32 uncommitted [2]
 
char vmxnet3_driver_name []
 

Macro Definition Documentation

#define MAX_ETHERNET_CARDS   10

Definition at line 123 of file vmxnet3_int.h.

#define MAX_PCI_PASSTHRU_DEVICE   6

Definition at line 124 of file vmxnet3_int.h.

#define PCI_DEVICE_ID_VMWARE_VMXNET3   0x07B0

Definition at line 122 of file vmxnet3_int.h.

#define PCI_VENDOR_ID_VMWARE   0x15AD

Definition at line 121 of file vmxnet3_int.h.

#define VMXNET3_DEF_RX_RING_SIZE   256

Definition at line 380 of file vmxnet3_int.h.

#define VMXNET3_DEF_TX_RING_SIZE   512

Definition at line 379 of file vmxnet3_int.h.

#define VMXNET3_DEVICE_MAX_RX_QUEUES   8 /* Keep this value as a power of 2 */

Definition at line 287 of file vmxnet3_int.h.

#define VMXNET3_DEVICE_MAX_TX_QUEUES   8

Definition at line 286 of file vmxnet3_int.h.

#define VMXNET3_DRIVER_VERSION_NUM   0x01011D00

Definition at line 76 of file vmxnet3_int.h.

#define VMXNET3_DRIVER_VERSION_REPORT   VMXNET3_DRIVER_VERSION_STRING"-NAPI"

Definition at line 66 of file vmxnet3_int.h.

#define VMXNET3_DRIVER_VERSION_STRING   "1.1.29.0-k"

Definition at line 73 of file vmxnet3_int.h.

#define VMXNET3_GET_ADDR_HI (   dma)    ((u32)(((u64)(dma)) >> 32))

Definition at line 376 of file vmxnet3_int.h.

#define VMXNET3_GET_ADDR_LO (   dma)    ((u32)(dma))

Definition at line 375 of file vmxnet3_int.h.

#define VMXNET3_INTR_BUDDYSHARE   0 /* Corresponding tx,rx queues share irq */

Definition at line 310 of file vmxnet3_int.h.

#define VMXNET3_INTR_DONTSHARE   2 /* each queue has its own irq */

Definition at line 312 of file vmxnet3_int.h.

#define VMXNET3_INTR_TXSHARE   1 /* All tx queues share one irq */

Definition at line 311 of file vmxnet3_int.h.

#define VMXNET3_LINUX_MAX_MSIX_VECT
Value:
VMXNET3_DEVICE_MAX_RX_QUEUES + 1)

Definition at line 292 of file vmxnet3_int.h.

#define VMXNET3_LINUX_MIN_MSIX_VECT   2 /* 1 for tx-rx pair and 1 for event */

Definition at line 294 of file vmxnet3_int.h.

#define VMXNET3_MAX_ETH_HDR_SIZE   22

Definition at line 382 of file vmxnet3_int.h.

#define VMXNET3_MAX_SKB_BUF_SIZE   (3*1024)

Definition at line 383 of file vmxnet3_int.h.

#define VMXNET3_READ_BAR0_REG (   adapter,
  reg 
)    readl((adapter)->hw_addr0 + (reg))

Definition at line 363 of file vmxnet3_int.h.

#define VMXNET3_READ_BAR1_REG (   adapter,
  reg 
)    readl((adapter)->hw_addr1 + (reg))

Definition at line 368 of file vmxnet3_int.h.

#define VMXNET3_RSS_IND_TABLE_SIZE   (VMXNET3_DEVICE_MAX_RX_QUEUES * 4)

Definition at line 290 of file vmxnet3_int.h.

#define VMXNET3_RX_ALLOC_THRESHOLD (   rq,
  ring_idx,
  adapter 
)    ((rq)->rx_ring[ring_idx].size >> 3)

Definition at line 372 of file vmxnet3_int.h.

#define VMXNET3_STATE_BIT_QUIESCED   1

Definition at line 316 of file vmxnet3_int.h.

#define VMXNET3_STATE_BIT_RESETTING   0

Definition at line 315 of file vmxnet3_int.h.

#define VMXNET3_WAKE_QUEUE_THRESHOLD (   tq)    (5)

Definition at line 371 of file vmxnet3_int.h.

#define VMXNET3_WRITE_BAR0_REG (   adapter,
  reg,
  val 
)    writel((val), (adapter)->hw_addr0 + (reg))

Definition at line 361 of file vmxnet3_int.h.

#define VMXNET3_WRITE_BAR1_REG (   adapter,
  reg,
  val 
)    writel((val), (adapter)->hw_addr1 + (reg))

Definition at line 366 of file vmxnet3_int.h.

Enumeration Type Documentation

anonymous enum
Enumerator:
VMNET_CAP_SG 
VMNET_CAP_IP4_CSUM 
VMNET_CAP_HW_CSUM 
VMNET_CAP_HIGH_DMA 
VMNET_CAP_TOE 
VMNET_CAP_TSO 
VMNET_CAP_SW_TSO 
VMNET_CAP_VMXNET_APROM 
VMNET_CAP_HW_TX_VLAN 
VMNET_CAP_HW_RX_VLAN 
VMNET_CAP_SW_VLAN 
VMNET_CAP_WAKE_PCKT_RCV 
VMNET_CAP_ENABLE_INT_INLINE 
VMNET_CAP_ENABLE_HEADER_COPY 
VMNET_CAP_TX_CHAIN 
VMNET_CAP_RX_CHAIN 
VMNET_CAP_LPD 
VMNET_CAP_BPF 
VMNET_CAP_SG_SPAN_PAGES 
VMNET_CAP_IP6_CSUM 
VMNET_CAP_TSO6 
VMNET_CAP_TSO256k 
VMNET_CAP_UPT 

Definition at line 87 of file vmxnet3_int.h.

Enumerator:
VMXNET3_MAP_INVALID 
VMXNET3_MAP_NONE 
VMXNET3_MAP_SINGLE 
VMXNET3_MAP_PAGE 

Definition at line 183 of file vmxnet3_int.h.

Enumerator:
VMXNET3_RX_BUF_NONE 
VMXNET3_RX_BUF_SKB 
VMXNET3_RX_BUF_PAGE 

Definition at line 242 of file vmxnet3_int.h.

Function Documentation

int vmxnet3_activate_dev ( struct vmxnet3_adapter adapter)

Definition at line 2215 of file vmxnet3_drv.c.

int vmxnet3_create_queues ( struct vmxnet3_adapter adapter,
u32  tx_ring_size,
u32  rx_ring_size,
u32  rx_ring2_size 
)

Definition at line 2492 of file vmxnet3_drv.c.

void vmxnet3_force_close ( struct vmxnet3_adapter adapter)

Definition at line 2601 of file vmxnet3_drv.c.

struct rtnl_link_stats64* vmxnet3_get_stats64 ( struct net_device dev,
struct rtnl_link_stats64 stats 
)
read

Definition at line 117 of file vmxnet3_ethtool.c.

int vmxnet3_quiesce_dev ( struct vmxnet3_adapter adapter)

Definition at line 2308 of file vmxnet3_drv.c.

void vmxnet3_reset_dev ( struct vmxnet3_adapter adapter)

Definition at line 2298 of file vmxnet3_drv.c.

void vmxnet3_rq_destroy_all ( struct vmxnet3_adapter adapter)

Definition at line 2074 of file vmxnet3_drv.c.

void vmxnet3_set_ethtool_ops ( struct net_device netdev)

Definition at line 632 of file vmxnet3_ethtool.c.

int vmxnet3_set_features ( struct net_device netdev,
netdev_features_t  features 
)

Definition at line 260 of file vmxnet3_ethtool.c.

void vmxnet3_tq_destroy_all ( struct vmxnet3_adapter adapter)

Definition at line 463 of file vmxnet3_drv.c.

Variable Documentation

Definition at line 242 of file vmxnet3_int.h.

Definition at line 245 of file vmxnet3_int.h.

Definition at line 247 of file vmxnet3_int.h.

Definition at line 246 of file vmxnet3_int.h.

char name[IFNAMSIZ+8]

Definition at line 241 of file vmxnet3_int.h.

Definition at line 287 of file vmxnet3_int.h.

int num_stop

Definition at line 251 of file vmxnet3_int.h.

u32 qid

Definition at line 253 of file vmxnet3_int.h.

u32 qid2

Definition at line 292 of file vmxnet3_int.h.

Definition at line 290 of file vmxnet3_int.h.

Definition at line 288 of file vmxnet3_int.h.

unsigned char shared

Definition at line 248 of file vmxnet3_int.h.

Definition at line 249 of file vmxnet3_int.h.

bool stopped

Definition at line 250 of file vmxnet3_int.h.

spinlock_t tx_lock

Definition at line 243 of file vmxnet3_int.h.

Definition at line 244 of file vmxnet3_int.h.

u32 uncommitted[2]

Definition at line 293 of file vmxnet3_int.h.

char vmxnet3_driver_name[]

Definition at line 32 of file vmxnet3_drv.c.