Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
netdev.c File Reference
#include <linux/module.h>
#include <linux/types.h>
#include <linux/init.h>
#include <linux/pci.h>
#include <linux/vmalloc.h>
#include <linux/pagemap.h>
#include <linux/delay.h>
#include <linux/netdevice.h>
#include <linux/tcp.h>
#include <linux/ipv6.h>
#include <linux/slab.h>
#include <net/checksum.h>
#include <net/ip6_checksum.h>
#include <linux/mii.h>
#include <linux/ethtool.h>
#include <linux/if_vlan.h>
#include <linux/prefetch.h>
#include "igbvf.h"

Go to the source code of this file.

Macros

#define pr_fmt(fmt)   KBUILD_MODNAME ": " fmt
 
#define DRV_VERSION   "2.0.1-k"
 
#define DEFAULT_MSG_ENABLE   (NETIF_MSG_DRV|NETIF_MSG_PROBE|NETIF_MSG_LINK)
 
#define IGBVF_NO_QUEUE   -1
 
#define UPDATE_VF_COUNTER(reg, name)
 
#define IGBVF_TX_FLAGS_CSUM   0x00000001
 
#define IGBVF_TX_FLAGS_VLAN   0x00000002
 
#define IGBVF_TX_FLAGS_TSO   0x00000004
 
#define IGBVF_TX_FLAGS_IPV4   0x00000008
 
#define IGBVF_TX_FLAGS_VLAN_MASK   0xffff0000
 
#define IGBVF_TX_FLAGS_VLAN_SHIFT   16
 
#define IGBVF_MAX_TXD_PWR   16
 
#define IGBVF_MAX_DATA_PER_TXD   (1 << IGBVF_MAX_TXD_PWR)
 
#define MAX_STD_JUMBO_FRAME_SIZE   9234
 

Functions

 module_param (debug, int, 0)
 
 MODULE_PARM_DESC (debug,"Debug level (0=none,...,16=all)")
 
int igbvf_setup_tx_resources (struct igbvf_adapter *adapter, struct igbvf_ring *tx_ring)
 
int igbvf_setup_rx_resources (struct igbvf_adapter *adapter, struct igbvf_ring *rx_ring)
 
void igbvf_free_tx_resources (struct igbvf_ring *tx_ring)
 
void igbvf_free_rx_resources (struct igbvf_ring *rx_ring)
 
int igbvf_up (struct igbvf_adapter *adapter)
 
void igbvf_down (struct igbvf_adapter *adapter)
 
void igbvf_reinit_locked (struct igbvf_adapter *adapter)
 
void igbvf_update_stats (struct igbvf_adapter *adapter)
 
 MODULE_DEVICE_TABLE (pci, igbvf_pci_tbl)
 
 module_init (igbvf_init_module)
 
 module_exit (igbvf_exit_module)
 
 MODULE_AUTHOR ("Intel Corporation, <[email protected]>")
 
 MODULE_DESCRIPTION ("Intel(R) Gigabit Virtual Function Network Driver")
 
 MODULE_LICENSE ("GPL")
 
 MODULE_VERSION (DRV_VERSION)
 

Variables

char igbvf_driver_name [] = "igbvf"
 
const char igbvf_driver_version [] = DRV_VERSION
 

Macro Definition Documentation

#define DEFAULT_MSG_ENABLE   (NETIF_MSG_DRV|NETIF_MSG_PROBE|NETIF_MSG_LINK)

Definition at line 58 of file netdev.c.

#define DRV_VERSION   "2.0.1-k"

Definition at line 50 of file netdev.c.

#define IGBVF_MAX_DATA_PER_TXD   (1 << IGBVF_MAX_TXD_PWR)

Definition at line 2043 of file netdev.c.

#define IGBVF_MAX_TXD_PWR   16

Definition at line 2042 of file netdev.c.

#define IGBVF_NO_QUEUE   -1

Definition at line 910 of file netdev.c.

#define IGBVF_TX_FLAGS_CSUM   0x00000001

Definition at line 1871 of file netdev.c.

#define IGBVF_TX_FLAGS_IPV4   0x00000008

Definition at line 1874 of file netdev.c.

#define IGBVF_TX_FLAGS_TSO   0x00000004

Definition at line 1873 of file netdev.c.

#define IGBVF_TX_FLAGS_VLAN   0x00000002

Definition at line 1872 of file netdev.c.

#define IGBVF_TX_FLAGS_VLAN_MASK   0xffff0000

Definition at line 1875 of file netdev.c.

#define IGBVF_TX_FLAGS_VLAN_SHIFT   16

Definition at line 1876 of file netdev.c.

#define MAX_STD_JUMBO_FRAME_SIZE   9234
#define pr_fmt (   fmt)    KBUILD_MODNAME ": " fmt

Definition at line 28 of file netdev.c.

#define UPDATE_VF_COUNTER (   reg,
  name 
)
Value:
{ \
u32 current_counter = er32(reg); \
if (current_counter < adapter->stats.last_##name) \
adapter->stats.name += 0x100000000LL; \
adapter->stats.last_##name = current_counter; \
adapter->stats.name &= 0xFFFFFFFF00000000LL; \
adapter->stats.name |= current_counter; \
}

Definition at line 1726 of file netdev.c.

Function Documentation

void igbvf_down ( struct igbvf_adapter adapter)

Definition at line 1470 of file netdev.c.

void igbvf_free_rx_resources ( struct igbvf_ring rx_ring)

igbvf_free_rx_resources - Free Rx Resources : ring to clean the resources from

Free all receive software resources

Definition at line 613 of file netdev.c.

void igbvf_free_tx_resources ( struct igbvf_ring tx_ring)

igbvf_free_tx_resources - Free Tx Resources per Queue : ring to free resources from

Free all transmit software resources

Definition at line 529 of file netdev.c.

void igbvf_reinit_locked ( struct igbvf_adapter adapter)

Definition at line 1515 of file netdev.c.

int igbvf_setup_rx_resources ( struct igbvf_adapter adapter,
struct igbvf_ring rx_ring 
)

igbvf_setup_rx_resources - allocate Rx resources (Descriptors) : board private structure

Returns 0 on success, negative on failure

Definition at line 452 of file netdev.c.

int igbvf_setup_tx_resources ( struct igbvf_adapter adapter,
struct igbvf_ring tx_ring 
)

igbvf_setup_tx_resources - allocate Tx resources (Descriptors) : board private structure

Return 0 on success, negative on failure

Definition at line 413 of file netdev.c.

int igbvf_up ( struct igbvf_adapter adapter)

Definition at line 1445 of file netdev.c.

void igbvf_update_stats ( struct igbvf_adapter adapter)

igbvf_update_stats - Update the board statistics counters : board private structure

Definition at line 1740 of file netdev.c.

MODULE_AUTHOR ( "Intel  Corporation,
< e1000-devel @lists.sourceforge.net >"   
)
MODULE_DESCRIPTION ( "Intel(R) Gigabit Virtual Function Network Driver"  )
MODULE_DEVICE_TABLE ( pci  ,
igbvf_pci_tbl   
)
module_exit ( igbvf_exit_module  )
module_init ( igbvf_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

char igbvf_driver_name[] = "igbvf"

Definition at line 51 of file netdev.c.

const char igbvf_driver_version[] = DRV_VERSION

Definition at line 52 of file netdev.c.