Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Enumerations | Functions | Variables
ixgbevf_main.c File Reference
#include <linux/types.h>
#include <linux/bitops.h>
#include <linux/module.h>
#include <linux/pci.h>
#include <linux/netdevice.h>
#include <linux/vmalloc.h>
#include <linux/string.h>
#include <linux/in.h>
#include <linux/ip.h>
#include <linux/tcp.h>
#include <linux/sctp.h>
#include <linux/ipv6.h>
#include <linux/slab.h>
#include <net/checksum.h>
#include <net/ip6_checksum.h>
#include <linux/ethtool.h>
#include <linux/if.h>
#include <linux/if_vlan.h>
#include <linux/prefetch.h>
#include "ixgbevf.h"

Go to the source code of this file.

Macros

#define pr_fmt(fmt)   KBUILD_MODNAME ": " fmt
 
#define DRV_VERSION   "2.6.0-k"
 
#define DEFAULT_MSG_ENABLE   (NETIF_MSG_DRV|NETIF_MSG_PROBE|NETIF_MSG_LINK)
 
#define IXGBE_MAX_TXD_PWR   14
 
#define IXGBE_MAX_DATA_PER_TXD   (1 << IXGBE_MAX_TXD_PWR)
 
#define TXD_USE_COUNT(S)   DIV_ROUND_UP((S), IXGBE_MAX_DATA_PER_TXD)
 
#define DESC_NEEDED   (MAX_SKB_FRAGS + 4)
 
#define TX_WAKE_THRESHOLD   (DESC_NEEDED * 2)
 
#define IXGBE_SRRCTL_BSIZEHDRSIZE_SHIFT   2
 
#define IXGBE_MAX_RX_DESC_POLL   10
 
#define UPDATE_VF_COUNTER_32bit(reg, last_counter, counter)
 
#define UPDATE_VF_COUNTER_36bit(reg_lsb, reg_msb, last_counter, counter)
 

Enumerations

enum  latency_range {
  lowest_latency = 0, low_latency = 1, bulk_latency = 2, latency_invalid = 255,
  lowest_latency = 0, low_latency = 1, bulk_latency = 2, latency_invalid = 255,
  lowest_latency = 0, low_latency = 1, bulk_latency = 2, latency_invalid = 255,
  lowest_latency = 0, low_latency = 1, bulk_latency = 2, latency_invalid = 255,
  lowest_latency = 0, low_latency = 1, bulk_latency = 2, latency_invalid = 255,
  lowest_latency = 0, low_latency = 1, bulk_latency = 2, latency_invalid = 255
}
 

Functions

 MODULE_DEVICE_TABLE (pci, ixgbevf_pci_tbl)
 
 MODULE_AUTHOR ("Intel Corporation, <[email protected]>")
 
 MODULE_DESCRIPTION ("Intel(R) 82599 Virtual Function Driver")
 
 MODULE_LICENSE ("GPL")
 
 MODULE_VERSION (DRV_VERSION)
 
 module_param (debug, int, 0)
 
 MODULE_PARM_DESC (debug,"Debug level (0=none,...,16=all)")
 
void ixgbevf_up (struct ixgbevf_adapter *adapter)
 
void ixgbevf_down (struct ixgbevf_adapter *adapter)
 
void ixgbevf_reinit_locked (struct ixgbevf_adapter *adapter)
 
void ixgbevf_reset (struct ixgbevf_adapter *adapter)
 
void ixgbevf_update_stats (struct ixgbevf_adapter *adapter)
 
void ixgbevf_free_tx_resources (struct ixgbevf_adapter *adapter, struct ixgbevf_ring *tx_ring)
 
int ixgbevf_setup_tx_resources (struct ixgbevf_adapter *adapter, struct ixgbevf_ring *tx_ring)
 
int ixgbevf_setup_rx_resources (struct ixgbevf_adapter *adapter, struct ixgbevf_ring *rx_ring)
 
void ixgbevf_free_rx_resources (struct ixgbevf_adapter *adapter, struct ixgbevf_ring *rx_ring)
 
 module_init (ixgbevf_init_module)
 
 module_exit (ixgbevf_exit_module)
 

Variables

const char ixgbevf_driver_name [] = "ixgbevf"
 
const char ixgbevf_driver_version [] = DRV_VERSION
 

Macro Definition Documentation

#define DEFAULT_MSG_ENABLE   (NETIF_MSG_DRV|NETIF_MSG_PROBE|NETIF_MSG_LINK)

Definition at line 95 of file ixgbevf_main.c.

#define DESC_NEEDED   (MAX_SKB_FRAGS + 4)

Definition at line 178 of file ixgbevf_main.c.

#define DRV_VERSION   "2.6.0-k"

Definition at line 61 of file ixgbevf_main.c.

#define IXGBE_MAX_DATA_PER_TXD   (1 << IXGBE_MAX_TXD_PWR)

Definition at line 174 of file ixgbevf_main.c.

#define IXGBE_MAX_RX_DESC_POLL   10

Definition at line 1274 of file ixgbevf_main.c.

#define IXGBE_MAX_TXD_PWR   14

Definition at line 173 of file ixgbevf_main.c.

#define IXGBE_SRRCTL_BSIZEHDRSIZE_SHIFT   2

Definition at line 1033 of file ixgbevf_main.c.

#define pr_fmt (   fmt)    KBUILD_MODNAME ": " fmt

Definition at line 33 of file ixgbevf_main.c.

#define TX_WAKE_THRESHOLD   (DESC_NEEDED * 2)
#define TXD_USE_COUNT (   S)    DIV_ROUND_UP((S), IXGBE_MAX_DATA_PER_TXD)

Definition at line 177 of file ixgbevf_main.c.

#define UPDATE_VF_COUNTER_32bit (   reg,
  last_counter,
  counter 
)
Value:
{ \
u32 current_counter = IXGBE_READ_REG(hw, reg); \
if (current_counter < last_counter) \
counter += 0x100000000LL; \
last_counter = current_counter; \
counter &= 0xFFFFFFFF00000000LL; \
counter |= current_counter; \
}

Definition at line 1990 of file ixgbevf_main.c.

#define UPDATE_VF_COUNTER_36bit (   reg_lsb,
  reg_msb,
  last_counter,
  counter 
)
Value:
{ \
u64 current_counter_lsb = IXGBE_READ_REG(hw, reg_lsb); \
u64 current_counter_msb = IXGBE_READ_REG(hw, reg_msb); \
u64 current_counter = (current_counter_msb << 32) | \
current_counter_lsb; \
if (current_counter < last_counter) \
counter += 0x1000000000LL; \
last_counter = current_counter; \
counter &= 0xFFFFFFF000000000LL; \
counter |= current_counter; \
}

Definition at line 2000 of file ixgbevf_main.c.

Enumeration Type Documentation

Enumerator:
lowest_latency 
low_latency 
bulk_latency 
latency_invalid 
lowest_latency 
low_latency 
bulk_latency 
latency_invalid 
lowest_latency 
low_latency 
bulk_latency 
latency_invalid 
lowest_latency 
low_latency 
bulk_latency 
latency_invalid 
lowest_latency 
low_latency 
bulk_latency 
latency_invalid 
lowest_latency 
low_latency 
bulk_latency 
latency_invalid 

Definition at line 629 of file ixgbevf_main.c.

Function Documentation

void ixgbevf_down ( struct ixgbevf_adapter adapter)

Definition at line 1544 of file ixgbevf_main.c.

void ixgbevf_free_rx_resources ( struct ixgbevf_adapter adapter,
struct ixgbevf_ring rx_ring 
)

ixgbevf_free_rx_resources - Free Rx Resources : board private structure : ring to clean the resources from

Free all receive software resources

Definition at line 2348 of file ixgbevf_main.c.

void ixgbevf_free_tx_resources ( struct ixgbevf_adapter adapter,
struct ixgbevf_ring tx_ring 
)

ixgbevf_free_tx_resources - Free Tx Resources per Queue : board private structure : Tx descriptor ring for a specific queue

Free all transmit software resources

Definition at line 2176 of file ixgbevf_main.c.

void ixgbevf_reinit_locked ( struct ixgbevf_adapter adapter)

Definition at line 1589 of file ixgbevf_main.c.

void ixgbevf_reset ( struct ixgbevf_adapter adapter)

Definition at line 1609 of file ixgbevf_main.c.

int ixgbevf_setup_rx_resources ( struct ixgbevf_adapter adapter,
struct ixgbevf_ring rx_ring 
)

ixgbevf_setup_rx_resources - allocate Rx resources (Descriptors) : board private structure : rx descriptor ring (for a specific queue) to setup

Returns 0 on success, negative on failure

Definition at line 2281 of file ixgbevf_main.c.

int ixgbevf_setup_tx_resources ( struct ixgbevf_adapter adapter,
struct ixgbevf_ring tx_ring 
)

ixgbevf_setup_tx_resources - allocate Tx resources (Descriptors) : board private structure : tx descriptor ring (for a specific queue) to setup

Return 0 on success, negative on failure

Definition at line 2216 of file ixgbevf_main.c.

void ixgbevf_up ( struct ixgbevf_adapter adapter)

Definition at line 1416 of file ixgbevf_main.c.

void ixgbevf_update_stats ( struct ixgbevf_adapter adapter)

ixgbevf_update_stats - Update the board statistics counters. : board private structure

Definition at line 2016 of file ixgbevf_main.c.

MODULE_AUTHOR ( "Intel  Corporation,
< linux.nics @intel.com >"   
)
MODULE_DESCRIPTION ( "Intel(R) 82599 Virtual Function Driver"  )
MODULE_DEVICE_TABLE ( pci  ,
ixgbevf_pci_tbl   
)
module_exit ( ixgbevf_exit_module  )
module_init ( ixgbevf_init_module  )
MODULE_LICENSE ( "GPL"  )
module_param ( debug  ,
int  ,
 
)
MODULE_PARM_DESC ( debug  ,
"Debug level (0=none,...,16=all)"   
)
MODULE_VERSION ( DRV_VERSION  )

Variable Documentation

const char ixgbevf_driver_name[] = "ixgbevf"

Definition at line 57 of file ixgbevf_main.c.

const char ixgbevf_driver_version[] = DRV_VERSION

Definition at line 62 of file ixgbevf_main.c.