mtnic.h File Reference

Go to the source code of this file.

Data Structures

struct  mtnic_ctrl_seg
struct  mtnic_data_seg
struct  mtnic_tx_desc
struct  mtnic_rx_desc
struct  mtnic_rx_db_record
struct  mtnic_ring
struct  mtnic_cqe
struct  mtnic_cq_db_record
struct  mtnic_cq
struct  mtnic_eqe
struct  mtnic_eq
struct  mtnic_pages
struct  mtnic_err_buf
struct  mtnic_cmd
struct  mtnic_txcq_db
struct  mtnic
struct  mtnic_port
struct  mtnic_if_cmd_reg
 Command Register (Command interface). More...
struct  mtnic_if_query_fw_out_mbox
struct  mtnic_if_query_cap_in_imm
struct  mtnic_if_open_nic_in_mbox
struct  mtnic_if_config_rx_in_imm
struct  mtnic_if_config_send_in_imm
struct  mtnic_if_heart_beat_out_imm
struct  mtnic_if_config_port_vlan_filter_in_mbox
struct  mtnic_if_set_port_mtu_in_imm
struct  mtnic_if_set_port_default_ring_in_imm
struct  mtnic_if_set_port_state_in_imm
struct  mtnic_if_config_cq_in_mbox
struct  mtnic_if_config_rx_ring_in_mbox
struct  mtnic_if_set_rx_ring_modifier
struct  mtnic_if_set_rx_ring_addr_in_imm
struct  mtnic_if_config_send_ring_in_mbox
struct  mtnic_if_config_eq_in_mbox
struct  mtnic_if_release_resource_in_imm
struct  pcidev
struct  dev_pci_struct

Defines

#define MTNIC_MAX_PORTS   2
#define MTNIC_PORT1   0
#define MTNIC_PORT2   1
#define NUM_TX_RINGS   1
#define NUM_RX_RINGS   1
#define NUM_CQS   (NUM_RX_RINGS + NUM_TX_RINGS)
#define GO_BIT_TIMEOUT   6000
#define TBIT_RETRIES   100
#define UNITS_BUFFER_SIZE   8
#define MAX_GAP_PROD_CONS   ( UNITS_BUFFER_SIZE / 4 )
#define ETH_DEF_LEN   1540
#define ETH_FCS_LEN   14
#define DEF_MTU   ETH_DEF_LEN + ETH_FCS_LEN
#define DEF_IOBUF_SIZE   ETH_DEF_LEN
#define MAC_ADDRESS_SIZE   6
#define NUM_EQES   16
#define ROUND_TO_CHECK   0x400
#define DELAY_LINK_CHECK   300
#define CHECK_LINK_TIMES   7
#define XNOR(x, y)   (!(x) == !(y))
#define dma_addr_t   unsigned long
#define PAGE_SIZE   4096
#define PAGE_MASK   (PAGE_SIZE - 1)
#define MTNIC_MAILBOX_SIZE   PAGE_SIZE
#define MTNIC_BC_OFF(bc)   ((bc) >> 8)
#define MTNIC_BC_SZ(bc)   ((bc) & 0xff)
#define MTNIC_BC_ONES(size)   (~((int)0x80000000 >> (31 - size)))
#define MTNIC_BC_MASK(bc)   (MTNIC_BC_ONES(MTNIC_BC_SZ(bc)) << MTNIC_BC_OFF(bc))
#define MTNIC_BC_VAL(val, bc)   (((val) & MTNIC_BC_ONES(MTNIC_BC_SZ(bc))) << MTNIC_BC_OFF(bc))
#define MTNIC_BC(off, size)   ((off << 8) | (size & 0xff))
#define MTNIC_BC_GET(x, bc)   (((x) >> MTNIC_BC_OFF(bc)) & MTNIC_BC_ONES(MTNIC_BC_SZ(bc)))
#define MTNIC_BC_SET(x, val, bc)   ((x) = ((x) & ~MTNIC_BC_MASK(bc)) | MTNIC_BC_VAL(val, bc))
#define MTNIC_BC_PUT(x, val, bc)   ((x) |= MTNIC_BC_VAL(val, bc))
#define MTNIC_RESET_OFFSET   0xF0010
#define MTNIC_BIT_DESC_OWN   0x80000000
#define MTNIC_OPCODE_SEND   0xa
#define MTNIC_BIT_NO_ICRC   0x2
#define MTNIC_BIT_TX_COMP   0xc
#define MTNIC_INLINE   0x80000000
#define MTNIC_MEMTYPE_PAD   0x100
#define MTNIC_BIT_BAD_FCS   0x10
#define MTNIC_OPCODE_ERROR   0x1e
#define MTNIC_BIT_CQ_OWN   0x80
#define MTNIC_MASK_EQE_PORT   MTNIC_BC(4,2)
#define MTNIC_BIT_EQE_OWN   0x80
#define MTNIC_MASK_CMD_REG_TOKEN   MTNIC_BC(16,32)
#define MTNIC_MASK_CMD_REG_OPCODE   MTNIC_BC(0,16)
#define MTNIC_MASK_CMD_REG_T_BIT   MTNIC_BC(21,1)
#define MTNIC_MASK_CMD_REG_GO_BIT   MTNIC_BC(23,1)
#define MTNIC_MASK_CMD_REG_STATUS   MTNIC_BC(24,8)
#define MTNIC_MASK_HEAR_BEAT_INT_ERROR   MTNIC_BC(31,1)
#define MTNIC_MASK_CONFIG_PORT_STATE   MTNIC_BC(0,1)
#define MTNIC_MASK_CONFIG_RX_RING_STRIDE   MTNIC_BC(4,3)
#define MTNIC_MASK_CONFIG_RX_RING_SIZE   MTNIC_BC(0,4)
#define MTNIC_MASK_SET_RX_RING_ADDR_VLAN_ID   MTNIC_BC(0,12)
#define MTNIC_MASK_SET_RX_RING_ADDR_BY_MAC   MTNIC_BC(12,1)
#define MTNIC_MASK_SET_RX_RING_ADDR_BY_VLAN   MTNIC_BC(13,1)
#define MTNIC_MASK_CONFIG_TX_RING_INDEX   MTNIC_BC(0,8)
#define MTNIC_MASK_CONFIG_TX_RING_SIZE   MTNIC_BC(0,4)
#define MTNIC_MASK_CONFIG_TX_CQ_INDEX   MTNIC_BC(0,8)
#define MTNIC_MASK_CONFIG_EQ_INT_VEC   MTNIC_BC(0,6)
#define MTNIC_MASK_CONFIG_EQ_SIZE   MTNIC_BC(0,5)
#define MTNIC_MASK_CONFIG_EQ_OFFSET   MTNIC_BC(0,6)

Typedefs

typedef enum mtnic_if_cmd mtnic_if_cmd_t
typedef enum mtnic_if_caps mtnic_if_caps_t
 selectors for MTNIC_IF_CMD_QUERY_CAP
typedef enum mtnic_if_steer_types mtnic_if_steer_types_t
typedef enum mtnic_if_memory_types mtnic_if_memory_types_t
 types of memory access modes

Enumerations

enum  mtnic_if_cmd {
  MTNIC_IF_CMD_QUERY_FW = 0x004, MTNIC_IF_CMD_MAP_FW = 0xfff, MTNIC_IF_CMD_RUN_FW = 0xff6, MTNIC_IF_CMD_QUERY_CAP = 0x001,
  MTNIC_IF_CMD_MAP_PAGES = 0x002, MTNIC_IF_CMD_OPEN_NIC = 0x003, MTNIC_IF_CMD_CONFIG_RX = 0x005, MTNIC_IF_CMD_CONFIG_TX = 0x006,
  MTNIC_IF_CMD_CONFIG_INT_FREQ = 0x007, MTNIC_IF_CMD_HEART_BEAT = 0x008, MTNIC_IF_CMD_CLOSE_NIC = 0x009, MTNIC_IF_CMD_CONFIG_PORT_RSS_STEER = 0x10,
  MTNIC_IF_CMD_SET_PORT_RSS_INDIRECTION = 0x11, MTNIC_IF_CMD_CONFIG_PORT_PRIO_STEERING = 0x12, MTNIC_IF_CMD_CONFIG_PORT_ADDR_STEER = 0x13, MTNIC_IF_CMD_CONFIG_PORT_VLAN_FILTER = 0x14,
  MTNIC_IF_CMD_CONFIG_PORT_MCAST_FILTER = 0x15, MTNIC_IF_CMD_ENABLE_PORT_MCAST_FILTER = 0x16, MTNIC_IF_CMD_SET_PORT_MTU = 0x17, MTNIC_IF_CMD_SET_PORT_PROMISCUOUS_MODE = 0x18,
  MTNIC_IF_CMD_SET_PORT_DEFAULT_RING = 0x19, MTNIC_IF_CMD_SET_PORT_STATE = 0x1a, MTNIC_IF_CMD_DUMP_STAT = 0x1b, MTNIC_IF_CMD_ARM_PORT_STATE_EVENT = 0x1c,
  MTNIC_IF_CMD_CONFIG_CQ = 0x20, MTNIC_IF_CMD_CONFIG_RX_RING = 0x21, MTNIC_IF_CMD_SET_RX_RING_ADDR = 0x22, MTNIC_IF_CMD_SET_RX_RING_MCAST = 0x23,
  MTNIC_IF_CMD_ARM_RX_RING_WM = 0x24, MTNIC_IF_CMD_CONFIG_TX_RING = 0x25, MTNIC_IF_CMD_ENFORCE_TX_RING_ADDR = 0x26, MTNIC_IF_CMD_CONFIG_EQ = 0x27,
  MTNIC_IF_CMD_RELEASE_RESOURCE = 0x28
}
enum  mtnic_if_caps {
  MTNIC_IF_CAP_MAX_TX_RING_PER_PORT = 0x0, MTNIC_IF_CAP_MAX_RX_RING_PER_PORT = 0x1, MTNIC_IF_CAP_MAX_CQ_PER_PORT = 0x2, MTNIC_IF_CAP_NUM_PORTS = 0x3,
  MTNIC_IF_CAP_MAX_TX_DESC = 0x4, MTNIC_IF_CAP_MAX_RX_DESC = 0x5, MTNIC_IF_CAP_MAX_CQES = 0x6, MTNIC_IF_CAP_MAX_TX_SG_ENTRIES = 0x7,
  MTNIC_IF_CAP_MAX_RX_SG_ENTRIES = 0x8, MTNIC_IF_CAP_MEM_KEY = 0x9, MTNIC_IF_CAP_RSS_HASH_TYPE = 0xa, MTNIC_IF_CAP_MAX_PORT_UCAST_ADDR = 0xc,
  MTNIC_IF_CAP_MAX_RING_UCAST_ADDR = 0xd, MTNIC_IF_CAP_MAX_PORT_MCAST_ADDR = 0xe, MTNIC_IF_CAP_MAX_RING_MCAST_ADDR = 0xf, MTNIC_IF_CAP_INTA = 0x10,
  MTNIC_IF_CAP_BOARD_ID_LOW = 0x11, MTNIC_IF_CAP_BOARD_ID_HIGH = 0x12, MTNIC_IF_CAP_TX_CQ_DB_OFFSET = 0x13, MTNIC_IF_CAP_EQ_DB_OFFSET = 0x14,
  MTNIC_IF_CAP_SPEED = 0x20, MTNIC_IF_CAP_DEFAULT_MAC = 0x21, MTNIC_IF_CAP_EQ_OFFSET = 0x22, MTNIC_IF_CAP_CQ_OFFSET = 0x23,
  MTNIC_IF_CAP_TX_OFFSET = 0x24, MTNIC_IF_CAP_RX_OFFSET = 0x25
}
 selectors for MTNIC_IF_CMD_QUERY_CAP More...
enum  mtnic_if_steer_types { MTNIC_IF_STEER_NONE = 0, MTNIC_IF_STEER_PRIORITY = 1, MTNIC_IF_STEER_RSS = 2, MTNIC_IF_STEER_ADDRESS = 3 }
enum  mtnic_if_memory_types { MTNIC_IF_MEM_TYPE_SNOOP = 1, MTNIC_IF_MEM_TYPE_NO_SNOOP = 2 }
 types of memory access modes More...
enum  { MTNIC_HCR_BASE = 0x1f000, MTNIC_HCR_SIZE = 0x0001c, MTNIC_CLR_INT_SIZE = 0x00008 }
enum  mtnic_state { CARD_DOWN, CARD_INITIALIZED, CARD_UP, CARD_LINK_DOWN }
enum  mtnic_if_resource_types { MTNIC_IF_RESOURCE_TYPE_CQ = 0, MTNIC_IF_RESOURCE_TYPE_RX_RING, MTNIC_IF_RESOURCE_TYPE_TX_RING, MTNIC_IF_RESOURCE_TYPE_EQ }

Functions

 FILE_LICENCE (GPL2_ONLY)

Variables

struct dev_pci_struct mtnic_pci_dev


Define Documentation

#define MTNIC_MAX_PORTS   2

Definition at line 44 of file mtnic.h.

#define MTNIC_PORT1   0

Definition at line 45 of file mtnic.h.

#define MTNIC_PORT2   1

Definition at line 46 of file mtnic.h.

#define NUM_TX_RINGS   1

Definition at line 47 of file mtnic.h.

#define NUM_RX_RINGS   1

Definition at line 48 of file mtnic.h.

#define NUM_CQS   (NUM_RX_RINGS + NUM_TX_RINGS)

Definition at line 49 of file mtnic.h.

Referenced by mtnic_open(), and mtnic_poll().

#define GO_BIT_TIMEOUT   6000

Definition at line 50 of file mtnic.h.

Referenced by mtnic_cmd().

#define TBIT_RETRIES   100

Definition at line 51 of file mtnic.h.

Referenced by cmdif_go_bit().

#define UNITS_BUFFER_SIZE   8

#define MAX_GAP_PROD_CONS   ( UNITS_BUFFER_SIZE / 4 )

Definition at line 53 of file mtnic.h.

Referenced by mtnic_process_rx_cq().

#define ETH_DEF_LEN   1540

Definition at line 54 of file mtnic.h.

#define ETH_FCS_LEN   14

Definition at line 55 of file mtnic.h.

#define DEF_MTU   ETH_DEF_LEN + ETH_FCS_LEN

Definition at line 56 of file mtnic.h.

Referenced by mtnic_open().

#define DEF_IOBUF_SIZE   ETH_DEF_LEN

Definition at line 57 of file mtnic.h.

Referenced by mtnic_alloc_ring(), and mtnic_process_rx_cq().

#define MAC_ADDRESS_SIZE   6

Definition at line 59 of file mtnic.h.

Referenced by mtnic_probe().

#define NUM_EQES   16

Definition at line 60 of file mtnic.h.

Referenced by mtnic_alloc_eq().

#define ROUND_TO_CHECK   0x400

Definition at line 61 of file mtnic.h.

Referenced by mtnic_poll().

#define DELAY_LINK_CHECK   300

Definition at line 63 of file mtnic.h.

Referenced by mtnic_open().

#define CHECK_LINK_TIMES   7

Definition at line 64 of file mtnic.h.

Referenced by mtnic_open().

#define XNOR ( x,
 )     (!(x) == !(y))

Definition at line 67 of file mtnic.h.

Referenced by mtnic_process_rx_cq(), and mtnic_process_tx_cq().

#define dma_addr_t   unsigned long

Definition at line 68 of file mtnic.h.

#define PAGE_SIZE   4096

#define PAGE_MASK   (PAGE_SIZE - 1)

Definition at line 70 of file mtnic.h.

Referenced by mtnic_CONFIG_CQ(), mtnic_CONFIG_EQ(), mtnic_map_cmd(), and vring_init().

#define MTNIC_MAILBOX_SIZE   PAGE_SIZE

Definition at line 71 of file mtnic.h.

Referenced by mtnic_map_cmd().

#define MTNIC_BC_OFF ( bc   )     ((bc) >> 8)

Definition at line 77 of file mtnic.h.

Referenced by cmdif_go_bit(), and mtnic_cmd().

#define MTNIC_BC_SZ ( bc   )     ((bc) & 0xff)

Definition at line 78 of file mtnic.h.

#define MTNIC_BC_ONES ( size   )     (~((int)0x80000000 >> (31 - size)))

Definition at line 79 of file mtnic.h.

#define MTNIC_BC_MASK ( bc   )     (MTNIC_BC_ONES(MTNIC_BC_SZ(bc)) << MTNIC_BC_OFF(bc))

#define MTNIC_BC_VAL ( val,
bc   )     (((val) & MTNIC_BC_ONES(MTNIC_BC_SZ(bc))) << MTNIC_BC_OFF(bc))

Definition at line 82 of file mtnic.h.

#define MTNIC_BC ( off,
size   )     ((off << 8) | (size & 0xff))

Definition at line 89 of file mtnic.h.

#define MTNIC_BC_GET ( x,
bc   )     (((x) >> MTNIC_BC_OFF(bc)) & MTNIC_BC_ONES(MTNIC_BC_SZ(bc)))

Definition at line 92 of file mtnic.h.

#define MTNIC_BC_SET ( x,
val,
bc   )     ((x) = ((x) & ~MTNIC_BC_MASK(bc)) | MTNIC_BC_VAL(val, bc))

Definition at line 96 of file mtnic.h.

#define MTNIC_BC_PUT ( x,
val,
bc   )     ((x) |= MTNIC_BC_VAL(val, bc))

Definition at line 100 of file mtnic.h.

Referenced by mtnic_CONFIG_EQ(), and mtnic_CONFIG_RX_RING().

#define MTNIC_RESET_OFFSET   0xF0010

Definition at line 203 of file mtnic.h.

Referenced by mtnic_reset().

#define MTNIC_BIT_DESC_OWN   0x80000000

Definition at line 220 of file mtnic.h.

Referenced by mtnic_alloc_ring(), and mtnic_transmit().

#define MTNIC_OPCODE_SEND   0xa

Definition at line 221 of file mtnic.h.

Referenced by mtnic_transmit().

#define MTNIC_BIT_NO_ICRC   0x2

Definition at line 224 of file mtnic.h.

Referenced by mtnic_transmit().

#define MTNIC_BIT_TX_COMP   0xc

Definition at line 225 of file mtnic.h.

Referenced by mtnic_transmit().

#define MTNIC_INLINE   0x80000000

Definition at line 231 of file mtnic.h.

#define MTNIC_MEMTYPE_PAD   0x100

Definition at line 233 of file mtnic.h.

#define MTNIC_BIT_BAD_FCS   0x10

Definition at line 297 of file mtnic.h.

Referenced by mtnic_process_rx_cq().

#define MTNIC_OPCODE_ERROR   0x1e

Definition at line 298 of file mtnic.h.

Referenced by mtnic_process_rx_cq().

#define MTNIC_BIT_CQ_OWN   0x80

Definition at line 304 of file mtnic.h.

Referenced by mtnic_alloc_cq(), mtnic_process_rx_cq(), and mtnic_process_tx_cq().

#define MTNIC_MASK_EQE_PORT   MTNIC_BC(4,2)

Definition at line 344 of file mtnic.h.

#define MTNIC_BIT_EQE_OWN   0x80

Definition at line 349 of file mtnic.h.

Referenced by mtnic_alloc_eq().

#define MTNIC_MASK_CMD_REG_TOKEN   MTNIC_BC(16,32)

Definition at line 478 of file mtnic.h.

#define MTNIC_MASK_CMD_REG_OPCODE   MTNIC_BC(0,16)

Definition at line 480 of file mtnic.h.

#define MTNIC_MASK_CMD_REG_T_BIT   MTNIC_BC(21,1)

Definition at line 481 of file mtnic.h.

Referenced by cmdif_go_bit(), and mtnic_cmd().

#define MTNIC_MASK_CMD_REG_GO_BIT   MTNIC_BC(23,1)

Definition at line 482 of file mtnic.h.

Referenced by cmdif_go_bit(), and mtnic_cmd().

#define MTNIC_MASK_CMD_REG_STATUS   MTNIC_BC(24,8)

Definition at line 483 of file mtnic.h.

#define MTNIC_MASK_HEAR_BEAT_INT_ERROR   MTNIC_BC(31,1)

Definition at line 553 of file mtnic.h.

Referenced by mtnic_HEART_BEAT().

#define MTNIC_MASK_CONFIG_PORT_STATE   MTNIC_BC(0,1)

Definition at line 585 of file mtnic.h.

Referenced by mtnic_SET_PORT_STATE().

#define MTNIC_MASK_CONFIG_RX_RING_STRIDE   MTNIC_BC(4,3)

Definition at line 613 of file mtnic.h.

Referenced by mtnic_CONFIG_RX_RING().

#define MTNIC_MASK_CONFIG_RX_RING_SIZE   MTNIC_BC(0,4)

Definition at line 615 of file mtnic.h.

Referenced by mtnic_CONFIG_RX_RING().

#define MTNIC_MASK_SET_RX_RING_ADDR_VLAN_ID   MTNIC_BC(0,12)

Definition at line 638 of file mtnic.h.

#define MTNIC_MASK_SET_RX_RING_ADDR_BY_MAC   MTNIC_BC(12,1)

Definition at line 639 of file mtnic.h.

Referenced by mtnic_SET_RX_RING_ADDR().

#define MTNIC_MASK_SET_RX_RING_ADDR_BY_VLAN   MTNIC_BC(13,1)

Definition at line 640 of file mtnic.h.

#define MTNIC_MASK_CONFIG_TX_RING_INDEX   MTNIC_BC(0,8)

Definition at line 647 of file mtnic.h.

#define MTNIC_MASK_CONFIG_TX_RING_SIZE   MTNIC_BC(0,4)

Definition at line 649 of file mtnic.h.

#define MTNIC_MASK_CONFIG_TX_CQ_INDEX   MTNIC_BC(0,8)

Definition at line 654 of file mtnic.h.

#define MTNIC_MASK_CONFIG_EQ_INT_VEC   MTNIC_BC(0,6)

Definition at line 663 of file mtnic.h.

Referenced by mtnic_CONFIG_EQ().

#define MTNIC_MASK_CONFIG_EQ_SIZE   MTNIC_BC(0,5)

Definition at line 665 of file mtnic.h.

Referenced by mtnic_CONFIG_EQ().

#define MTNIC_MASK_CONFIG_EQ_OFFSET   MTNIC_BC(0,6)

Definition at line 667 of file mtnic.h.

Referenced by mtnic_CONFIG_EQ().


Typedef Documentation

selectors for MTNIC_IF_CMD_QUERY_CAP

types of memory access modes


Enumeration Type Documentation

Enumerator:
MTNIC_IF_CMD_QUERY_FW 
MTNIC_IF_CMD_MAP_FW 
MTNIC_IF_CMD_RUN_FW 
MTNIC_IF_CMD_QUERY_CAP 
MTNIC_IF_CMD_MAP_PAGES 
MTNIC_IF_CMD_OPEN_NIC 
MTNIC_IF_CMD_CONFIG_RX 
MTNIC_IF_CMD_CONFIG_TX 
MTNIC_IF_CMD_CONFIG_INT_FREQ 
MTNIC_IF_CMD_HEART_BEAT 
MTNIC_IF_CMD_CLOSE_NIC 
MTNIC_IF_CMD_CONFIG_PORT_RSS_STEER 
MTNIC_IF_CMD_SET_PORT_RSS_INDIRECTION 
MTNIC_IF_CMD_CONFIG_PORT_PRIO_STEERING 
MTNIC_IF_CMD_CONFIG_PORT_ADDR_STEER 
MTNIC_IF_CMD_CONFIG_PORT_VLAN_FILTER 
MTNIC_IF_CMD_CONFIG_PORT_MCAST_FILTER 
MTNIC_IF_CMD_ENABLE_PORT_MCAST_FILTER 
MTNIC_IF_CMD_SET_PORT_MTU 
MTNIC_IF_CMD_SET_PORT_PROMISCUOUS_MODE 
MTNIC_IF_CMD_SET_PORT_DEFAULT_RING 
MTNIC_IF_CMD_SET_PORT_STATE 
MTNIC_IF_CMD_DUMP_STAT 
MTNIC_IF_CMD_ARM_PORT_STATE_EVENT 
MTNIC_IF_CMD_CONFIG_CQ 
MTNIC_IF_CMD_CONFIG_RX_RING 
MTNIC_IF_CMD_SET_RX_RING_ADDR 
MTNIC_IF_CMD_SET_RX_RING_MCAST 
MTNIC_IF_CMD_ARM_RX_RING_WM 
MTNIC_IF_CMD_CONFIG_TX_RING 
MTNIC_IF_CMD_ENFORCE_TX_RING_ADDR 
MTNIC_IF_CMD_CONFIG_EQ 
MTNIC_IF_CMD_RELEASE_RESOURCE 

Definition at line 107 of file mtnic.h.

00107                           {
00108         /* NIC commands: */
00109         MTNIC_IF_CMD_QUERY_FW  = 0x004, /* query FW (size, version, etc) */
00110         MTNIC_IF_CMD_MAP_FW    = 0xfff, /* map pages for FW image */
00111         MTNIC_IF_CMD_RUN_FW    = 0xff6, /* run the FW */
00112         MTNIC_IF_CMD_QUERY_CAP = 0x001, /* query MTNIC capabilities */
00113         MTNIC_IF_CMD_MAP_PAGES = 0x002, /* map physical pages to HW */
00114         MTNIC_IF_CMD_OPEN_NIC  = 0x003, /* run the firmware */
00115         MTNIC_IF_CMD_CONFIG_RX = 0x005, /* general receive configuration */
00116         MTNIC_IF_CMD_CONFIG_TX = 0x006, /* general transmit configuration */
00117         MTNIC_IF_CMD_CONFIG_INT_FREQ = 0x007, /* interrupt timers freq limits */
00118         MTNIC_IF_CMD_HEART_BEAT = 0x008, /* NOP command testing liveliness */
00119         MTNIC_IF_CMD_CLOSE_NIC = 0x009, /* release memory and stop the NIC */
00120 
00121         /* Port commands: */
00122         MTNIC_IF_CMD_CONFIG_PORT_RSS_STEER     = 0x10, /* set RSS mode */
00123         MTNIC_IF_CMD_SET_PORT_RSS_INDIRECTION  = 0x11, /* set RSS indirection tbl */
00124         MTNIC_IF_CMD_CONFIG_PORT_PRIO_STEERING = 0x12, /* set PRIORITY mode */
00125         MTNIC_IF_CMD_CONFIG_PORT_ADDR_STEER    = 0x13, /* set Address steer mode */
00126         MTNIC_IF_CMD_CONFIG_PORT_VLAN_FILTER   = 0x14, /* configure VLAN filter */
00127         MTNIC_IF_CMD_CONFIG_PORT_MCAST_FILTER  = 0x15, /* configure mcast filter */
00128         MTNIC_IF_CMD_ENABLE_PORT_MCAST_FILTER  = 0x16, /* enable/disable */
00129         MTNIC_IF_CMD_SET_PORT_MTU              = 0x17, /* set port MTU */
00130         MTNIC_IF_CMD_SET_PORT_PROMISCUOUS_MODE = 0x18, /* enable/disable promisc */
00131         MTNIC_IF_CMD_SET_PORT_DEFAULT_RING     = 0x19, /* set the default ring */
00132         MTNIC_IF_CMD_SET_PORT_STATE            = 0x1a, /* set link up/down */
00133         MTNIC_IF_CMD_DUMP_STAT                 = 0x1b, /* dump statistics */
00134         MTNIC_IF_CMD_ARM_PORT_STATE_EVENT      = 0x1c, /* arm the port state event */
00135 
00136         /* Ring / Completion queue commands: */
00137         MTNIC_IF_CMD_CONFIG_CQ            = 0x20,  /* set up completion queue */
00138         MTNIC_IF_CMD_CONFIG_RX_RING       = 0x21,  /* setup Rx ring */
00139         MTNIC_IF_CMD_SET_RX_RING_ADDR     = 0x22,  /* set Rx ring filter by address */
00140         MTNIC_IF_CMD_SET_RX_RING_MCAST    = 0x23,  /* set Rx ring mcast filter */
00141         MTNIC_IF_CMD_ARM_RX_RING_WM       = 0x24,  /* one-time low-watermark INT */
00142         MTNIC_IF_CMD_CONFIG_TX_RING       = 0x25,  /* set up Tx ring */
00143         MTNIC_IF_CMD_ENFORCE_TX_RING_ADDR = 0x26,  /* setup anti spoofing */
00144         MTNIC_IF_CMD_CONFIG_EQ            = 0x27,  /* config EQ ring */
00145         MTNIC_IF_CMD_RELEASE_RESOURCE     = 0x28,  /* release internal ref to resource */
00146 }

selectors for MTNIC_IF_CMD_QUERY_CAP

Enumerator:
MTNIC_IF_CAP_MAX_TX_RING_PER_PORT 
MTNIC_IF_CAP_MAX_RX_RING_PER_PORT 
MTNIC_IF_CAP_MAX_CQ_PER_PORT 
MTNIC_IF_CAP_NUM_PORTS 
MTNIC_IF_CAP_MAX_TX_DESC 
MTNIC_IF_CAP_MAX_RX_DESC 
MTNIC_IF_CAP_MAX_CQES 
MTNIC_IF_CAP_MAX_TX_SG_ENTRIES 
MTNIC_IF_CAP_MAX_RX_SG_ENTRIES 
MTNIC_IF_CAP_MEM_KEY 
MTNIC_IF_CAP_RSS_HASH_TYPE 
MTNIC_IF_CAP_MAX_PORT_UCAST_ADDR 
MTNIC_IF_CAP_MAX_RING_UCAST_ADDR 
MTNIC_IF_CAP_MAX_PORT_MCAST_ADDR 
MTNIC_IF_CAP_MAX_RING_MCAST_ADDR 
MTNIC_IF_CAP_INTA 
MTNIC_IF_CAP_BOARD_ID_LOW 
MTNIC_IF_CAP_BOARD_ID_HIGH 
MTNIC_IF_CAP_TX_CQ_DB_OFFSET 
MTNIC_IF_CAP_EQ_DB_OFFSET 
MTNIC_IF_CAP_SPEED 
MTNIC_IF_CAP_DEFAULT_MAC 
MTNIC_IF_CAP_EQ_OFFSET 
MTNIC_IF_CAP_CQ_OFFSET 
MTNIC_IF_CAP_TX_OFFSET 
MTNIC_IF_CAP_RX_OFFSET 

Definition at line 151 of file mtnic.h.

00151                            {
00152         MTNIC_IF_CAP_MAX_TX_RING_PER_PORT = 0x0,
00153         MTNIC_IF_CAP_MAX_RX_RING_PER_PORT = 0x1,
00154         MTNIC_IF_CAP_MAX_CQ_PER_PORT      = 0x2,
00155         MTNIC_IF_CAP_NUM_PORTS            = 0x3,
00156         MTNIC_IF_CAP_MAX_TX_DESC          = 0x4,
00157         MTNIC_IF_CAP_MAX_RX_DESC          = 0x5,
00158         MTNIC_IF_CAP_MAX_CQES             = 0x6,
00159         MTNIC_IF_CAP_MAX_TX_SG_ENTRIES    = 0x7,
00160         MTNIC_IF_CAP_MAX_RX_SG_ENTRIES    = 0x8,
00161         MTNIC_IF_CAP_MEM_KEY              = 0x9, /* key to mem (after map_pages) */
00162         MTNIC_IF_CAP_RSS_HASH_TYPE        = 0xa, /* one of mtnic_if_rss_types_t */
00163         MTNIC_IF_CAP_MAX_PORT_UCAST_ADDR  = 0xc,
00164         MTNIC_IF_CAP_MAX_RING_UCAST_ADDR  = 0xd, /* only for ADDR steer */
00165         MTNIC_IF_CAP_MAX_PORT_MCAST_ADDR  = 0xe,
00166         MTNIC_IF_CAP_MAX_RING_MCAST_ADDR  = 0xf, /* only for ADDR steer */
00167         MTNIC_IF_CAP_INTA                 = 0x10,
00168         MTNIC_IF_CAP_BOARD_ID_LOW         = 0x11,
00169         MTNIC_IF_CAP_BOARD_ID_HIGH        = 0x12,
00170         MTNIC_IF_CAP_TX_CQ_DB_OFFSET      = 0x13, /* offset in bytes for TX, CQ doorbell record */
00171         MTNIC_IF_CAP_EQ_DB_OFFSET         = 0x14, /* offset in bytes for EQ doorbell record */
00172 
00173         /* These are per port - using port number from cap modifier field */
00174         MTNIC_IF_CAP_SPEED                = 0x20,
00175         MTNIC_IF_CAP_DEFAULT_MAC          = 0x21,
00176         MTNIC_IF_CAP_EQ_OFFSET            = 0x22,
00177         MTNIC_IF_CAP_CQ_OFFSET            = 0x23,
00178         MTNIC_IF_CAP_TX_OFFSET            = 0x24,
00179         MTNIC_IF_CAP_RX_OFFSET            = 0x25,
00180 
00181 } mtnic_if_caps_t;

Enumerator:
MTNIC_IF_STEER_NONE 
MTNIC_IF_STEER_PRIORITY 
MTNIC_IF_STEER_RSS 
MTNIC_IF_STEER_ADDRESS 

Definition at line 183 of file mtnic.h.

types of memory access modes

Enumerator:
MTNIC_IF_MEM_TYPE_SNOOP 
MTNIC_IF_MEM_TYPE_NO_SNOOP 

Definition at line 191 of file mtnic.h.

anonymous enum

Enumerator:
MTNIC_HCR_BASE 
MTNIC_HCR_SIZE 
MTNIC_CLR_INT_SIZE 

Definition at line 197 of file mtnic.h.

00197      {
00198         MTNIC_HCR_BASE          = 0x1f000,
00199         MTNIC_HCR_SIZE          = 0x0001c,
00200         MTNIC_CLR_INT_SIZE      = 0x00008,
00201 };

Enumerator:
CARD_DOWN 
CARD_INITIALIZED 
CARD_UP 
CARD_LINK_DOWN 

Definition at line 359 of file mtnic.h.

00359                  {
00360         CARD_DOWN,
00361         CARD_INITIALIZED,
00362         CARD_UP,
00363         CARD_LINK_DOWN,
00364 };

Enumerator:
MTNIC_IF_RESOURCE_TYPE_CQ 
MTNIC_IF_RESOURCE_TYPE_RX_RING 
MTNIC_IF_RESOURCE_TYPE_TX_RING 
MTNIC_IF_RESOURCE_TYPE_EQ 

Definition at line 674 of file mtnic.h.


Function Documentation

FILE_LICENCE ( GPL2_ONLY   ) 


Variable Documentation


Generated on Tue Apr 6 20:01:36 2010 for gPXE by  doxygen 1.5.7.1