Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions | Variables
bnad.h File Reference
#include <linux/rtnetlink.h>
#include <linux/workqueue.h>
#include <linux/ipv6.h>
#include <linux/etherdevice.h>
#include <linux/mutex.h>
#include <linux/firmware.h>
#include <linux/if_vlan.h>
#include <asm/checksum.h>
#include <net/ip6_checksum.h>
#include <net/ip.h>
#include <net/tcp.h>
#include "bna.h"

Go to the source code of this file.

Data Structures

struct  bnad_rx_ctrl
 
struct  bnad_iocmd_comp
 
struct  bnad_completion
 
struct  bnad_drv_stats
 
struct  bnad_stats
 
struct  bnad_tx_res_info
 
struct  bnad_rx_res_info
 
struct  bnad_tx_info
 
struct  bnad_rx_info
 
struct  bnad_skb_unmap
 
struct  bnad_unmap_q
 
struct  bnad
 
struct  bnad_drvinfo
 

Macros

#define BNAD_TXQ_DEPTH   2048
 
#define BNAD_RXQ_DEPTH   2048
 
#define BNAD_MAX_TX   1
 
#define BNAD_MAX_TXQ_PER_TX   8 /* 8 priority queues */
 
#define BNAD_TXQ_NUM   1
 
#define BNAD_MAX_RX   1
 
#define BNAD_MAX_RXP_PER_RX   16
 
#define BNAD_MAX_RXQ_PER_RXP   2
 
#define BNAD_RXMODE_PROMISC_DEFAULT   BNA_RXMODE_PROMISC
 
#define BNAD_NAME   "bna"
 
#define BNAD_NAME_LEN   64
 
#define BNAD_VERSION   "3.0.23.0"
 
#define BNAD_MAILBOX_MSIX_INDEX   0
 
#define BNAD_MAILBOX_MSIX_VECTORS   1
 
#define BNAD_INTX_TX_IB_BITMASK   0x1
 
#define BNAD_INTX_RX_IB_BITMASK   0x2
 
#define BNAD_STATS_TIMER_FREQ   1000 /* in msecs */
 
#define BNAD_DIM_TIMER_FREQ   1000 /* in msecs */
 
#define BNAD_IOCETH_TIMEOUT   10000
 
#define BNAD_MAX_Q_DEPTH   0x10000
 
#define BNAD_MIN_Q_DEPTH   0x200
 
#define BNAD_MAX_RXQ_DEPTH   (BNAD_MAX_Q_DEPTH / bnad_rxqs_per_cq)
 
#define BNAD_MAX_TXQ_DEPTH   BNAD_MAX_RXQ_DEPTH
 
#define BNAD_JUMBO_MTU   9000
 
#define BNAD_NETIF_WAKE_THRESHOLD   8
 
#define BNAD_RXQ_REFILL_THRESHOLD_SHIFT   3
 
#define BNAD_TXQ_FREE_SENT   0
 
#define BNAD_TXQ_TX_STARTED   1
 
#define BNAD_RXQ_REFILL   0
 
#define BNAD_RXQ_STARTED   1
 
#define BNAD_RXQ_POST_OK   2
 
#define BNAD_NUM_TXQ   (bnad->num_tx * bnad->num_txq_per_tx)
 
#define BNAD_NUM_RXP   (bnad->num_rx * bnad->num_rxp_per_rx)
 
#define BNAD_CF_DIM_ENABLED   0x01 /* DIM */
 
#define BNAD_CF_PROMISC   0x02
 
#define BNAD_CF_ALLMULTI   0x04
 
#define BNAD_CF_MSIX   0x08 /* If in MSIx mode */
 
#define BNAD_RF_CEE_RUNNING   0
 
#define BNAD_RF_MTU_SET   1
 
#define BNAD_RF_MBOX_IRQ_DISABLED   2
 
#define BNAD_RF_NETDEV_REGISTERED   3
 
#define BNAD_RF_DIM_TIMER_RUNNING   4
 
#define BNAD_RF_STATS_TIMER_RUNNING   5
 
#define BNAD_RF_TX_PRIO_SET   6
 
#define BNAD_FP_IN_RX_PATH   0
 
#define BNAD_UPDATE_CTR(_bnad, _ctr)   (((_bnad)->stats.drv_stats._ctr)++)
 
#define BNAD_GET_CTR(_bnad, _ctr)   ((_bnad)->stats.drv_stats._ctr)
 
#define bnad_enable_rx_irq_unsafe(_ccb)
 

Enumerations

enum  bnad_intr_source { BNAD_INTR_TX = 1, BNAD_INTR_RX = 2 }
 
enum  bnad_link_state { BNAD_LS_DOWN = 0, BNAD_LS_UP = 1 }
 

Functions

u32cna_get_firmware_buf (struct pci_dev *pdev)
 
void bnad_set_rx_mode (struct net_device *netdev)
 
struct net_device_statsbnad_get_netdev_stats (struct net_device *netdev)
 
int bnad_mac_addr_set_locked (struct bnad *bnad, u8 *mac_addr)
 
int bnad_enable_default_bcast (struct bnad *bnad)
 
void bnad_restore_vlans (struct bnad *bnad, u32 rx_id)
 
void bnad_set_ethtool_ops (struct net_device *netdev)
 
void bnad_cb_completion (void *arg, enum bfa_status status)
 
void bnad_tx_coalescing_timeo_set (struct bnad *bnad)
 
void bnad_rx_coalescing_timeo_set (struct bnad *bnad)
 
int bnad_setup_rx (struct bnad *bnad, u32 rx_id)
 
int bnad_setup_tx (struct bnad *bnad, u32 tx_id)
 
void bnad_destroy_tx (struct bnad *bnad, u32 tx_id)
 
void bnad_destroy_rx (struct bnad *bnad, u32 rx_id)
 
void bnad_dim_timer_start (struct bnad *bnad)
 
void bnad_netdev_qstats_fill (struct bnad *bnad, struct rtnl_link_stats64 *stats)
 
void bnad_netdev_hwstats_fill (struct bnad *bnad, struct rtnl_link_stats64 *stats)
 
void bnad_debugfs_init (struct bnad *bnad)
 
void bnad_debugfs_uninit (struct bnad *bnad)
 

Variables

struct bnad_tx_info ____cacheline_aligned
 
struct firmwarebfi_fw
 
u32 bnad_rxqs_per_cq
 

Macro Definition Documentation

#define BNAD_CF_ALLMULTI   0x04

Definition at line 241 of file bnad.h.

#define BNAD_CF_DIM_ENABLED   0x01 /* DIM */

Definition at line 239 of file bnad.h.

#define BNAD_CF_MSIX   0x08 /* If in MSIx mode */

Definition at line 242 of file bnad.h.

#define BNAD_CF_PROMISC   0x02

Definition at line 240 of file bnad.h.

#define BNAD_DIM_TIMER_FREQ   1000 /* in msecs */

Definition at line 82 of file bnad.h.

#define bnad_enable_rx_irq_unsafe (   _ccb)
Value:
{ \
if (likely(test_bit(BNAD_RXQ_STARTED, &(_ccb)->rcb[0]->flags))) {\
bna_ib_coalescing_timer_set((_ccb)->i_dbell, \
(_ccb)->rx_coalescing_timeo); \
bna_ib_ack((_ccb)->i_dbell, 0); \
} \
}

Definition at line 399 of file bnad.h.

#define BNAD_FP_IN_RX_PATH   0

Definition at line 258 of file bnad.h.

#define BNAD_GET_CTR (   _bnad,
  _ctr 
)    ((_bnad)->stats.drv_stats._ctr)

Definition at line 397 of file bnad.h.

#define BNAD_INTX_RX_IB_BITMASK   0x2

Definition at line 79 of file bnad.h.

#define BNAD_INTX_TX_IB_BITMASK   0x1

Definition at line 78 of file bnad.h.

#define BNAD_IOCETH_TIMEOUT   10000

Definition at line 84 of file bnad.h.

#define BNAD_JUMBO_MTU   9000

Definition at line 93 of file bnad.h.

#define BNAD_MAILBOX_MSIX_INDEX   0

Definition at line 76 of file bnad.h.

#define BNAD_MAILBOX_MSIX_VECTORS   1

Definition at line 77 of file bnad.h.

#define BNAD_MAX_Q_DEPTH   0x10000

Definition at line 86 of file bnad.h.

#define BNAD_MAX_RX   1

Definition at line 45 of file bnad.h.

#define BNAD_MAX_RXP_PER_RX   16

Definition at line 46 of file bnad.h.

#define BNAD_MAX_RXQ_DEPTH   (BNAD_MAX_Q_DEPTH / bnad_rxqs_per_cq)

Definition at line 89 of file bnad.h.

#define BNAD_MAX_RXQ_PER_RXP   2

Definition at line 47 of file bnad.h.

#define BNAD_MAX_TX   1

Definition at line 41 of file bnad.h.

#define BNAD_MAX_TXQ_DEPTH   BNAD_MAX_RXQ_DEPTH

Definition at line 91 of file bnad.h.

#define BNAD_MAX_TXQ_PER_TX   8 /* 8 priority queues */

Definition at line 42 of file bnad.h.

#define BNAD_MIN_Q_DEPTH   0x200

Definition at line 87 of file bnad.h.

#define BNAD_NAME   "bna"

Definition at line 71 of file bnad.h.

#define BNAD_NAME_LEN   64

Definition at line 72 of file bnad.h.

#define BNAD_NETIF_WAKE_THRESHOLD   8

Definition at line 95 of file bnad.h.

#define BNAD_NUM_RXP   (bnad->num_rx * bnad->num_rxp_per_rx)

Definition at line 110 of file bnad.h.

#define BNAD_NUM_TXQ   (bnad->num_tx * bnad->num_txq_per_tx)

Definition at line 109 of file bnad.h.

#define BNAD_RF_CEE_RUNNING   0

Definition at line 247 of file bnad.h.

#define BNAD_RF_DIM_TIMER_RUNNING   4

Definition at line 251 of file bnad.h.

#define BNAD_RF_MBOX_IRQ_DISABLED   2

Definition at line 249 of file bnad.h.

#define BNAD_RF_MTU_SET   1

Definition at line 248 of file bnad.h.

#define BNAD_RF_NETDEV_REGISTERED   3

Definition at line 250 of file bnad.h.

#define BNAD_RF_STATS_TIMER_RUNNING   5

Definition at line 252 of file bnad.h.

#define BNAD_RF_TX_PRIO_SET   6

Definition at line 253 of file bnad.h.

#define BNAD_RXMODE_PROMISC_DEFAULT   BNA_RXMODE_PROMISC

Definition at line 66 of file bnad.h.

#define BNAD_RXQ_DEPTH   2048

Definition at line 39 of file bnad.h.

#define BNAD_RXQ_POST_OK   2

Definition at line 106 of file bnad.h.

#define BNAD_RXQ_REFILL   0

Definition at line 104 of file bnad.h.

#define BNAD_RXQ_REFILL_THRESHOLD_SHIFT   3

Definition at line 97 of file bnad.h.

#define BNAD_RXQ_STARTED   1

Definition at line 105 of file bnad.h.

#define BNAD_STATS_TIMER_FREQ   1000 /* in msecs */

Definition at line 81 of file bnad.h.

#define BNAD_TXQ_DEPTH   2048

Definition at line 38 of file bnad.h.

#define BNAD_TXQ_FREE_SENT   0

Definition at line 100 of file bnad.h.

#define BNAD_TXQ_NUM   1

Definition at line 43 of file bnad.h.

#define BNAD_TXQ_TX_STARTED   1

Definition at line 101 of file bnad.h.

#define BNAD_UPDATE_CTR (   _bnad,
  _ctr 
)    (((_bnad)->stats.drv_stats._ctr)++)

Definition at line 394 of file bnad.h.

#define BNAD_VERSION   "3.0.23.0"

Definition at line 74 of file bnad.h.

Enumeration Type Documentation

Enumerator:
BNAD_INTR_TX 
BNAD_INTR_RX 

Definition at line 117 of file bnad.h.

Enumerator:
BNAD_LS_DOWN 
BNAD_LS_UP 

Definition at line 122 of file bnad.h.

Function Documentation

void bnad_cb_completion ( void arg,
enum bfa_status  status 
)

Definition at line 1097 of file bnad.c.

void bnad_debugfs_init ( struct bnad bnad)

Definition at line 536 of file bnad_debugfs.c.

void bnad_debugfs_uninit ( struct bnad bnad)

Definition at line 585 of file bnad_debugfs.c.

void bnad_destroy_rx ( struct bnad bnad,
u32  rx_id 
)

Definition at line 1864 of file bnad.c.

void bnad_destroy_tx ( struct bnad bnad,
u32  tx_id 
)

Definition at line 1713 of file bnad.c.

void bnad_dim_timer_start ( struct bnad bnad)

Definition at line 1594 of file bnad.c.

int bnad_enable_default_bcast ( struct bnad bnad)

Definition at line 2059 of file bnad.c.

struct net_device_stats* bnad_get_netdev_stats ( struct net_device netdev)
read
int bnad_mac_addr_set_locked ( struct bnad bnad,
u8 mac_addr 
)

Definition at line 2039 of file bnad.c.

void bnad_netdev_hwstats_fill ( struct bnad bnad,
struct rtnl_link_stats64 stats 
)

Definition at line 2139 of file bnad.c.

void bnad_netdev_qstats_fill ( struct bnad bnad,
struct rtnl_link_stats64 stats 
)

Definition at line 2099 of file bnad.c.

void bnad_restore_vlans ( struct bnad bnad,
u32  rx_id 
)

Definition at line 2085 of file bnad.c.

void bnad_rx_coalescing_timeo_set ( struct bnad bnad)

Definition at line 2021 of file bnad.c.

void bnad_set_ethtool_ops ( struct net_device netdev)

Definition at line 1136 of file bnad_ethtool.c.

void bnad_set_rx_mode ( struct net_device netdev)

Definition at line 2835 of file bnad.c.

int bnad_setup_rx ( struct bnad bnad,
u32  rx_id 
)

Definition at line 1910 of file bnad.c.

int bnad_setup_tx ( struct bnad bnad,
u32  tx_id 
)

Definition at line 1744 of file bnad.c.

void bnad_tx_coalescing_timeo_set ( struct bnad bnad)

Definition at line 2008 of file bnad.c.

u32* cna_get_firmware_buf ( struct pci_dev pdev)

Definition at line 48 of file cna_fwimg.c.

Variable Documentation

struct firmware* bfi_fw

Definition at line 23 of file cna_fwimg.c.

u32 bnad_rxqs_per_cq

Definition at line 55 of file bnad.c.