Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions | Variables
igb.h File Reference
#include "e1000_mac.h"
#include "e1000_82575.h"
#include <linux/bitops.h>
#include <linux/if_vlan.h>

Go to the source code of this file.

Data Structures

struct  vf_data_storage
 
struct  igb_tx_buffer
 
struct  igb_rx_buffer
 
struct  igb_tx_queue_stats
 
struct  igb_rx_queue_stats
 
struct  igb_ring_container
 
struct  igb_q_vector
 
struct  igb_ring
 
struct  igb_adapter
 

Macros

#define IGB_START_ITR   648 /* ~6000 ints/sec */
 
#define IGB_4K_ITR   980
 
#define IGB_20K_ITR   196
 
#define IGB_70K_ITR   56
 
#define IGB_DEFAULT_TXD   256
 
#define IGB_DEFAULT_TX_WORK   128
 
#define IGB_MIN_TXD   80
 
#define IGB_MAX_TXD   4096
 
#define IGB_DEFAULT_RXD   256
 
#define IGB_MIN_RXD   80
 
#define IGB_MAX_RXD   4096
 
#define IGB_DEFAULT_ITR   3 /* dynamic */
 
#define IGB_MAX_ITR_USECS   10000
 
#define IGB_MIN_ITR_USECS   10
 
#define NON_Q_VECTORS   1
 
#define MAX_Q_VECTORS   8
 
#define IGB_MAX_RX_QUEUES   8
 
#define IGB_MAX_RX_QUEUES_82575   4
 
#define IGB_MAX_RX_QUEUES_I211   2
 
#define IGB_MAX_TX_QUEUES   8
 
#define IGB_MAX_VF_MC_ENTRIES   30
 
#define IGB_MAX_VF_FUNCTIONS   8
 
#define IGB_MAX_VFTA_ENTRIES   128
 
#define IGB_82576_VF_DEV_ID   0x10CA
 
#define IGB_I350_VF_DEV_ID   0x1520
 
#define IGB_MAJOR_MASK   0xF000
 
#define IGB_MINOR_MASK   0x0FF0
 
#define IGB_BUILD_MASK   0x000F
 
#define IGB_COMB_VER_MASK   0x00FF
 
#define IGB_MAJOR_SHIFT   12
 
#define IGB_MINOR_SHIFT   4
 
#define IGB_COMB_VER_SHFT   8
 
#define IGB_NVM_VER_INVALID   0xFFFF
 
#define IGB_ETRACK_SHIFT   16
 
#define NVM_ETRACK_WORD   0x0042
 
#define NVM_COMB_VER_OFF   0x0083
 
#define NVM_COMB_VER_PTR   0x003d
 
#define IGB_VF_FLAG_CTS   0x00000001 /* VF is clear to send data */
 
#define IGB_VF_FLAG_UNI_PROMISC   0x00000002 /* VF has unicast promisc */
 
#define IGB_VF_FLAG_MULTI_PROMISC   0x00000004 /* VF has multicast promisc */
 
#define IGB_VF_FLAG_PF_SET_MAC   0x00000008 /* PF has set MAC address */
 
#define IGB_RX_PTHRESH   8
 
#define IGB_RX_HTHRESH   8
 
#define IGB_TX_PTHRESH   8
 
#define IGB_TX_HTHRESH   1
 
#define IGB_RX_WTHRESH
 
#define IGB_TX_WTHRESH
 
#define MAXIMUM_ETHERNET_VLAN_SIZE   1522
 
#define IGB_RXBUFFER_256   256
 
#define IGB_RXBUFFER_16384   16384
 
#define IGB_RX_HDR_LEN   IGB_RXBUFFER_256
 
#define IGB_TX_QUEUE_WAKE   16
 
#define IGB_RX_BUFFER_WRITE   16 /* Must be power of 2 */
 
#define AUTO_ALL_MODES   0
 
#define IGB_EEPROM_APME   0x0400
 
#define IGB_MASTER_SLAVE   e1000_ms_hw_default
 
#define IGB_MNG_VLAN_NONE   -1
 
#define IGB_TX_FLAGS_CSUM   0x00000001
 
#define IGB_TX_FLAGS_VLAN   0x00000002
 
#define IGB_TX_FLAGS_TSO   0x00000004
 
#define IGB_TX_FLAGS_IPV4   0x00000008
 
#define IGB_TX_FLAGS_TSTAMP   0x00000010
 
#define IGB_TX_FLAGS_VLAN_MASK   0xffff0000
 
#define IGB_TX_FLAGS_VLAN_SHIFT   16
 
#define IGB_TXD_DCMD   (E1000_ADVTXD_DCMD_EOP | E1000_ADVTXD_DCMD_RS)
 
#define IGB_RX_DESC(R, i)   (&(((union e1000_adv_rx_desc *)((R)->desc))[i]))
 
#define IGB_TX_DESC(R, i)   (&(((union e1000_adv_tx_desc *)((R)->desc))[i]))
 
#define IGB_TX_CTXTDESC(R, i)   (&(((struct e1000_adv_tx_context_desc *)((R)->desc))[i]))
 
#define IGB_FLAG_HAS_MSI   (1 << 0)
 
#define IGB_FLAG_DCA_ENABLED   (1 << 1)
 
#define IGB_FLAG_QUAD_PORT_A   (1 << 2)
 
#define IGB_FLAG_QUEUE_PAIRS   (1 << 3)
 
#define IGB_FLAG_DMAC   (1 << 4)
 
#define IGB_FLAG_PTP   (1 << 5)
 
#define IGB_MIN_TXPBSIZE   20408
 
#define IGB_TX_BUF_4096   4096
 
#define IGB_DMCTLX_DCFLUSH_DIS   0x80000000 /* Disable DMA Coal Flush */
 
#define IGB_82576_TSYNC_SHIFT   19
 
#define IGB_TS_HDR_LEN   16
 

Enumerations

enum  e1000_ring_flags_t { IGB_RING_FLAG_RX_SCTP_CSUM, IGB_RING_FLAG_RX_LB_VLAN_BSWAP, IGB_RING_FLAG_TX_CTX_IDX, IGB_RING_FLAG_TX_DETECT_HANG }
 
enum  e1000_state_t {
  __E1000_TESTING, __E1000_RESETTING, __E1000_DOWN, __E1000_TESTING,
  __E1000_RESETTING, __E1000_ACCESS_SHARED_RESOURCE, __E1000_DOWN, __IGB_TESTING,
  __IGB_RESETTING, __IGB_DOWN
}
 
enum  igb_boards { board_82575 }
 

Functions

int igb_up (struct igb_adapter *)
 
void igb_down (struct igb_adapter *)
 
void igb_reinit_locked (struct igb_adapter *)
 
void igb_reset (struct igb_adapter *)
 
int igb_set_spd_dplx (struct igb_adapter *, u32, u8)
 
int igb_setup_tx_resources (struct igb_ring *)
 
int igb_setup_rx_resources (struct igb_ring *)
 
void igb_free_tx_resources (struct igb_ring *)
 
void igb_free_rx_resources (struct igb_ring *)
 
void igb_configure_tx_ring (struct igb_adapter *, struct igb_ring *)
 
void igb_configure_rx_ring (struct igb_adapter *, struct igb_ring *)
 
void igb_setup_tctl (struct igb_adapter *)
 
void igb_setup_rctl (struct igb_adapter *)
 
netdev_tx_t igb_xmit_frame_ring (struct sk_buff *, struct igb_ring *)
 
void igb_unmap_and_free_tx_resource (struct igb_ring *, struct igb_tx_buffer *)
 
void igb_alloc_rx_buffers (struct igb_ring *, u16)
 
void igb_update_stats (struct igb_adapter *, struct rtnl_link_stats64 *)
 
bool igb_has_link (struct igb_adapter *adapter)
 
void igb_set_ethtool_ops (struct net_device *)
 
void igb_power_up_link (struct igb_adapter *)
 
void igb_set_fw_version (struct igb_adapter *)
 

Variables

char igb_driver_name []
 
char igb_driver_version []
 

Macro Definition Documentation

#define AUTO_ALL_MODES   0

Definition at line 144 of file igb.h.

#define IGB_20K_ITR   196

Definition at line 50 of file igb.h.

#define IGB_4K_ITR   980

Definition at line 49 of file igb.h.

#define IGB_70K_ITR   56

Definition at line 51 of file igb.h.

#define IGB_82576_TSYNC_SHIFT   19

Definition at line 402 of file igb.h.

#define IGB_82576_VF_DEV_ID   0x10CA

Definition at line 77 of file igb.h.

#define IGB_BUILD_MASK   0x000F

Definition at line 83 of file igb.h.

#define IGB_COMB_VER_MASK   0x00FF

Definition at line 84 of file igb.h.

#define IGB_COMB_VER_SHFT   8

Definition at line 87 of file igb.h.

#define IGB_DEFAULT_ITR   3 /* dynamic */

Definition at line 63 of file igb.h.

#define IGB_DEFAULT_RXD   256

Definition at line 59 of file igb.h.

#define IGB_DEFAULT_TX_WORK   128

Definition at line 55 of file igb.h.

#define IGB_DEFAULT_TXD   256

Definition at line 54 of file igb.h.

#define IGB_DMCTLX_DCFLUSH_DIS   0x80000000 /* Disable DMA Coal Flush */

Definition at line 400 of file igb.h.

#define IGB_EEPROM_APME   0x0400

Definition at line 145 of file igb.h.

#define IGB_ETRACK_SHIFT   16

Definition at line 89 of file igb.h.

#define IGB_FLAG_DCA_ENABLED   (1 << 1)

Definition at line 391 of file igb.h.

#define IGB_FLAG_DMAC   (1 << 4)

Definition at line 394 of file igb.h.

#define IGB_FLAG_HAS_MSI   (1 << 0)

Definition at line 390 of file igb.h.

#define IGB_FLAG_PTP   (1 << 5)

Definition at line 395 of file igb.h.

#define IGB_FLAG_QUAD_PORT_A   (1 << 2)

Definition at line 392 of file igb.h.

#define IGB_FLAG_QUEUE_PAIRS   (1 << 3)

Definition at line 393 of file igb.h.

#define IGB_I350_VF_DEV_ID   0x1520

Definition at line 78 of file igb.h.

#define IGB_MAJOR_MASK   0xF000

Definition at line 81 of file igb.h.

#define IGB_MAJOR_SHIFT   12

Definition at line 85 of file igb.h.

#define IGB_MASTER_SLAVE   e1000_ms_hw_default

Definition at line 149 of file igb.h.

#define IGB_MAX_ITR_USECS   10000

Definition at line 64 of file igb.h.

#define IGB_MAX_RX_QUEUES   8

Definition at line 70 of file igb.h.

#define IGB_MAX_RX_QUEUES_82575   4

Definition at line 71 of file igb.h.

#define IGB_MAX_RX_QUEUES_I211   2

Definition at line 72 of file igb.h.

#define IGB_MAX_RXD   4096

Definition at line 61 of file igb.h.

#define IGB_MAX_TX_QUEUES   8

Definition at line 73 of file igb.h.

#define IGB_MAX_TXD   4096

Definition at line 57 of file igb.h.

#define IGB_MAX_VF_FUNCTIONS   8

Definition at line 75 of file igb.h.

#define IGB_MAX_VF_MC_ENTRIES   30

Definition at line 74 of file igb.h.

#define IGB_MAX_VFTA_ENTRIES   128

Definition at line 76 of file igb.h.

#define IGB_MIN_ITR_USECS   10

Definition at line 65 of file igb.h.

#define IGB_MIN_RXD   80

Definition at line 60 of file igb.h.

#define IGB_MIN_TXD   80

Definition at line 56 of file igb.h.

#define IGB_MIN_TXPBSIZE   20408

Definition at line 398 of file igb.h.

#define IGB_MINOR_MASK   0x0FF0

Definition at line 82 of file igb.h.

#define IGB_MINOR_SHIFT   4

Definition at line 86 of file igb.h.

#define IGB_MNG_VLAN_NONE   -1

Definition at line 152 of file igb.h.

#define IGB_NVM_VER_INVALID   0xFFFF

Definition at line 88 of file igb.h.

#define IGB_RX_BUFFER_WRITE   16 /* Must be power of 2 */

Definition at line 142 of file igb.h.

#define IGB_RX_DESC (   R,
  i 
)    (&(((union e1000_adv_rx_desc *)((R)->desc))[i]))

Definition at line 271 of file igb.h.

#define IGB_RX_HDR_LEN   IGB_RXBUFFER_256

Definition at line 137 of file igb.h.

#define IGB_RX_HTHRESH   8

Definition at line 123 of file igb.h.

#define IGB_RX_PTHRESH   8

Definition at line 122 of file igb.h.

#define IGB_RX_WTHRESH
Value:
((hw->mac.type == e1000_82576 && \
adapter->msix_entries) ? 1 : 4)

Definition at line 126 of file igb.h.

#define IGB_RXBUFFER_16384   16384

Definition at line 136 of file igb.h.

#define IGB_RXBUFFER_256   256

Definition at line 135 of file igb.h.

#define IGB_START_ITR   648 /* ~6000 ints/sec */

Definition at line 48 of file igb.h.

#define IGB_TS_HDR_LEN   16

Definition at line 403 of file igb.h.

#define IGB_TX_BUF_4096   4096

Definition at line 399 of file igb.h.

#define IGB_TX_CTXTDESC (   R,
  i 
)    (&(((struct e1000_adv_tx_context_desc *)((R)->desc))[i]))

Definition at line 275 of file igb.h.

#define IGB_TX_DESC (   R,
  i 
)    (&(((union e1000_adv_tx_desc *)((R)->desc))[i]))

Definition at line 273 of file igb.h.

#define IGB_TX_FLAGS_CSUM   0x00000001

Definition at line 154 of file igb.h.

#define IGB_TX_FLAGS_IPV4   0x00000008

Definition at line 157 of file igb.h.

#define IGB_TX_FLAGS_TSO   0x00000004

Definition at line 156 of file igb.h.

#define IGB_TX_FLAGS_TSTAMP   0x00000010

Definition at line 158 of file igb.h.

#define IGB_TX_FLAGS_VLAN   0x00000002

Definition at line 155 of file igb.h.

#define IGB_TX_FLAGS_VLAN_MASK   0xffff0000

Definition at line 159 of file igb.h.

#define IGB_TX_FLAGS_VLAN_SHIFT   16

Definition at line 160 of file igb.h.

#define IGB_TX_HTHRESH   1

Definition at line 125 of file igb.h.

#define IGB_TX_PTHRESH   8

Definition at line 124 of file igb.h.

#define IGB_TX_QUEUE_WAKE   16

Definition at line 140 of file igb.h.

#define IGB_TX_WTHRESH
Value:
((hw->mac.type == e1000_82576 && \
adapter->msix_entries) ? 1 : 16)

Definition at line 128 of file igb.h.

#define IGB_TXD_DCMD   (E1000_ADVTXD_DCMD_EOP | E1000_ADVTXD_DCMD_RS)

Definition at line 269 of file igb.h.

#define IGB_VF_FLAG_CTS   0x00000001 /* VF is clear to send data */

Definition at line 106 of file igb.h.

#define IGB_VF_FLAG_MULTI_PROMISC   0x00000004 /* VF has multicast promisc */

Definition at line 108 of file igb.h.

#define IGB_VF_FLAG_PF_SET_MAC   0x00000008 /* PF has set MAC address */

Definition at line 109 of file igb.h.

#define IGB_VF_FLAG_UNI_PROMISC   0x00000002 /* VF has unicast promisc */

Definition at line 107 of file igb.h.

#define MAX_Q_VECTORS   8

Definition at line 67 of file igb.h.

#define MAXIMUM_ETHERNET_VLAN_SIZE   1522

Definition at line 132 of file igb.h.

#define NON_Q_VECTORS   1

Definition at line 66 of file igb.h.

#define NVM_COMB_VER_OFF   0x0083

Definition at line 91 of file igb.h.

#define NVM_COMB_VER_PTR   0x003d

Definition at line 92 of file igb.h.

#define NVM_ETRACK_WORD   0x0042

Definition at line 90 of file igb.h.

Enumeration Type Documentation

Enumerator:
IGB_RING_FLAG_RX_SCTP_CSUM 
IGB_RING_FLAG_RX_LB_VLAN_BSWAP 
IGB_RING_FLAG_TX_CTX_IDX 
IGB_RING_FLAG_TX_DETECT_HANG 

Definition at line 262 of file igb.h.

Enumerator:
__E1000_TESTING 
__E1000_RESETTING 
__E1000_DOWN 
__E1000_TESTING 
__E1000_RESETTING 
__E1000_ACCESS_SHARED_RESOURCE 
__E1000_DOWN 
__IGB_TESTING 
__IGB_RESETTING 
__IGB_DOWN 

Definition at line 404 of file igb.h.

enum igb_boards
Enumerator:
board_82575 

Definition at line 410 of file igb.h.

Function Documentation

void igb_alloc_rx_buffers ( struct igb_ring rx_ring,
u16  cleaned_count 
)

igb_alloc_rx_buffers - Replace used receive buffers; packet split : address of board private structure

Definition at line 6117 of file igb_main.c.

void igb_configure_rx_ring ( struct igb_adapter adapter,
struct igb_ring ring 
)

igb_configure_rx_ring - Configure a receive ring after Reset : board private structure : receive ring to be configured

Configure the Rx unit of the MAC after a reset.

Definition at line 3084 of file igb_main.c.

void igb_configure_tx_ring ( struct igb_adapter adapter,
struct igb_ring ring 
)

igb_configure_tx_ring - Configure transmit ring after Reset : board private structure : tx ring to configure

Configure a transmit ring after a reset.

Definition at line 2718 of file igb_main.c.

void igb_down ( struct igb_adapter )

Definition at line 1519 of file igb_main.c.

void igb_free_rx_resources ( struct igb_ring rx_ring)

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

Free all receive software resources

Definition at line 3268 of file igb_main.c.

void igb_free_tx_resources ( struct igb_ring tx_ring)

igb_free_tx_resources - Free Tx Resources per Queue : Tx descriptor ring for a specific queue

Free all transmit software resources

Definition at line 3166 of file igb_main.c.

bool igb_has_link ( struct igb_adapter adapter)

igb_has_link - check shared code for link and determine up/down : pointer to driver private info

Definition at line 3594 of file igb_main.c.

void igb_power_up_link ( struct igb_adapter adapter)

igb_power_up_link - Power up the phy/serdes link : address of board private structure

Definition at line 1455 of file igb_main.c.

void igb_reinit_locked ( struct igb_adapter )

Definition at line 1574 of file igb_main.c.

void igb_reset ( struct igb_adapter adapter)

Definition at line 1584 of file igb_main.c.

void igb_set_ethtool_ops ( struct net_device )

Definition at line 2390 of file igb_ethtool.c.

void igb_set_fw_version ( struct igb_adapter adapter)

igb_set_fw_version - Configure version string for ethtool : adapter struct

Definition at line 1783 of file igb_main.c.

int igb_set_spd_dplx ( struct igb_adapter ,
u32  ,
u8   
)

Definition at line 6312 of file igb_main.c.

void igb_setup_rctl ( struct igb_adapter adapter)

igb_setup_rctl - configure the receive control registers : Board private structure

Definition at line 2938 of file igb_main.c.

int igb_setup_rx_resources ( struct igb_ring rx_ring)

igb_setup_rx_resources - allocate Rx resources (Descriptors) : rx descriptor ring (for a specific queue) to setup

Returns 0 on success, negative on failure

Definition at line 2769 of file igb_main.c.

void igb_setup_tctl ( struct igb_adapter adapter)

igb_setup_tctl - configure the transmit control registers : Board private structure

Definition at line 2689 of file igb_main.c.

int igb_setup_tx_resources ( struct igb_ring tx_ring)

igb_setup_tx_resources - allocate Tx resources (Descriptors) : tx descriptor ring (for a specific queue) to setup

Return 0 on success, negative on failure

Definition at line 2625 of file igb_main.c.

void igb_unmap_and_free_tx_resource ( struct igb_ring ,
struct igb_tx_buffer  
)

Definition at line 3197 of file igb_main.c.

int igb_up ( struct igb_adapter adapter)

igb_up - Open the interface and prepare it to handle traffic : board private structure

Definition at line 1481 of file igb_main.c.

void igb_update_stats ( struct igb_adapter adapter,
struct rtnl_link_stats64 net_stats 
)

igb_update_stats - Update the board statistics counters : board private structure

Definition at line 4580 of file igb_main.c.

netdev_tx_t igb_xmit_frame_ring ( struct sk_buff ,
struct igb_ring  
)

Definition at line 4372 of file igb_main.c.

Variable Documentation

char igb_driver_name[]

Definition at line 67 of file igb_main.c.

char igb_driver_version[]

Definition at line 68 of file igb_main.c.