hpi_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 _HPI_PFC_H
#define _HPI_PFC_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
#include <hpi.h>
#include <hxge_common.h>
#include <hxge_pfc_hw.h>
#include <hxge_pfc.h>
typedef enum _tcam_op {
TCAM_RWC_STAT = 0x1,
TCAM_RWC_MATCH = 0x2
} tcam_op_t;
/*
* HPI PFC ERROR Codes
*/
#define HPI_TCAM_ERROR 0x10
#define HPI_FCRAM_ERROR 0x20
#define HPI_GEN_PFC 0x30
#define HPI_PFC_SW_PARAM_ERROR 0x40
#define HPI_PFC_HW_ERROR 0x80
#define HPI_PFC_TCAM_WR_ERROR \
#define HPI_PFC_ASC_RAM_RD_ERROR \
#define HPI_PFC_ASC_RAM_WR_ERROR \
#define TCAM_CLASS_INVALID \
(HPI_PFC_SW_PARAM_ERROR | 0xb)
/* have only 0xc, 0xd, 0xe and 0xf left for sw error codes */
#define HPI_PFC_TCAM_HW_ERROR \
#define PFC_N_VLAN_MEMBERS 0x20
#define PFC_N_MAC_ADDRESSES 16
#define PFC_MAX_DMA_CHANNELS 4
#define PFC_MAC_ADDR_STEP 8
#define PFC_HASH_STEP 0x08
#define PFC_L2_CLASS_CONFIG_STEP 0x08
#define PFC_L3_CLASS_CONFIG_STEP 0x08
#define PFC_N_TCAM_ENTRIES 42
#define PFC_VLAN_REG_OFFSET(vlan_id) \
#define PFC_VLAN_BIT_OFFSET(vlan_id) \
#define PFC_MAC_ADDRESS(slot) \
#define PFC_MAC_ADDRESS_MASK(slot) \
#define PFC_HASH_ADDR(slot) \
#define PFC_L2_CONFIG(slot) \
#define PFC_L3_CONFIG(slot) \
/*
* PFC Control Register Functions
*/
/*
* PFC vlan Functions
*/
/*
* PFC Mac Address Functions
*/
uint64_t);
/*
* PFC L2 and L3 Config Functions.
*/
/*
* PFC TCAM Functions
*/
pfc_auto_init_t *);
/*
* PFC TCP Control
*/
/*
* PFC Hash Seed Value
*/
/*
* PFC Interrupt Management Functions
*/
/*
* PFC Packet Logs
*/
int slot);
#ifdef __cplusplus
}
#endif
#endif /* !_HPI_PFC_H */