4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
22 * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
23 * Use is subject to license terms.
26 #ifndef _SYS_NXGE_NXGE_FFLP_HW_H
27 #define _SYS_NXGE_NXGE_FFLP_HW_H
33 #include <nxge_defs.h>
36 /* FZC_FFLP Offsets */
37 #define FFLP_ENET_VLAN_TBL_REG (FZC_FFLP + 0x00000)
39 /* defines for FFLP_ENET_VLAN_TBL */
40 #define ENET_VLAN_TBL_VLANRDCTBLN0_MASK 0x0000000000000003ULL
41 #define ENET_VLAN_TBL_VLANRDCTBLN0_SHIFT 0
42 #define ENET_VLAN_TBL_VPR0_MASK 0x00000000000000008ULL
43 #define ENET_VLAN_TBL_VPR0_SHIFT 3
45 #define ENET_VLAN_TBL_VLANRDCTBLN1_MASK 0x0000000000000030ULL
46 #define ENET_VLAN_TBL_VLANRDCTBLN1_SHIFT 4
47 #define ENET_VLAN_TBL_VPR1_MASK 0x00000000000000080ULL
48 #define ENET_VLAN_TBL_VPR1_SHIFT 7
50 #define ENET_VLAN_TBL_VLANRDCTBLN2_MASK 0x0000000000000300ULL
51 #define ENET_VLAN_TBL_VLANRDCTBLN2_SHIFT 8
52 #define ENET_VLAN_TBL_VPR2_MASK 0x00000000000000800ULL
53 #define ENET_VLAN_TBL_VPR2_SHIFT 11
55 #define ENET_VLAN_TBL_VLANRDCTBLN3_MASK 0x0000000000003000ULL
56 #define ENET_VLAN_TBL_VLANRDCTBLN3_SHIFT 12
57 #define ENET_VLAN_TBL_VPR3_MASK 0x0000000000008000ULL
58 #define ENET_VLAN_TBL_VPR3_SHIFT 15
60 #define ENET_VLAN_TBL_PARITY0_MASK 0x0000000000010000ULL
61 #define ENET_VLAN_TBL_PARITY0_SHIFT 16
62 #define ENET_VLAN_TBL_PARITY1_MASK 0x0000000000020000ULL
63 #define ENET_VLAN_TBL_PARITY1_SHIFT 17
65 typedef union _fflp_enet_vlan_tbl_t
{
68 #if defined(_BIG_ENDIAN)
72 #ifdef _BIT_FIELDS_HTOL
77 uint32_t vlanrdctbln3
:3;
79 uint32_t vlanrdctbln2
:3;
81 uint32_t vlanrdctbln1
:3;
83 uint32_t vlanrdctbln0
:3;
85 uint32_t vlanrdctbln0
:3;
87 uint32_t vlanrdctbln1
:3;
89 uint32_t vlanrdctbln2
:3;
91 uint32_t vlanrdctbln3
:3;
102 } fflp_enet_vlan_tbl_t
, *p_fflp_enet_vlan_tbl_t
;
104 #define FFLP_TCAM_CLS_BASE_OFFSET (FZC_FFLP + 0x20000)
105 #define FFLP_L2_CLS_ENET1_REG (FZC_FFLP + 0x20000)
106 #define FFLP_L2_CLS_ENET2_REG (FZC_FFLP + 0x20008)
108 typedef union _tcam_class_prg_ether_t
{
109 #define TCAM_ENET_USR_CLASS_ENABLE 0x1
110 #define TCAM_ENET_USR_CLASS_DISABLE 0x0
118 #ifdef _BIT_FIELDS_HTOL
132 } tcam_class_prg_ether_t
, *p_tcam_class_prg_ether_t
;
134 #define FFLP_L3_CLS_IP_U4_REG (FZC_FFLP + 0x20010)
135 #define FFLP_L3_CLS_IP_U5_REG (FZC_FFLP + 0x20018)
136 #define FFLP_L3_CLS_IP_U6_REG (FZC_FFLP + 0x20020)
137 #define FFLP_L3_CLS_IP_U7_REG (FZC_FFLP + 0x20028)
139 typedef union _tcam_class_prg_ip_t
{
140 #define TCAM_IP_USR_CLASS_ENABLE 0x1
141 #define TCAM_IP_USR_CLASS_DISABLE 0x0
145 #if defined(_BIG_ENDIAN)
149 #ifdef _BIT_FIELDS_HTOL
169 } tcam_class_prg_ip_t
, *p_tcam_class_prg_ip_t
;
172 * New fields added to the L3 programmable class register for RF-NIU
175 #define L3_UCLS_TOS_SH 0
176 #define L3_UCLS_TOS_MSK 0xff
177 #define L3_UCLS_TOSM_SH 8
178 #define L3_UCLS_TOSM_MSK 0xff
179 #define L3_UCLS_PID_SH 16
180 #define L3_UCLS_PID_MSK 0xff
181 #define L3_UCLS_VALID_SH 25
182 #define L3_UCLS_VALID_MSK 0x01
183 #define L3_UCLS_L4B23_SEL_SH 26
184 #define L3_UCLS_L4B23_SEL_MSK 0x01
185 #define L3_UCLS_L4B23_VAL_SH 27
186 #define L3_UCLS_L4B23_VAL_MSK 0xffff
187 #define L3_UCLS_L4B0_MASK_SH 43
188 #define L3_UCLS_L4B0_MASK_MSK 0xff
189 #define L3_UCLS_L4B0_VAL_SH 51
190 #define L3_UCLS_L4B0_VAL_MSK 0xff
191 #define L3_UCLS_L4_MODE_SH 59
192 #define L3_UCLS_L4_MODE_MSK 0x01
193 /* define the classes which use the above structure */
195 typedef enum fflp_tcam_class
{
196 TCAM_CLASS_INVALID
= 0,
197 TCAM_CLASS_DUMMY
= 1,
198 TCAM_CLASS_ETYPE_1
= 2,
200 TCAM_CLASS_IP_USER_4
,
201 TCAM_CLASS_IP_USER_5
,
202 TCAM_CLASS_IP_USER_6
,
203 TCAM_CLASS_IP_USER_7
,
206 TCAM_CLASS_AH_ESP_IPV4
,
207 TCAM_CLASS_SCTP_IPV4
,
210 TCAM_CLASS_AH_ESP_IPV6
,
211 TCAM_CLASS_SCTP_IPV6
,
218 TCAM_CLASS_IPV6_FRAG
= 0x1F
221 #define TCAM_CLASS_MAX TCAM_CLASS_IPV6_FRAG
224 * Specify how to build TCAM key for L3
225 * IP Classes. Both User configured and
226 * hardwired IP services are included.
227 * These are the supported 12 classes.
229 #define FFLP_TCAM_KEY_BASE_OFFSET (FZC_FFLP + 0x20030)
230 #define FFLP_TCAM_KEY_IP_USR4_REG (FZC_FFLP + 0x20030)
231 #define FFLP_TCAM_KEY_IP_USR5_REG (FZC_FFLP + 0x20038)
232 #define FFLP_TCAM_KEY_IP_USR6_REG (FZC_FFLP + 0x20040)
233 #define FFLP_TCAM_KEY_IP_USR7_REG (FZC_FFLP + 0x20048)
234 #define FFLP_TCAM_KEY_IP4_TCP_REG (FZC_FFLP + 0x20050)
235 #define FFLP_TCAM_KEY_IP4_UDP_REG (FZC_FFLP + 0x20058)
236 #define FFLP_TCAM_KEY_IP4_AH_ESP_REG (FZC_FFLP + 0x20060)
237 #define FFLP_TCAM_KEY_IP4_SCTP_REG (FZC_FFLP + 0x20068)
238 #define FFLP_TCAM_KEY_IP6_TCP_REG (FZC_FFLP + 0x20070)
239 #define FFLP_TCAM_KEY_IP6_UDP_REG (FZC_FFLP + 0x20078)
240 #define FFLP_TCAM_KEY_IP6_AH_ESP_REG (FZC_FFLP + 0x20080)
241 #define FFLP_TCAM_KEY_IP6_SCTP_REG (FZC_FFLP + 0x20088)
244 typedef union _tcam_class_key_ip_t
{
247 #if defined(_BIG_ENDIAN)
251 #ifdef _BIT_FIELDS_HTOL
269 } tcam_class_key_ip_t
, *p_tcam_class_key_ip_t
;
273 #define FFLP_TCAM_KEY_0_REG (FZC_FFLP + 0x20090)
274 #define FFLP_TCAM_KEY_1_REG (FZC_FFLP + 0x20098)
275 #define FFLP_TCAM_KEY_2_REG (FZC_FFLP + 0x200A0)
276 #define FFLP_TCAM_KEY_3_REG (FZC_FFLP + 0x200A8)
277 #define FFLP_TCAM_MASK_0_REG (FZC_FFLP + 0x200B0)
278 #define FFLP_TCAM_MASK_1_REG (FZC_FFLP + 0x200B8)
279 #define FFLP_TCAM_MASK_2_REG (FZC_FFLP + 0x200C0)
280 #define FFLP_TCAM_MASK_3_REG (FZC_FFLP + 0x200C8)
282 #define FFLP_TCAM_CTL_REG (FZC_FFLP + 0x200D0)
284 /* bit defines for FFLP_TCAM_CTL register */
285 #define TCAM_CTL_TCAM_WR 0x0ULL
286 #define TCAM_CTL_TCAM_RD 0x040000ULL
287 #define TCAM_CTL_TCAM_CMP 0x080000ULL
288 #define TCAM_CTL_RAM_WR 0x100000ULL
289 #define TCAM_CTL_RAM_RD 0x140000ULL
290 #define TCAM_CTL_RWC_STAT 0x0020000ULL
291 #define TCAM_CTL_RWC_MATCH 0x0010000ULL
294 typedef union _tcam_ctl_t
{
295 #define TCAM_CTL_RWC_TCAM_WR 0x0
296 #define TCAM_CTL_RWC_TCAM_RD 0x1
297 #define TCAM_CTL_RWC_TCAM_CMP 0x2
298 #define TCAM_CTL_RWC_RAM_WR 0x4
299 #define TCAM_CTL_RWC_RAM_RD 0x5
300 #define TCAM_CTL_RWC_RWC_STAT 0x1
301 #define TCAM_CTL_RWC_RWC_MATCH 0x1
305 #if defined(_BIG_ENDIAN)
309 #ifdef _BIT_FIELDS_HTOL
315 uint32_t location
:10;
317 uint32_t location
:10;
329 } tcam_ctl_t
, *p_tcam_ctl_t
;
333 /* Bit defines for TCAM ASC RAM */
336 typedef union _tcam_res_t
{
339 #if defined(_BIG_ENDIAN)
342 uint32_t syndrome
:10;
346 #ifdef _BIT_FIELDS_HTOL
349 uint32_t v4_ecc_ck
:1;
363 uint32_t v4_ecc_ck
:1;
370 uint32_t syndrome
:10;
375 } tcam_res_t
, *p_tcam_res_t
;
379 #define TCAM_ASC_DATA_AGE 0x0000000000000001ULL
380 #define TCAM_ASC_DATA_AGE_SHIFT 0x0
381 #define TCAM_ASC_DATA_ZFVLD 0x0000000000000002ULL
382 #define TCAM_ASC_DATA_ZFVLD_SHIFT 1
384 #define TCAM_ASC_DATA_OFFSET_MASK 0x000000000000007CULL
385 #define TCAM_ASC_DATA_OFFSET_SHIFT 2
387 #define TCAM_ASC_DATA_RDCTBL_MASK 0x0000000000000038ULL
388 #define TCAM_ASC_DATA_RDCTBL_SHIFT 7
389 #define TCAM_ASC_DATA_TRES_MASK 0x0000000000000C00ULL
390 #define TRES_CONT_USE_L2RDC 0x00
391 #define TRES_TERM_USE_OFFSET 0x01
392 #define TRES_CONT_OVRD_L2RDC 0x02
393 #define TRES_TERM_OVRD_L2RDC 0x03
395 #define TCAM_ASC_DATA_TRES_SHIFT 10
396 #define TCAM_TRES_CONT_USE_L2RDC \
397 (0x0000000000000000ULL << TCAM_ASC_DATA_TRES_SHIFT)
398 #define TCAM_TRES_TERM_USE_OFFSET \
399 (0x0000000000000001ULL << TCAM_ASC_DATA_TRES_SHIFT)
400 #define TCAM_TRES_CONT_OVRD_L2RDC \
401 (0x0000000000000002ULL << TCAM_ASC_DATA_TRES_SHIFT)
402 #define TCAM_TRES_TERM_OVRD_L2RDC \
403 (0x0000000000000003ULL << TCAM_ASC_DATA_TRES_SHIFT)
405 #define TCAM_ASC_DATA_DISC_MASK 0x0000000000001000ULL
406 #define TCAM_ASC_DATA_DISC_SHIFT 12
407 #define TCAM_ASC_DATA_V4_ECC_OK_MASK 0x0000000000002000ULL
408 #define TCAM_ASC_DATA_V4_ECC_OK_SHIFT 13
409 #define TCAM_ASC_DATA_V4_ECC_OK \
410 (0x0000000000000001ULL << TCAM_ASC_DATA_V4_ECC_OK_MASK_SHIFT)
412 #define TCAM_ASC_DATA_ZFID_MASK 0x0000000003FF3000ULL
413 #define TCAM_ASC_DATA_ZFID_SHIFT 14
414 #define TCAM_ASC_DATA_ZFID(value) \
415 ((value & TCAM_ASC_DATA_ZFID_MASK) >> TCAM_ASC_DATA_ZFID_SHIFT)
417 #define TCAM_ASC_DATA_SYNDR_MASK 0x000003FFF3000000ULL
418 #define TCAM_ASC_DATA_SYNDR_SHIFT 26
419 #define TCAM_ASC_DATA_SYNDR(value) \
420 ((value & TCAM_ASC_DATA_SYNDR_MASK) >> TCAM_ASC_DATA_SYNDR_SHIFT)
423 /* error registers */
425 #define FFLP_VLAN_PAR_ERR_REG (FZC_FFLP + 0x08000)
427 typedef union _vlan_par_err_t
{
430 #if defined(_BIG_ENDIAN)
434 #ifdef _BIT_FIELDS_HTOL
450 } vlan_par_err_t
, *p_vlan_par_err_t
;
453 #define FFLP_TCAM_ERR_REG (FZC_FFLP + 0x200D8)
455 typedef union _tcam_err_t
{
458 #if defined(_BIG_ENDIAN)
462 #ifdef _BIT_FIELDS_HTOL
468 uint32_t syndrome
:16;
470 uint32_t syndrome
:16;
482 } tcam_err_t
, *p_tcam_err_t
;
485 #define TCAM_ERR_SYNDROME_MASK 0x000000000000FFFFULL
486 #define TCAM_ERR_MULT_SHIFT 29
487 #define TCAM_ERR_MULT 0x0000000020000000ULL
488 #define TCAM_ERR_P_ECC 0x0000000040000000ULL
489 #define TCAM_ERR_ERR 0x0000000080000000ULL
491 #define HASH_LKUP_ERR_LOG1_REG (FZC_FFLP + 0x200E0)
492 #define HASH_LKUP_ERR_LOG2_REG (FZC_FFLP + 0x200E8)
496 typedef union _hash_lookup_err_log1_t
{
499 #if defined(_BIG_ENDIAN)
503 #ifdef _BIT_FIELDS_HTOL
521 } hash_lookup_err_log1_t
, *p_hash_lookup_err_log1_t
;
525 typedef union _hash_lookup_err_log2_t
{
528 #if defined(_BIG_ENDIAN)
532 #ifdef _BIT_FIELDS_HTOL
548 } hash_lookup_err_log2_t
, *p_hash_lookup_err_log2_t
;
552 #define FFLP_FCRAM_ERR_TST0_REG (FZC_FFLP + 0x20128)
554 typedef union _fcram_err_tst0_t
{
557 #if defined(_BIG_ENDIAN)
561 #ifdef _BIT_FIELDS_HTOL
563 uint32_t syndrome_mask
:8;
565 uint32_t syndrome_mask
:10;
573 } fcram_err_tst0_t
, *p_fcram_err_tst0_t
;
576 #define FFLP_FCRAM_ERR_TST1_REG (FZC_FFLP + 0x20130)
577 #define FFLP_FCRAM_ERR_TST2_REG (FZC_FFLP + 0x20138)
579 typedef union _fcram_err_tst_t
{
582 #if defined(_BIG_ENDIAN)
596 } fcram_err_tst1_t
, *p_fcram_err_tst1_t
,
597 fcram_err_tst2_t
, *p_fcram_err_tst2_t
,
598 fcram_err_data_t
, *p_fcram_err_data_t
;
602 #define FFLP_ERR_MSK_REG (FZC_FFLP + 0x20140)
604 typedef union _fflp_err_mask_t
{
607 #if defined(_BIG_ENDIAN)
611 #ifdef _BIT_FIELDS_HTOL
613 uint32_t hash_tbl_dat
:8;
614 uint32_t hash_tbl_lkup
:1;
620 uint32_t hash_tbl_lkup
:1;
621 uint32_t hash_tbl_dat
:8;
629 } fflp_err_mask_t
, *p_fflp_err_mask_t
;
631 #define FFLP_ERR_VLAN_MASK 0x00000001ULL
632 #define FFLP_ERR_VLAN 0x00000001ULL
633 #define FFLP_ERR_VLAN_SHIFT 0x0
635 #define FFLP_ERR_TCAM_MASK 0x00000002ULL
636 #define FFLP_ERR_TCAM 0x00000001ULL
637 #define FFLP_ERR_TCAM_SHIFT 0x1
639 #define FFLP_ERR_HASH_TBL_LKUP_MASK 0x00000004ULL
640 #define FFLP_ERR_HASH_TBL_LKUP 0x00000001ULL
641 #define FFLP_ERR_HASH_TBL_LKUP_SHIFT 0x2
643 #define FFLP_ERR_HASH_TBL_DAT_MASK 0x00000007F8ULL
644 #define FFLP_ERR_HASH_TBL_DAT 0x0000000FFULL
645 #define FFLP_ERR_HASH_TBL_DAT_SHIFT 0x3
647 #define FFLP_ERR_MASK_ALL (FFLP_ERR_VLAN_MASK | FFLP_ERR_TCAM_MASK | \
648 FFLP_ERR_HASH_TBL_LKUP_MASK | \
649 FFLP_ERR_HASH_TBL_DAT_MASK)
652 #define FFLP_CFG_1_REG (FZC_FFLP + 0x20100)
654 typedef union _fflp_cfg_1_t
{
657 #if defined(_BIG_ENDIAN)
661 #ifdef _BIT_FIELDS_HTOL
663 uint32_t tcam_disable
:1;
664 uint32_t pio_dbg_sel
:3;
665 uint32_t pio_fio_rst
:1;
666 uint32_t pio_fio_lat
:2;
667 uint32_t camlatency
:4;
669 uint32_t fcramratio
:4;
670 uint32_t fcramoutdr
:4;
673 uint32_t fflpinitdone
:1;
677 uint32_t fflpinitdone
:1;
680 uint32_t fcramoutdr
:4;
681 uint32_t fcramratio
:4;
683 uint32_t camlatency
:4;
684 uint32_t pio_fio_lat
:2;
685 uint32_t pio_fio_rst
:1;
686 uint32_t pio_dbg_sel
:3;
687 uint32_t tcam_disable
:1;
695 } fflp_cfg_1_t
, *p_fflp_cfg_1_t
;
698 typedef enum fflp_fcram_output_drive
{
699 FCRAM_OUTDR_NORMAL
= 0x0,
700 FCRAM_OUTDR_STRONG
= 0x5,
701 FCRAM_OUTDR_WEAK
= 0xa
702 } fflp_fcram_output_drive_t
;
705 typedef enum fflp_fcram_qs
{
706 FCRAM_QS_MODE_QS
= 0x0,
707 FCRAM_QS_MODE_FREE
= 0x1
710 #define FCRAM_PIO_HIGH_PRI 0xf
711 #define FCRAM_PIO_MED_PRI 0xa
712 #define FCRAM_LOOKUP_HIGH_PRI 0x0
713 #define FCRAM_LOOKUP_HIGH_PRI 0x0
714 #define FCRAM_IO_DEFAULT_PRI FCRAM_PIO_MED_PRI
716 #define TCAM_PIO_HIGH_PRI 0xf
717 #define TCAM_PIO_MED_PRI 0xa
718 #define TCAM_LOOKUP_HIGH_PRI 0x0
719 #define TCAM_LOOKUP_HIGH_PRI 0x0
720 #define TCAM_IO_DEFAULT_PRI TCAM_PIO_MED_PRI
722 #define TCAM_DEFAULT_LATENCY 0x4
725 #define FFLP_DBG_TRAIN_VCT_REG (FZC_FFLP + 0x20148)
727 typedef union _fflp_dbg_train_vct_t
{
730 #if defined(_BIG_ENDIAN)
734 #ifdef _BIT_FIELDS_HTOL
744 } fflp_dbg_train_vct_t
, *p_fflp_dbg_train_vct_t
;
748 #define FFLP_TCP_CFLAG_MSK_REG (FZC_FFLP + 0x20108)
750 typedef union _tcp_cflag_mask_t
{
753 #if defined(_BIG_ENDIAN)
757 #ifdef _BIT_FIELDS_HTOL
769 } tcp_cflag_mask_t
, *p_tcp_cflag_mask_t
;
773 #define FFLP_FCRAM_REF_TMR_REG (FZC_FFLP + 0x20110)
776 typedef union _fcram_ref_tmr_t
{
777 #define FCRAM_REFRESH_DEFAULT_MAX_TIME 0x200
778 #define FCRAM_REFRESH_DEFAULT_MIN_TIME 0x200
779 #define FCRAM_REFRESH_DEFAULT_SYS_TIME 0x200
780 #define FCRAM_REFRESH_MAX_TICK 39 /* usecs */
781 #define FCRAM_REFRESH_MIN_TICK 400 /* nsecs */
785 #if defined(_BIG_ENDIAN)
789 #ifdef _BIT_FIELDS_HTOL
801 } fcram_ref_tmr_t
, *p_fcram_ref_tmr_t
;
806 #define FFLP_FCRAM_FIO_ADDR_REG (FZC_FFLP + 0x20118)
808 typedef union _fcram_fio_addr_t
{
811 #if defined(_BIG_ENDIAN)
815 #ifdef _BIT_FIELDS_HTOL
827 } fcram_fio_addr_t
, *p_fcram_fio_addr_t
;
830 #define FFLP_FCRAM_FIO_DAT_REG (FZC_FFLP + 0x20120)
832 typedef union _fcram_fio_dat_t
{
835 #if defined(_BIG_ENDIAN)
839 #ifdef _BIT_FIELDS_HTOL
851 } fcram_fio_dat_t
, *p_fcram_fio_dat_t
;
854 #define FFLP_FCRAM_PHY_RD_LAT_REG (FZC_FFLP + 0x20150)
856 typedef union _fcram_phy_rd_lat_t
{
859 #if defined(_BIG_ENDIAN)
863 #ifdef _BIT_FIELDS_HTOL
875 } fcram_phy_rd_lat_t
, *p_fcram_phy_rd_lat_t
;
879 * Specify how to build a flow key for IP
880 * classes, both programmable and hardwired
882 #define FFLP_FLOW_KEY_BASE_OFFSET (FZC_FFLP + 0x40000)
883 #define FFLP_FLOW_KEY_IP_USR4_REG (FZC_FFLP + 0x40000)
884 #define FFLP_FLOW_KEY_IP_USR5_REG (FZC_FFLP + 0x40008)
885 #define FFLP_FLOW_KEY_IP_USR6_REG (FZC_FFLP + 0x40010)
886 #define FFLP_FLOW_KEY_IP_USR7_REG (FZC_FFLP + 0x40018)
887 #define FFLP_FLOW_KEY_IP4_TCP_REG (FZC_FFLP + 0x40020)
888 #define FFLP_FLOW_KEY_IP4_UDP_REG (FZC_FFLP + 0x40028)
889 #define FFLP_FLOW_KEY_IP4_AH_ESP_REG (FZC_FFLP + 0x40030)
890 #define FFLP_FLOW_KEY_IP4_SCTP_REG (FZC_FFLP + 0x40038)
891 #define FFLP_FLOW_KEY_IP6_TCP_REG (FZC_FFLP + 0x40040)
892 #define FFLP_FLOW_KEY_IP6_UDP_REG (FZC_FFLP + 0x40048)
893 #define FFLP_FLOW_KEY_IP6_AH_ESP_REG (FZC_FFLP + 0x40050)
894 #define FFLP_FLOW_KEY_IP6_SCTP_REG (FZC_FFLP + 0x40058)
896 * New FLOW KEY register added for IPV6 Fragments for RF-NIU
899 #define FFLP_FLOW_KEY_IP6_FRAG_REG (FZC_FFLP + 0x400B0)
901 #define FL_KEY_USR_L4XOR_MSK 0x03ff
903 typedef union _flow_class_key_ip_t
{
906 #if defined(_BIG_ENDIAN)
910 #ifdef _BIT_FIELDS_HTOL
912 /* These bits added for L3 programmable classes in RF-NIU and Neptune-L */
915 /* This bit added for SNORT support in RF-NIU and Neptune-L */
944 } flow_class_key_ip_t
, *p_flow_class_key_ip_t
;
946 #define FFLP_H1POLY_REG (FZC_FFLP + 0x40060)
949 typedef union _hash_h1poly_t
{
952 #if defined(_BIG_ENDIAN)
962 } hash_h1poly_t
, *p_hash_h1poly_t
;
964 #define FFLP_H2POLY_REG (FZC_FFLP + 0x40068)
966 typedef union _hash_h2poly_t
{
969 #if defined(_BIG_ENDIAN)
973 #ifdef _BIT_FIELDS_HTOL
975 uint32_t init_value
:16;
977 uint32_t init_value
:16;
985 } hash_h2poly_t
, *p_hash_h2poly_t
;
987 #define FFLP_FLW_PRT_SEL_REG (FZC_FFLP + 0x40070)
990 typedef union _flow_prt_sel_t
{
991 #define FFLP_FCRAM_MAX_PARTITION 8
994 #if defined(_BIG_ENDIAN)
998 #ifdef _BIT_FIELDS_HTOL
1018 } flow_prt_sel_t
, *p_flow_prt_sel_t
;
1025 #define FFLP_HASH_TBL_ADDR_REG (FFLP + 0x00000)
1027 typedef union _hash_tbl_addr_t
{
1030 #if defined(_BIG_ENDIAN)
1034 #ifdef _BIT_FIELDS_HTOL
1048 } hash_tbl_addr_t
, *p_hash_tbl_addr_t
;
1051 #define FFLP_HASH_TBL_DATA_REG (FFLP + 0x00008)
1053 typedef union _hash_tbl_data_t
{
1064 } hash_tbl_data_t
, *p_hash_tbl_data_t
;
1067 #define FFLP_HASH_TBL_DATA_LOG_REG (FFLP + 0x00010)
1070 typedef union _hash_tbl_data_log_t
{
1073 #if defined(_BIG_ENDIAN)
1077 #ifdef _BIT_FIELDS_HTOL
1079 uint32_t fcram_addr
:23;
1080 uint32_t syndrome
:8;
1082 uint32_t syndrome
:8;
1083 uint32_t fcram_addr
:23;
1091 } hash_tbl_data_log_t
, *p_hash_tbl_data_log_t
;
1095 #define REG_PIO_WRITE64(handle, offset, value) \
1096 NXGE_REG_WR64((handle), (offset), (value))
1097 #define REG_PIO_READ64(handle, offset, val_p) \
1098 NXGE_REG_RD64((handle), (offset), (val_p))
1101 #define WRITE_TCAM_REG_CTL(handle, ctl) \
1102 REG_PIO_WRITE64(handle, FFLP_TCAM_CTL_REG, ctl)
1104 #define READ_TCAM_REG_CTL(handle, val_p) \
1105 REG_PIO_READ64(handle, FFLP_TCAM_CTL_REG, val_p)
1108 #define WRITE_TCAM_REG_KEY0(handle, key) \
1109 REG_PIO_WRITE64(handle, FFLP_TCAM_KEY_0_REG, key)
1110 #define WRITE_TCAM_REG_KEY1(handle, key) \
1111 REG_PIO_WRITE64(handle, FFLP_TCAM_KEY_1_REG, key)
1112 #define WRITE_TCAM_REG_KEY2(handle, key) \
1113 REG_PIO_WRITE64(handle, FFLP_TCAM_KEY_2_REG, key)
1114 #define WRITE_TCAM_REG_KEY3(handle, key) \
1115 REG_PIO_WRITE64(handle, FFLP_TCAM_KEY_3_REG, key)
1116 #define WRITE_TCAM_REG_MASK0(handle, mask) \
1117 REG_PIO_WRITE64(handle, FFLP_TCAM_MASK_0_REG, mask)
1118 #define WRITE_TCAM_REG_MASK1(handle, mask) \
1119 REG_PIO_WRITE64(handle, FFLP_TCAM_MASK_1_REG, mask)
1120 #define WRITE_TCAM_REG_MASK2(handle, mask) \
1121 REG_PIO_WRITE64(handle, FFLP_TCAM_MASK_2_REG, mask)
1122 #define WRITE_TCAM_REG_MASK3(handle, mask) \
1123 REG_PIO_WRITE64(handle, FFLP_TCAM_MASK_3_REG, mask)
1125 #define READ_TCAM_REG_KEY0(handle, val_p) \
1126 REG_PIO_READ64(handle, FFLP_TCAM_KEY_0_REG, val_p)
1127 #define READ_TCAM_REG_KEY1(handle, val_p) \
1128 REG_PIO_READ64(handle, FFLP_TCAM_KEY_1_REG, val_p)
1129 #define READ_TCAM_REG_KEY2(handle, val_p) \
1130 REG_PIO_READ64(handle, FFLP_TCAM_KEY_2_REG, val_p)
1131 #define READ_TCAM_REG_KEY3(handle, val_p) \
1132 REG_PIO_READ64(handle, FFLP_TCAM_KEY_3_REG, val_p)
1133 #define READ_TCAM_REG_MASK0(handle, val_p) \
1134 REG_PIO_READ64(handle, FFLP_TCAM_MASK_0_REG, val_p)
1135 #define READ_TCAM_REG_MASK1(handle, val_p) \
1136 REG_PIO_READ64(handle, FFLP_TCAM_MASK_1_REG, val_p)
1137 #define READ_TCAM_REG_MASK2(handle, val_p) \
1138 REG_PIO_READ64(handle, FFLP_TCAM_MASK_2_REG, val_p)
1139 #define READ_TCAM_REG_MASK3(handle, val_p) \
1140 REG_PIO_READ64(handle, FFLP_TCAM_MASK_3_REG, val_p)
1145 typedef struct tcam_ipv4
{
1146 #if defined(_BIG_ENDIAN)
1147 uint32_t reserved6
; /* 255 : 224 */
1148 uint32_t reserved5
: 24; /* 223 : 200 */
1149 uint32_t cls_code
: 5; /* 199 : 195 */
1150 uint32_t reserved4
: 3; /* 194 : 192 */
1151 uint32_t l2rd_tbl_num
: 5; /* 191: 187 */
1152 uint32_t noport
: 1; /* 186 */
1153 uint32_t reserved3
: 26; /* 185: 160 */
1154 uint32_t reserved2
; /* 159: 128 */
1155 uint32_t reserved
: 16; /* 127 : 112 */
1156 uint32_t tos
: 8; /* 111 : 104 */
1157 uint32_t proto
: 8; /* 103 : 96 */
1158 uint32_t l4_port_spi
; /* 95 : 64 */
1159 uint32_t ip_src
; /* 63 : 32 */
1160 uint32_t ip_dest
; /* 31 : 0 */
1162 uint32_t ip_dest
; /* 31 : 0 */
1163 uint32_t ip_src
; /* 63 : 32 */
1164 uint32_t l4_port_spi
; /* 95 : 64 */
1165 uint32_t proto
: 8; /* 103 : 96 */
1166 uint32_t tos
: 8; /* 111 : 104 */
1167 uint32_t reserved
: 16; /* 127 : 112 */
1168 uint32_t reserved2
; /* 159: 128 */
1169 uint32_t reserved3
: 26; /* 185: 160 */
1170 uint32_t noport
: 1; /* 186 */
1171 uint32_t l2rd_tbl_num
: 5; /* 191: 187 */
1172 uint32_t reserved4
: 3; /* 194 : 192 */
1173 uint32_t cls_code
: 5; /* 199 : 195 */
1174 uint32_t reserved5
: 24; /* 223 : 200 */
1175 uint32_t reserved6
; /* 255 : 224 */
1181 typedef struct tcam_reg
{
1182 #if defined(_BIG_ENDIAN)
1196 typedef struct tcam_ether
{
1197 #if defined(_BIG_ENDIAN)
1198 uint8_t reserved3
[7]; /* 255 : 200 */
1199 uint8_t cls_code
: 5; /* 199 : 195 */
1200 uint8_t reserved2
: 3; /* 194 : 192 */
1201 uint8_t ethframe
[11]; /* 191 : 104 */
1202 uint8_t reserved
[13]; /* 103 : 0 */
1204 uint8_t reserved
[13]; /* 103 : 0 */
1205 uint8_t ethframe
[11]; /* 191 : 104 */
1206 uint8_t reserved2
: 3; /* 194 : 192 */
1207 uint8_t cls_code
: 5; /* 199 : 195 */
1208 uint8_t reserved3
[7]; /* 255 : 200 */
1213 typedef struct tcam_ipv6
{
1214 #if defined(_BIG_ENDIAN)
1215 uint32_t reserved4
; /* 255 : 224 */
1216 uint32_t reserved3
: 24; /* 223 : 200 */
1217 uint32_t cls_code
: 5; /* 199 : 195 */
1218 uint32_t reserved2
: 3; /* 194 : 192 */
1219 uint32_t l2rd_tbl_num
: 5; /* 191: 187 */
1220 uint32_t noport
: 1; /* 186 */
1221 uint32_t reserved
: 10; /* 185 : 176 */
1222 uint32_t tos
: 8; /* 175 : 168 */
1223 uint32_t nxt_hdr
: 8; /* 167 : 160 */
1224 uint32_t l4_port_spi
; /* 159 : 128 */
1225 uint32_t ip_addr
[4]; /* 127 : 0 */
1227 uint32_t ip_addr
[4]; /* 127 : 0 */
1228 uint32_t l4_port_spi
; /* 159 : 128 */
1229 uint32_t nxt_hdr
: 8; /* 167 : 160 */
1230 uint32_t tos
: 8; /* 175 : 168 */
1231 uint32_t reserved
: 10; /* 185 : 176 */
1232 uint32_t noport
: 1; /* 186 */
1233 uint32_t l2rd_tbl_num
: 5; /* 191: 187 */
1234 uint32_t reserved2
: 3; /* 194 : 192 */
1235 uint32_t cls_code
: 5; /* 199 : 195 */
1236 uint32_t reserved3
: 24; /* 223 : 200 */
1237 uint32_t reserved4
; /* 255 : 224 */
1242 typedef struct tcam_entry
{
1245 tcam_ether_t ether_e
;
1249 tcam_res_t match_action
;
1253 #define key_reg0 key.regs_e.reg0
1254 #define key_reg1 key.regs_e.reg1
1255 #define key_reg2 key.regs_e.reg2
1256 #define key_reg3 key.regs_e.reg3
1257 #define mask_reg0 mask.regs_e.reg0
1258 #define mask_reg1 mask.regs_e.reg1
1259 #define mask_reg2 mask.regs_e.reg2
1260 #define mask_reg3 mask.regs_e.reg3
1263 #define key0 key.regs_e.reg0
1264 #define key1 key.regs_e.reg1
1265 #define key2 key.regs_e.reg2
1266 #define key3 key.regs_e.reg3
1267 #define mask0 mask.regs_e.reg0
1268 #define mask1 mask.regs_e.reg1
1269 #define mask2 mask.regs_e.reg2
1270 #define mask3 mask.regs_e.reg3
1273 #define ip4_src_key key.ipv4_e.ip_src
1274 #define ip4_dest_key key.ipv4_e.ip_dest
1275 #define ip4_proto_key key.ipv4_e.proto
1276 #define ip4_port_key key.ipv4_e.l4_port_spi
1277 #define ip4_tos_key key.ipv4_e.tos
1278 #define ip4_noport_key key.ipv4_e.noport
1279 #define ip4_nrdc_key key.ipv4_e.l2rdc_tbl_num
1280 #define ip4_class_key key.ipv4_e.cls_code
1282 #define ip4_src_mask mask.ipv4_e.ip_src
1283 #define ip4_dest_mask mask.ipv4_e.ip_dest
1284 #define ip4_proto_mask mask.ipv4_e.proto
1285 #define ip4_port_mask mask.ipv4_e.l4_port_spi
1286 #define ip4_tos_mask mask.ipv4_e.tos
1287 #define ip4_nrdc_mask mask.ipv4_e.l2rdc_tbl_num
1288 #define ip4_noport_mask mask.ipv4_e.noport
1289 #define ip4_class_mask mask.ipv4_e.cls_code
1292 #define ip6_ip_addr_key key.ipv6_e.ip_addr
1293 #define ip6_port_key key.ipv6_e.l4_port_spi
1294 #define ip6_nxt_hdr_key key.ipv6_e.nxt_hdr
1295 #define ip6_tos_key key.ipv6_e.tos
1296 #define ip6_nrdc_key key.ipv6_e.l2rdc_tbl_num
1297 #define ip6_noport_key key.ipv6_e.noport
1298 #define ip6_class_key key.ipv6_e.cls_code
1301 #define ip6_ip_addr_mask mask.ipv6_e.ip_addr
1302 #define ip6_port_mask mask.ipv6_e.l4_port_spi
1303 #define ip6_nxt_hdr_mask mask.ipv6_e.nxt_hdr
1304 #define ip6_tos_mask mask.ipv6_e.tos
1305 #define ip6_nrdc_mask mask.ipv6_e.l2rdc_tbl_num
1306 #define ip6_noport_mask mask.ipv6_e.noport
1307 #define ip6_class_mask mask.ipv6_e.cls_code
1309 #define ether_class_key key.ether_e.cls_code
1310 #define ether_ethframe_key key.ether_e.ethframe
1311 #define ether_class_mask mask.ether_e.cls_code
1312 #define ether_ethframe_mask mask.ether_e.ethframe
1316 * flow template structure
1317 * The flow header is passed through the hash function
1318 * which generates the H1 (and the H2 ) hash value.
1319 * Hash computation is started at the 22 zeros.
1321 * Since this structure uses the ip address fields,
1322 * /usr/include/netinet/in.h has to be included
1323 * before this header file.
1324 * Need to move these includes to impl files ...
1327 #include <netinet/in.h>
1329 typedef union flow_template
{
1332 #if defined(_BIG_ENDIAN)
1333 uint32_t l4_0
:16; /* src port */
1334 uint32_t l4_1
:16; /* dest Port */
1338 uint32_t zeros
:22; /* 0 */
1342 struct in6_addr daddr
;
1343 struct in6_addr saddr
;
1348 struct in_addr daddr
;
1350 struct in_addr saddr
;
1358 uint32_t vlan_valid
: 4;
1359 uint32_t l2da_1
: 28;
1360 uint32_t l2da_0
: 20;
1361 uint32_t vlanid
: 12;
1367 uint32_t l4_1
:16; /* dest Port */
1368 uint32_t l4_0
:16; /* src port */
1370 uint32_t zeros
:22; /* 0 */
1376 struct in6_addr daddr
;
1377 struct in6_addr saddr
;
1382 struct in_addr daddr
;
1384 struct in_addr saddr
;
1393 uint32_t l2da_1
: 28;
1394 uint32_t vlan_valid
: 4;
1396 uint32_t vlanid
: 12;
1397 uint32_t l2da_0
: 20;
1407 #define ip4_saddr bits.ipaddr.ip4_addr.saddr.s_addr
1408 #define ip4_daddr bits.ipaddr.ip4_addr.daddr.s_addr
1410 #define ip_src_port bits.l4_0
1411 #define ip_dst_port bits.l4_1
1412 #define ip_proto bits.pid
1414 #define ip6_saddr bits.ipaddr.ip6_addr.saddr
1415 #define ip6_daddr bits.ipaddr.ip6_addr.daddr
1420 typedef struct _flow_key_cfg_t
{
1422 /* The following 3 bit fields added for RF-NIU and Neptune-L */
1423 uint32_t l4_xor_sel
:10;
1424 uint32_t use_l4_md
:1;
1426 uint32_t use_portnum
:1;
1427 uint32_t use_l2da
:1;
1428 uint32_t use_vlan
:1;
1429 uint32_t use_saddr
:1;
1430 uint32_t use_daddr
:1;
1431 uint32_t use_sport
:1;
1432 uint32_t use_dport
:1;
1433 uint32_t use_proto
:1;
1434 uint32_t ip_opts_exist
:1;
1438 typedef struct _tcam_key_cfg_t
{
1440 uint32_t use_ip_daddr
:1;
1441 uint32_t use_ip_saddr
:1;
1442 uint32_t lookup_enable
:1;
1449 * FCRAM Entry Formats
1451 * ip6 and ip4 entries, the first 64 bits layouts are identical
1452 * optimistic entry has only 64 bit layout
1453 * The first three bits, fmt, ext and valid are the same
1454 * accoross all the entries
1457 typedef union hash_optim
{
1460 #if defined(_BIG_ENDIAN)
1461 uint32_t fmt
: 1; /* 63 set to zero */
1462 uint32_t ext
: 1; /* 62 set to zero */
1463 uint32_t valid
: 1; /* 61 */
1464 uint32_t rdc_offset
: 5; /* 60 : 56 */
1465 uint32_t h2
: 16; /* 55 : 40 */
1466 uint32_t rsrvd
: 8; /* 32 : 32 */
1467 uint32_t usr_info
; /* 31 : 0 */
1469 uint32_t usr_info
; /* 31 : 0 */
1470 uint32_t rsrvd
: 8; /* 39 : 32 */
1471 uint32_t h2
: 16; /* 55 : 40 */
1472 uint32_t rdc_offset
: 5; /* 60 : 56 */
1473 uint32_t valid
: 1; /* 61 */
1474 uint32_t ext
: 1; /* 62 set to zero */
1475 uint32_t fmt
: 1; /* 63 set to zero */
1481 typedef union _hash_hdr
{
1484 #if defined(_BIG_ENDIAN)
1485 uint32_t fmt
: 1; /* 63 1 for ipv6, 0 for ipv4 */
1486 uint32_t ext
: 1; /* 62 set to 1 */
1487 uint32_t valid
: 1; /* 61 */
1488 uint32_t rsrvd
: 1; /* 60 */
1489 uint32_t l2da_1
: 28; /* 59 : 32 */
1490 uint32_t l2da_0
: 20; /* 31 : 12 */
1491 uint32_t vlan
: 12; /* 12 : 0 */
1493 uint32_t vlan
: 12; /* 12 : 0 */
1494 uint32_t l2da_0
: 20; /* 31 : 12 */
1495 uint32_t l2da_1
: 28; /* 59 : 32 */
1496 uint32_t rsrvd
: 1; /* 60 */
1497 uint32_t valid
: 1; /* 61 */
1498 uint32_t ext
: 1; /* 62 set to 1 */
1499 uint32_t fmt
: 1; /* 63 1 for ipv6, 0 for ipv4 */
1502 hash_optim_t optim_hdr
;
1507 typedef union _hash_ports
{
1509 struct _ports_bits
{
1510 #if defined(_BIG_ENDIAN)
1511 uint32_t ip_dport
: 16; /* 63 : 48 */
1512 uint32_t ip_sport
: 16; /* 47 : 32 */
1513 uint32_t proto
: 8; /* 31 : 24 */
1514 uint32_t port
: 2; /* 23 : 22 */
1515 uint32_t rsrvd
: 22; /* 21 : 0 */
1517 uint32_t rsrvd
: 22; /* 21 : 0 */
1518 uint32_t port
: 2; /* 23 : 22 */
1519 uint32_t proto
: 8; /* 31 : 24 */
1520 uint32_t ip_sport
: 16; /* 47 : 32 */
1521 uint32_t ip_dport
: 16; /* 63 : 48 */
1528 typedef union _hash_match_action
{
1530 struct _action_bits
{
1531 #if defined(_BIG_ENDIAN)
1532 uint32_t rsrvd2
: 3; /* 63 : 61 */
1533 uint32_t rdc_offset
: 5; /* 60 : 56 */
1534 uint32_t zfvld
: 1; /* 55 */
1535 uint32_t rsrvd
: 3; /* 54 : 52 */
1536 uint32_t zfid
: 12; /* 51 : 40 */
1537 uint32_t _rsrvd
: 8; /* 39 : 32 */
1538 uint32_t usr_info
; /* 31 : 0 */
1540 uint32_t usr_info
; /* 31 : 0 */
1541 uint32_t _rsrvd
: 8; /* 39 : 32 */
1542 uint32_t zfid
: 12; /* 51 : 40 */
1543 uint32_t rsrvd
: 3; /* 54 : 52 */
1544 uint32_t zfvld
: 1; /* 55 */
1545 uint32_t rdc_offset
: 5; /* 60 : 56 */
1546 uint32_t rsrvd2
: 1; /* 63 : 61 */
1549 } hash_match_action_t
;
1552 typedef struct _ipaddr6
{
1553 struct in6_addr saddr
;
1554 struct in6_addr daddr
;
1558 typedef struct _ipaddr4
{
1559 #if defined(_BIG_ENDIAN)
1560 struct in_addr saddr
;
1561 struct in_addr daddr
;
1563 struct in_addr daddr
;
1564 struct in_addr saddr
;
1569 /* ipv4 has 32 byte layout */
1571 typedef struct hash_ipv4
{
1574 hash_ports_t proto_ports
;
1575 hash_match_action_t action
;
1579 /* ipv4 has 56 byte layout */
1580 typedef struct hash_ipv6
{
1583 hash_ports_t proto_ports
;
1584 hash_match_action_t action
;
1589 typedef union fcram_entry
{
1591 hash_tbl_data_t dreg
[8];
1592 hash_ipv6_t ipv6_entry
;
1593 hash_ipv4_t ipv4_entry
;
1594 hash_optim_t optim_entry
;
1599 #define hash_hdr_fmt ipv4_entry.hdr.exact_hdr.fmt
1600 #define hash_hdr_ext ipv4_entry.hdr.exact_hdr.ext
1601 #define hash_hdr_valid ipv4_entry.hdr.exact_hdr.valid
1603 #define HASH_ENTRY_EXACT(fc) \
1604 (fc->ipv4_entry.hdr.exact_hdr.ext == 1)
1605 #define HASH_ENTRY_OPTIM(fc) \
1606 ((fc->ipv4_entry.hdr.exact_hdr.ext == 0) && \
1607 (fc->ipv6_entry.hdr.exact_hdr.fmt == 0))
1608 #define HASH_ENTRY_EXACT_IP6(fc) \
1609 ((fc->ipv6_entry.hdr.exact_hdr.fmt == 1) && \
1610 (fc->ipv4_entry.hdr.exact_hdr.ext == 1))
1612 #define HASH_ENTRY_EXACT_IP4(fc) \
1613 ((fc->ipv6_entry.hdr.exact_hdr.fmt == 0) && \
1614 (fc->ipv4_entry.hdr.exact_hdr.ext == 1))
1616 #define HASH_ENTRY_TYPE(fc) \
1617 (fc->ipv4_entry.hdr.exact_hdr.ext | \
1618 (fc->ipv4_entry.hdr.exact_hdr.fmt << 1))
1622 typedef enum fcram_entry_format
{
1623 FCRAM_ENTRY_OPTIM
= 0x0,
1624 FCRAM_ENTRY_EX_IP4
= 0x2,
1625 FCRAM_ENTRY_EX_IP6
= 0x3,
1626 FCRAM_ENTRY_UNKOWN
= 0x1
1627 } fcram_entry_format_t
;
1630 #define HASH_ENTRY_TYPE_OPTIM FCRAM_ENTRY_OPTIM
1631 #define HASH_ENTRY_TYPE_OPTIM_IP4 FCRAM_ENTRY_OPTIM
1632 #define HASH_ENTRY_TYPE_OPTIM_IP4 FCRAM_ENTRY_OPTIM
1633 #define HASH_ENTRY_TYPE_EX_IP4 FCRAM_ENTRY_EX_IP4
1634 #define HASH_ENTRY_TYPE_EX_IP6 FCRAM_ENTRY_EX_IP6
1639 /* error xxx formats */
1642 typedef struct _hash_lookup_err_log
{
1644 uint32_t lookup_err
:1;
1646 uint32_t uncor_err
:1;
1647 uint32_t multi_lkup
:1;
1648 uint32_t multi_bit
:1;
1650 uint32_t syndrome
:8;
1652 } hash_lookup_err_log_t
, *p_hash_lookup_err_log_t
;
1656 typedef struct _hash_pio_err_log
{
1659 uint32_t syndrome
:8;
1661 } hash_pio_err_log_t
, *p_hash_pio_err_log_t
;
1665 typedef struct _tcam_err_log
{
1667 uint32_t tcam_err
:1;
1668 uint32_t parity_err
:1;
1670 uint32_t multi_lkup
:1;
1671 uint32_t location
:8;
1672 uint32_t syndrome
:16;
1673 } tcam_err_log_t
, *p_tcam_err_log_t
;
1676 typedef struct _vlan_tbl_err_log
{
1682 } vlan_tbl_err_log_t
, *p_vlan_tbl_err_log_t
;
1685 #define NEPTUNE_TCAM_SIZE 0x100
1686 #define NIU_TCAM_SIZE 0x80
1687 #define FCRAM_SIZE 0x100000
1693 #endif /* _SYS_NXGE_NXGE_FFLP_HW_H */