/*
* 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_NXGE_NXGE_FFLP_HW_H
#define _SYS_NXGE_NXGE_FFLP_HW_H
#ifdef __cplusplus
extern "C" {
#endif
#include <nxge_defs.h>
/* FZC_FFLP Offsets */
/* defines for FFLP_ENET_VLAN_TBL */
#define ENET_VLAN_TBL_VLANRDCTBLN0_SHIFT 0
typedef union _fflp_enet_vlan_tbl_t {
struct {
#if defined(_BIG_ENDIAN)
#endif
struct {
#ifdef _BIT_FIELDS_HTOL
#else
#endif
} ldw;
#ifndef _BIG_ENDIAN
#endif
} bits;
typedef union _tcam_class_prg_ether_t {
struct {
#ifdef _BIG_ENDIAN
#endif
struct {
#ifdef _BIT_FIELDS_HTOL
#else
#endif
} ldw;
#ifndef _BIG_ENDIAN
#endif
} bits;
typedef union _tcam_class_prg_ip_t {
struct {
#if defined(_BIG_ENDIAN)
#endif
struct {
#ifdef _BIT_FIELDS_HTOL
#else
#endif
} ldw;
#ifndef _BIG_ENDIAN
#endif
} bits;
/*
* New fields added to the L3 programmable class register for RF-NIU
* and Neptune-L.
*/
#define L3_UCLS_TOS_SH 0
/* define the classes which use the above structure */
typedef enum fflp_tcam_class {
TCAM_CLASS_INVALID = 0,
} tcam_class_t;
/*
* Specify how to build TCAM key for L3
* IP Classes. Both User configured and
* hardwired IP services are included.
* These are the supported 12 classes.
*/
typedef union _tcam_class_key_ip_t {
struct {
#if defined(_BIG_ENDIAN)
#endif
struct {
#ifdef _BIT_FIELDS_HTOL
#else
#endif
} ldw;
#ifndef _BIG_ENDIAN
#endif
} bits;
/* bit defines for FFLP_TCAM_CTL register */
typedef union _tcam_ctl_t {
struct {
#if defined(_BIG_ENDIAN)
#endif
struct {
#ifdef _BIT_FIELDS_HTOL
#else
#endif
} ldw;
#ifndef _BIG_ENDIAN
#endif
} bits;
/* Bit defines for TCAM ASC RAM */
typedef union _tcam_res_t {
struct {
#if defined(_BIG_ENDIAN)
struct {
} hdw;
#endif
struct {
#ifdef _BIT_FIELDS_HTOL
#else
#endif
} ldw;
#ifndef _BIG_ENDIAN
struct {
} hdw;
#endif
} bits;
#define TCAM_TRES_CONT_USE_L2RDC \
(0x0000000000000000ULL << TCAM_ASC_DATA_TRES_SHIFT)
#define TCAM_TRES_TERM_USE_OFFSET \
(0x0000000000000001ULL << TCAM_ASC_DATA_TRES_SHIFT)
#define TCAM_TRES_CONT_OVRD_L2RDC \
(0x0000000000000002ULL << TCAM_ASC_DATA_TRES_SHIFT)
#define TCAM_TRES_TERM_OVRD_L2RDC \
(0x0000000000000003ULL << TCAM_ASC_DATA_TRES_SHIFT)
#define TCAM_ASC_DATA_V4_ECC_OK \
(0x0000000000000001ULL << TCAM_ASC_DATA_V4_ECC_OK_MASK_SHIFT)
/* error registers */
typedef union _vlan_par_err_t {
struct {
#if defined(_BIG_ENDIAN)
#endif
struct {
#ifdef _BIT_FIELDS_HTOL
#else
#endif
} ldw;
#ifndef _BIG_ENDIAN
#endif
} bits;
typedef union _tcam_err_t {
struct {
#if defined(_BIG_ENDIAN)
#endif
struct {
#ifdef _BIT_FIELDS_HTOL
#else
#endif
} ldw;
#ifndef _BIG_ENDIAN
#endif
} bits;
typedef union _hash_lookup_err_log1_t {
struct {
#if defined(_BIG_ENDIAN)
#endif
struct {
#ifdef _BIT_FIELDS_HTOL
#else
#endif
} ldw;
#ifndef _BIG_ENDIAN
#endif
} bits;
typedef union _hash_lookup_err_log2_t {
struct {
#if defined(_BIG_ENDIAN)
#endif
struct {
#ifdef _BIT_FIELDS_HTOL
#else
#endif
} ldw;
#ifndef _BIG_ENDIAN
#endif
} bits;
typedef union _fcram_err_tst0_t {
struct {
#if defined(_BIG_ENDIAN)
#endif
struct {
#ifdef _BIT_FIELDS_HTOL
#else
#endif
} ldw;
#ifndef _BIG_ENDIAN
#endif
} bits;
typedef union _fcram_err_tst_t {
struct {
#if defined(_BIG_ENDIAN)
struct {
} hdw;
#endif
struct {
} ldw;
#ifndef _BIG_ENDIAN
struct {
} hdw;
#endif
} bits;
typedef union _fflp_err_mask_t {
struct {
#if defined(_BIG_ENDIAN)
#endif
struct {
#ifdef _BIT_FIELDS_HTOL
#else
#endif
} ldw;
#ifndef _BIG_ENDIAN
#endif
} bits;
typedef union _fflp_cfg_1_t {
struct {
#if defined(_BIG_ENDIAN)
#endif
struct {
#ifdef _BIT_FIELDS_HTOL
#else
#endif
} ldw;
#ifndef _BIG_ENDIAN
#endif
} bits;
typedef enum fflp_fcram_output_drive {
typedef enum fflp_fcram_qs {
typedef union _fflp_dbg_train_vct_t {
struct {
#if defined(_BIG_ENDIAN)
#endif
struct {
#ifdef _BIT_FIELDS_HTOL
#else
#endif
} ldw;
#ifndef _BIG_ENDIAN
#endif
} bits;
typedef union _tcp_cflag_mask_t {
struct {
#if defined(_BIG_ENDIAN)
#endif
struct {
#ifdef _BIT_FIELDS_HTOL
#else
#endif
} ldw;
#ifndef _BIG_ENDIAN
#endif
} bits;
typedef union _fcram_ref_tmr_t {
struct {
#if defined(_BIG_ENDIAN)
#endif
struct {
#ifdef _BIT_FIELDS_HTOL
#else
#endif
} ldw;
#ifndef _BIG_ENDIAN
#endif
} bits;
typedef union _fcram_fio_addr_t {
struct {
#if defined(_BIG_ENDIAN)
#endif
struct {
#ifdef _BIT_FIELDS_HTOL
#else
#endif
} ldw;
#ifndef _BIG_ENDIAN
#endif
} bits;
typedef union _fcram_fio_dat_t {
struct {
#if defined(_BIG_ENDIAN)
#endif
struct {
#ifdef _BIT_FIELDS_HTOL
#else
#endif
} ldw;
#ifndef _BIG_ENDIAN
#endif
} bits;
typedef union _fcram_phy_rd_lat_t {
struct {
#if defined(_BIG_ENDIAN)
#endif
struct {
#ifdef _BIT_FIELDS_HTOL
#else
#endif
} ldw;
#ifndef _BIG_ENDIAN
#endif
} bits;
/*
* Specify how to build a flow key for IP
* classes, both programmable and hardwired
*/
/*
* New FLOW KEY register added for IPV6 Fragments for RF-NIU
* and Neptune-L.
*/
typedef union _flow_class_key_ip_t {
struct {
#if defined(_BIG_ENDIAN)
#endif
struct {
#ifdef _BIT_FIELDS_HTOL
/* These bits added for L3 programmable classes in RF-NIU and Neptune-L */
/* This bit added for SNORT support in RF-NIU and Neptune-L */
#else
#endif
} ldw;
#ifndef _BIG_ENDIAN
#endif
} bits;
typedef union _hash_h1poly_t {
struct {
#if defined(_BIG_ENDIAN)
#endif
struct {
} ldw;
#ifndef _BIG_ENDIAN
#endif
} bits;
typedef union _hash_h2poly_t {
struct {
#if defined(_BIG_ENDIAN)
#endif
struct {
#ifdef _BIT_FIELDS_HTOL
#else
#endif
} ldw;
#ifndef _BIG_ENDIAN
#endif
} bits;
typedef union _flow_prt_sel_t {
struct {
#if defined(_BIG_ENDIAN)
#endif
struct {
#ifdef _BIT_FIELDS_HTOL
#else
#endif
} ldw;
#ifndef _BIG_ENDIAN
#endif
} bits;
/* FFLP Offsets */
typedef union _hash_tbl_addr_t {
struct {
#if defined(_BIG_ENDIAN)
#endif
struct {
#ifdef _BIT_FIELDS_HTOL
#else
#endif
} ldw;
#ifndef _BIG_ENDIAN
#endif
} bits;
typedef union _hash_tbl_data_t {
struct {
#ifdef _BIG_ENDIAN
#else
#endif
} bits;
typedef union _hash_tbl_data_log_t {
struct {
#if defined(_BIG_ENDIAN)
#endif
struct {
#ifdef _BIT_FIELDS_HTOL
#else
#endif
} ldw;
#ifndef _BIG_ENDIAN
#endif
} bits;
typedef struct tcam_ipv4 {
#if defined(_BIG_ENDIAN)
#else
#endif
} tcam_ipv4_t;
typedef struct tcam_reg {
#if defined(_BIG_ENDIAN)
#else
#endif
} tcam_reg_t;
typedef struct tcam_ether {
#if defined(_BIG_ENDIAN)
#else
#endif
} tcam_ether_t;
typedef struct tcam_ipv6 {
#if defined(_BIG_ENDIAN)
#else
#endif
} tcam_ipv6_t;
typedef struct tcam_entry {
union _tcam_entry {
} tcam_entry_t;
/*
* flow template structure
* The flow header is passed through the hash function
* which generates the H1 (and the H2 ) hash value.
* Hash computation is started at the 22 zeros.
*
* Since this structure uses the ip address fields,
* before this header file.
* Need to move these includes to impl files ...
*/
typedef union flow_template {
struct {
#if defined(_BIG_ENDIAN)
union {
struct {
} ip6_addr;
struct {
} ip4_addr;
} ipaddr;
union {
struct {
}l2_bits;
}l2;
#else
union {
struct {
} ip6_addr;
struct {
} ip4_addr;
} ipaddr;
union {
struct {
}l2_bits;
}l2;
#endif
} bits;
typedef struct _flow_key_cfg_t {
/* The following 3 bit fields added for RF-NIU and Neptune-L */
typedef struct _tcam_key_cfg_t {
/*
* FCRAM Entry Formats
*
* ip6 and ip4 entries, the first 64 bits layouts are identical
* optimistic entry has only 64 bit layout
* The first three bits, fmt, ext and valid are the same
* accoross all the entries
*/
typedef union hash_optim {
struct _bits {
#if defined(_BIG_ENDIAN)
#else
#endif
} bits;
} hash_optim_t;
typedef union _hash_hdr {
struct _exact_hdr {
#if defined(_BIG_ENDIAN)
#else
#endif
} exact_hdr;
} hash_hdr_t;
typedef union _hash_ports {
struct _ports_bits {
#if defined(_BIG_ENDIAN)
#else
#endif
} ports_bits;
} hash_ports_t;
typedef union _hash_match_action {
struct _action_bits {
#if defined(_BIG_ENDIAN)
#else
#endif
} action_bits;
typedef struct _ipaddr6 {
} ip6_addr_t;
typedef struct _ipaddr4 {
#if defined(_BIG_ENDIAN)
#else
#endif
} ip4_addr_t;
/* ipv4 has 32 byte layout */
typedef struct hash_ipv4 {
} hash_ipv4_t;
/* ipv4 has 56 byte layout */
typedef struct hash_ipv6 {
} hash_ipv6_t;
typedef union fcram_entry {
typedef enum fcram_entry_format {
/* error xxx formats */
typedef struct _hash_lookup_err_log {
typedef struct _hash_pio_err_log {
typedef struct _tcam_err_log {
typedef struct _vlan_tbl_err_log {
#ifdef __cplusplus
}
#endif
#endif /* _SYS_NXGE_NXGE_FFLP_HW_H */