/*
* 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
*/
/*
*/
#ifndef _SYS_NXGE_NXGE_H
#define _SYS_NXGE_NXGE_H
#ifdef __cplusplus
extern "C" {
#endif
#include <nxge_mac.h>
#include <nxge_ipp.h>
#include <nxge_fflp.h>
/*
* NXGE diagnostics IOCTLS.
*/
#define NXGE_OK 0
#define NXGE_GET_PORT_NUM(n) n
/*
* Definitions for module_info.
*/
#ifndef D_HOTPLUG
#endif
typedef enum {
typedef enum {
/*
* Named Dispatch Parameter Management Structure
*/
typedef struct _nxge_param_t {
int (*getf)();
char *fcode_name;
char *name;
/*
* Do not change the order of the elements of this enum as that will
* break the driver code.
*/
typedef enum {
} nxge_lb_t;
enum nxge_mac_state {
NXGE_MAC_STOPPED = 0,
};
/*
* Private DLPI full dlsap address format.
*/
typedef struct _nxge_dladdr_t {
typedef struct _mc_addr_t {
typedef struct _mc_bucket_t {
typedef struct _mc_table_t {
typedef struct _filter_t {
typedef struct _nxge_port_stats_t {
/*
* Overall structure size
*/
/*
*/
/*
* MIB II variables
*/
/*
* Lets the user know the MTU currently in use by
* the physical MAC port.
*/
/*
* Tx Statistics.
*/
/*
* Rx Statistics.
*/
/*
* Receive buffer management statistics.
*/
/*
* Receive flow statistics
*/
/*
* PCI-E Bus Statistics.
*/
/*
* Some statistics added to support bringup, these
* should be removed.
*/
typedef struct _nxge_stats_t {
/*
* Overall structure size
*/
typedef struct _nxge_intr_t {
/* Add interrupt number for each interrupt vector */
int pri;
typedef struct _nxge_ldgv_t {
typedef enum {
typedef struct nxge_grp {
} nxge_grp_t;
typedef struct {
} lg_data_t;
typedef struct {
} dc_data_t;
typedef struct {
/* These are this instance's logical groups. */
/*
* Transmit Ring Group
* TX groups will be used exclusively for the purpose of Hybrid I/O. From
* the point of view of the nxge driver, the groups will be software
* constructs which will be used to establish the relationship between TX
* rings and shares.
*
* Receive Ring Group
* One of the advanced virtualization features is the ability to bundle
* multiple Receive Rings in a single group. One or more MAC addresses may
* be assigned to a group. Incoming packets destined to the group's MAC
* address(es) are delivered to any ring member, according to a programmable
* or predefined RTS policy. Member rings can be polled individually.
* RX ring groups can come with a predefined set of member rings, or they
*/
typedef struct _nxge_ring_group_t {
int gindex;
int sindex;
int rdctbl;
int n_mac_addrs;
/*
* Ring Handle
*/
typedef struct _nxge_ring_handle_t {
/*
* Share Handle
*/
typedef struct _nxge_share_handle_t {
int index;
void *vrp;
int rxgroup;
/*
* Neptune Device instance state information.
*
* Each instance is dynamically allocated on first attach.
*/
struct _nxge_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;
void (*mii_read)();
void (*mii_write)();
void (*mii_poll)();
#if defined(sun4v)
#endif
int link_check_count;
int soft_lso_enable;
/* The following fields are LDOMs-specific additions. */
/* Ring Handles */
/*
* KT-NIU:
* KT family will have up to 4 NIUs per system.
* SerDes, Hypervisor interfaces,
* additional NIU classification features.
*/
};
/*
* Driver state flags.
*/
typedef struct _nxge_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.
*/
/*
* Some statistics added to support bringup, these
* should be removed.
*/
typedef struct _nxge_rdc_kstat {
/*
* Receive DMA channel statistics.
*/
typedef struct _nxge_rdc_sys_kstat {
/*
* Receive DMA system statistics.
*/
typedef struct _nxge_tdc_kstat {
/*
* Transmit DMA channel statistics.
*/
/* used to in the common (per port) counter */
typedef struct _nxge_txc_kstat {
/*
* Transmit port TXC block statistics.
*/
typedef struct _nxge_ipp_kstat {
/*
* Receive port IPP block statistics.
*/
typedef struct _nxge_zcp_kstat {
/*
* ZCP statistics.
*/
typedef struct _nxge_mac_kstat {
/*
* Transmit MAC statistics.
*/
/*
* Receive MAC statistics.
*/
typedef struct _nxge_xmac_kstat {
/*
* XMAC statistics.
*/
typedef struct _nxge_bmac_kstat {
/*
* BMAC statistics.
*/
typedef struct _nxge_fflp_kstat {
/*
* FFLP statistics.
*/
typedef struct _nxge_mmac_kstat {
/*
* Prototype definitions.
*/
void nxge_uninit(p_nxge_t);
typedef void (*fptrv_t)();
#ifdef __cplusplus
}
#endif
#endif /* _SYS_NXGE_NXGE_H */