9da57d7b0ddd8d73b676ce12c040362132cdd538bt * CDDL HEADER START
9da57d7b0ddd8d73b676ce12c040362132cdd538bt * The contents of this file are subject to the terms of the
9da57d7b0ddd8d73b676ce12c040362132cdd538bt * Common Development and Distribution License (the "License").
9da57d7b0ddd8d73b676ce12c040362132cdd538bt * You may not use this file except in compliance with the License.
da14cebe459d3275048785f25bd869cb09b5307fEric Cheng * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9da57d7b0ddd8d73b676ce12c040362132cdd538bt * See the License for the specific language governing permissions
9da57d7b0ddd8d73b676ce12c040362132cdd538bt * and limitations under the License.
da14cebe459d3275048785f25bd869cb09b5307fEric Cheng * When distributing Covered Code, include this CDDL HEADER in each
da14cebe459d3275048785f25bd869cb09b5307fEric Cheng * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
9da57d7b0ddd8d73b676ce12c040362132cdd538bt * If applicable, add the following below this CDDL HEADER, with the
9da57d7b0ddd8d73b676ce12c040362132cdd538bt * fields enclosed by brackets "[]" replaced with your own identifying
9da57d7b0ddd8d73b676ce12c040362132cdd538bt * information: Portions Copyright [yyyy] [name of copyright owner]
9da57d7b0ddd8d73b676ce12c040362132cdd538bt * CDDL HEADER END
5b6dd21f5401160f9a62ac2e76a858c2bc105370chenlu chen - Sun Microsystems - Beijing China * Copyright(c) 2007-2010 Intel Corporation. All rights reserved.
5b6dd21f5401160f9a62ac2e76a858c2bc105370chenlu chen - Sun Microsystems - Beijing China * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
43fab1a9f38ff02e665a874ea0a8eb3818e61ff3Saso Kiselkov * Copyright (c) 2013 Saso Kiselkov. All rights reserved.
dc0cb1cda72a989d92d813e487cdff59f629aa3fDale Ghent * Copyright 2016 OmniTI Computer Consulting, Inc. All rights reserved.
9da57d7b0ddd8d73b676ce12c040362132cdd538btextern "C" {
5b6dd21f5401160f9a62ac2e76a858c2bc105370chenlu chen - Sun Microsystems - Beijing China#define IXGBE_OVERTEMP 0x20
edf70dc9b8e373c558a49c15c2d86be817d497fePaul Guo#define IXGBE_TX_DESC_LIMIT 32 /* tx desc limitation */
73cd555c10e70dac413ae4b40de8450a291750acBin Tu - Sun Microsystems - Beijing China#define IXGBE_ADAPTER_REGSET 1 /* map adapter registers */
ea65739ebec0cbd625d8c89e19592be58fa186a6chenlu chen - Sun Microsystems - Beijing China#define IXGBE_RX_STOPPED 0x1
ffd8e8832e01f996f32459073f4dd308fe5265baWinson Wang - Sun Microsystems - Beijing China#define IXGBE_PKG_BUF_16k 16384
73cd555c10e70dac413ae4b40de8450a291750acBin Tu - Sun Microsystems - Beijing China * MAX_xx_QUEUE_NUM and MAX_INTR_VECTOR values need to be the maximum of all
13740cb230f19fcbf1a6468d1a6a0ba9a0a09c22Paul Guo * supported silicon types.
73cd555c10e70dac413ae4b40de8450a291750acBin Tu - Sun Microsystems - Beijing China#define MAX_TX_QUEUE_NUM 128
73cd555c10e70dac413ae4b40de8450a291750acBin Tu - Sun Microsystems - Beijing China#define MAX_RX_QUEUE_NUM 128
73cd555c10e70dac413ae4b40de8450a291750acBin Tu - Sun Microsystems - Beijing China#define MAX_INTR_VECTOR 64
13740cb230f19fcbf1a6468d1a6a0ba9a0a09c22Paul Guo * Maximum values for user configurable parameters
9da57d7b0ddd8d73b676ce12c040362132cdd538bt * Minimum values for user configurable parameters
9da57d7b0ddd8d73b676ce12c040362132cdd538bt * Default values for user configurable parameters
da14cebe459d3275048785f25bd869cb09b5307fEric Cheng#define DEFAULT_TX_RECYCLE_THRESHOLD (MAX_COOKIE + 1)
ffd8e8832e01f996f32459073f4dd308fe5265baWinson Wang - Sun Microsystems - Beijing China#define DEFAULT_LRO_ENABLE B_FALSE
5b6dd21f5401160f9a62ac2e76a858c2bc105370chenlu chen - Sun Microsystems - Beijing China#define DEFAULT_RELAX_ORDER_ENABLE B_TRUE
9da57d7b0ddd8d73b676ce12c040362132cdd538bt * Extra register bit masks for 82598
9da57d7b0ddd8d73b676ce12c040362132cdd538bt * Defined for IP header alignment.
9da57d7b0ddd8d73b676ce12c040362132cdd538bt * Bit flags for attach_progress
9da57d7b0ddd8d73b676ce12c040362132cdd538bt#define ATTACH_PROGRESS_PCI_CONFIG 0x0001 /* PCI config setup */
9da57d7b0ddd8d73b676ce12c040362132cdd538bt#define ATTACH_PROGRESS_REGS_MAP 0x0002 /* Registers mapped */
9da57d7b0ddd8d73b676ce12c040362132cdd538bt#define ATTACH_PROGRESS_PROPS 0x0004 /* Properties initialized */
9da57d7b0ddd8d73b676ce12c040362132cdd538bt#define ATTACH_PROGRESS_ALLOC_INTR 0x0008 /* Interrupts allocated */
9da57d7b0ddd8d73b676ce12c040362132cdd538bt#define ATTACH_PROGRESS_ALLOC_RINGS 0x0010 /* Rings allocated */
9da57d7b0ddd8d73b676ce12c040362132cdd538bt#define ATTACH_PROGRESS_ADD_INTR 0x0020 /* Intr handlers added */
9da57d7b0ddd8d73b676ce12c040362132cdd538bt#define ATTACH_PROGRESS_LOCKS 0x0040 /* Locks initialized */
9da57d7b0ddd8d73b676ce12c040362132cdd538bt#define ATTACH_PROGRESS_INIT 0x0080 /* Device initialized */
9da57d7b0ddd8d73b676ce12c040362132cdd538bt#define ATTACH_PROGRESS_ENABLE_INTR 0x1000 /* DDI interrupts enabled */
9da57d7b0ddd8d73b676ce12c040362132cdd538bt#define ATTACH_PROGRESS_FM_INIT 0x2000 /* FMA initialized */
62e6e1adfc8d795f477410703cc7a88dc5b82622Paul Guo#define ATTACH_PROGRESS_SFP_TASKQ 0x4000 /* SFP taskq created */
62e6e1adfc8d795f477410703cc7a88dc5b82622Paul Guo#define ATTACH_PROGRESS_LINK_TIMER 0x8000 /* link check timer */
5b6dd21f5401160f9a62ac2e76a858c2bc105370chenlu chen - Sun Microsystems - Beijing China#define ATTACH_PROGRESS_OVERTEMP_TASKQ 0x10000 /* Over-temp taskq created */
dc0cb1cda72a989d92d813e487cdff59f629aa3fDale Ghent#define ATTACH_PROGRESS_PHY_TASKQ 0x20000 /* Ext. PHY taskq created */
ffd8e8832e01f996f32459073f4dd308fe5265baWinson Wang - Sun Microsystems - Beijing China#define PROP_LRO_ENABLE "lro_enable"
5b6dd21f5401160f9a62ac2e76a858c2bc105370chenlu chen - Sun Microsystems - Beijing China#define PROP_RELAX_ORDER_ENABLE "relax_order_enable"
9da57d7b0ddd8d73b676ce12c040362132cdd538bt#define PROP_TX_OVERLOAD_THRESHOLD "tx_overload_threshold"
43fab1a9f38ff02e665a874ea0a8eb3818e61ff3Saso Kiselkov#define PROP_ALLOW_UNSUPPORTED_SFP "allow_unsupported_sfp"
13740cb230f19fcbf1a6468d1a6a0ba9a0a09c22Paul Guo * Flags named _CAPABLE are set when the NIC hardware is capable of the feature.
13740cb230f19fcbf1a6468d1a6a0ba9a0a09c22Paul Guo * Separately, the flag named _ENABLED is set when the feature is enabled.
ffd8e8832e01f996f32459073f4dd308fe5265baWinson Wang - Sun Microsystems - Beijing China#define IXGBE_FLAG_RSC_CAPABLE (u32)(1 << 9)
5b6dd21f5401160f9a62ac2e76a858c2bc105370chenlu chen - Sun Microsystems - Beijing China#define IXGBE_FLAG_SFP_PLUG_CAPABLE (u32)(1 << 10)
5b6dd21f5401160f9a62ac2e76a858c2bc105370chenlu chen - Sun Microsystems - Beijing China#define IXGBE_FLAG_TEMP_SENSOR_CAPABLE (u32)(1 << 11)
0dc2366f7b9f9f36e10909b1e95edbf2a261c2acVenugopal Iyer * Classification mode
13740cb230f19fcbf1a6468d1a6a0ba9a0a09c22Paul Guo/* adapter-specific info for each supported device type */
0dc2366f7b9f9f36e10909b1e95edbf2a261c2acVenugopal Iyer uint32_t max_rx_que_num; /* maximum number of rx queues */
0dc2366f7b9f9f36e10909b1e95edbf2a261c2acVenugopal Iyer uint32_t min_rx_que_num; /* minimum number of rx queues */
0dc2366f7b9f9f36e10909b1e95edbf2a261c2acVenugopal Iyer uint32_t def_rx_que_num; /* default number of rx queues */
0dc2366f7b9f9f36e10909b1e95edbf2a261c2acVenugopal Iyer uint32_t max_rx_grp_num; /* maximum number of rx groups */
0dc2366f7b9f9f36e10909b1e95edbf2a261c2acVenugopal Iyer uint32_t min_rx_grp_num; /* minimum number of rx groups */
0dc2366f7b9f9f36e10909b1e95edbf2a261c2acVenugopal Iyer uint32_t def_rx_grp_num; /* default number of rx groups */
13740cb230f19fcbf1a6468d1a6a0ba9a0a09c22Paul Guo uint32_t max_tx_que_num; /* maximum number of tx queues */
13740cb230f19fcbf1a6468d1a6a0ba9a0a09c22Paul Guo uint32_t min_tx_que_num; /* minimum number of tx queues */
13740cb230f19fcbf1a6468d1a6a0ba9a0a09c22Paul Guo uint32_t def_tx_que_num; /* default number of tx queues */
1fedc51fe8f78efa2ee550387171e6adb2223b8dWinson Wang - Sun Microsystems - Beijing China uint32_t max_mtu; /* maximum MTU size */
ea65739ebec0cbd625d8c89e19592be58fa186a6chenlu chen - Sun Microsystems - Beijing China * Interrupt throttling is in unit of 256 nsec
ea65739ebec0cbd625d8c89e19592be58fa186a6chenlu chen - Sun Microsystems - Beijing China uint32_t max_intr_throttle; /* maximum interrupt throttle */
ea65739ebec0cbd625d8c89e19592be58fa186a6chenlu chen - Sun Microsystems - Beijing China uint32_t min_intr_throttle; /* minimum interrupt throttle */
ea65739ebec0cbd625d8c89e19592be58fa186a6chenlu chen - Sun Microsystems - Beijing China uint32_t def_intr_throttle; /* default interrupt throttle */
13740cb230f19fcbf1a6468d1a6a0ba9a0a09c22Paul Guo uint32_t max_msix_vect; /* maximum total msix vectors */
13740cb230f19fcbf1a6468d1a6a0ba9a0a09c22Paul Guo uint32_t max_ring_vect; /* maximum number of ring vectors */
13740cb230f19fcbf1a6468d1a6a0ba9a0a09c22Paul Guo uint32_t max_other_vect; /* maximum number of other vectors */
13740cb230f19fcbf1a6468d1a6a0ba9a0a09c22Paul Guo uint32_t other_intr; /* "other" interrupt types handled */
5b6dd21f5401160f9a62ac2e76a858c2bc105370chenlu chen - Sun Microsystems - Beijing China uint32_t other_gpie; /* "other" interrupt types enabling */
13740cb230f19fcbf1a6468d1a6a0ba9a0a09c22Paul Guo/* bits representing all interrupt types other than tx & rx */
73cd555c10e70dac413ae4b40de8450a291750acBin Tu - Sun Microsystems - Beijing China#define IXGBE_82599_OTHER_INTR 0x86100000
9da57d7b0ddd8d73b676ce12c040362132cdd538bt#define DMA_SYNC(area, flag) ((void) ddi_dma_sync((area)->dma_handle, \
9da57d7b0ddd8d73b676ce12c040362132cdd538bt * Defined for ring index operations
9da57d7b0ddd8d73b676ce12c040362132cdd538bt * ASSERT(index < limit)
9da57d7b0ddd8d73b676ce12c040362132cdd538bt * ASSERT(step < limit)
9da57d7b0ddd8d73b676ce12c040362132cdd538bt * ASSERT(index1 < limit)
9da57d7b0ddd8d73b676ce12c040362132cdd538bt * ASSERT(index2 < limit)
9da57d7b0ddd8d73b676ce12c040362132cdd538bt#define NEXT_INDEX(index, step, limit) (((index) + (step)) < (limit) ? \
9da57d7b0ddd8d73b676ce12c040362132cdd538bt#define PREV_INDEX(index, step, limit) ((index) >= (step) ? \
9da57d7b0ddd8d73b676ce12c040362132cdd538bt#define OFFSET(index1, index2, limit) ((index1) <= (index2) ? \
9da57d7b0ddd8d73b676ce12c040362132cdd538bt#define LIST_GET_HEAD(_LH) ((single_link_t *)((_LH)->head))
9da57d7b0ddd8d73b676ce12c040362132cdd538bt#define LIST_GET_TAIL(_LH) ((single_link_t *)((_LH)->tail))
9da57d7b0ddd8d73b676ce12c040362132cdd538bt } else { \
9da57d7b0ddd8d73b676ce12c040362132cdd538bt * Property lookups
9da57d7b0ddd8d73b676ce12c040362132cdd538bt#define IXGBE_PROP_EXISTS(d, n) ddi_prop_exists(DDI_DEV_T_ANY, (d), \
9da57d7b0ddd8d73b676ce12c040362132cdd538bt#define IXGBE_PROP_GET_INT(d, n) ddi_prop_get_int(DDI_DEV_T_ANY, (d), \
9da57d7b0ddd8d73b676ce12c040362132cdd538bttypedef enum {
9da57d7b0ddd8d73b676ce12c040362132cdd538bt * Hold address/length of each DMA segment
9da57d7b0ddd8d73b676ce12c040362132cdd538bt * Handles and addresses of DMA buffer
9da57d7b0ddd8d73b676ce12c040362132cdd538bt * Tx Control Block
edf70dc9b8e373c558a49c15c2d86be817d497fePaul Guo uint32_t last_index; /* last descriptor of the pkt */
9da57d7b0ddd8d73b676ce12c040362132cdd538bt * RX Control Block
ea65739ebec0cbd625d8c89e19592be58fa186a6chenlu chen - Sun Microsystems - Beijing China uint32_t ref_cnt;
ea65739ebec0cbd625d8c89e19592be58fa186a6chenlu chen - Sun Microsystems - Beijing China struct ixgbe_rx_data *rx_data;
ffd8e8832e01f996f32459073f4dd308fe5265baWinson Wang - Sun Microsystems - Beijing China int lro_next; /* Index of next rcb */
ffd8e8832e01f996f32459073f4dd308fe5265baWinson Wang - Sun Microsystems - Beijing China int lro_prev; /* Index of previous rcb */
ffd8e8832e01f996f32459073f4dd308fe5265baWinson Wang - Sun Microsystems - Beijing China boolean_t lro_pkt; /* Flag for LRO rcb */
9da57d7b0ddd8d73b676ce12c040362132cdd538bt * Software Data Structure for Tx Ring
9da57d7b0ddd8d73b676ce12c040362132cdd538bt * Tx descriptor ring definitions
9da57d7b0ddd8d73b676ce12c040362132cdd538bt * Tx control block list definitions
c971fb7ec0a19c6cd00c5614a94c97f953b6e8b1gg * s/w context structure for TCP/UDP checksum offload
c971fb7ec0a19c6cd00c5614a94c97f953b6e8b1gg * and LSO.
9da57d7b0ddd8d73b676ce12c040362132cdd538bt * Tx ring settings and status
9da57d7b0ddd8d73b676ce12c040362132cdd538bt * Debug statistics
9da57d7b0ddd8d73b676ce12c040362132cdd538bt * Pointer to the ixgbe struct
9da57d7b0ddd8d73b676ce12c040362132cdd538bt * Software Receive Ring
ea65739ebec0cbd625d8c89e19592be58fa186a6chenlu chen - Sun Microsystems - Beijing Chinatypedef struct ixgbe_rx_data {
9da57d7b0ddd8d73b676ce12c040362132cdd538bt * Rx descriptor ring definitions
9da57d7b0ddd8d73b676ce12c040362132cdd538bt * Rx control block list definitions
ea65739ebec0cbd625d8c89e19592be58fa186a6chenlu chen - Sun Microsystems - Beijing China * Rx sw ring settings and status
ea65739ebec0cbd625d8c89e19592be58fa186a6chenlu chen - Sun Microsystems - Beijing China uint32_t rcb_pending;
ea65739ebec0cbd625d8c89e19592be58fa186a6chenlu chen - Sun Microsystems - Beijing China uint32_t flag;
ffd8e8832e01f996f32459073f4dd308fe5265baWinson Wang - Sun Microsystems - Beijing China uint32_t lro_num; /* Number of rcbs of one LRO */
ffd8e8832e01f996f32459073f4dd308fe5265baWinson Wang - Sun Microsystems - Beijing China uint32_t lro_first; /* Index of first LRO rcb */
ea65739ebec0cbd625d8c89e19592be58fa186a6chenlu chen - Sun Microsystems - Beijing China struct ixgbe_rx_ring *rx_ring; /* Pointer to rx ring */
ea65739ebec0cbd625d8c89e19592be58fa186a6chenlu chen - Sun Microsystems - Beijing China} ixgbe_rx_data_t;
ea65739ebec0cbd625d8c89e19592be58fa186a6chenlu chen - Sun Microsystems - Beijing China * Software Data Structure for Rx Ring
ea65739ebec0cbd625d8c89e19592be58fa186a6chenlu chen - Sun Microsystems - Beijing Chinatypedef struct ixgbe_rx_ring {
ea65739ebec0cbd625d8c89e19592be58fa186a6chenlu chen - Sun Microsystems - Beijing China uint32_t index; /* Ring index */
ea65739ebec0cbd625d8c89e19592be58fa186a6chenlu chen - Sun Microsystems - Beijing China uint32_t intr_vector; /* Interrupt vector index */
ea65739ebec0cbd625d8c89e19592be58fa186a6chenlu chen - Sun Microsystems - Beijing China uint32_t vect_bit; /* vector's bit in register */
ea65739ebec0cbd625d8c89e19592be58fa186a6chenlu chen - Sun Microsystems - Beijing China ixgbe_rx_data_t *rx_data; /* Rx software ring */
ea65739ebec0cbd625d8c89e19592be58fa186a6chenlu chen - Sun Microsystems - Beijing China kmutex_t rx_lock; /* Rx access lock */
9da57d7b0ddd8d73b676ce12c040362132cdd538bt * Debug statistics
da14cebe459d3275048785f25bd869cb09b5307fEric Cheng struct ixgbe *ixgbe; /* Pointer to ixgbe struct */
da14cebe459d3275048785f25bd869cb09b5307fEric Cheng * Software Receive Ring Group
da14cebe459d3275048785f25bd869cb09b5307fEric Cheng mac_group_handle_t group_handle; /* call back group handle */
da14cebe459d3275048785f25bd869cb09b5307fEric Cheng struct ixgbe *ixgbe; /* Pointer to ixgbe struct */
73cd555c10e70dac413ae4b40de8450a291750acBin Tu - Sun Microsystems - Beijing China * structure to map interrupt cleanup to msi-x vector
73cd555c10e70dac413ae4b40de8450a291750acBin Tu - Sun Microsystems - Beijing Chinatypedef struct ixgbe_intr_vector {
9da57d7b0ddd8d73b676ce12c040362132cdd538bt ulong_t rx_map[BT_BITOUL(MAX_RX_QUEUE_NUM)]; /* bitmap of rx rings */
9da57d7b0ddd8d73b676ce12c040362132cdd538bt ulong_t tx_map[BT_BITOUL(MAX_TX_QUEUE_NUM)]; /* bitmap of tx rings */
73cd555c10e70dac413ae4b40de8450a291750acBin Tu - Sun Microsystems - Beijing China ulong_t other_map[BT_BITOUL(2)]; /* bitmap of other */
73cd555c10e70dac413ae4b40de8450a291750acBin Tu - Sun Microsystems - Beijing China int other_cnt; /* count other interrupt */
73cd555c10e70dac413ae4b40de8450a291750acBin Tu - Sun Microsystems - Beijing China} ixgbe_intr_vector_t;
9da57d7b0ddd8d73b676ce12c040362132cdd538bt * Software adapter state
13740cb230f19fcbf1a6468d1a6a0ba9a0a09c22Paul Guo adapter_info_t *capab; /* adapter hardware capabilities */
5b6dd21f5401160f9a62ac2e76a858c2bc105370chenlu chen - Sun Microsystems - Beijing China ddi_taskq_t *overtemp_taskq; /* overtemp taskq */
73cd555c10e70dac413ae4b40de8450a291750acBin Tu - Sun Microsystems - Beijing China uint32_t eimc; /* interrupt mask clear */
73cd555c10e70dac413ae4b40de8450a291750acBin Tu - Sun Microsystems - Beijing China uint32_t eicr; /* interrupt cause reg */
ea65739ebec0cbd625d8c89e19592be58fa186a6chenlu chen - Sun Microsystems - Beijing China uint32_t rcb_pending;
73cd555c10e70dac413ae4b40de8450a291750acBin Tu - Sun Microsystems - Beijing China * Each msi-x vector: map vector to interrupt cleanup
73cd555c10e70dac413ae4b40de8450a291750acBin Tu - Sun Microsystems - Beijing China ixgbe_intr_vector_t vect_map[MAX_INTR_VECTOR];
9da57d7b0ddd8d73b676ce12c040362132cdd538bt * Receive Rings
ffd8e8832e01f996f32459073f4dd308fe5265baWinson Wang - Sun Microsystems - Beijing China boolean_t lro_enable; /* Large Receive Offload */
ffd8e8832e01f996f32459073f4dd308fe5265baWinson Wang - Sun Microsystems - Beijing China uint64_t lro_pkt_count; /* LRO packet count */
da14cebe459d3275048785f25bd869cb09b5307fEric Cheng * Receive Groups
da14cebe459d3275048785f25bd869cb09b5307fEric Cheng ixgbe_rx_group_t *rx_groups; /* Array of rx groups */
da14cebe459d3275048785f25bd869cb09b5307fEric Cheng uint32_t num_rx_groups; /* Number of rx groups in use */
9da57d7b0ddd8d73b676ce12c040362132cdd538bt * Transmit Rings
ea65739ebec0cbd625d8c89e19592be58fa186a6chenlu chen - Sun Microsystems - Beijing China boolean_t tx_ring_init;
da14cebe459d3275048785f25bd869cb09b5307fEric Cheng boolean_t mr_enable; /* Multiple Tx and Rx Ring */
5b6dd21f5401160f9a62ac2e76a858c2bc105370chenlu chen - Sun Microsystems - Beijing China boolean_t relax_order_enable; /* Relax Order */
0dc2366f7b9f9f36e10909b1e95edbf2a261c2acVenugopal Iyer uint32_t classify_mode; /* Classification mode */
9da57d7b0ddd8d73b676ce12c040362132cdd538bt uint32_t tx_resched_thresh; /* Tx reschedule threshold */
73cd555c10e70dac413ae4b40de8450a291750acBin Tu - Sun Microsystems - Beijing China uint32_t intr_throttling[MAX_INTR_VECTOR];
0dc2366f7b9f9f36e10909b1e95edbf2a261c2acVenugopal Iyer ddi_cb_handle_t cb_hdl; /* Interrupt callback handle */
ea65739ebec0cbd625d8c89e19592be58fa186a6chenlu chen - Sun Microsystems - Beijing China kmutex_t rx_pending_lock;
9da57d7b0ddd8d73b676ce12c040362132cdd538bt ixgbe_ether_addr_t unicst_addr[MAX_NUM_UNICAST_ADDRESSES];
9da57d7b0ddd8d73b676ce12c040362132cdd538bt struct ether_addr mcast_table[MAX_NUM_MULTICAST_ADDRESSES];
62e6e1adfc8d795f477410703cc7a88dc5b82622Paul Guo ddi_periodic_t periodic_id; /* for link check timer func */
9da57d7b0ddd8d73b676ce12c040362132cdd538bt * Kstat definitions
ea65739ebec0cbd625d8c89e19592be58fa186a6chenlu chen - Sun Microsystems - Beijing China uint32_t param_en_10000fdx_cap:1,
ea65739ebec0cbd625d8c89e19592be58fa186a6chenlu chen - Sun Microsystems - Beijing China param_en_1000fdx_cap:1,
ea65739ebec0cbd625d8c89e19592be58fa186a6chenlu chen - Sun Microsystems - Beijing China param_en_100fdx_cap:1,
ea65739ebec0cbd625d8c89e19592be58fa186a6chenlu chen - Sun Microsystems - Beijing China param_adv_10000fdx_cap:1,
ea65739ebec0cbd625d8c89e19592be58fa186a6chenlu chen - Sun Microsystems - Beijing China param_adv_1000fdx_cap:1,
ea65739ebec0cbd625d8c89e19592be58fa186a6chenlu chen - Sun Microsystems - Beijing China param_adv_100fdx_cap:1,
ea65739ebec0cbd625d8c89e19592be58fa186a6chenlu chen - Sun Microsystems - Beijing China param_pause_cap:1,
ea65739ebec0cbd625d8c89e19592be58fa186a6chenlu chen - Sun Microsystems - Beijing China param_asym_pause_cap:1,
ea65739ebec0cbd625d8c89e19592be58fa186a6chenlu chen - Sun Microsystems - Beijing China param_rem_fault:1,
ea65739ebec0cbd625d8c89e19592be58fa186a6chenlu chen - Sun Microsystems - Beijing China param_adv_autoneg_cap:1,
ea65739ebec0cbd625d8c89e19592be58fa186a6chenlu chen - Sun Microsystems - Beijing China param_adv_pause_cap:1,
ea65739ebec0cbd625d8c89e19592be58fa186a6chenlu chen - Sun Microsystems - Beijing China param_adv_asym_pause_cap:1,
ea65739ebec0cbd625d8c89e19592be58fa186a6chenlu chen - Sun Microsystems - Beijing China param_adv_rem_fault:1,
ea65739ebec0cbd625d8c89e19592be58fa186a6chenlu chen - Sun Microsystems - Beijing China param_lp_10000fdx_cap:1,
ea65739ebec0cbd625d8c89e19592be58fa186a6chenlu chen - Sun Microsystems - Beijing China param_lp_1000fdx_cap:1,
ea65739ebec0cbd625d8c89e19592be58fa186a6chenlu chen - Sun Microsystems - Beijing China param_lp_100fdx_cap:1,
ea65739ebec0cbd625d8c89e19592be58fa186a6chenlu chen - Sun Microsystems - Beijing China param_lp_autoneg_cap:1,
ea65739ebec0cbd625d8c89e19592be58fa186a6chenlu chen - Sun Microsystems - Beijing China param_lp_pause_cap:1,
ea65739ebec0cbd625d8c89e19592be58fa186a6chenlu chen - Sun Microsystems - Beijing China param_lp_asym_pause_cap:1,
1fedc51fe8f78efa2ee550387171e6adb2223b8dWinson Wang - Sun Microsystems - Beijing China param_lp_rem_fault:1,
9da57d7b0ddd8d73b676ce12c040362132cdd538bt kstat_named_t rx_exceed_pkt; /* Rx Exceed Max Pkt Count */
9da57d7b0ddd8d73b676ce12c040362132cdd538bt kstat_named_t tx_fail_no_tcb; /* Tx Fail Freelist Empty */
9da57d7b0ddd8d73b676ce12c040362132cdd538bt kstat_named_t tx_fail_no_tbd; /* Tx Fail Desc Ring Empty */
9da57d7b0ddd8d73b676ce12c040362132cdd538bt kstat_named_t prc1023; /* Packets Received - 511-1023b */
9da57d7b0ddd8d73b676ce12c040362132cdd538bt kstat_named_t prc1522; /* Packets Received - 1024-1522b */
da14cebe459d3275048785f25bd869cb09b5307fEric Cheng kstat_named_t qprc[16]; /* Queue Packets Received Count */
da14cebe459d3275048785f25bd869cb09b5307fEric Cheng kstat_named_t qptc[16]; /* Queue Packets Transmitted Count */
da14cebe459d3275048785f25bd869cb09b5307fEric Cheng kstat_named_t qbrc[16]; /* Queue Bytes Received Count */
da14cebe459d3275048785f25bd869cb09b5307fEric Cheng kstat_named_t qbtc[16]; /* Queue Bytes Transmitted Count */
9da57d7b0ddd8d73b676ce12c040362132cdd538bt kstat_named_t mspdc; /* MAC Short Packet Discard Count */
9da57d7b0ddd8d73b676ce12c040362132cdd538bt kstat_named_t lxofftxc; /* Link XOFF Transmitted Count */
ffd8e8832e01f996f32459073f4dd308fe5265baWinson Wang - Sun Microsystems - Beijing China kstat_named_t lroc; /* LRO Packets Received Count */
9da57d7b0ddd8d73b676ce12c040362132cdd538bt * Function prototypes in ixgbe_buf.c
ea65739ebec0cbd625d8c89e19592be58fa186a6chenlu chen - Sun Microsystems - Beijing Chinavoid ixgbe_free_dma_buffer(dma_buffer_t *);
ea65739ebec0cbd625d8c89e19592be58fa186a6chenlu chen - Sun Microsystems - Beijing Chinaint ixgbe_alloc_rx_ring_data(ixgbe_rx_ring_t *rx_ring);
ea65739ebec0cbd625d8c89e19592be58fa186a6chenlu chen - Sun Microsystems - Beijing Chinavoid ixgbe_free_rx_ring_data(ixgbe_rx_data_t *rx_data);
9da57d7b0ddd8d73b676ce12c040362132cdd538bt * Function prototypes in ixgbe_main.c
ea65739ebec0cbd625d8c89e19592be58fa186a6chenlu chen - Sun Microsystems - Beijing Chinaint ixgbe_start(ixgbe_t *, boolean_t);
ea65739ebec0cbd625d8c89e19592be58fa186a6chenlu chen - Sun Microsystems - Beijing Chinavoid ixgbe_stop(ixgbe_t *, boolean_t);
9da57d7b0ddd8d73b676ce12c040362132cdd538btenum ioc_reply ixgbe_loopback_ioctl(ixgbe_t *, struct iocblk *, mblk_t *);
da14cebe459d3275048785f25bd869cb09b5307fEric Chengvoid ixgbe_fill_ring(void *, mac_ring_type_t, const int, const int,
da14cebe459d3275048785f25bd869cb09b5307fEric Chengvoid ixgbe_fill_group(void *arg, mac_ring_type_t, const int,
da14cebe459d3275048785f25bd869cb09b5307fEric Chengint ixgbe_rx_ring_intr_disable(mac_intr_handle_t);
9da57d7b0ddd8d73b676ce12c040362132cdd538bt * Function prototypes in ixgbe_gld.c
9da57d7b0ddd8d73b676ce12c040362132cdd538btvoid ixgbe_m_stop(void *);
ea65739ebec0cbd625d8c89e19592be58fa186a6chenlu chen - Sun Microsystems - Beijing Chinaint ixgbe_m_setprop(void *, const char *, mac_prop_id_t, uint_t, const void *);
0dc2366f7b9f9f36e10909b1e95edbf2a261c2acVenugopal Iyerint ixgbe_m_getprop(void *, const char *, mac_prop_id_t, uint_t, void *);
0dc2366f7b9f9f36e10909b1e95edbf2a261c2acVenugopal Iyervoid ixgbe_m_propinfo(void *, const char *, mac_prop_id_t,
ea65739ebec0cbd625d8c89e19592be58fa186a6chenlu chen - Sun Microsystems - Beijing Chinaint ixgbe_set_priv_prop(ixgbe_t *, const char *, uint_t, const void *);
0dc2366f7b9f9f36e10909b1e95edbf2a261c2acVenugopal Iyerint ixgbe_get_priv_prop(ixgbe_t *, const char *, uint_t, void *);
ea65739ebec0cbd625d8c89e19592be58fa186a6chenlu chen - Sun Microsystems - Beijing Chinaboolean_t ixgbe_param_locked(mac_prop_id_t);
9da57d7b0ddd8d73b676ce12c040362132cdd538bt * Function prototypes in ixgbe_rx.c
9da57d7b0ddd8d73b676ce12c040362132cdd538bt * Function prototypes in ixgbe_tx.c
9da57d7b0ddd8d73b676ce12c040362132cdd538btvoid ixgbe_put_free_list(ixgbe_tx_ring_t *, link_list_t *);
9da57d7b0ddd8d73b676ce12c040362132cdd538bt * Function prototypes in ixgbe_log.c
9da57d7b0ddd8d73b676ce12c040362132cdd538btvoid ixgbe_notice(void *, const char *, ...);
9da57d7b0ddd8d73b676ce12c040362132cdd538btvoid ixgbe_log(void *, const char *, ...);
9da57d7b0ddd8d73b676ce12c040362132cdd538btvoid ixgbe_error(void *, const char *, ...);
9da57d7b0ddd8d73b676ce12c040362132cdd538bt * Function prototypes in ixgbe_stat.c
0dc2366f7b9f9f36e10909b1e95edbf2a261c2acVenugopal Iyerint ixgbe_rx_ring_stat(mac_ring_driver_t, uint_t, uint64_t *);
0dc2366f7b9f9f36e10909b1e95edbf2a261c2acVenugopal Iyerint ixgbe_tx_ring_stat(mac_ring_driver_t, uint_t, uint64_t *);
9da57d7b0ddd8d73b676ce12c040362132cdd538bt#endif /* _IXGBE_SW_H */