hxge_pfc.h revision 3dec9fcdd56adf1b4a563137b4915c8f2d83b881
/*
* 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 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _HXGE_PFC_H
#define _HXGE_PFC_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
/* 0 and 4095 are reserved */
#define VLAN_ID_MIN 1
#define VLAN_ID_MAX 4094
#define VLAN_ID_IMPLICIT 0
#define HXGE_MAC_DEFAULT_ADDR_SLOT 0
#define HASH_BITS 8
#define HASH_REG_WIDTH 16
/* Number of multicast filter regs */
#define MAC_MAX_HASH_ENTRY NMCFILTER_REGS
#define TCAM_CTL_RWC_TCAM_WR 0x0
#define TCAM_CTL_RWC_TCAM_CMP 0x2
#define TCAM_CTL_RWC_RAM_WR 0x4
#define TCAM_CTL_RWC_RAM_RD 0x5
#define TCAM_CTL_RWC_RWC_STAT 0x1
#define TCAM_CTL_RWC_RWC_MATCH 0x1
typedef union _hxge_tcam_res_t {
struct {
#if defined(_BIG_ENDIAN)
#else
#endif
} bits;
typedef struct tcam_reg {
#if defined(_BIG_ENDIAN)
#else
#endif
typedef struct hxge_tcam_ipv4_S {
#if defined(_BIG_ENDIAN)
#else
#endif
typedef struct hxge_tcam_ipv6_S {
#if defined(_BIG_ENDIAN)
#else
#endif
typedef struct hxge_tcam_enet_S {
#if defined(_BIG_ENDIAN)
#else
#endif
typedef struct hxge_tcam_spread_S {
#if defined(_BIG_ENDIAN)
#else
#endif
typedef struct hxge_tcam_entry_S {
union _hxge_tcam_entry {
typedef struct _pfc_errlog {
typedef struct _pfc_stats {
typedef enum pfc_tcam_class {
TCAM_CLASS_INVALID = 0,
TCAM_CLASS_DUMMY = 1,
TCAM_CLASS_ETYPE_1 = 2,
} tcam_class_t;
typedef struct _tcam_key_cfg_t {
typedef struct _hash_filter_t {
#define CLS_CODE_MASK 0x1f
#define BLADE_ID_MASK 0xf
#define PID_MASK 0xff
#define IP_PORT_MASK 0xffff
#define IP_ADDR_SA_MASK 0xFFFFFFFF
#define IP_ADDR_DA_MASK IP_ADDR_SA_MASK
#define L4PT_SPI_MASK IP_ADDR_SA_MASK
#ifdef __cplusplus
}
#endif
#endif /* !_HXGE_PFC_H */