c869993e79c1eafbec61a56bf6cea848fe754c71xy/*
c869993e79c1eafbec61a56bf6cea848fe754c71xy * CDDL HEADER START
c869993e79c1eafbec61a56bf6cea848fe754c71xy *
c869993e79c1eafbec61a56bf6cea848fe754c71xy * The contents of this file are subject to the terms of the
c869993e79c1eafbec61a56bf6cea848fe754c71xy * Common Development and Distribution License (the "License").
c869993e79c1eafbec61a56bf6cea848fe754c71xy * You may not use this file except in compliance with the License.
c869993e79c1eafbec61a56bf6cea848fe754c71xy *
0dc2366f7b9f9f36e10909b1e95edbf2a261c2acVenugopal Iyer * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
0dc2366f7b9f9f36e10909b1e95edbf2a261c2acVenugopal Iyer * or http://www.opensolaris.org/os/licensing.
c869993e79c1eafbec61a56bf6cea848fe754c71xy * See the License for the specific language governing permissions
c869993e79c1eafbec61a56bf6cea848fe754c71xy * and limitations under the License.
c869993e79c1eafbec61a56bf6cea848fe754c71xy *
0dc2366f7b9f9f36e10909b1e95edbf2a261c2acVenugopal Iyer * When distributing Covered Code, include this CDDL HEADER in each
0dc2366f7b9f9f36e10909b1e95edbf2a261c2acVenugopal Iyer * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
c869993e79c1eafbec61a56bf6cea848fe754c71xy * If applicable, add the following below this CDDL HEADER, with the
c869993e79c1eafbec61a56bf6cea848fe754c71xy * fields enclosed by brackets "[]" replaced with your own identifying
c869993e79c1eafbec61a56bf6cea848fe754c71xy * information: Portions Copyright [yyyy] [name of copyright owner]
c869993e79c1eafbec61a56bf6cea848fe754c71xy *
c869993e79c1eafbec61a56bf6cea848fe754c71xy * CDDL HEADER END
c869993e79c1eafbec61a56bf6cea848fe754c71xy */
c869993e79c1eafbec61a56bf6cea848fe754c71xy
da14cebe459d3275048785f25bd869cb09b5307fEric Cheng/*
08a0f9b044f01fb540a861b94b63d77dd3d576eechenlu chen - Sun Microsystems - Beijing China * Copyright(c) 2007-2010 Intel Corporation. All rights reserved.
08a0f9b044f01fb540a861b94b63d77dd3d576eechenlu chen - Sun Microsystems - Beijing China */
08a0f9b044f01fb540a861b94b63d77dd3d576eechenlu chen - Sun Microsystems - Beijing China
08a0f9b044f01fb540a861b94b63d77dd3d576eechenlu chen - Sun Microsystems - Beijing China/*
08a0f9b044f01fb540a861b94b63d77dd3d576eechenlu chen - Sun Microsystems - Beijing China * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
13485e69b5429e6c7d27301fb3c0deee0e93768aGarrett D'Amore * Copyright 2014 Pluribus Networks Inc.
c869993e79c1eafbec61a56bf6cea848fe754c71xy */
c869993e79c1eafbec61a56bf6cea848fe754c71xy
c869993e79c1eafbec61a56bf6cea848fe754c71xy#ifndef _IGB_SW_H
c869993e79c1eafbec61a56bf6cea848fe754c71xy#define _IGB_SW_H
c869993e79c1eafbec61a56bf6cea848fe754c71xy
c869993e79c1eafbec61a56bf6cea848fe754c71xy#ifdef __cplusplus
c869993e79c1eafbec61a56bf6cea848fe754c71xyextern "C" {
c869993e79c1eafbec61a56bf6cea848fe754c71xy#endif
c869993e79c1eafbec61a56bf6cea848fe754c71xy
c869993e79c1eafbec61a56bf6cea848fe754c71xy#include <sys/types.h>
c869993e79c1eafbec61a56bf6cea848fe754c71xy#include <sys/conf.h>
c869993e79c1eafbec61a56bf6cea848fe754c71xy#include <sys/debug.h>
c869993e79c1eafbec61a56bf6cea848fe754c71xy#include <sys/stropts.h>
c869993e79c1eafbec61a56bf6cea848fe754c71xy#include <sys/stream.h>
c869993e79c1eafbec61a56bf6cea848fe754c71xy#include <sys/strsun.h>
c869993e79c1eafbec61a56bf6cea848fe754c71xy#include <sys/strlog.h>
c869993e79c1eafbec61a56bf6cea848fe754c71xy#include <sys/kmem.h>
c869993e79c1eafbec61a56bf6cea848fe754c71xy#include <sys/stat.h>
c869993e79c1eafbec61a56bf6cea848fe754c71xy#include <sys/kstat.h>
c869993e79c1eafbec61a56bf6cea848fe754c71xy#include <sys/modctl.h>
c869993e79c1eafbec61a56bf6cea848fe754c71xy#include <sys/errno.h>
c869993e79c1eafbec61a56bf6cea848fe754c71xy#include <sys/dlpi.h>
da14cebe459d3275048785f25bd869cb09b5307fEric Cheng#include <sys/mac_provider.h>
c869993e79c1eafbec61a56bf6cea848fe754c71xy#include <sys/mac_ether.h>
c869993e79c1eafbec61a56bf6cea848fe754c71xy#include <sys/vlan.h>
c869993e79c1eafbec61a56bf6cea848fe754c71xy#include <sys/ddi.h>
c869993e79c1eafbec61a56bf6cea848fe754c71xy#include <sys/sunddi.h>
c869993e79c1eafbec61a56bf6cea848fe754c71xy#include <sys/pci.h>
c869993e79c1eafbec61a56bf6cea848fe754c71xy#include <sys/pcie.h>
c869993e79c1eafbec61a56bf6cea848fe754c71xy#include <sys/sdt.h>
c869993e79c1eafbec61a56bf6cea848fe754c71xy#include <sys/ethernet.h>
c869993e79c1eafbec61a56bf6cea848fe754c71xy#include <sys/pattr.h>
c869993e79c1eafbec61a56bf6cea848fe754c71xy#include <sys/strsubr.h>
c869993e79c1eafbec61a56bf6cea848fe754c71xy#include <sys/netlb.h>
c869993e79c1eafbec61a56bf6cea848fe754c71xy#include <sys/random.h>
c869993e79c1eafbec61a56bf6cea848fe754c71xy#include <inet/common.h>
d11274aa6f1c1462c11e04d3da70b7453f6f0ebdPaul Guo#include <inet/tcp.h>
c869993e79c1eafbec61a56bf6cea848fe754c71xy#include <inet/ip.h>
c869993e79c1eafbec61a56bf6cea848fe754c71xy#include <inet/mi.h>
c869993e79c1eafbec61a56bf6cea848fe754c71xy#include <inet/nd.h>
8bb4b220fdb894543e41a5f9037898cf3c3f312bgl#include <sys/ddifm.h>
8bb4b220fdb894543e41a5f9037898cf3c3f312bgl#include <sys/fm/protocol.h>
8bb4b220fdb894543e41a5f9037898cf3c3f312bgl#include <sys/fm/util.h>
8bb4b220fdb894543e41a5f9037898cf3c3f312bgl#include <sys/fm/io/ddi.h>
75eba5b6d79ed4d2ce3daf7b2806306b6b69a938Robert Mustacchi#include "e1000_api.h"
75eba5b6d79ed4d2ce3daf7b2806306b6b69a938Robert Mustacchi#include "e1000_82575.h"
c869993e79c1eafbec61a56bf6cea848fe754c71xy
c869993e79c1eafbec61a56bf6cea848fe754c71xy
c869993e79c1eafbec61a56bf6cea848fe754c71xy#define MODULE_NAME "igb" /* module name */
c869993e79c1eafbec61a56bf6cea848fe754c71xy
c869993e79c1eafbec61a56bf6cea848fe754c71xy#define IGB_SUCCESS DDI_SUCCESS
c869993e79c1eafbec61a56bf6cea848fe754c71xy#define IGB_FAILURE DDI_FAILURE
c869993e79c1eafbec61a56bf6cea848fe754c71xy
c869993e79c1eafbec61a56bf6cea848fe754c71xy#define IGB_UNKNOWN 0x00
c869993e79c1eafbec61a56bf6cea848fe754c71xy#define IGB_INITIALIZED 0x01
c869993e79c1eafbec61a56bf6cea848fe754c71xy#define IGB_STARTED 0x02
c869993e79c1eafbec61a56bf6cea848fe754c71xy#define IGB_SUSPENDED 0x04
3f7e60a636ef887af87fadf9ab6289c672532dd9zhefeng xu - Sun Microsystems - Beijing China#define IGB_STALL 0x08
cf8dcc9bbabedca41ecfee13dec8172104e99968zhefeng xu - Sun Microsystems - Beijing China#define IGB_ERROR 0x80
c869993e79c1eafbec61a56bf6cea848fe754c71xy
ac7f5757903d7806e03e59f71c10eec36e0deadechenlu chen - Sun Microsystems - Beijing China#define IGB_RX_STOPPED 0x1
ac7f5757903d7806e03e59f71c10eec36e0deadechenlu chen - Sun Microsystems - Beijing China
c869993e79c1eafbec61a56bf6cea848fe754c71xy#define IGB_INTR_NONE 0
c869993e79c1eafbec61a56bf6cea848fe754c71xy#define IGB_INTR_MSIX 1
c869993e79c1eafbec61a56bf6cea848fe754c71xy#define IGB_INTR_MSI 2
c869993e79c1eafbec61a56bf6cea848fe754c71xy#define IGB_INTR_LEGACY 3
c869993e79c1eafbec61a56bf6cea848fe754c71xy
80a11ad227f9c82cd6e7cf5c8913a37f00b7af0echenlu chen - Sun Microsystems - Beijing China#define IGB_ADAPTER_REGSET 1 /* mapping adapter registers */
80a11ad227f9c82cd6e7cf5c8913a37f00b7af0echenlu chen - Sun Microsystems - Beijing China#define IGB_ADAPTER_MSIXTAB 4 /* mapping msi-x table */
80a11ad227f9c82cd6e7cf5c8913a37f00b7af0echenlu chen - Sun Microsystems - Beijing China
da14cebe459d3275048785f25bd869cb09b5307fEric Cheng#define IGB_NO_POLL -1
da14cebe459d3275048785f25bd869cb09b5307fEric Cheng#define IGB_NO_FREE_SLOT -1
da14cebe459d3275048785f25bd869cb09b5307fEric Cheng
c869993e79c1eafbec61a56bf6cea848fe754c71xy#define MAX_NUM_UNICAST_ADDRESSES E1000_RAR_ENTRIES
6ca163a136944eea4423498926e09cef9889312cvitezslav batrla - Sun Microsystems - Prague Czech Republic#define MCAST_ALLOC_COUNT 256
d11274aa6f1c1462c11e04d3da70b7453f6f0ebdPaul Guo#define MAX_COOKIE 18
c869993e79c1eafbec61a56bf6cea848fe754c71xy#define MIN_NUM_TX_DESC 2
c869993e79c1eafbec61a56bf6cea848fe754c71xy
80a11ad227f9c82cd6e7cf5c8913a37f00b7af0echenlu chen - Sun Microsystems - Beijing China/*
80a11ad227f9c82cd6e7cf5c8913a37f00b7af0echenlu chen - Sun Microsystems - Beijing China * Number of settings for interrupt throttle rate (ITR). There is one of
80a11ad227f9c82cd6e7cf5c8913a37f00b7af0echenlu chen - Sun Microsystems - Beijing China * these per msi-x vector and it needs to be the maximum of all silicon
80a11ad227f9c82cd6e7cf5c8913a37f00b7af0echenlu chen - Sun Microsystems - Beijing China * types supported by this driver.
80a11ad227f9c82cd6e7cf5c8913a37f00b7af0echenlu chen - Sun Microsystems - Beijing China */
80a11ad227f9c82cd6e7cf5c8913a37f00b7af0echenlu chen - Sun Microsystems - Beijing China#define MAX_NUM_EITR 25
80a11ad227f9c82cd6e7cf5c8913a37f00b7af0echenlu chen - Sun Microsystems - Beijing China
c869993e79c1eafbec61a56bf6cea848fe754c71xy/*
c869993e79c1eafbec61a56bf6cea848fe754c71xy * Maximum values for user configurable parameters
c869993e79c1eafbec61a56bf6cea848fe754c71xy */
c869993e79c1eafbec61a56bf6cea848fe754c71xy#define MAX_TX_RING_SIZE 4096
c869993e79c1eafbec61a56bf6cea848fe754c71xy#define MAX_RX_RING_SIZE 4096
da14cebe459d3275048785f25bd869cb09b5307fEric Cheng#define MAX_RX_GROUP_NUM 4
c869993e79c1eafbec61a56bf6cea848fe754c71xy
c869993e79c1eafbec61a56bf6cea848fe754c71xy#define MAX_MTU 9000
c869993e79c1eafbec61a56bf6cea848fe754c71xy#define MAX_RX_LIMIT_PER_INTR 4096
c869993e79c1eafbec61a56bf6cea848fe754c71xy
c869993e79c1eafbec61a56bf6cea848fe754c71xy#define MAX_RX_COPY_THRESHOLD 9216
c869993e79c1eafbec61a56bf6cea848fe754c71xy#define MAX_TX_COPY_THRESHOLD 9216
c869993e79c1eafbec61a56bf6cea848fe754c71xy#define MAX_TX_RECYCLE_THRESHOLD DEFAULT_TX_RING_SIZE
c869993e79c1eafbec61a56bf6cea848fe754c71xy#define MAX_TX_OVERLOAD_THRESHOLD DEFAULT_TX_RING_SIZE
c869993e79c1eafbec61a56bf6cea848fe754c71xy#define MAX_TX_RESCHED_THRESHOLD DEFAULT_TX_RING_SIZE
6ca163a136944eea4423498926e09cef9889312cvitezslav batrla - Sun Microsystems - Prague Czech Republic#define MAX_MCAST_NUM 8192
c869993e79c1eafbec61a56bf6cea848fe754c71xy
c869993e79c1eafbec61a56bf6cea848fe754c71xy/*
c869993e79c1eafbec61a56bf6cea848fe754c71xy * Minimum values for user configurable parameters
c869993e79c1eafbec61a56bf6cea848fe754c71xy */
c869993e79c1eafbec61a56bf6cea848fe754c71xy#define MIN_TX_RING_SIZE 64
c869993e79c1eafbec61a56bf6cea848fe754c71xy#define MIN_RX_RING_SIZE 64
da14cebe459d3275048785f25bd869cb09b5307fEric Cheng#define MIN_RX_GROUP_NUM 1
c869993e79c1eafbec61a56bf6cea848fe754c71xy
c869993e79c1eafbec61a56bf6cea848fe754c71xy#define MIN_MTU ETHERMIN
c869993e79c1eafbec61a56bf6cea848fe754c71xy#define MIN_RX_LIMIT_PER_INTR 16
3f7e60a636ef887af87fadf9ab6289c672532dd9zhefeng xu - Sun Microsystems - Beijing China
c869993e79c1eafbec61a56bf6cea848fe754c71xy#define MIN_RX_COPY_THRESHOLD 0
c869993e79c1eafbec61a56bf6cea848fe754c71xy#define MIN_TX_COPY_THRESHOLD 0
c869993e79c1eafbec61a56bf6cea848fe754c71xy#define MIN_TX_RECYCLE_THRESHOLD MIN_NUM_TX_DESC
c869993e79c1eafbec61a56bf6cea848fe754c71xy#define MIN_TX_OVERLOAD_THRESHOLD MIN_NUM_TX_DESC
c869993e79c1eafbec61a56bf6cea848fe754c71xy#define MIN_TX_RESCHED_THRESHOLD MIN_NUM_TX_DESC
6ca163a136944eea4423498926e09cef9889312cvitezslav batrla - Sun Microsystems - Prague Czech Republic#define MIN_MCAST_NUM 8
c869993e79c1eafbec61a56bf6cea848fe754c71xy
c869993e79c1eafbec61a56bf6cea848fe754c71xy/*
c869993e79c1eafbec61a56bf6cea848fe754c71xy * Default values for user configurable parameters
c869993e79c1eafbec61a56bf6cea848fe754c71xy */
c869993e79c1eafbec61a56bf6cea848fe754c71xy#define DEFAULT_TX_RING_SIZE 512
c869993e79c1eafbec61a56bf6cea848fe754c71xy#define DEFAULT_RX_RING_SIZE 512
da14cebe459d3275048785f25bd869cb09b5307fEric Cheng#define DEFAULT_RX_GROUP_NUM 1
c869993e79c1eafbec61a56bf6cea848fe754c71xy
c869993e79c1eafbec61a56bf6cea848fe754c71xy#define DEFAULT_MTU ETHERMTU
c869993e79c1eafbec61a56bf6cea848fe754c71xy#define DEFAULT_RX_LIMIT_PER_INTR 256
3f7e60a636ef887af87fadf9ab6289c672532dd9zhefeng xu - Sun Microsystems - Beijing China
c869993e79c1eafbec61a56bf6cea848fe754c71xy#define DEFAULT_RX_COPY_THRESHOLD 128
c869993e79c1eafbec61a56bf6cea848fe754c71xy#define DEFAULT_TX_COPY_THRESHOLD 512
d11274aa6f1c1462c11e04d3da70b7453f6f0ebdPaul Guo#define DEFAULT_TX_RECYCLE_THRESHOLD (MAX_COOKIE + 1)
c869993e79c1eafbec61a56bf6cea848fe754c71xy#define DEFAULT_TX_OVERLOAD_THRESHOLD MIN_NUM_TX_DESC
c869993e79c1eafbec61a56bf6cea848fe754c71xy#define DEFAULT_TX_RESCHED_THRESHOLD 128
69b2d733deffed6bf9baf89d901afd9c81b484edGuoqing Zhu#define DEFAULT_TX_RESCHED_THRESHOLD_LOW 32
6ca163a136944eea4423498926e09cef9889312cvitezslav batrla - Sun Microsystems - Prague Czech Republic#define DEFAULT_MCAST_NUM 4096
c869993e79c1eafbec61a56bf6cea848fe754c71xy
d11274aa6f1c1462c11e04d3da70b7453f6f0ebdPaul Guo#define IGB_LSO_MAXLEN 65535
d11274aa6f1c1462c11e04d3da70b7453f6f0ebdPaul Guo
c869993e79c1eafbec61a56bf6cea848fe754c71xy#define TX_DRAIN_TIME 200
c869993e79c1eafbec61a56bf6cea848fe754c71xy#define RX_DRAIN_TIME 200
c869993e79c1eafbec61a56bf6cea848fe754c71xy
c869993e79c1eafbec61a56bf6cea848fe754c71xy#define STALL_WATCHDOG_TIMEOUT 8 /* 8 seconds */
c869993e79c1eafbec61a56bf6cea848fe754c71xy
c869993e79c1eafbec61a56bf6cea848fe754c71xy/*
c869993e79c1eafbec61a56bf6cea848fe754c71xy * Defined for IP header alignment.
c869993e79c1eafbec61a56bf6cea848fe754c71xy */
c869993e79c1eafbec61a56bf6cea848fe754c71xy#define IPHDR_ALIGN_ROOM 2
c869993e79c1eafbec61a56bf6cea848fe754c71xy
c869993e79c1eafbec61a56bf6cea848fe754c71xy/*
c869993e79c1eafbec61a56bf6cea848fe754c71xy * Bit flags for attach_progress
c869993e79c1eafbec61a56bf6cea848fe754c71xy */
c869993e79c1eafbec61a56bf6cea848fe754c71xy#define ATTACH_PROGRESS_PCI_CONFIG 0x0001 /* PCI config setup */
c869993e79c1eafbec61a56bf6cea848fe754c71xy#define ATTACH_PROGRESS_REGS_MAP 0x0002 /* Registers mapped */
c869993e79c1eafbec61a56bf6cea848fe754c71xy#define ATTACH_PROGRESS_PROPS 0x0004 /* Properties initialized */
c869993e79c1eafbec61a56bf6cea848fe754c71xy#define ATTACH_PROGRESS_ALLOC_INTR 0x0008 /* Interrupts allocated */
c869993e79c1eafbec61a56bf6cea848fe754c71xy#define ATTACH_PROGRESS_ALLOC_RINGS 0x0010 /* Rings allocated */
c869993e79c1eafbec61a56bf6cea848fe754c71xy#define ATTACH_PROGRESS_ADD_INTR 0x0020 /* Intr handlers added */
c869993e79c1eafbec61a56bf6cea848fe754c71xy#define ATTACH_PROGRESS_LOCKS 0x0040 /* Locks initialized */
b8d0a37778010a5166d34bb0d192cf6b1b2f7becchenlu chen - Sun Microsystems - Beijing China#define ATTACH_PROGRESS_INIT_ADAPTER 0x0080 /* Adapter initialized */
c869993e79c1eafbec61a56bf6cea848fe754c71xy#define ATTACH_PROGRESS_STATS 0x0200 /* Kstats created */
c869993e79c1eafbec61a56bf6cea848fe754c71xy#define ATTACH_PROGRESS_MAC 0x0800 /* MAC registered */
c869993e79c1eafbec61a56bf6cea848fe754c71xy#define ATTACH_PROGRESS_ENABLE_INTR 0x1000 /* DDI interrupts enabled */
8bb4b220fdb894543e41a5f9037898cf3c3f312bgl#define ATTACH_PROGRESS_FMINIT 0x2000 /* FMA initialized */
c869993e79c1eafbec61a56bf6cea848fe754c71xy
c869993e79c1eafbec61a56bf6cea848fe754c71xy#define PROP_ADV_AUTONEG_CAP "adv_autoneg_cap"
c869993e79c1eafbec61a56bf6cea848fe754c71xy#define PROP_ADV_1000FDX_CAP "adv_1000fdx_cap"
c869993e79c1eafbec61a56bf6cea848fe754c71xy#define PROP_ADV_1000HDX_CAP "adv_1000hdx_cap"
c869993e79c1eafbec61a56bf6cea848fe754c71xy#define PROP_ADV_100FDX_CAP "adv_100fdx_cap"
c869993e79c1eafbec61a56bf6cea848fe754c71xy#define PROP_ADV_100HDX_CAP "adv_100hdx_cap"
c869993e79c1eafbec61a56bf6cea848fe754c71xy#define PROP_ADV_10FDX_CAP "adv_10fdx_cap"
c869993e79c1eafbec61a56bf6cea848fe754c71xy#define PROP_ADV_10HDX_CAP "adv_10hdx_cap"
c869993e79c1eafbec61a56bf6cea848fe754c71xy#define PROP_DEFAULT_MTU "default_mtu"
c869993e79c1eafbec61a56bf6cea848fe754c71xy#define PROP_FLOW_CONTROL "flow_control"
c869993e79c1eafbec61a56bf6cea848fe754c71xy#define PROP_TX_RING_SIZE "tx_ring_size"
c869993e79c1eafbec61a56bf6cea848fe754c71xy#define PROP_RX_RING_SIZE "rx_ring_size"
da14cebe459d3275048785f25bd869cb09b5307fEric Cheng#define PROP_MR_ENABLE "mr_enable"
da14cebe459d3275048785f25bd869cb09b5307fEric Cheng#define PROP_RX_GROUP_NUM "rx_group_number"
c869993e79c1eafbec61a56bf6cea848fe754c71xy
c869993e79c1eafbec61a56bf6cea848fe754c71xy#define PROP_INTR_FORCE "intr_force"
c869993e79c1eafbec61a56bf6cea848fe754c71xy#define PROP_TX_HCKSUM_ENABLE "tx_hcksum_enable"
c869993e79c1eafbec61a56bf6cea848fe754c71xy#define PROP_RX_HCKSUM_ENABLE "rx_hcksum_enable"
c869993e79c1eafbec61a56bf6cea848fe754c71xy#define PROP_LSO_ENABLE "lso_enable"
c869993e79c1eafbec61a56bf6cea848fe754c71xy#define PROP_TX_HEAD_WB_ENABLE "tx_head_wb_enable"
c869993e79c1eafbec61a56bf6cea848fe754c71xy#define PROP_TX_COPY_THRESHOLD "tx_copy_threshold"
c869993e79c1eafbec61a56bf6cea848fe754c71xy#define PROP_TX_RECYCLE_THRESHOLD "tx_recycle_threshold"
c869993e79c1eafbec61a56bf6cea848fe754c71xy#define PROP_TX_OVERLOAD_THRESHOLD "tx_overload_threshold"
c869993e79c1eafbec61a56bf6cea848fe754c71xy#define PROP_TX_RESCHED_THRESHOLD "tx_resched_threshold"
c869993e79c1eafbec61a56bf6cea848fe754c71xy#define PROP_RX_COPY_THRESHOLD "rx_copy_threshold"
c869993e79c1eafbec61a56bf6cea848fe754c71xy#define PROP_RX_LIMIT_PER_INTR "rx_limit_per_intr"
c869993e79c1eafbec61a56bf6cea848fe754c71xy#define PROP_INTR_THROTTLING "intr_throttling"
6ca163a136944eea4423498926e09cef9889312cvitezslav batrla - Sun Microsystems - Prague Czech Republic#define PROP_MCAST_MAX_NUM "mcast_max_num"
c869993e79c1eafbec61a56bf6cea848fe754c71xy
c869993e79c1eafbec61a56bf6cea848fe754c71xy#define IGB_LB_NONE 0
c869993e79c1eafbec61a56bf6cea848fe754c71xy#define IGB_LB_EXTERNAL 1
c869993e79c1eafbec61a56bf6cea848fe754c71xy#define IGB_LB_INTERNAL_PHY 3
c869993e79c1eafbec61a56bf6cea848fe754c71xy#define IGB_LB_INTERNAL_SERDES 4
c869993e79c1eafbec61a56bf6cea848fe754c71xy
c869993e79c1eafbec61a56bf6cea848fe754c71xyenum ioc_reply {
c869993e79c1eafbec61a56bf6cea848fe754c71xy IOC_INVAL = -1, /* bad, NAK with EINVAL */
c869993e79c1eafbec61a56bf6cea848fe754c71xy IOC_DONE, /* OK, reply sent */
c869993e79c1eafbec61a56bf6cea848fe754c71xy IOC_ACK, /* OK, just send ACK */
c869993e79c1eafbec61a56bf6cea848fe754c71xy IOC_REPLY /* OK, just send reply */
c869993e79c1eafbec61a56bf6cea848fe754c71xy};
c869993e79c1eafbec61a56bf6cea848fe754c71xy
d11274aa6f1c1462c11e04d3da70b7453f6f0ebdPaul Guo/*
d11274aa6f1c1462c11e04d3da70b7453f6f0ebdPaul Guo * For s/w context extraction from a tx frame
d11274aa6f1c1462c11e04d3da70b7453f6f0ebdPaul Guo */
d11274aa6f1c1462c11e04d3da70b7453f6f0ebdPaul Guo#define TX_CXT_SUCCESS 0
d11274aa6f1c1462c11e04d3da70b7453f6f0ebdPaul Guo#define TX_CXT_E_LSO_CSUM (-1)
d11274aa6f1c1462c11e04d3da70b7453f6f0ebdPaul Guo#define TX_CXT_E_ETHER_TYPE (-2)
c869993e79c1eafbec61a56bf6cea848fe754c71xy
c869993e79c1eafbec61a56bf6cea848fe754c71xy#define DMA_SYNC(area, flag) ((void) ddi_dma_sync((area)->dma_handle, \
c869993e79c1eafbec61a56bf6cea848fe754c71xy 0, 0, (flag)))
c869993e79c1eafbec61a56bf6cea848fe754c71xy
c869993e79c1eafbec61a56bf6cea848fe754c71xy/*
c869993e79c1eafbec61a56bf6cea848fe754c71xy * Defined for ring index operations
c869993e79c1eafbec61a56bf6cea848fe754c71xy * ASSERT(index < limit)
c869993e79c1eafbec61a56bf6cea848fe754c71xy * ASSERT(step < limit)
c869993e79c1eafbec61a56bf6cea848fe754c71xy * ASSERT(index1 < limit)
c869993e79c1eafbec61a56bf6cea848fe754c71xy * ASSERT(index2 < limit)
c869993e79c1eafbec61a56bf6cea848fe754c71xy */
c869993e79c1eafbec61a56bf6cea848fe754c71xy#define NEXT_INDEX(index, step, limit) (((index) + (step)) < (limit) ? \
c869993e79c1eafbec61a56bf6cea848fe754c71xy (index) + (step) : (index) + (step) - (limit))
c869993e79c1eafbec61a56bf6cea848fe754c71xy#define PREV_INDEX(index, step, limit) ((index) >= (step) ? \
c869993e79c1eafbec61a56bf6cea848fe754c71xy (index) - (step) : (index) + (limit) - (step))
c869993e79c1eafbec61a56bf6cea848fe754c71xy#define OFFSET(index1, index2, limit) ((index1) <= (index2) ? \
c869993e79c1eafbec61a56bf6cea848fe754c71xy (index2) - (index1) : (index2) + (limit) - (index1))
c869993e79c1eafbec61a56bf6cea848fe754c71xy
c869993e79c1eafbec61a56bf6cea848fe754c71xy#define LINK_LIST_INIT(_LH) \
c869993e79c1eafbec61a56bf6cea848fe754c71xy (_LH)->head = (_LH)->tail = NULL
c869993e79c1eafbec61a56bf6cea848fe754c71xy
c869993e79c1eafbec61a56bf6cea848fe754c71xy#define LIST_GET_HEAD(_LH) ((single_link_t *)((_LH)->head))
c869993e79c1eafbec61a56bf6cea848fe754c71xy
c869993e79c1eafbec61a56bf6cea848fe754c71xy#define LIST_POP_HEAD(_LH) \
c869993e79c1eafbec61a56bf6cea848fe754c71xy (single_link_t *)(_LH)->head; \
c869993e79c1eafbec61a56bf6cea848fe754c71xy { \
c869993e79c1eafbec61a56bf6cea848fe754c71xy if ((_LH)->head != NULL) { \
c869993e79c1eafbec61a56bf6cea848fe754c71xy (_LH)->head = (_LH)->head->link; \
c869993e79c1eafbec61a56bf6cea848fe754c71xy if ((_LH)->head == NULL) \
c869993e79c1eafbec61a56bf6cea848fe754c71xy (_LH)->tail = NULL; \
c869993e79c1eafbec61a56bf6cea848fe754c71xy } \
c869993e79c1eafbec61a56bf6cea848fe754c71xy }
c869993e79c1eafbec61a56bf6cea848fe754c71xy
c869993e79c1eafbec61a56bf6cea848fe754c71xy#define LIST_GET_TAIL(_LH) ((single_link_t *)((_LH)->tail))
c869993e79c1eafbec61a56bf6cea848fe754c71xy
c869993e79c1eafbec61a56bf6cea848fe754c71xy#define LIST_PUSH_TAIL(_LH, _E) \
c869993e79c1eafbec61a56bf6cea848fe754c71xy if ((_LH)->tail != NULL) { \
c869993e79c1eafbec61a56bf6cea848fe754c71xy (_LH)->tail->link = (single_link_t *)(_E); \
c869993e79c1eafbec61a56bf6cea848fe754c71xy (_LH)->tail = (single_link_t *)(_E); \
c869993e79c1eafbec61a56bf6cea848fe754c71xy } else { \
c869993e79c1eafbec61a56bf6cea848fe754c71xy (_LH)->head = (_LH)->tail = (single_link_t *)(_E); \
c869993e79c1eafbec61a56bf6cea848fe754c71xy } \
c869993e79c1eafbec61a56bf6cea848fe754c71xy (_E)->link = NULL;
c869993e79c1eafbec61a56bf6cea848fe754c71xy
c869993e79c1eafbec61a56bf6cea848fe754c71xy#define LIST_GET_NEXT(_LH, _E) \
c869993e79c1eafbec61a56bf6cea848fe754c71xy (((_LH)->tail == (single_link_t *)(_E)) ? \
c869993e79c1eafbec61a56bf6cea848fe754c71xy NULL : ((single_link_t *)(_E))->link)
c869993e79c1eafbec61a56bf6cea848fe754c71xy
c869993e79c1eafbec61a56bf6cea848fe754c71xy
c869993e79c1eafbec61a56bf6cea848fe754c71xytypedef struct single_link {
c869993e79c1eafbec61a56bf6cea848fe754c71xy struct single_link *link;
c869993e79c1eafbec61a56bf6cea848fe754c71xy} single_link_t;
c869993e79c1eafbec61a56bf6cea848fe754c71xy
c869993e79c1eafbec61a56bf6cea848fe754c71xytypedef struct link_list {
c869993e79c1eafbec61a56bf6cea848fe754c71xy single_link_t *head;
c869993e79c1eafbec61a56bf6cea848fe754c71xy single_link_t *tail;
c869993e79c1eafbec61a56bf6cea848fe754c71xy} link_list_t;
c869993e79c1eafbec61a56bf6cea848fe754c71xy
c869993e79c1eafbec61a56bf6cea848fe754c71xy/*
c869993e79c1eafbec61a56bf6cea848fe754c71xy * Property lookups
c869993e79c1eafbec61a56bf6cea848fe754c71xy */
c869993e79c1eafbec61a56bf6cea848fe754c71xy#define IGB_PROP_EXISTS(d, n) ddi_prop_exists(DDI_DEV_T_ANY, (d), \
c869993e79c1eafbec61a56bf6cea848fe754c71xy DDI_PROP_DONTPASS, (n))
c869993e79c1eafbec61a56bf6cea848fe754c71xy#define IGB_PROP_GET_INT(d, n) ddi_prop_get_int(DDI_DEV_T_ANY, (d), \
c869993e79c1eafbec61a56bf6cea848fe754c71xy DDI_PROP_DONTPASS, (n), -1)
c869993e79c1eafbec61a56bf6cea848fe754c71xy
c869993e79c1eafbec61a56bf6cea848fe754c71xy
80a11ad227f9c82cd6e7cf5c8913a37f00b7af0echenlu chen - Sun Microsystems - Beijing China/* capability/feature flags */
80a11ad227f9c82cd6e7cf5c8913a37f00b7af0echenlu chen - Sun Microsystems - Beijing China#define IGB_FLAG_HAS_DCA (1 << 0) /* has Direct Cache Access */
80a11ad227f9c82cd6e7cf5c8913a37f00b7af0echenlu chen - Sun Microsystems - Beijing China#define IGB_FLAG_VMDQ_POOL (1 << 1) /* has vmdq capability */
80a11ad227f9c82cd6e7cf5c8913a37f00b7af0echenlu chen - Sun Microsystems - Beijing China#define IGB_FLAG_NEED_CTX_IDX (1 << 2) /* context descriptor needs index */
80a11ad227f9c82cd6e7cf5c8913a37f00b7af0echenlu chen - Sun Microsystems - Beijing China
80a11ad227f9c82cd6e7cf5c8913a37f00b7af0echenlu chen - Sun Microsystems - Beijing China/* function pointer for nic-specific functions */
80a11ad227f9c82cd6e7cf5c8913a37f00b7af0echenlu chen - Sun Microsystems - Beijing Chinatypedef void (*igb_nic_func_t)(struct igb *);
80a11ad227f9c82cd6e7cf5c8913a37f00b7af0echenlu chen - Sun Microsystems - Beijing China
80a11ad227f9c82cd6e7cf5c8913a37f00b7af0echenlu chen - Sun Microsystems - Beijing China/* adapter-specific info for each supported device type */
80a11ad227f9c82cd6e7cf5c8913a37f00b7af0echenlu chen - Sun Microsystems - Beijing Chinatypedef struct adapter_info {
80a11ad227f9c82cd6e7cf5c8913a37f00b7af0echenlu chen - Sun Microsystems - Beijing China /* limits */
80a11ad227f9c82cd6e7cf5c8913a37f00b7af0echenlu chen - Sun Microsystems - Beijing China uint32_t max_rx_que_num; /* maximum number of rx queues */
80a11ad227f9c82cd6e7cf5c8913a37f00b7af0echenlu chen - Sun Microsystems - Beijing China uint32_t min_rx_que_num; /* minimum number of rx queues */
80a11ad227f9c82cd6e7cf5c8913a37f00b7af0echenlu chen - Sun Microsystems - Beijing China uint32_t def_rx_que_num; /* default number of rx queues */
80a11ad227f9c82cd6e7cf5c8913a37f00b7af0echenlu chen - Sun Microsystems - Beijing China uint32_t max_tx_que_num; /* maximum number of tx queues */
80a11ad227f9c82cd6e7cf5c8913a37f00b7af0echenlu chen - Sun Microsystems - Beijing China uint32_t min_tx_que_num; /* minimum number of tx queues */
80a11ad227f9c82cd6e7cf5c8913a37f00b7af0echenlu chen - Sun Microsystems - Beijing China uint32_t def_tx_que_num; /* default number of tx queues */
80a11ad227f9c82cd6e7cf5c8913a37f00b7af0echenlu chen - Sun Microsystems - Beijing China uint32_t max_intr_throttle; /* maximum interrupt throttle */
80a11ad227f9c82cd6e7cf5c8913a37f00b7af0echenlu chen - Sun Microsystems - Beijing China uint32_t min_intr_throttle; /* minimum interrupt throttle */
80a11ad227f9c82cd6e7cf5c8913a37f00b7af0echenlu chen - Sun Microsystems - Beijing China uint32_t def_intr_throttle; /* default interrupt throttle */
80a11ad227f9c82cd6e7cf5c8913a37f00b7af0echenlu chen - Sun Microsystems - Beijing China /* function pointers */
80a11ad227f9c82cd6e7cf5c8913a37f00b7af0echenlu chen - Sun Microsystems - Beijing China igb_nic_func_t enable_intr; /* enable adapter interrupts */
80a11ad227f9c82cd6e7cf5c8913a37f00b7af0echenlu chen - Sun Microsystems - Beijing China igb_nic_func_t setup_msix; /* set up msi-x vectors */
80a11ad227f9c82cd6e7cf5c8913a37f00b7af0echenlu chen - Sun Microsystems - Beijing China /* capabilities */
80a11ad227f9c82cd6e7cf5c8913a37f00b7af0echenlu chen - Sun Microsystems - Beijing China uint32_t flags; /* capability flags */
b8d0a37778010a5166d34bb0d192cf6b1b2f7becchenlu chen - Sun Microsystems - Beijing China uint32_t rxdctl_mask; /* mask for RXDCTL register */
80a11ad227f9c82cd6e7cf5c8913a37f00b7af0echenlu chen - Sun Microsystems - Beijing China} adapter_info_t;
80a11ad227f9c82cd6e7cf5c8913a37f00b7af0echenlu chen - Sun Microsystems - Beijing China
c869993e79c1eafbec61a56bf6cea848fe754c71xytypedef union igb_ether_addr {
c869993e79c1eafbec61a56bf6cea848fe754c71xy struct {
c869993e79c1eafbec61a56bf6cea848fe754c71xy uint32_t high;
c869993e79c1eafbec61a56bf6cea848fe754c71xy uint32_t low;
c869993e79c1eafbec61a56bf6cea848fe754c71xy } reg;
c869993e79c1eafbec61a56bf6cea848fe754c71xy struct {
c869993e79c1eafbec61a56bf6cea848fe754c71xy uint8_t set;
da14cebe459d3275048785f25bd869cb09b5307fEric Cheng uint8_t group_index;
c869993e79c1eafbec61a56bf6cea848fe754c71xy uint8_t addr[ETHERADDRL];
c869993e79c1eafbec61a56bf6cea848fe754c71xy } mac;
c869993e79c1eafbec61a56bf6cea848fe754c71xy} igb_ether_addr_t;
c869993e79c1eafbec61a56bf6cea848fe754c71xy
c869993e79c1eafbec61a56bf6cea848fe754c71xytypedef enum {
c869993e79c1eafbec61a56bf6cea848fe754c71xy USE_NONE,
c869993e79c1eafbec61a56bf6cea848fe754c71xy USE_COPY,
c869993e79c1eafbec61a56bf6cea848fe754c71xy USE_DMA
c869993e79c1eafbec61a56bf6cea848fe754c71xy} tx_type_t;
c869993e79c1eafbec61a56bf6cea848fe754c71xy
d11274aa6f1c1462c11e04d3da70b7453f6f0ebdPaul Guotypedef struct tx_context {
c869993e79c1eafbec61a56bf6cea848fe754c71xy uint32_t hcksum_flags;
c869993e79c1eafbec61a56bf6cea848fe754c71xy uint32_t ip_hdr_len;
c869993e79c1eafbec61a56bf6cea848fe754c71xy uint32_t mac_hdr_len;
c869993e79c1eafbec61a56bf6cea848fe754c71xy uint32_t l4_proto;
d11274aa6f1c1462c11e04d3da70b7453f6f0ebdPaul Guo uint32_t mss;
d11274aa6f1c1462c11e04d3da70b7453f6f0ebdPaul Guo uint32_t l4_hdr_len;
d11274aa6f1c1462c11e04d3da70b7453f6f0ebdPaul Guo boolean_t lso_flag;
d11274aa6f1c1462c11e04d3da70b7453f6f0ebdPaul Guo} tx_context_t;
c869993e79c1eafbec61a56bf6cea848fe754c71xy
c869993e79c1eafbec61a56bf6cea848fe754c71xy/* Hold address/length of each DMA segment */
c869993e79c1eafbec61a56bf6cea848fe754c71xytypedef struct sw_desc {
c869993e79c1eafbec61a56bf6cea848fe754c71xy uint64_t address;
c869993e79c1eafbec61a56bf6cea848fe754c71xy size_t length;
c869993e79c1eafbec61a56bf6cea848fe754c71xy} sw_desc_t;
c869993e79c1eafbec61a56bf6cea848fe754c71xy
c869993e79c1eafbec61a56bf6cea848fe754c71xy/* Handles and addresses of DMA buffer */
c869993e79c1eafbec61a56bf6cea848fe754c71xytypedef struct dma_buffer {
c869993e79c1eafbec61a56bf6cea848fe754c71xy caddr_t address; /* Virtual address */
c869993e79c1eafbec61a56bf6cea848fe754c71xy uint64_t dma_address; /* DMA (Hardware) address */
c869993e79c1eafbec61a56bf6cea848fe754c71xy ddi_acc_handle_t acc_handle; /* Data access handle */
c869993e79c1eafbec61a56bf6cea848fe754c71xy ddi_dma_handle_t dma_handle; /* DMA handle */
c869993e79c1eafbec61a56bf6cea848fe754c71xy size_t size; /* Buffer size */
c869993e79c1eafbec61a56bf6cea848fe754c71xy size_t len; /* Data length in the buffer */
c869993e79c1eafbec61a56bf6cea848fe754c71xy} dma_buffer_t;
c869993e79c1eafbec61a56bf6cea848fe754c71xy
c869993e79c1eafbec61a56bf6cea848fe754c71xy/*
c869993e79c1eafbec61a56bf6cea848fe754c71xy * Tx Control Block
c869993e79c1eafbec61a56bf6cea848fe754c71xy */
c869993e79c1eafbec61a56bf6cea848fe754c71xytypedef struct tx_control_block {
c869993e79c1eafbec61a56bf6cea848fe754c71xy single_link_t link;
69b2d733deffed6bf9baf89d901afd9c81b484edGuoqing Zhu uint32_t last_index;
c869993e79c1eafbec61a56bf6cea848fe754c71xy uint32_t frag_num;
c869993e79c1eafbec61a56bf6cea848fe754c71xy uint32_t desc_num;
c869993e79c1eafbec61a56bf6cea848fe754c71xy mblk_t *mp;
c869993e79c1eafbec61a56bf6cea848fe754c71xy tx_type_t tx_type;
c869993e79c1eafbec61a56bf6cea848fe754c71xy ddi_dma_handle_t tx_dma_handle;
c869993e79c1eafbec61a56bf6cea848fe754c71xy dma_buffer_t tx_buf;
c869993e79c1eafbec61a56bf6cea848fe754c71xy sw_desc_t desc[MAX_COOKIE];
c869993e79c1eafbec61a56bf6cea848fe754c71xy} tx_control_block_t;
c869993e79c1eafbec61a56bf6cea848fe754c71xy
c869993e79c1eafbec61a56bf6cea848fe754c71xy/*
c869993e79c1eafbec61a56bf6cea848fe754c71xy * RX Control Block
c869993e79c1eafbec61a56bf6cea848fe754c71xy */
c869993e79c1eafbec61a56bf6cea848fe754c71xytypedef struct rx_control_block {
c869993e79c1eafbec61a56bf6cea848fe754c71xy mblk_t *mp;
ac7f5757903d7806e03e59f71c10eec36e0deadechenlu chen - Sun Microsystems - Beijing China uint32_t ref_cnt;
c869993e79c1eafbec61a56bf6cea848fe754c71xy dma_buffer_t rx_buf;
c869993e79c1eafbec61a56bf6cea848fe754c71xy frtn_t free_rtn;
ac7f5757903d7806e03e59f71c10eec36e0deadechenlu chen - Sun Microsystems - Beijing China struct igb_rx_data *rx_data;
c869993e79c1eafbec61a56bf6cea848fe754c71xy} rx_control_block_t;
c869993e79c1eafbec61a56bf6cea848fe754c71xy
c869993e79c1eafbec61a56bf6cea848fe754c71xy/*
c869993e79c1eafbec61a56bf6cea848fe754c71xy * Software Data Structure for Tx Ring
c869993e79c1eafbec61a56bf6cea848fe754c71xy */
c869993e79c1eafbec61a56bf6cea848fe754c71xytypedef struct igb_tx_ring {
c869993e79c1eafbec61a56bf6cea848fe754c71xy uint32_t index; /* Ring index */
da14cebe459d3275048785f25bd869cb09b5307fEric Cheng uint32_t intr_vector; /* Interrupt vector index */
c869993e79c1eafbec61a56bf6cea848fe754c71xy
c869993e79c1eafbec61a56bf6cea848fe754c71xy /*
c869993e79c1eafbec61a56bf6cea848fe754c71xy * Mutexes
c869993e79c1eafbec61a56bf6cea848fe754c71xy */
c869993e79c1eafbec61a56bf6cea848fe754c71xy kmutex_t tx_lock;
c869993e79c1eafbec61a56bf6cea848fe754c71xy kmutex_t recycle_lock;
c869993e79c1eafbec61a56bf6cea848fe754c71xy kmutex_t tcb_head_lock;
c869993e79c1eafbec61a56bf6cea848fe754c71xy kmutex_t tcb_tail_lock;
c869993e79c1eafbec61a56bf6cea848fe754c71xy
c869993e79c1eafbec61a56bf6cea848fe754c71xy /*
c869993e79c1eafbec61a56bf6cea848fe754c71xy * Tx descriptor ring definitions
c869993e79c1eafbec61a56bf6cea848fe754c71xy */
c869993e79c1eafbec61a56bf6cea848fe754c71xy dma_buffer_t tbd_area;
c869993e79c1eafbec61a56bf6cea848fe754c71xy union e1000_adv_tx_desc *tbd_ring;
c869993e79c1eafbec61a56bf6cea848fe754c71xy uint32_t tbd_head; /* Index of next tbd to recycle */
c869993e79c1eafbec61a56bf6cea848fe754c71xy uint32_t tbd_tail; /* Index of next tbd to transmit */
c869993e79c1eafbec61a56bf6cea848fe754c71xy uint32_t tbd_free; /* Number of free tbd */
c869993e79c1eafbec61a56bf6cea848fe754c71xy
c869993e79c1eafbec61a56bf6cea848fe754c71xy /*
c869993e79c1eafbec61a56bf6cea848fe754c71xy * Tx control block list definitions
c869993e79c1eafbec61a56bf6cea848fe754c71xy */
c869993e79c1eafbec61a56bf6cea848fe754c71xy tx_control_block_t *tcb_area;
c869993e79c1eafbec61a56bf6cea848fe754c71xy tx_control_block_t **work_list;
c869993e79c1eafbec61a56bf6cea848fe754c71xy tx_control_block_t **free_list;
c869993e79c1eafbec61a56bf6cea848fe754c71xy uint32_t tcb_head; /* Head index of free list */
c869993e79c1eafbec61a56bf6cea848fe754c71xy uint32_t tcb_tail; /* Tail index of free list */
c869993e79c1eafbec61a56bf6cea848fe754c71xy uint32_t tcb_free; /* Number of free tcb in free list */
c869993e79c1eafbec61a56bf6cea848fe754c71xy
c869993e79c1eafbec61a56bf6cea848fe754c71xy uint32_t *tbd_head_wb; /* Head write-back */
c869993e79c1eafbec61a56bf6cea848fe754c71xy uint32_t (*tx_recycle)(struct igb_tx_ring *);
c869993e79c1eafbec61a56bf6cea848fe754c71xy
c869993e79c1eafbec61a56bf6cea848fe754c71xy /*
d11274aa6f1c1462c11e04d3da70b7453f6f0ebdPaul Guo * s/w context structure for TCP/UDP checksum offload and LSO.
c869993e79c1eafbec61a56bf6cea848fe754c71xy */
d11274aa6f1c1462c11e04d3da70b7453f6f0ebdPaul Guo tx_context_t tx_context;
c869993e79c1eafbec61a56bf6cea848fe754c71xy
c869993e79c1eafbec61a56bf6cea848fe754c71xy /*
c869993e79c1eafbec61a56bf6cea848fe754c71xy * Tx ring settings and status
c869993e79c1eafbec61a56bf6cea848fe754c71xy */
c869993e79c1eafbec61a56bf6cea848fe754c71xy uint32_t ring_size; /* Tx descriptor ring size */
c869993e79c1eafbec61a56bf6cea848fe754c71xy uint32_t free_list_size; /* Tx free list size */
c869993e79c1eafbec61a56bf6cea848fe754c71xy
c869993e79c1eafbec61a56bf6cea848fe754c71xy boolean_t reschedule;
c869993e79c1eafbec61a56bf6cea848fe754c71xy uint32_t recycle_fail;
c869993e79c1eafbec61a56bf6cea848fe754c71xy uint32_t stall_watchdog;
c869993e79c1eafbec61a56bf6cea848fe754c71xy
0dc2366f7b9f9f36e10909b1e95edbf2a261c2acVenugopal Iyer /*
0dc2366f7b9f9f36e10909b1e95edbf2a261c2acVenugopal Iyer * Per-ring statistics
0dc2366f7b9f9f36e10909b1e95edbf2a261c2acVenugopal Iyer */
0dc2366f7b9f9f36e10909b1e95edbf2a261c2acVenugopal Iyer uint64_t tx_pkts; /* Packets Transmitted Count */
0dc2366f7b9f9f36e10909b1e95edbf2a261c2acVenugopal Iyer uint64_t tx_bytes; /* Bytes Transmitted Count */
0dc2366f7b9f9f36e10909b1e95edbf2a261c2acVenugopal Iyer
c869993e79c1eafbec61a56bf6cea848fe754c71xy#ifdef IGB_DEBUG
c869993e79c1eafbec61a56bf6cea848fe754c71xy /*
c869993e79c1eafbec61a56bf6cea848fe754c71xy * Debug statistics
c869993e79c1eafbec61a56bf6cea848fe754c71xy */
c869993e79c1eafbec61a56bf6cea848fe754c71xy uint32_t stat_overload;
c869993e79c1eafbec61a56bf6cea848fe754c71xy uint32_t stat_fail_no_tbd;
c869993e79c1eafbec61a56bf6cea848fe754c71xy uint32_t stat_fail_no_tcb;
c869993e79c1eafbec61a56bf6cea848fe754c71xy uint32_t stat_fail_dma_bind;
c869993e79c1eafbec61a56bf6cea848fe754c71xy uint32_t stat_reschedule;
da14cebe459d3275048785f25bd869cb09b5307fEric Cheng uint32_t stat_pkt_cnt;
c869993e79c1eafbec61a56bf6cea848fe754c71xy#endif
c869993e79c1eafbec61a56bf6cea848fe754c71xy
c869993e79c1eafbec61a56bf6cea848fe754c71xy /*
c869993e79c1eafbec61a56bf6cea848fe754c71xy * Pointer to the igb struct
c869993e79c1eafbec61a56bf6cea848fe754c71xy */
c869993e79c1eafbec61a56bf6cea848fe754c71xy struct igb *igb;
da14cebe459d3275048785f25bd869cb09b5307fEric Cheng mac_ring_handle_t ring_handle; /* call back ring handle */
c869993e79c1eafbec61a56bf6cea848fe754c71xy} igb_tx_ring_t;
c869993e79c1eafbec61a56bf6cea848fe754c71xy
c869993e79c1eafbec61a56bf6cea848fe754c71xy/*
c869993e79c1eafbec61a56bf6cea848fe754c71xy * Software Receive Ring
c869993e79c1eafbec61a56bf6cea848fe754c71xy */
ac7f5757903d7806e03e59f71c10eec36e0deadechenlu chen - Sun Microsystems - Beijing Chinatypedef struct igb_rx_data {
c869993e79c1eafbec61a56bf6cea848fe754c71xy kmutex_t recycle_lock; /* Recycle lock, for rcb_tail */
c869993e79c1eafbec61a56bf6cea848fe754c71xy
c869993e79c1eafbec61a56bf6cea848fe754c71xy /*
c869993e79c1eafbec61a56bf6cea848fe754c71xy * Rx descriptor ring definitions
c869993e79c1eafbec61a56bf6cea848fe754c71xy */
c869993e79c1eafbec61a56bf6cea848fe754c71xy dma_buffer_t rbd_area; /* DMA buffer of rx desc ring */
c869993e79c1eafbec61a56bf6cea848fe754c71xy union e1000_adv_rx_desc *rbd_ring; /* Rx desc ring */
c869993e79c1eafbec61a56bf6cea848fe754c71xy uint32_t rbd_next; /* Index of next rx desc */
c869993e79c1eafbec61a56bf6cea848fe754c71xy
c869993e79c1eafbec61a56bf6cea848fe754c71xy /*
c869993e79c1eafbec61a56bf6cea848fe754c71xy * Rx control block list definitions
c869993e79c1eafbec61a56bf6cea848fe754c71xy */
c869993e79c1eafbec61a56bf6cea848fe754c71xy rx_control_block_t *rcb_area;
c869993e79c1eafbec61a56bf6cea848fe754c71xy rx_control_block_t **work_list; /* Work list of rcbs */
c869993e79c1eafbec61a56bf6cea848fe754c71xy rx_control_block_t **free_list; /* Free list of rcbs */
c869993e79c1eafbec61a56bf6cea848fe754c71xy uint32_t rcb_head; /* Index of next free rcb */
c869993e79c1eafbec61a56bf6cea848fe754c71xy uint32_t rcb_tail; /* Index to put recycled rcb */
c869993e79c1eafbec61a56bf6cea848fe754c71xy uint32_t rcb_free; /* Number of free rcbs */
c869993e79c1eafbec61a56bf6cea848fe754c71xy
c869993e79c1eafbec61a56bf6cea848fe754c71xy /*
ac7f5757903d7806e03e59f71c10eec36e0deadechenlu chen - Sun Microsystems - Beijing China * Rx sw ring settings and status
c869993e79c1eafbec61a56bf6cea848fe754c71xy */
c869993e79c1eafbec61a56bf6cea848fe754c71xy uint32_t ring_size; /* Rx descriptor ring size */
c869993e79c1eafbec61a56bf6cea848fe754c71xy uint32_t free_list_size; /* Rx free list size */
ac7f5757903d7806e03e59f71c10eec36e0deadechenlu chen - Sun Microsystems - Beijing China
ac7f5757903d7806e03e59f71c10eec36e0deadechenlu chen - Sun Microsystems - Beijing China uint32_t rcb_pending;
ac7f5757903d7806e03e59f71c10eec36e0deadechenlu chen - Sun Microsystems - Beijing China uint32_t flag;
ac7f5757903d7806e03e59f71c10eec36e0deadechenlu chen - Sun Microsystems - Beijing China
ac7f5757903d7806e03e59f71c10eec36e0deadechenlu chen - Sun Microsystems - Beijing China struct igb_rx_ring *rx_ring; /* Pointer to rx ring */
ac7f5757903d7806e03e59f71c10eec36e0deadechenlu chen - Sun Microsystems - Beijing China} igb_rx_data_t;
ac7f5757903d7806e03e59f71c10eec36e0deadechenlu chen - Sun Microsystems - Beijing China
ac7f5757903d7806e03e59f71c10eec36e0deadechenlu chen - Sun Microsystems - Beijing China/*
ac7f5757903d7806e03e59f71c10eec36e0deadechenlu chen - Sun Microsystems - Beijing China * Software Data Structure for Rx Ring
ac7f5757903d7806e03e59f71c10eec36e0deadechenlu chen - Sun Microsystems - Beijing China */
ac7f5757903d7806e03e59f71c10eec36e0deadechenlu chen - Sun Microsystems - Beijing Chinatypedef struct igb_rx_ring {
ac7f5757903d7806e03e59f71c10eec36e0deadechenlu chen - Sun Microsystems - Beijing China uint32_t index; /* Ring index */
ac7f5757903d7806e03e59f71c10eec36e0deadechenlu chen - Sun Microsystems - Beijing China uint32_t intr_vector; /* Interrupt vector index */
ac7f5757903d7806e03e59f71c10eec36e0deadechenlu chen - Sun Microsystems - Beijing China
ac7f5757903d7806e03e59f71c10eec36e0deadechenlu chen - Sun Microsystems - Beijing China igb_rx_data_t *rx_data; /* Rx software ring */
ac7f5757903d7806e03e59f71c10eec36e0deadechenlu chen - Sun Microsystems - Beijing China
ac7f5757903d7806e03e59f71c10eec36e0deadechenlu chen - Sun Microsystems - Beijing China kmutex_t rx_lock; /* Rx access lock */
c869993e79c1eafbec61a56bf6cea848fe754c71xy
0dc2366f7b9f9f36e10909b1e95edbf2a261c2acVenugopal Iyer /*
0dc2366f7b9f9f36e10909b1e95edbf2a261c2acVenugopal Iyer * Per-ring statistics
0dc2366f7b9f9f36e10909b1e95edbf2a261c2acVenugopal Iyer */
0dc2366f7b9f9f36e10909b1e95edbf2a261c2acVenugopal Iyer uint64_t rx_pkts; /* Packets Received Count */
0dc2366f7b9f9f36e10909b1e95edbf2a261c2acVenugopal Iyer uint64_t rx_bytes; /* Bytes Received Count */
0dc2366f7b9f9f36e10909b1e95edbf2a261c2acVenugopal Iyer
c869993e79c1eafbec61a56bf6cea848fe754c71xy#ifdef IGB_DEBUG
c869993e79c1eafbec61a56bf6cea848fe754c71xy /*
c869993e79c1eafbec61a56bf6cea848fe754c71xy * Debug statistics
c869993e79c1eafbec61a56bf6cea848fe754c71xy */
c869993e79c1eafbec61a56bf6cea848fe754c71xy uint32_t stat_frame_error;
c869993e79c1eafbec61a56bf6cea848fe754c71xy uint32_t stat_cksum_error;
c869993e79c1eafbec61a56bf6cea848fe754c71xy uint32_t stat_exceed_pkt;
da14cebe459d3275048785f25bd869cb09b5307fEric Cheng uint32_t stat_pkt_cnt;
c869993e79c1eafbec61a56bf6cea848fe754c71xy#endif
c869993e79c1eafbec61a56bf6cea848fe754c71xy
c869993e79c1eafbec61a56bf6cea848fe754c71xy struct igb *igb; /* Pointer to igb struct */
b8d0a37778010a5166d34bb0d192cf6b1b2f7becchenlu chen - Sun Microsystems - Beijing China mac_ring_handle_t ring_handle; /* call back ring handle */
da14cebe459d3275048785f25bd869cb09b5307fEric Cheng uint32_t group_index; /* group index */
da14cebe459d3275048785f25bd869cb09b5307fEric Cheng uint64_t ring_gen_num;
c869993e79c1eafbec61a56bf6cea848fe754c71xy} igb_rx_ring_t;
c869993e79c1eafbec61a56bf6cea848fe754c71xy
da14cebe459d3275048785f25bd869cb09b5307fEric Cheng/*
da14cebe459d3275048785f25bd869cb09b5307fEric Cheng * Software Receive Ring Group
da14cebe459d3275048785f25bd869cb09b5307fEric Cheng */
da14cebe459d3275048785f25bd869cb09b5307fEric Chengtypedef struct igb_rx_group {
da14cebe459d3275048785f25bd869cb09b5307fEric Cheng uint32_t index; /* Group index */
da14cebe459d3275048785f25bd869cb09b5307fEric Cheng mac_group_handle_t group_handle; /* call back group handle */
da14cebe459d3275048785f25bd869cb09b5307fEric Cheng struct igb *igb; /* Pointer to igb struct */
da14cebe459d3275048785f25bd869cb09b5307fEric Cheng} igb_rx_group_t;
da14cebe459d3275048785f25bd869cb09b5307fEric Cheng
c869993e79c1eafbec61a56bf6cea848fe754c71xytypedef struct igb {
c869993e79c1eafbec61a56bf6cea848fe754c71xy int instance;
c869993e79c1eafbec61a56bf6cea848fe754c71xy mac_handle_t mac_hdl;
c869993e79c1eafbec61a56bf6cea848fe754c71xy dev_info_t *dip;
c869993e79c1eafbec61a56bf6cea848fe754c71xy struct e1000_hw hw;
c869993e79c1eafbec61a56bf6cea848fe754c71xy struct igb_osdep osdep;
c869993e79c1eafbec61a56bf6cea848fe754c71xy
80a11ad227f9c82cd6e7cf5c8913a37f00b7af0echenlu chen - Sun Microsystems - Beijing China adapter_info_t *capab; /* adapter capabilities */
80a11ad227f9c82cd6e7cf5c8913a37f00b7af0echenlu chen - Sun Microsystems - Beijing China
c869993e79c1eafbec61a56bf6cea848fe754c71xy uint32_t igb_state;
c869993e79c1eafbec61a56bf6cea848fe754c71xy link_state_t link_state;
c869993e79c1eafbec61a56bf6cea848fe754c71xy uint32_t link_speed;
c869993e79c1eafbec61a56bf6cea848fe754c71xy uint32_t link_duplex;
cf8dcc9bbabedca41ecfee13dec8172104e99968zhefeng xu - Sun Microsystems - Beijing China boolean_t link_complete;
cf8dcc9bbabedca41ecfee13dec8172104e99968zhefeng xu - Sun Microsystems - Beijing China timeout_id_t link_tid;
c869993e79c1eafbec61a56bf6cea848fe754c71xy
c869993e79c1eafbec61a56bf6cea848fe754c71xy uint32_t reset_count;
c869993e79c1eafbec61a56bf6cea848fe754c71xy uint32_t attach_progress;
c869993e79c1eafbec61a56bf6cea848fe754c71xy uint32_t loopback_mode;
ac7f5757903d7806e03e59f71c10eec36e0deadechenlu chen - Sun Microsystems - Beijing China uint32_t default_mtu;
c869993e79c1eafbec61a56bf6cea848fe754c71xy uint32_t max_frame_size;
b8d0a37778010a5166d34bb0d192cf6b1b2f7becchenlu chen - Sun Microsystems - Beijing China uint32_t dout_sync;
c869993e79c1eafbec61a56bf6cea848fe754c71xy
ac7f5757903d7806e03e59f71c10eec36e0deadechenlu chen - Sun Microsystems - Beijing China uint32_t rcb_pending;
ac7f5757903d7806e03e59f71c10eec36e0deadechenlu chen - Sun Microsystems - Beijing China
da14cebe459d3275048785f25bd869cb09b5307fEric Cheng uint32_t mr_enable; /* Enable multiple rings */
da14cebe459d3275048785f25bd869cb09b5307fEric Cheng uint32_t vmdq_mode; /* Mode of VMDq */
da14cebe459d3275048785f25bd869cb09b5307fEric Cheng
c869993e79c1eafbec61a56bf6cea848fe754c71xy /*
da14cebe459d3275048785f25bd869cb09b5307fEric Cheng * Receive Rings and Groups
c869993e79c1eafbec61a56bf6cea848fe754c71xy */
c869993e79c1eafbec61a56bf6cea848fe754c71xy igb_rx_ring_t *rx_rings; /* Array of rx rings */
c869993e79c1eafbec61a56bf6cea848fe754c71xy uint32_t num_rx_rings; /* Number of rx rings in use */
c869993e79c1eafbec61a56bf6cea848fe754c71xy uint32_t rx_ring_size; /* Rx descriptor ring size */
c869993e79c1eafbec61a56bf6cea848fe754c71xy uint32_t rx_buf_size; /* Rx buffer size */
da14cebe459d3275048785f25bd869cb09b5307fEric Cheng igb_rx_group_t *rx_groups; /* Array of rx groups */
da14cebe459d3275048785f25bd869cb09b5307fEric Cheng uint32_t num_rx_groups; /* Number of rx groups in use */
c869993e79c1eafbec61a56bf6cea848fe754c71xy
c869993e79c1eafbec61a56bf6cea848fe754c71xy /*
c869993e79c1eafbec61a56bf6cea848fe754c71xy * Transmit Rings
c869993e79c1eafbec61a56bf6cea848fe754c71xy */
c869993e79c1eafbec61a56bf6cea848fe754c71xy igb_tx_ring_t *tx_rings; /* Array of tx rings */
c869993e79c1eafbec61a56bf6cea848fe754c71xy uint32_t num_tx_rings; /* Number of tx rings in use */
c869993e79c1eafbec61a56bf6cea848fe754c71xy uint32_t tx_ring_size; /* Tx descriptor ring size */
c869993e79c1eafbec61a56bf6cea848fe754c71xy uint32_t tx_buf_size; /* Tx buffer size */
c869993e79c1eafbec61a56bf6cea848fe754c71xy
ac7f5757903d7806e03e59f71c10eec36e0deadechenlu chen - Sun Microsystems - Beijing China boolean_t tx_ring_init;
c869993e79c1eafbec61a56bf6cea848fe754c71xy boolean_t tx_head_wb_enable; /* Tx head wrtie-back */
c869993e79c1eafbec61a56bf6cea848fe754c71xy boolean_t tx_hcksum_enable; /* Tx h/w cksum offload */
c869993e79c1eafbec61a56bf6cea848fe754c71xy boolean_t lso_enable; /* Large Segment Offload */
c869993e79c1eafbec61a56bf6cea848fe754c71xy uint32_t tx_copy_thresh; /* Tx copy threshold */
c869993e79c1eafbec61a56bf6cea848fe754c71xy uint32_t tx_recycle_thresh; /* Tx recycle threshold */
c869993e79c1eafbec61a56bf6cea848fe754c71xy uint32_t tx_overload_thresh; /* Tx overload threshold */
c869993e79c1eafbec61a56bf6cea848fe754c71xy uint32_t tx_resched_thresh; /* Tx reschedule threshold */
c869993e79c1eafbec61a56bf6cea848fe754c71xy boolean_t rx_hcksum_enable; /* Rx h/w cksum offload */
c869993e79c1eafbec61a56bf6cea848fe754c71xy uint32_t rx_copy_thresh; /* Rx copy threshold */
c869993e79c1eafbec61a56bf6cea848fe754c71xy uint32_t rx_limit_per_intr; /* Rx pkts per interrupt */
b8d0a37778010a5166d34bb0d192cf6b1b2f7becchenlu chen - Sun Microsystems - Beijing China
c869993e79c1eafbec61a56bf6cea848fe754c71xy uint32_t intr_throttling[MAX_NUM_EITR];
c869993e79c1eafbec61a56bf6cea848fe754c71xy uint32_t intr_force;
c869993e79c1eafbec61a56bf6cea848fe754c71xy
c869993e79c1eafbec61a56bf6cea848fe754c71xy int intr_type;
c869993e79c1eafbec61a56bf6cea848fe754c71xy int intr_cnt;
c869993e79c1eafbec61a56bf6cea848fe754c71xy int intr_cap;
c869993e79c1eafbec61a56bf6cea848fe754c71xy size_t intr_size;
c869993e79c1eafbec61a56bf6cea848fe754c71xy uint_t intr_pri;
c869993e79c1eafbec61a56bf6cea848fe754c71xy ddi_intr_handle_t *htable;
c869993e79c1eafbec61a56bf6cea848fe754c71xy uint32_t eims_mask;
da14cebe459d3275048785f25bd869cb09b5307fEric Cheng uint32_t ims_mask;
c869993e79c1eafbec61a56bf6cea848fe754c71xy
c869993e79c1eafbec61a56bf6cea848fe754c71xy kmutex_t gen_lock; /* General lock for device access */
c869993e79c1eafbec61a56bf6cea848fe754c71xy kmutex_t watchdog_lock;
cf8dcc9bbabedca41ecfee13dec8172104e99968zhefeng xu - Sun Microsystems - Beijing China kmutex_t link_lock;
ac7f5757903d7806e03e59f71c10eec36e0deadechenlu chen - Sun Microsystems - Beijing China kmutex_t rx_pending_lock;
c869993e79c1eafbec61a56bf6cea848fe754c71xy
c869993e79c1eafbec61a56bf6cea848fe754c71xy boolean_t watchdog_enable;
c869993e79c1eafbec61a56bf6cea848fe754c71xy boolean_t watchdog_start;
c869993e79c1eafbec61a56bf6cea848fe754c71xy timeout_id_t watchdog_tid;
c869993e79c1eafbec61a56bf6cea848fe754c71xy
c869993e79c1eafbec61a56bf6cea848fe754c71xy boolean_t unicst_init;
c869993e79c1eafbec61a56bf6cea848fe754c71xy uint32_t unicst_avail;
c869993e79c1eafbec61a56bf6cea848fe754c71xy uint32_t unicst_total;
c869993e79c1eafbec61a56bf6cea848fe754c71xy igb_ether_addr_t unicst_addr[MAX_NUM_UNICAST_ADDRESSES];
c869993e79c1eafbec61a56bf6cea848fe754c71xy uint32_t mcast_count;
6ca163a136944eea4423498926e09cef9889312cvitezslav batrla - Sun Microsystems - Prague Czech Republic uint32_t mcast_alloc_count;
6ca163a136944eea4423498926e09cef9889312cvitezslav batrla - Sun Microsystems - Prague Czech Republic uint32_t mcast_max_num;
6ca163a136944eea4423498926e09cef9889312cvitezslav batrla - Sun Microsystems - Prague Czech Republic struct ether_addr *mcast_table;
c869993e79c1eafbec61a56bf6cea848fe754c71xy
c869993e79c1eafbec61a56bf6cea848fe754c71xy /*
c869993e79c1eafbec61a56bf6cea848fe754c71xy * Kstat definitions
c869993e79c1eafbec61a56bf6cea848fe754c71xy */
c869993e79c1eafbec61a56bf6cea848fe754c71xy kstat_t *igb_ks;
c869993e79c1eafbec61a56bf6cea848fe754c71xy
13485e69b5429e6c7d27301fb3c0deee0e93768aGarrett D'Amore /*
13485e69b5429e6c7d27301fb3c0deee0e93768aGarrett D'Amore * Backing store for MAC stats. These are reported via GLDv3, instead
13485e69b5429e6c7d27301fb3c0deee0e93768aGarrett D'Amore * of via our private kstat structure.
13485e69b5429e6c7d27301fb3c0deee0e93768aGarrett D'Amore */
13485e69b5429e6c7d27301fb3c0deee0e93768aGarrett D'Amore uint64_t stat_tor; /* rbytes */
13485e69b5429e6c7d27301fb3c0deee0e93768aGarrett D'Amore uint64_t stat_tpr; /* rpackets */
13485e69b5429e6c7d27301fb3c0deee0e93768aGarrett D'Amore uint64_t stat_tot; /* obytes */
13485e69b5429e6c7d27301fb3c0deee0e93768aGarrett D'Amore uint64_t stat_tpt; /* opackets */
13485e69b5429e6c7d27301fb3c0deee0e93768aGarrett D'Amore uint64_t stat_colc; /* collisions */
13485e69b5429e6c7d27301fb3c0deee0e93768aGarrett D'Amore uint64_t stat_mcc; /* multi colls */
13485e69b5429e6c7d27301fb3c0deee0e93768aGarrett D'Amore uint64_t stat_scc; /* single colls */
13485e69b5429e6c7d27301fb3c0deee0e93768aGarrett D'Amore uint64_t stat_ecol; /* excessive colls */
13485e69b5429e6c7d27301fb3c0deee0e93768aGarrett D'Amore uint64_t stat_latecol; /* late colls */
13485e69b5429e6c7d27301fb3c0deee0e93768aGarrett D'Amore uint64_t stat_bptc; /* xmit bcast */
13485e69b5429e6c7d27301fb3c0deee0e93768aGarrett D'Amore uint64_t stat_mptc; /* xmit bcast */
13485e69b5429e6c7d27301fb3c0deee0e93768aGarrett D'Amore uint64_t stat_bprc; /* recv bcast */
13485e69b5429e6c7d27301fb3c0deee0e93768aGarrett D'Amore uint64_t stat_mprc; /* recv mcast */
13485e69b5429e6c7d27301fb3c0deee0e93768aGarrett D'Amore uint64_t stat_rnbc; /* recv nobuf */
13485e69b5429e6c7d27301fb3c0deee0e93768aGarrett D'Amore uint64_t stat_roc; /* recv toolong */
13485e69b5429e6c7d27301fb3c0deee0e93768aGarrett D'Amore uint64_t stat_sec; /* sqe errors */
13485e69b5429e6c7d27301fb3c0deee0e93768aGarrett D'Amore uint64_t stat_dc; /* defer */
13485e69b5429e6c7d27301fb3c0deee0e93768aGarrett D'Amore uint64_t stat_algnerrc; /* align errors */
13485e69b5429e6c7d27301fb3c0deee0e93768aGarrett D'Amore uint64_t stat_crcerrs; /* crc errors */
13485e69b5429e6c7d27301fb3c0deee0e93768aGarrett D'Amore uint64_t stat_cexterr; /* carrier extension errors */
13485e69b5429e6c7d27301fb3c0deee0e93768aGarrett D'Amore uint64_t stat_ruc; /* recv tooshort */
13485e69b5429e6c7d27301fb3c0deee0e93768aGarrett D'Amore uint64_t stat_rjc; /* recv jabber */
13485e69b5429e6c7d27301fb3c0deee0e93768aGarrett D'Amore uint64_t stat_rxerrc; /* recv errors */
13485e69b5429e6c7d27301fb3c0deee0e93768aGarrett D'Amore
ac7f5757903d7806e03e59f71c10eec36e0deadechenlu chen - Sun Microsystems - Beijing China uint32_t param_en_1000fdx_cap:1,
ac7f5757903d7806e03e59f71c10eec36e0deadechenlu chen - Sun Microsystems - Beijing China param_en_1000hdx_cap:1,
ac7f5757903d7806e03e59f71c10eec36e0deadechenlu chen - Sun Microsystems - Beijing China param_en_100t4_cap:1,
ac7f5757903d7806e03e59f71c10eec36e0deadechenlu chen - Sun Microsystems - Beijing China param_en_100fdx_cap:1,
ac7f5757903d7806e03e59f71c10eec36e0deadechenlu chen - Sun Microsystems - Beijing China param_en_100hdx_cap:1,
ac7f5757903d7806e03e59f71c10eec36e0deadechenlu chen - Sun Microsystems - Beijing China param_en_10fdx_cap:1,
ac7f5757903d7806e03e59f71c10eec36e0deadechenlu chen - Sun Microsystems - Beijing China param_en_10hdx_cap:1,
ac7f5757903d7806e03e59f71c10eec36e0deadechenlu chen - Sun Microsystems - Beijing China param_1000fdx_cap:1,
ac7f5757903d7806e03e59f71c10eec36e0deadechenlu chen - Sun Microsystems - Beijing China param_1000hdx_cap:1,
ac7f5757903d7806e03e59f71c10eec36e0deadechenlu chen - Sun Microsystems - Beijing China param_100t4_cap:1,
ac7f5757903d7806e03e59f71c10eec36e0deadechenlu chen - Sun Microsystems - Beijing China param_100fdx_cap:1,
ac7f5757903d7806e03e59f71c10eec36e0deadechenlu chen - Sun Microsystems - Beijing China param_100hdx_cap:1,
ac7f5757903d7806e03e59f71c10eec36e0deadechenlu chen - Sun Microsystems - Beijing China param_10fdx_cap:1,
ac7f5757903d7806e03e59f71c10eec36e0deadechenlu chen - Sun Microsystems - Beijing China param_10hdx_cap:1,
ac7f5757903d7806e03e59f71c10eec36e0deadechenlu chen - Sun Microsystems - Beijing China param_autoneg_cap:1,
ac7f5757903d7806e03e59f71c10eec36e0deadechenlu chen - Sun Microsystems - Beijing China param_pause_cap:1,
ac7f5757903d7806e03e59f71c10eec36e0deadechenlu chen - Sun Microsystems - Beijing China param_asym_pause_cap:1,
ac7f5757903d7806e03e59f71c10eec36e0deadechenlu chen - Sun Microsystems - Beijing China param_rem_fault:1,
ac7f5757903d7806e03e59f71c10eec36e0deadechenlu chen - Sun Microsystems - Beijing China param_adv_1000fdx_cap:1,
ac7f5757903d7806e03e59f71c10eec36e0deadechenlu chen - Sun Microsystems - Beijing China param_adv_1000hdx_cap:1,
ac7f5757903d7806e03e59f71c10eec36e0deadechenlu chen - Sun Microsystems - Beijing China param_adv_100t4_cap:1,
ac7f5757903d7806e03e59f71c10eec36e0deadechenlu chen - Sun Microsystems - Beijing China param_adv_100fdx_cap:1,
ac7f5757903d7806e03e59f71c10eec36e0deadechenlu chen - Sun Microsystems - Beijing China param_adv_100hdx_cap:1,
ac7f5757903d7806e03e59f71c10eec36e0deadechenlu chen - Sun Microsystems - Beijing China param_adv_10fdx_cap:1,
ac7f5757903d7806e03e59f71c10eec36e0deadechenlu chen - Sun Microsystems - Beijing China param_adv_10hdx_cap:1,
ac7f5757903d7806e03e59f71c10eec36e0deadechenlu chen - Sun Microsystems - Beijing China param_adv_autoneg_cap:1,
ac7f5757903d7806e03e59f71c10eec36e0deadechenlu chen - Sun Microsystems - Beijing China param_adv_pause_cap:1,
ac7f5757903d7806e03e59f71c10eec36e0deadechenlu chen - Sun Microsystems - Beijing China param_adv_asym_pause_cap:1,
ac7f5757903d7806e03e59f71c10eec36e0deadechenlu chen - Sun Microsystems - Beijing China param_adv_rem_fault:1,
ac7f5757903d7806e03e59f71c10eec36e0deadechenlu chen - Sun Microsystems - Beijing China param_lp_1000fdx_cap:1,
ac7f5757903d7806e03e59f71c10eec36e0deadechenlu chen - Sun Microsystems - Beijing China param_lp_1000hdx_cap:1,
ac7f5757903d7806e03e59f71c10eec36e0deadechenlu chen - Sun Microsystems - Beijing China param_lp_100t4_cap:1;
ac7f5757903d7806e03e59f71c10eec36e0deadechenlu chen - Sun Microsystems - Beijing China
ac7f5757903d7806e03e59f71c10eec36e0deadechenlu chen - Sun Microsystems - Beijing China uint32_t param_lp_100fdx_cap:1,
ac7f5757903d7806e03e59f71c10eec36e0deadechenlu chen - Sun Microsystems - Beijing China param_lp_100hdx_cap:1,
ac7f5757903d7806e03e59f71c10eec36e0deadechenlu chen - Sun Microsystems - Beijing China param_lp_10fdx_cap:1,
ac7f5757903d7806e03e59f71c10eec36e0deadechenlu chen - Sun Microsystems - Beijing China param_lp_10hdx_cap:1,
ac7f5757903d7806e03e59f71c10eec36e0deadechenlu chen - Sun Microsystems - Beijing China param_lp_autoneg_cap:1,
ac7f5757903d7806e03e59f71c10eec36e0deadechenlu chen - Sun Microsystems - Beijing China param_lp_pause_cap:1,
ac7f5757903d7806e03e59f71c10eec36e0deadechenlu chen - Sun Microsystems - Beijing China param_lp_asym_pause_cap:1,
ac7f5757903d7806e03e59f71c10eec36e0deadechenlu chen - Sun Microsystems - Beijing China param_lp_rem_fault:1,
ac7f5757903d7806e03e59f71c10eec36e0deadechenlu chen - Sun Microsystems - Beijing China param_pad_to_32:24;
c869993e79c1eafbec61a56bf6cea848fe754c71xy
8bb4b220fdb894543e41a5f9037898cf3c3f312bgl /*
8bb4b220fdb894543e41a5f9037898cf3c3f312bgl * FMA capabilities
8bb4b220fdb894543e41a5f9037898cf3c3f312bgl */
8bb4b220fdb894543e41a5f9037898cf3c3f312bgl int fm_capabilities;
8bb4b220fdb894543e41a5f9037898cf3c3f312bgl
d11274aa6f1c1462c11e04d3da70b7453f6f0ebdPaul Guo ulong_t page_size;
c869993e79c1eafbec61a56bf6cea848fe754c71xy} igb_t;
c869993e79c1eafbec61a56bf6cea848fe754c71xy
c869993e79c1eafbec61a56bf6cea848fe754c71xytypedef struct igb_stat {
c869993e79c1eafbec61a56bf6cea848fe754c71xy
c869993e79c1eafbec61a56bf6cea848fe754c71xy kstat_named_t reset_count; /* Reset Count */
b8d0a37778010a5166d34bb0d192cf6b1b2f7becchenlu chen - Sun Microsystems - Beijing China kstat_named_t dout_sync; /* DMA out of sync */
b8d0a37778010a5166d34bb0d192cf6b1b2f7becchenlu chen - Sun Microsystems - Beijing China#ifdef IGB_DEBUG
c869993e79c1eafbec61a56bf6cea848fe754c71xy kstat_named_t rx_frame_error; /* Rx Error in Packet */
c869993e79c1eafbec61a56bf6cea848fe754c71xy kstat_named_t rx_cksum_error; /* Rx Checksum Error */
c869993e79c1eafbec61a56bf6cea848fe754c71xy kstat_named_t rx_exceed_pkt; /* Rx Exceed Max Pkt Count */
c869993e79c1eafbec61a56bf6cea848fe754c71xy
c869993e79c1eafbec61a56bf6cea848fe754c71xy kstat_named_t tx_overload; /* Tx Desc Ring Overload */
c869993e79c1eafbec61a56bf6cea848fe754c71xy kstat_named_t tx_fail_no_tcb; /* Tx Fail Freelist Empty */
c869993e79c1eafbec61a56bf6cea848fe754c71xy kstat_named_t tx_fail_no_tbd; /* Tx Fail Desc Ring Empty */
c869993e79c1eafbec61a56bf6cea848fe754c71xy kstat_named_t tx_fail_dma_bind; /* Tx Fail DMA bind */
c869993e79c1eafbec61a56bf6cea848fe754c71xy kstat_named_t tx_reschedule; /* Tx Reschedule */
c869993e79c1eafbec61a56bf6cea848fe754c71xy
c869993e79c1eafbec61a56bf6cea848fe754c71xy kstat_named_t gprc; /* Good Packets Received Count */
c869993e79c1eafbec61a56bf6cea848fe754c71xy kstat_named_t gptc; /* Good Packets Xmitted Count */
c869993e79c1eafbec61a56bf6cea848fe754c71xy kstat_named_t gor; /* Good Octets Received Count */
c869993e79c1eafbec61a56bf6cea848fe754c71xy kstat_named_t got; /* Good Octets Xmitd Count */
c869993e79c1eafbec61a56bf6cea848fe754c71xy kstat_named_t prc64; /* Packets Received - 64b */
c869993e79c1eafbec61a56bf6cea848fe754c71xy kstat_named_t prc127; /* Packets Received - 65-127b */
c869993e79c1eafbec61a56bf6cea848fe754c71xy kstat_named_t prc255; /* Packets Received - 127-255b */
c869993e79c1eafbec61a56bf6cea848fe754c71xy kstat_named_t prc511; /* Packets Received - 256-511b */
c869993e79c1eafbec61a56bf6cea848fe754c71xy kstat_named_t prc1023; /* Packets Received - 511-1023b */
c869993e79c1eafbec61a56bf6cea848fe754c71xy kstat_named_t prc1522; /* Packets Received - 1024-1522b */
c869993e79c1eafbec61a56bf6cea848fe754c71xy kstat_named_t ptc64; /* Packets Xmitted (64b) */
c869993e79c1eafbec61a56bf6cea848fe754c71xy kstat_named_t ptc127; /* Packets Xmitted (64-127b) */
c869993e79c1eafbec61a56bf6cea848fe754c71xy kstat_named_t ptc255; /* Packets Xmitted (128-255b) */
c869993e79c1eafbec61a56bf6cea848fe754c71xy kstat_named_t ptc511; /* Packets Xmitted (255-511b) */
c869993e79c1eafbec61a56bf6cea848fe754c71xy kstat_named_t ptc1023; /* Packets Xmitted (512-1023b) */
c869993e79c1eafbec61a56bf6cea848fe754c71xy kstat_named_t ptc1522; /* Packets Xmitted (1024-1522b */
c869993e79c1eafbec61a56bf6cea848fe754c71xy#endif
c869993e79c1eafbec61a56bf6cea848fe754c71xy kstat_named_t symerrs; /* Symbol Error Count */
c869993e79c1eafbec61a56bf6cea848fe754c71xy kstat_named_t mpc; /* Missed Packet Count */
c869993e79c1eafbec61a56bf6cea848fe754c71xy kstat_named_t rlec; /* Receive Length Error Count */
c869993e79c1eafbec61a56bf6cea848fe754c71xy kstat_named_t xonrxc; /* XON Received Count */
c869993e79c1eafbec61a56bf6cea848fe754c71xy kstat_named_t xontxc; /* XON Xmitted Count */
c869993e79c1eafbec61a56bf6cea848fe754c71xy kstat_named_t xoffrxc; /* XOFF Received Count */
c869993e79c1eafbec61a56bf6cea848fe754c71xy kstat_named_t xofftxc; /* Xoff Xmitted Count */
c869993e79c1eafbec61a56bf6cea848fe754c71xy kstat_named_t fcruc; /* Unknown Flow Conrol Packet Rcvd Count */
c869993e79c1eafbec61a56bf6cea848fe754c71xy kstat_named_t rfc; /* Receive Frag Count */
c869993e79c1eafbec61a56bf6cea848fe754c71xy kstat_named_t tncrs; /* Transmit with no CRS */
c869993e79c1eafbec61a56bf6cea848fe754c71xy kstat_named_t tsctc; /* TCP seg contexts xmit count */
c869993e79c1eafbec61a56bf6cea848fe754c71xy kstat_named_t tsctfc; /* TCP seg contexts xmit fail count */
c869993e79c1eafbec61a56bf6cea848fe754c71xy} igb_stat_t;
c869993e79c1eafbec61a56bf6cea848fe754c71xy
c869993e79c1eafbec61a56bf6cea848fe754c71xy/*
c869993e79c1eafbec61a56bf6cea848fe754c71xy * Function prototypes in e1000_osdep.c
c869993e79c1eafbec61a56bf6cea848fe754c71xy */
7d46e7ad7bb3e7ef36bb4f0816ad4d6c2784f405zhefeng xu - Sun Microsystems - Beijing Chinavoid e1000_write_pci_cfg(struct e1000_hw *, uint32_t, uint16_t *);
7d46e7ad7bb3e7ef36bb4f0816ad4d6c2784f405zhefeng xu - Sun Microsystems - Beijing Chinavoid e1000_read_pci_cfg(struct e1000_hw *, uint32_t, uint16_t *);
7d46e7ad7bb3e7ef36bb4f0816ad4d6c2784f405zhefeng xu - Sun Microsystems - Beijing Chinaint32_t e1000_read_pcie_cap_reg(struct e1000_hw *, uint32_t, uint16_t *);
7d46e7ad7bb3e7ef36bb4f0816ad4d6c2784f405zhefeng xu - Sun Microsystems - Beijing Chinaint32_t e1000_write_pcie_cap_reg(struct e1000_hw *, uint32_t, uint16_t *);
3f7e60a636ef887af87fadf9ab6289c672532dd9zhefeng xu - Sun Microsystems - Beijing Chinavoid e1000_rar_clear(struct e1000_hw *, uint32_t);
3f7e60a636ef887af87fadf9ab6289c672532dd9zhefeng xu - Sun Microsystems - Beijing Chinavoid e1000_rar_set_vmdq(struct e1000_hw *, const uint8_t *, uint32_t,
80a11ad227f9c82cd6e7cf5c8913a37f00b7af0echenlu chen - Sun Microsystems - Beijing China uint32_t, uint8_t);
c869993e79c1eafbec61a56bf6cea848fe754c71xy
c869993e79c1eafbec61a56bf6cea848fe754c71xy/*
c869993e79c1eafbec61a56bf6cea848fe754c71xy * Function prototypes in igb_buf.c
c869993e79c1eafbec61a56bf6cea848fe754c71xy */
c869993e79c1eafbec61a56bf6cea848fe754c71xyint igb_alloc_dma(igb_t *);
c869993e79c1eafbec61a56bf6cea848fe754c71xyvoid igb_free_dma(igb_t *);
ac7f5757903d7806e03e59f71c10eec36e0deadechenlu chen - Sun Microsystems - Beijing Chinavoid igb_free_dma_buffer(dma_buffer_t *);
ac7f5757903d7806e03e59f71c10eec36e0deadechenlu chen - Sun Microsystems - Beijing Chinaint igb_alloc_rx_ring_data(igb_rx_ring_t *rx_ring);
ac7f5757903d7806e03e59f71c10eec36e0deadechenlu chen - Sun Microsystems - Beijing Chinavoid igb_free_rx_ring_data(igb_rx_data_t *rx_data);
c869993e79c1eafbec61a56bf6cea848fe754c71xy
c869993e79c1eafbec61a56bf6cea848fe754c71xy/*
c869993e79c1eafbec61a56bf6cea848fe754c71xy * Function prototypes in igb_main.c
c869993e79c1eafbec61a56bf6cea848fe754c71xy */
ac7f5757903d7806e03e59f71c10eec36e0deadechenlu chen - Sun Microsystems - Beijing Chinaint igb_start(igb_t *, boolean_t);
ac7f5757903d7806e03e59f71c10eec36e0deadechenlu chen - Sun Microsystems - Beijing Chinavoid igb_stop(igb_t *, boolean_t);
c869993e79c1eafbec61a56bf6cea848fe754c71xyint igb_setup_link(igb_t *, boolean_t);
da14cebe459d3275048785f25bd869cb09b5307fEric Chengint igb_unicst_find(igb_t *, const uint8_t *);
da14cebe459d3275048785f25bd869cb09b5307fEric Chengint igb_unicst_set(igb_t *, const uint8_t *, int);
c869993e79c1eafbec61a56bf6cea848fe754c71xyint igb_multicst_add(igb_t *, const uint8_t *);
c869993e79c1eafbec61a56bf6cea848fe754c71xyint igb_multicst_remove(igb_t *, const uint8_t *);
c869993e79c1eafbec61a56bf6cea848fe754c71xyenum ioc_reply igb_loopback_ioctl(igb_t *, struct iocblk *, mblk_t *);
c869993e79c1eafbec61a56bf6cea848fe754c71xyvoid igb_enable_watchdog_timer(igb_t *);
c869993e79c1eafbec61a56bf6cea848fe754c71xyvoid igb_disable_watchdog_timer(igb_t *);
c869993e79c1eafbec61a56bf6cea848fe754c71xyint igb_atomic_reserve(uint32_t *, uint32_t);
8bb4b220fdb894543e41a5f9037898cf3c3f312bglint igb_check_acc_handle(ddi_acc_handle_t);
8bb4b220fdb894543e41a5f9037898cf3c3f312bglint igb_check_dma_handle(ddi_dma_handle_t);
8bb4b220fdb894543e41a5f9037898cf3c3f312bglvoid igb_fm_ereport(igb_t *, char *);
837c1ac4e72b7d86278cca88b1075af557f7d161Stephen Hansonvoid igb_set_fma_flags(int);
c869993e79c1eafbec61a56bf6cea848fe754c71xy
c869993e79c1eafbec61a56bf6cea848fe754c71xy/*
c869993e79c1eafbec61a56bf6cea848fe754c71xy * Function prototypes in igb_gld.c
c869993e79c1eafbec61a56bf6cea848fe754c71xy */
c869993e79c1eafbec61a56bf6cea848fe754c71xyint igb_m_start(void *);
c869993e79c1eafbec61a56bf6cea848fe754c71xyvoid igb_m_stop(void *);
c869993e79c1eafbec61a56bf6cea848fe754c71xyint igb_m_promisc(void *, boolean_t);
c869993e79c1eafbec61a56bf6cea848fe754c71xyint igb_m_multicst(void *, boolean_t, const uint8_t *);
c869993e79c1eafbec61a56bf6cea848fe754c71xyint igb_m_unicst(void *, const uint8_t *);
c869993e79c1eafbec61a56bf6cea848fe754c71xyint igb_m_stat(void *, uint_t, uint64_t *);
c869993e79c1eafbec61a56bf6cea848fe754c71xyvoid igb_m_resources(void *);
c869993e79c1eafbec61a56bf6cea848fe754c71xyvoid igb_m_ioctl(void *, queue_t *, mblk_t *);
c869993e79c1eafbec61a56bf6cea848fe754c71xyboolean_t igb_m_getcapab(void *, mac_capab_t, void *);
da14cebe459d3275048785f25bd869cb09b5307fEric Chengvoid igb_fill_ring(void *, mac_ring_type_t, const int, const int,
da14cebe459d3275048785f25bd869cb09b5307fEric Cheng mac_ring_info_t *, mac_ring_handle_t);
ac7f5757903d7806e03e59f71c10eec36e0deadechenlu chen - Sun Microsystems - Beijing Chinaint igb_m_setprop(void *, const char *, mac_prop_id_t, uint_t, const void *);
0dc2366f7b9f9f36e10909b1e95edbf2a261c2acVenugopal Iyerint igb_m_getprop(void *, const char *, mac_prop_id_t, uint_t, void *);
0dc2366f7b9f9f36e10909b1e95edbf2a261c2acVenugopal Iyervoid igb_m_propinfo(void *, const char *, mac_prop_id_t,
0dc2366f7b9f9f36e10909b1e95edbf2a261c2acVenugopal Iyer mac_prop_info_handle_t);
ac7f5757903d7806e03e59f71c10eec36e0deadechenlu chen - Sun Microsystems - Beijing Chinaint igb_set_priv_prop(igb_t *, const char *, uint_t, const void *);
0dc2366f7b9f9f36e10909b1e95edbf2a261c2acVenugopal Iyerint igb_get_priv_prop(igb_t *, const char *, uint_t, void *);
0dc2366f7b9f9f36e10909b1e95edbf2a261c2acVenugopal Iyervoid igb_priv_prop_info(igb_t *, const char *, mac_prop_info_handle_t);
ac7f5757903d7806e03e59f71c10eec36e0deadechenlu chen - Sun Microsystems - Beijing Chinaboolean_t igb_param_locked(mac_prop_id_t);
da14cebe459d3275048785f25bd869cb09b5307fEric Chengvoid igb_fill_group(void *arg, mac_ring_type_t, const int,
da14cebe459d3275048785f25bd869cb09b5307fEric Cheng mac_group_info_t *, mac_group_handle_t);
da14cebe459d3275048785f25bd869cb09b5307fEric Chengint igb_rx_ring_intr_enable(mac_intr_handle_t);
da14cebe459d3275048785f25bd869cb09b5307fEric Chengint igb_rx_ring_intr_disable(mac_intr_handle_t);
ac7f5757903d7806e03e59f71c10eec36e0deadechenlu chen - Sun Microsystems - Beijing Chinaint igb_get_def_val(igb_t *, mac_prop_id_t, uint_t, void *);
c869993e79c1eafbec61a56bf6cea848fe754c71xy
c869993e79c1eafbec61a56bf6cea848fe754c71xy/*
c869993e79c1eafbec61a56bf6cea848fe754c71xy * Function prototypes in igb_rx.c
c869993e79c1eafbec61a56bf6cea848fe754c71xy */
da14cebe459d3275048785f25bd869cb09b5307fEric Chengmblk_t *igb_rx(igb_rx_ring_t *, int);
c869993e79c1eafbec61a56bf6cea848fe754c71xyvoid igb_rx_recycle(caddr_t arg);
c869993e79c1eafbec61a56bf6cea848fe754c71xy
c869993e79c1eafbec61a56bf6cea848fe754c71xy/*
c869993e79c1eafbec61a56bf6cea848fe754c71xy * Function prototypes in igb_tx.c
c869993e79c1eafbec61a56bf6cea848fe754c71xy */
c869993e79c1eafbec61a56bf6cea848fe754c71xyvoid igb_free_tcb(tx_control_block_t *);
c869993e79c1eafbec61a56bf6cea848fe754c71xyvoid igb_put_free_list(igb_tx_ring_t *, link_list_t *);
c869993e79c1eafbec61a56bf6cea848fe754c71xyuint32_t igb_tx_recycle_legacy(igb_tx_ring_t *);
c869993e79c1eafbec61a56bf6cea848fe754c71xyuint32_t igb_tx_recycle_head_wb(igb_tx_ring_t *);
c869993e79c1eafbec61a56bf6cea848fe754c71xy
c869993e79c1eafbec61a56bf6cea848fe754c71xy/*
c869993e79c1eafbec61a56bf6cea848fe754c71xy * Function prototypes in igb_stat.c
c869993e79c1eafbec61a56bf6cea848fe754c71xy */
c869993e79c1eafbec61a56bf6cea848fe754c71xyint igb_init_stats(igb_t *);
c869993e79c1eafbec61a56bf6cea848fe754c71xy
da14cebe459d3275048785f25bd869cb09b5307fEric Chengmblk_t *igb_rx_ring_poll(void *, int);
da14cebe459d3275048785f25bd869cb09b5307fEric Chengmblk_t *igb_tx_ring_send(void *, mblk_t *);
0dc2366f7b9f9f36e10909b1e95edbf2a261c2acVenugopal Iyerint igb_rx_ring_stat(mac_ring_driver_t, uint_t, uint64_t *);
0dc2366f7b9f9f36e10909b1e95edbf2a261c2acVenugopal Iyerint igb_tx_ring_stat(mac_ring_driver_t, uint_t, uint64_t *);
c869993e79c1eafbec61a56bf6cea848fe754c71xy
c869993e79c1eafbec61a56bf6cea848fe754c71xy#ifdef __cplusplus
c869993e79c1eafbec61a56bf6cea848fe754c71xy}
c869993e79c1eafbec61a56bf6cea848fe754c71xy#endif
c869993e79c1eafbec61a56bf6cea848fe754c71xy
c869993e79c1eafbec61a56bf6cea848fe754c71xy#endif /* _IGB_SW_H */