Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions | Variables
ixgbevf.h File Reference
#include <linux/types.h>
#include <linux/bitops.h>
#include <linux/timer.h>
#include <linux/io.h>
#include <linux/netdevice.h>
#include <linux/if_vlan.h>
#include <linux/u64_stats_sync.h>
#include "vf.h"

Go to the source code of this file.

Data Structures

struct  ixgbevf_tx_buffer
 
struct  ixgbevf_rx_buffer
 
struct  ixgbevf_ring
 
struct  ixgbevf_ring_container
 
struct  ixgbevf_q_vector
 
struct  ixgbevf_adapter
 
struct  ixgbevf_cb
 

Macros

#define IXGBEVF_RX_BUFFER_WRITE   16 /* Must be power of 2 */
 
#define MAX_RX_QUEUES   1
 
#define MAX_TX_QUEUES   1
 
#define IXGBEVF_DEFAULT_TXD   1024
 
#define IXGBEVF_DEFAULT_RXD   512
 
#define IXGBEVF_MAX_TXD   4096
 
#define IXGBEVF_MIN_TXD   64
 
#define IXGBEVF_MAX_RXD   4096
 
#define IXGBEVF_MIN_RXD   64
 
#define IXGBEVF_RXBUFFER_256   256 /* Used for packet split */
 
#define IXGBEVF_RXBUFFER_3K   3072
 
#define IXGBEVF_RXBUFFER_7K   7168
 
#define IXGBEVF_RXBUFFER_15K   15360
 
#define IXGBEVF_MAX_RXBUFFER   16384 /* largest size for single descriptor */
 
#define IXGBEVF_RX_HDR_SIZE   IXGBEVF_RXBUFFER_256
 
#define MAXIMUM_ETHERNET_VLAN_SIZE   (VLAN_ETH_FRAME_LEN + ETH_FCS_LEN)
 
#define IXGBE_TX_FLAGS_CSUM   (u32)(1)
 
#define IXGBE_TX_FLAGS_VLAN   (u32)(1 << 1)
 
#define IXGBE_TX_FLAGS_TSO   (u32)(1 << 2)
 
#define IXGBE_TX_FLAGS_IPV4   (u32)(1 << 3)
 
#define IXGBE_TX_FLAGS_FCOE   (u32)(1 << 4)
 
#define IXGBE_TX_FLAGS_FSO   (u32)(1 << 5)
 
#define IXGBE_TX_FLAGS_VLAN_MASK   0xffff0000
 
#define IXGBE_TX_FLAGS_VLAN_PRIO_MASK   0x0000e000
 
#define IXGBE_TX_FLAGS_VLAN_SHIFT   16
 
#define ixgbevf_for_each_ring(pos, head)   for (pos = (head).ring; pos != NULL; pos = pos->next)
 
#define IXGBE_MIN_RSC_ITR   24
 
#define IXGBE_100K_ITR   40
 
#define IXGBE_20K_ITR   200
 
#define IXGBE_10K_ITR   400
 
#define IXGBE_8K_ITR   500
 
#define EITR_INTS_PER_SEC_TO_REG(_eitr)   ((_eitr) ? (1000000000 / ((_eitr) * 256)) : 8)
 
#define EITR_REG_TO_INTS_PER_SEC   EITR_INTS_PER_SEC_TO_REG
 
#define IXGBE_DESC_UNUSED(R)
 
#define IXGBEVF_RX_DESC(R, i)   (&(((union ixgbe_adv_rx_desc *)((R)->desc))[i]))
 
#define IXGBEVF_TX_DESC(R, i)   (&(((union ixgbe_adv_tx_desc *)((R)->desc))[i]))
 
#define IXGBEVF_TX_CTXTDESC(R, i)   (&(((struct ixgbe_adv_tx_context_desc *)((R)->desc))[i]))
 
#define IXGBE_MAX_JUMBO_FRAME_SIZE   9728 /* Maximum Supported Size 9.5KB */
 
#define OTHER_VECTOR   1
 
#define NON_Q_VECTORS   (OTHER_VECTOR)
 
#define MAX_MSIX_Q_VECTORS   2
 
#define MIN_MSIX_Q_VECTORS   1
 
#define MIN_MSIX_COUNT   (MIN_MSIX_Q_VECTORS + NON_Q_VECTORS)
 
#define IXGBE_FLAG_IN_WATCHDOG_TASK   (u32)(1)
 
#define IXGBE_CB(skb)   ((struct ixgbevf_cb *)(skb)->cb)
 
#define hw_dbg(hw, format, arg...)   do {} while (0)
 

Enumerations

enum  ixbgevf_state_t { __IXGBEVF_TESTING, __IXGBEVF_RESETTING, __IXGBEVF_DOWN }
 
enum  ixgbevf_boards { board_82599_vf, board_X540_vf }
 

Functions

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_set_ethtool_ops (struct net_device *netdev)
 
int ixgbevf_setup_rx_resources (struct ixgbevf_adapter *, struct ixgbevf_ring *)
 
int ixgbevf_setup_tx_resources (struct ixgbevf_adapter *, struct ixgbevf_ring *)
 
void ixgbevf_free_rx_resources (struct ixgbevf_adapter *, struct ixgbevf_ring *)
 
void ixgbevf_free_tx_resources (struct ixgbevf_adapter *, struct ixgbevf_ring *)
 
void ixgbevf_update_stats (struct ixgbevf_adapter *adapter)
 
int ethtool_ioctl (struct ifreq *ifr)
 
void ixgbe_napi_add_all (struct ixgbevf_adapter *adapter)
 
void ixgbe_napi_del_all (struct ixgbevf_adapter *adapter)
 

Variables

struct ixgbevf_info ixgbevf_82599_vf_info
 
struct ixgbevf_info ixgbevf_X540_vf_info
 
struct ixgbe_mbx_operations ixgbevf_mbx_ops
 
const char ixgbevf_driver_name []
 
const char ixgbevf_driver_version []
 

Macro Definition Documentation

#define EITR_INTS_PER_SEC_TO_REG (   _eitr)    ((_eitr) ? (1000000000 / ((_eitr) * 256)) : 8)

Definition at line 163 of file ixgbevf.h.

#define EITR_REG_TO_INTS_PER_SEC   EITR_INTS_PER_SEC_TO_REG

Definition at line 165 of file ixgbevf.h.

#define hw_dbg (   hw,
  format,
  arg... 
)    do {} while (0)

Definition at line 306 of file ixgbevf.h.

#define IXGBE_100K_ITR   40

Definition at line 154 of file ixgbevf.h.

#define IXGBE_10K_ITR   400

Definition at line 156 of file ixgbevf.h.

#define IXGBE_20K_ITR   200

Definition at line 155 of file ixgbevf.h.

#define IXGBE_8K_ITR   500

Definition at line 157 of file ixgbevf.h.

#define IXGBE_CB (   skb)    ((struct ixgbevf_cb *)(skb)->cb)

Definition at line 267 of file ixgbevf.h.

#define IXGBE_DESC_UNUSED (   R)
Value:
((((R)->next_to_clean > (R)->next_to_use) ? 0 : (R)->count) + \
(R)->next_to_clean - (R)->next_to_use - 1)

Definition at line 167 of file ixgbevf.h.

#define IXGBE_FLAG_IN_WATCHDOG_TASK   (u32)(1)

Definition at line 231 of file ixgbevf.h.

#define IXGBE_MAX_JUMBO_FRAME_SIZE   9728 /* Maximum Supported Size 9.5KB */

Definition at line 178 of file ixgbevf.h.

#define IXGBE_MIN_RSC_ITR   24

Definition at line 153 of file ixgbevf.h.

#define IXGBE_TX_FLAGS_CSUM   (u32)(1)

Definition at line 113 of file ixgbevf.h.

#define IXGBE_TX_FLAGS_FCOE   (u32)(1 << 4)

Definition at line 117 of file ixgbevf.h.

#define IXGBE_TX_FLAGS_FSO   (u32)(1 << 5)

Definition at line 118 of file ixgbevf.h.

#define IXGBE_TX_FLAGS_IPV4   (u32)(1 << 3)

Definition at line 116 of file ixgbevf.h.

#define IXGBE_TX_FLAGS_TSO   (u32)(1 << 2)

Definition at line 115 of file ixgbevf.h.

#define IXGBE_TX_FLAGS_VLAN   (u32)(1 << 1)

Definition at line 114 of file ixgbevf.h.

#define IXGBE_TX_FLAGS_VLAN_MASK   0xffff0000

Definition at line 119 of file ixgbevf.h.

#define IXGBE_TX_FLAGS_VLAN_PRIO_MASK   0x0000e000

Definition at line 120 of file ixgbevf.h.

#define IXGBE_TX_FLAGS_VLAN_SHIFT   16

Definition at line 121 of file ixgbevf.h.

#define IXGBEVF_DEFAULT_RXD   512

Definition at line 96 of file ixgbevf.h.

#define IXGBEVF_DEFAULT_TXD   1024

Definition at line 95 of file ixgbevf.h.

#define ixgbevf_for_each_ring (   pos,
  head 
)    for (pos = (head).ring; pos != NULL; pos = pos->next)

Definition at line 132 of file ixgbevf.h.

#define IXGBEVF_MAX_RXBUFFER   16384 /* largest size for single descriptor */

Definition at line 107 of file ixgbevf.h.

#define IXGBEVF_MAX_RXD   4096

Definition at line 99 of file ixgbevf.h.

#define IXGBEVF_MAX_TXD   4096

Definition at line 97 of file ixgbevf.h.

#define IXGBEVF_MIN_RXD   64

Definition at line 100 of file ixgbevf.h.

#define IXGBEVF_MIN_TXD   64

Definition at line 98 of file ixgbevf.h.

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

Definition at line 90 of file ixgbevf.h.

#define IXGBEVF_RX_DESC (   R,
  i 
)    (&(((union ixgbe_adv_rx_desc *)((R)->desc))[i]))

Definition at line 171 of file ixgbevf.h.

#define IXGBEVF_RX_HDR_SIZE   IXGBEVF_RXBUFFER_256

Definition at line 109 of file ixgbevf.h.

#define IXGBEVF_RXBUFFER_15K   15360

Definition at line 106 of file ixgbevf.h.

#define IXGBEVF_RXBUFFER_256   256 /* Used for packet split */

Definition at line 103 of file ixgbevf.h.

#define IXGBEVF_RXBUFFER_3K   3072

Definition at line 104 of file ixgbevf.h.

#define IXGBEVF_RXBUFFER_7K   7168

Definition at line 105 of file ixgbevf.h.

#define IXGBEVF_TX_CTXTDESC (   R,
  i 
)    (&(((struct ixgbe_adv_tx_context_desc *)((R)->desc))[i]))

Definition at line 175 of file ixgbevf.h.

#define IXGBEVF_TX_DESC (   R,
  i 
)    (&(((union ixgbe_adv_tx_desc *)((R)->desc))[i]))

Definition at line 173 of file ixgbevf.h.

#define MAX_MSIX_Q_VECTORS   2

Definition at line 183 of file ixgbevf.h.

#define MAX_RX_QUEUES   1

Definition at line 92 of file ixgbevf.h.

#define MAX_TX_QUEUES   1

Definition at line 93 of file ixgbevf.h.

#define MAXIMUM_ETHERNET_VLAN_SIZE   (VLAN_ETH_FRAME_LEN + ETH_FCS_LEN)

Definition at line 111 of file ixgbevf.h.

#define MIN_MSIX_COUNT   (MIN_MSIX_Q_VECTORS + NON_Q_VECTORS)

Definition at line 186 of file ixgbevf.h.

#define MIN_MSIX_Q_VECTORS   1

Definition at line 185 of file ixgbevf.h.

#define NON_Q_VECTORS   (OTHER_VECTOR)

Definition at line 181 of file ixgbevf.h.

#define OTHER_VECTOR   1

Definition at line 180 of file ixgbevf.h.

Enumeration Type Documentation

Enumerator:
__IXGBEVF_TESTING 
__IXGBEVF_RESETTING 
__IXGBEVF_DOWN 

Definition at line 258 of file ixgbevf.h.

Enumerator:
board_82599_vf 
board_X540_vf 

Definition at line 269 of file ixgbevf.h.

Function Documentation

int ethtool_ioctl ( struct ifreq ifr)
void ixgbe_napi_add_all ( struct ixgbevf_adapter adapter)
void ixgbe_napi_del_all ( struct ixgbevf_adapter adapter)
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.

void ixgbevf_set_ethtool_ops ( struct net_device netdev)

Definition at line 704 of file ethtool.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.

Variable Documentation

struct ixgbevf_info ixgbevf_82599_vf_info

Definition at line 530 of file vf.c.

const char ixgbevf_driver_name[]

Definition at line 57 of file ixgbevf_main.c.

const char ixgbevf_driver_version[]

Definition at line 62 of file ixgbevf_main.c.

struct ixgbe_mbx_operations ixgbevf_mbx_ops

Definition at line 339 of file mbx.c.

struct ixgbevf_info ixgbevf_X540_vf_info

Definition at line 535 of file vf.c.