/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright(c) 2007-2010 Intel Corporation. All rights reserved.
*/
/*
* Copyright 2014 Pluribus Networks Inc.
*/
#ifndef _IGB_SW_H
#define _IGB_SW_H
#ifdef __cplusplus
extern "C" {
#endif
#include <sys/mac_provider.h>
#include <sys/mac_ether.h>
#include <sys/ethernet.h>
#include "e1000_api.h"
#include "e1000_82575.h"
#define IGB_INTR_NONE 0
/*
* Number of settings for interrupt throttle rate (ITR). There is one of
* these per msi-x vector and it needs to be the maximum of all silicon
* types supported by this driver.
*/
/*
* Maximum values for user configurable parameters
*/
/*
* Minimum values for user configurable parameters
*/
#define MIN_RX_COPY_THRESHOLD 0
#define MIN_TX_COPY_THRESHOLD 0
/*
* Default values for user configurable parameters
*/
/*
* Defined for IP header alignment.
*/
/*
* Bit flags for attach_progress
*/
#define IGB_LB_NONE 0
enum ioc_reply {
};
/*
* For s/w context extraction from a tx frame
*/
#define TX_CXT_SUCCESS 0
0, 0, (flag)))
/*
* Defined for ring index operations
* ASSERT(index < limit)
* ASSERT(step < limit)
* ASSERT(index1 < limit)
* ASSERT(index2 < limit)
*/
{ \
} \
}
} else { \
} \
typedef struct single_link {
typedef struct link_list {
} link_list_t;
/*
* Property lookups
*/
DDI_PROP_DONTPASS, (n))
DDI_PROP_DONTPASS, (n), -1)
/* capability/feature flags */
/* function pointer for nic-specific functions */
/* adapter-specific info for each supported device type */
typedef struct adapter_info {
/* limits */
/* function pointers */
/* capabilities */
typedef union igb_ether_addr {
struct {
} reg;
struct {
} mac;
typedef enum {
} tx_type_t;
typedef struct tx_context {
} tx_context_t;
typedef struct sw_desc {
} sw_desc_t;
/* Handles and addresses of DMA buffer */
typedef struct dma_buffer {
} dma_buffer_t;
/*
* Tx Control Block
*/
typedef struct tx_control_block {
/*
* RX Control Block
*/
typedef struct rx_control_block {
/*
* Software Data Structure for Tx Ring
*/
typedef struct igb_tx_ring {
/*
* Mutexes
*/
/*
* Tx descriptor ring definitions
*/
/*
* Tx control block list definitions
*/
/*
*/
/*
* Tx ring settings and status
*/
/*
* Per-ring statistics
*/
#ifdef IGB_DEBUG
/*
* Debug statistics
*/
#endif
/*
* Pointer to the igb struct
*/
/*
* Software Receive Ring
*/
typedef struct igb_rx_data {
/*
* Rx descriptor ring definitions
*/
/*
* Rx control block list definitions
*/
/*
* Rx sw ring settings and status
*/
/*
* Software Data Structure for Rx Ring
*/
typedef struct igb_rx_ring {
/*
* Per-ring statistics
*/
#ifdef IGB_DEBUG
/*
* Debug statistics
*/
#endif
/*
* Software Receive Ring Group
*/
typedef struct igb_rx_group {
typedef struct igb {
int instance;
/*
* Receive Rings and Groups
*/
/*
* Transmit Rings
*/
int intr_type;
int intr_cnt;
int intr_cap;
/*
* Kstat definitions
*/
/*
* Backing store for MAC stats. These are reported via GLDv3, instead
* of via our private kstat structure.
*/
/*
* FMA capabilities
*/
int fm_capabilities;
} igb_t;
typedef struct igb_stat {
#ifdef IGB_DEBUG
#endif
} igb_stat_t;
/*
* Function prototypes in e1000_osdep.c
*/
/*
* Function prototypes in igb_buf.c
*/
int igb_alloc_dma(igb_t *);
void igb_free_dma(igb_t *);
void igb_free_dma_buffer(dma_buffer_t *);
/*
* Function prototypes in igb_main.c
*/
void igb_enable_watchdog_timer(igb_t *);
void igb_disable_watchdog_timer(igb_t *);
void igb_fm_ereport(igb_t *, char *);
void igb_set_fma_flags(int);
/*
* Function prototypes in igb_gld.c
*/
int igb_m_start(void *);
void igb_m_stop(void *);
int igb_m_promisc(void *, boolean_t);
int igb_m_unicst(void *, const uint8_t *);
void igb_m_resources(void *);
void igb_fill_ring(void *, mac_ring_type_t, const int, const int,
void igb_m_propinfo(void *, const char *, mac_prop_id_t,
/*
* Function prototypes in igb_rx.c
*/
/*
* Function prototypes in igb_tx.c
*/
void igb_free_tcb(tx_control_block_t *);
/*
* Function prototypes in igb_stat.c
*/
int igb_init_stats(igb_t *);
mblk_t *igb_rx_ring_poll(void *, int);
#ifdef __cplusplus
}
#endif
#endif /* _IGB_SW_H */