/*
* 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 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _SYS_HXGE_HXGE_H
#define _SYS_HXGE_HXGE_H
#ifdef __cplusplus
extern "C" {
#endif
#include <hxge_vmac.h>
#include <hxge_pfc.h>
#include <hxge_classify.h>
/*
* HXGE diagnostics IOCTLS.
*/
#define HXGE_OK 0
/*
* Definitions for module_info.
*/
typedef enum {
typedef struct _hxge_param_t {
int (*getf)();
char *fcode_name;
char *name;
typedef enum {
} hxge_lb_t;
enum hxge_mac_state {
HXGE_MAC_STOPPED = 0,
};
typedef struct _filter_t {
typedef struct _hxge_port_stats_t {
typedef struct _hxge_peu_sys_stats {
typedef struct _hxge_stats_t {
/*
* Overall structure size
*/
typedef struct _hxge_intr_t {
/* Add interrupt number for each interrupt vector */
int pri;
typedef struct _hxge_ldgv_t {
typedef struct _hxge_timeout {
} hxge_timeout;
typedef struct _hxge_addr {
} hxge_addr_t;
typedef struct _hxge_mmac {
} hxge_mmac_t;
/*
* Ring Group Strucuture.
*/
typedef struct _hxge_rx_ring_group_t {
int index;
/*
* Ring Handle
*/
typedef struct _hxge_ring_handle_t {
/*
* Hydra Device instance state information.
* Each instance is dynamically allocated on first attach.
*/
struct _hxge_t {
/* Logical device and group data structures. */
/*
* Blocks of memory may be pre-allocated by the
* partition manager or the driver. They may include
* blocks for configuration and buffers. The idea is
* to preallocate big blocks of contiguous areas in
* system memory (i.e. with IOMMU). These blocks then
* will be broken up to a fixed number of blocks with
* each block having the same block size (4K, 8K, 16K or
* 32K) in the case of buffer blocks. For systems that
* do not support DVMA, more than one big block will be
* allocated.
*/
/* Receive buffer block ring and completion ring. */
/* Transmit descriptors rings */
int suspended;
};
/*
* Driver state flags.
*/
typedef struct _hxge_port_kstat_t {
/*
* Transciever state informations.
*/
/*
* Link partner capabilities.
*/
/*
* Shared link setup.
*/
/*
* Lets the user know the MTU currently in use by
* the physical MAC port.
*/
/*
* Misc MAC statistics.
*/
typedef struct _hxge_rdc_kstat {
/*
* Receive DMA channel statistics.
* This structure needs to be consistent with hxge_rdc_stat_index_t
* in hxge_kstat.c
*/
typedef struct _hxge_rdc_sys_kstat {
/*
* Receive DMA system statistics.
* This structure needs to be consistent with hxge_rdc_sys_stat_idx_t
* in hxge_kstat.c
*/
typedef struct _hxge_tdc_kstat {
/*
* Transmit DMA channel statistics.
* This structure needs to be consistent with hxge_tdc_stats_index_t
* in hxge_kstat.c
*/
typedef struct _hxge_tdc_sys_kstat {
/*
* Transmit DMA system statistics.
* This structure needs to be consistent with hxge_tdc_sys_stat_idx_t
* in hxge_kstat.c
*/
typedef struct _hxge_vmac_kstat {
/*
* VMAC statistics.
* This structure needs to be consistent with hxge_vmac_stat_index_t
* in hxge_kstat.c
*/
typedef struct _hxge_pfc_kstat {
/*
* This structure needs to be consistent with hxge_pfc_stat_index_t
* in hxge_kstat.c
*/
typedef struct _hxge_mmac_kstat {
/*
* This structure needs to be consistent with hxge_mmac_stat_index_t
* in hxge_kstat.c
*/
typedef struct _hxge_peu_sys_kstat {
/*
* This structure needs to be consistent with hxge_peu_sys_stat_idx_t
* in hxge_kstat.c
*/
/*
* Prototype definitions.
*/
void hxge_uninit(p_hxge_t);
typedef void (*fptrv_t)();
#ifdef __cplusplus
}
#endif
#endif /* _SYS_HXGE_HXGE_H */