Home | History | Annotate | Line # | Download | only in dev
octeon_pipreg.h revision 1.2
      1 /*	$NetBSD: octeon_pipreg.h,v 1.2 2020/06/18 13:52:08 simonb Exp $	*/
      2 
      3 /*
      4  * Copyright (c) 2007 Internet Initiative Japan, Inc.
      5  * All rights reserved.
      6  *
      7  * Redistribution and use in source and binary forms, with or without
      8  * modification, are permitted provided that the following conditions
      9  * are met:
     10  * 1. Redistributions of source code must retain the above copyright
     11  *    notice, this list of conditions and the following disclaimer.
     12  * 2. Redistributions in binary form must reproduce the above copyright
     13  *    notice, this list of conditions and the following disclaimer in the
     14  *    documentation and/or other materials provided with the distribution.
     15  *
     16  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
     17  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     18  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     19  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
     20  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     21  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     22  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     23  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     24  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     25  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     26  * SUCH DAMAGE.
     27  */
     28 
     29 /*
     30  * PIP Registers
     31  */
     32 
     33 #ifndef _OCTEON_PIPREG_H_
     34 #define _OCTEON_PIPREG_H_
     35 
     36 #define	PIP_BIST_STATUS				0x00011800a0000000ULL
     37 #define	PIP_INT_REG				0x00011800a0000008ULL
     38 #define	PIP_INT_EN				0x00011800a0000010ULL
     39 #define	PIP_STAT_CTL				0x00011800a0000018ULL
     40 #define	PIP_GBL_CTL				0x00011800a0000020ULL
     41 #define	PIP_GBL_CFG				0x00011800a0000028ULL
     42 #define	PIP_SOFT_RST				0x00011800a0000030ULL
     43 #define	PIP_IP_OFFSET				0x00011800a0000060ULL
     44 #define	PIP_TAG_SECRET				0x00011800a0000068ULL
     45 #define	PIP_TAG_MASK				0x00011800a0000070ULL
     46 #define	PIP_DEC_IPSEC0				0x00011800a0000080ULL
     47 #define	PIP_DEC_IPSEC1				0x00011800a0000088ULL
     48 #define	PIP_DEC_IPSEC2				0x00011800a0000090ULL
     49 #define	PIP_DEC_IPSEC3				0x00011800a0000098ULL
     50 #define	PIP_RAW_WORD				0x00011800a00000b0ULL
     51 #define	PIP_QOS_VLAN0				0x00011800a00000c0ULL
     52 #define	PIP_QOS_VLAN1				0x00011800a00000c8ULL
     53 #define	PIP_QOS_VLAN2				0x00011800a00000d0ULL
     54 #define	PIP_QOS_VLAN3				0x00011800a00000d8ULL
     55 #define	PIP_QOS_VLAN4				0x00011800a00000e0ULL
     56 #define	PIP_QOS_VLAN5				0x00011800a00000e8ULL
     57 #define	PIP_QOS_VLAN6				0x00011800a00000f0ULL
     58 #define	PIP_QOS_VLAN7				0x00011800a00000f8ULL
     59 #define	PIP_QOS_WATCH0				0x00011800a0000100ULL
     60 #define	PIP_QOS_WATCH1				0x00011800a0000108ULL
     61 #define	PIP_QOS_WATCH2				0x00011800a0000110ULL
     62 #define	PIP_QOS_WATCH3				0x00011800a0000118ULL
     63 #define	PIP_QOS_WATCH4				0x00011800a0000120ULL
     64 #define	PIP_QOS_WATCH5				0x00011800a0000128ULL
     65 #define	PIP_QOS_WATCH6				0x00011800a0000130ULL
     66 #define	PIP_QOS_WATCH7				0x00011800a0000138ULL
     67 #define	PIP_FRM_LEN_CHK0			0x00011800a0000180ULL
     68 #define	PIP_FRM_LEN_CHK1			0x00011800a0000188ULL
     69 #define	PIP_DSA_SRC_GRP				0x00011800a0000190ULL
     70 #define	PIP_DSA_VID_GRP				0x00011800a0000198ULL
     71 #define	PIP_HG_PRI_QOS				0x00011800a00001a0ULL
     72 #define	PIP_PRT_CFG0				0x00011800a0000200ULL
     73 #define	PIP_PRT_CFG1				0x00011800a0000208ULL
     74 #define	PIP_PRT_CFG2				0x00011800a0000210ULL
     75 #define	PIP_PRT_CFG32				0x00011800a0000300ULL
     76 #define	PIP_PRT_TAG0				0x00011800a0000400ULL
     77 #define	PIP_PRT_TAG1				0x00011800a0000408ULL
     78 #define	PIP_PRT_TAG2				0x00011800a0000410ULL
     79 #define	PIP_PRT_TAG32				0x00011800a0000500ULL
     80 #define	PIP_QOS_DIFF0				0x00011800a0000600ULL
     81 /* PIP_QOS_DIFF[1-63] */
     82 /* PIP_STAT[0-9]_PRT{0,1,2,32} */
     83 #define	PIP_STAT0_PRT0				0x00011800a0000800ULL
     84 #define	PIP_STAT0_PRT1				0x00011800a0000850ULL
     85 #define	PIP_STAT0_PRT2				0x00011800a00008a0ULL
     86 #define	PIP_STAT0_PRT32				0x00011800a0001200ULL
     87 #define	PIP_TAG_INC0				0x00011800a0001800ULL
     88 /* PIP_TAG_INC[1-63] */
     89 #define	PIP_STAT_INB_PKTS0			0x00011800a0001a00ULL
     90 #define	PIP_STAT_INB_PKTS1			0x00011800a0001a20ULL
     91 #define	PIP_STAT_INB_PKTS2			0x00011800a0001a40ULL
     92 #define	PIP_STAT_INB_PKTS32			0x00011800a0001e00ULL
     93 #define	PIP_STAT_INB_OCTS0			0x00011800a0001a08ULL
     94 #define	PIP_STAT_INB_OCTS1			0x00011800a0001a28ULL
     95 #define	PIP_STAT_INB_OCTS2			0x00011800a0001a48ULL
     96 #define	PIP_STAT_INB_OCTS32			0x00011800a0001e08ULL
     97 #define	PIP_STAT_INB_ERRS0			0x00011800a0001a10ULL
     98 #define	PIP_STAT_INB_ERRS1			0x00011800a0001a30ULL
     99 #define	PIP_STAT_INB_ERRS2			0x00011800a0001a50ULL
    100 #define	PIP_STAT_INB_ERRS32			0x00011800a0001e10ULL
    101 
    102 #define PIP_BASE 0x00011800a0000000ULL
    103 #define PIP_SIZE 0x1e50ULL
    104 
    105 #define	PIP_BIST_STATUS_OFFSET				0x0ULL
    106 #define	PIP_INT_REG_OFFSET				0x8ULL
    107 #define	PIP_INT_EN_OFFSET				0x10ULL
    108 #define	PIP_STAT_CTL_OFFSET				0x18ULL
    109 #define	PIP_GBL_CTL_OFFSET				0x20ULL
    110 #define	PIP_GBL_CFG_OFFSET				0x28ULL
    111 #define	PIP_SOFT_RST_OFFSET				0x30ULL
    112 #define	PIP_IP_OFFSET_OFFSET				0x60ULL
    113 #define	PIP_TAG_SECRET_OFFSET				0x68ULL
    114 #define	PIP_TAG_MASK_OFFSET				0x70ULL
    115 #define	PIP_DEC_IPSEC0_OFFSET				0x80ULL
    116 #define	PIP_DEC_IPSEC1_OFFSET				0x88ULL
    117 #define	PIP_DEC_IPSEC2_OFFSET				0x90ULL
    118 #define	PIP_DEC_IPSEC3_OFFSET				0x98ULL
    119 #define	PIP_RAW_WORD_OFFSET				0xb0ULL
    120 #define	PIP_QOS_VLAN0_OFFSET				0xc0ULL
    121 #define	PIP_QOS_VLAN1_OFFSET				0xc8ULL
    122 #define	PIP_QOS_VLAN2_OFFSET				0xd0ULL
    123 #define	PIP_QOS_VLAN3_OFFSET				0xd8ULL
    124 #define	PIP_QOS_VLAN4_OFFSET				0xe0ULL
    125 #define	PIP_QOS_VLAN5_OFFSET				0xe8ULL
    126 #define	PIP_QOS_VLAN6_OFFSET				0xf0ULL
    127 #define	PIP_QOS_VLAN7_OFFSET				0xf8ULL
    128 #define	PIP_QOS_WATCH0_OFFSET				0x100ULL
    129 #define	PIP_QOS_WATCH1_OFFSET				0x108ULL
    130 #define	PIP_QOS_WATCH2_OFFSET				0x110ULL
    131 #define	PIP_QOS_WATCH3_OFFSET				0x118ULL
    132 #define	PIP_PRT_CFG0_OFFSET				0x200ULL
    133 #define	PIP_PRT_CFG1_OFFSET				0x208ULL
    134 #define	PIP_PRT_CFG2_OFFSET				0x210ULL
    135 #define	PIP_PRT_CFG32_OFFSET				0x300ULL
    136 #define	PIP_PRT_TAG0_OFFSET				0x400ULL
    137 #define	PIP_PRT_TAG1_OFFSET				0x408ULL
    138 #define	PIP_PRT_TAG2_OFFSET				0x410ULL
    139 #define	PIP_PRT_TAG32_OFFSET				0x500ULL
    140 #define	PIP_QOS_DIFF0_OFFSET				0x600ULL
    141 /* PIP_QOS_DIFF[1-63] */
    142 #define	PIP_STAT0_PRT0_OFFSET				0x800ULL
    143 #define	PIP_STAT0_PRT1_OFFSET				0x850ULL
    144 #define	PIP_STAT0_PRT2_OFFSET				0x8a0ULL
    145 #define	PIP_STAT0_PRT32_OFFSET				0x1200ULL
    146 #define	PIP_STAT0_PRT33_OFFSET				0x1250ULL
    147 #define	PIP_STAT1_PRT0_OFFSET				0x800ULL
    148 #define	PIP_STAT1_PRT1_OFFSET				0x850ULL
    149 #define	PIP_STAT1_PRT2_OFFSET				0x8a0ULL
    150 #define	PIP_STAT1_PRT32_OFFSET				0x1200ULL
    151 #define	PIP_STAT1_PRT33_OFFSET				0x1250ULL
    152 #define	PIP_STAT2_PRT0_OFFSET				0x810ULL
    153 #define	PIP_STAT2_PRT1_OFFSET				0x860ULL
    154 #define	PIP_STAT2_PRT2_OFFSET				0x8b0ULL
    155 #define	PIP_STAT2_PRT32_OFFSET				0x1210ULL
    156 #define	PIP_STAT2_PRT33_OFFSET				0x1260ULL
    157 #define	PIP_STAT3_PRT0_OFFSET				0x818ULL
    158 #define	PIP_STAT3_PRT1_OFFSET				0x868ULL
    159 #define	PIP_STAT3_PRT2_OFFSET				0x8b8ULL
    160 #define	PIP_STAT3_PRT32_OFFSET				0x1218ULL
    161 #define	PIP_STAT3_PRT33_OFFSET				0x1268ULL
    162 #define	PIP_STAT4_PRT0_OFFSET				0x820ULL
    163 #define	PIP_STAT4_PRT1_OFFSET				0x870ULL
    164 #define	PIP_STAT4_PRT2_OFFSET				0x8c0ULL
    165 #define	PIP_STAT4_PRT32_OFFSET				0x1220ULL
    166 #define	PIP_STAT4_PRT33_OFFSET				0x1270ULL
    167 #define	PIP_STAT5_PRT0_OFFSET				0x828ULL
    168 #define	PIP_STAT5_PRT1_OFFSET				0x878ULL
    169 #define	PIP_STAT5_PRT2_OFFSET				0x8c8ULL
    170 #define	PIP_STAT5_PRT32_OFFSET				0x1228ULL
    171 #define	PIP_STAT5_PRT33_OFFSET				0x1278ULL
    172 #define	PIP_STAT6_PRT0_OFFSET				0x830ULL
    173 #define	PIP_STAT6_PRT1_OFFSET				0x880ULL
    174 #define	PIP_STAT6_PRT2_OFFSET				0x8d0ULL
    175 #define	PIP_STAT6_PRT32_OFFSET				0x1238ULL
    176 #define	PIP_STAT6_PRT33_OFFSET				0x1288ULL
    177 #define	PIP_STAT7_PRT0_OFFSET				0x838ULL
    178 #define	PIP_STAT7_PRT1_OFFSET				0x888ULL
    179 #define	PIP_STAT7_PRT2_OFFSET				0x8d8ULL
    180 #define	PIP_STAT7_PRT32_OFFSET				0x1238ULL
    181 #define	PIP_STAT7_PRT33_OFFSET				0x1288ULL
    182 #define	PIP_STAT8_PRT0_OFFSET				0x840ULL
    183 #define	PIP_STAT8_PRT1_OFFSET				0x890ULL
    184 #define	PIP_STAT8_PRT2_OFFSET				0x8e0ULL
    185 #define	PIP_STAT8_PRT32_OFFSET				0x1240ULL
    186 #define	PIP_STAT8_PRT33_OFFSET				0x1290ULL
    187 #define	PIP_STAT9_PRT0_OFFSET				0x848ULL
    188 #define	PIP_STAT9_PRT1_OFFSET				0x898ULL
    189 #define	PIP_STAT9_PRT2_OFFSET				0x8e8ULL
    190 #define	PIP_STAT9_PRT32_OFFSET				0x1248ULL
    191 #define	PIP_STAT9_PRT33_OFFSET				0x1298ULL
    192 #define	PIP_TAG_INC0_OFFSET				0x1800ULL
    193 /* PIP_TAG_INC[1-63] */
    194 #define	PIP_STAT_INB_PKTS0_OFFSET			0x1a00ULL
    195 #define	PIP_STAT_INB_PKTS1_OFFSET			0x1a20ULL
    196 #define	PIP_STAT_INB_PKTS2_OFFSET			0x1a40ULL
    197 #define	PIP_STAT_INB_PKTS32_OFFSET			0x1e00ULL
    198 #define	PIP_STAT_INB_OCTS0_OFFSET			0x1a08ULL
    199 #define	PIP_STAT_INB_OCTS1_OFFSET			0x1a28ULL
    200 #define	PIP_STAT_INB_OCTS2_OFFSET			0x1a48ULL
    201 #define	PIP_STAT_INB_OCTS32_OFFSET			0x1e08ULL
    202 #define	PIP_STAT_INB_ERRS0_OFFSET			0x1a10ULL
    203 #define	PIP_STAT_INB_ERRS1_OFFSET			0x1a30ULL
    204 #define	PIP_STAT_INB_ERRS2_OFFSET			0x1a50ULL
    205 #define	PIP_STAT_INB_ERRS32_OFFSET			0x1e10ULL
    206 #define	PIP_STAT_INB_ERRS33_OFFSET			0x1e30ULL
    207 
    208 /*
    209  * PIP_BIST_STATUS
    210  */
    211 #define	PIP_BIST_STATUS_63_13			UINT64_C(0xfffffffffffc0000)
    212 #define	PIP_BIST_STATUS_BIST			UINT64_C(0x000000000003ffff)
    213 
    214 /*
    215  * PIP_INT_REG
    216  */
    217 #define	PIP_INT_REG_63_9			UINT64_C(0xfffffffffffffe00)
    218 #define	PIP_INT_REG_BEPERR			UINT64_C(0x0000000000000100)
    219 #define	PIP_INT_REG_FEPERR			UINT64_C(0x0000000000000080)
    220 #define	PIP_INT_REG_6				UINT64_C(0x0000000000000040)
    221 #define	PIP_INT_REG_SKPRUNT			UINT64_C(0x0000000000000020)
    222 #define	PIP_INT_REG_BADTAG			UINT64_C(0x0000000000000010)
    223 #define	PIP_INT_REG_PRTNXA			UINT64_C(0x0000000000000008)
    224 #define	PIP_INT_REG_2_1				0x00000006
    225 #define	PIP_INT_REG_PKTDRP			UINT32_C(0x00000001)
    226 
    227 /*
    228  * PIP_INT_EN
    229  */
    230 #define	PIP_INT_EN_63_9				UINT64_C(0xfffffffffffffe00)
    231 #define	PIP_INT_EN_BEPERR			UINT64_C(0x0000000000000100)
    232 #define	PIP_INT_EN_FEPERR			UINT64_C(0x0000000000000080)
    233 #define	PIP_INT_EN_6				UINT64_C(0x0000000000000040)
    234 #define	PIP_INT_EN_SKPRUNT			UINT64_C(0x0000000000000020)
    235 #define	PIP_INT_EN_BADTAG			UINT64_C(0x0000000000000010)
    236 #define	PIP_INT_EN_PRTNXA			UINT64_C(0x0000000000000008)
    237 #define	PIP_INT_EN_2_1				0x00000006
    238 #define	PIP_INT_EN_PKTDRP			UINT32_C(0x00000001)
    239 
    240 /*
    241  * PIP_STAT_CTL
    242  */
    243 #define	PIP_STAT_CTL_63_1			UINT64_C(0xfffffffffffffffe)
    244 #define	PIP_STAT_CTL_RDCLR			UINT64_C(0x0000000000000001)
    245 
    246 /*
    247  * PIP_GBL_CTL
    248  */
    249 #define	PIP_GBL_CTL_63_17			UINT64_C(0xfffffffffffe0000)
    250 #define	PIP_GBL_CTL_IGNRS			UINT64_C(0x0000000000010000)
    251 #define	PIP_GBL_CTL_VS_WQE			UINT64_C(0x0000000000008000)
    252 #define	PIP_GBL_CTL_VS_QOS			UINT64_C(0x0000000000004000)
    253 #define	PIP_GBL_CTL_L2MAL			UINT64_C(0x0000000000002000)
    254 #define	PIP_GBL_CTL_TCP_FLAG			UINT64_C(0x0000000000001000)
    255 #define	PIP_GBL_CTL_L4_LEN			UINT64_C(0x0000000000000800)
    256 #define	PIP_GBL_CTL_L4_CHK			UINT64_C(0x0000000000000400)
    257 #define	PIP_GBL_CTL_L4_PRT			UINT64_C(0x0000000000000200)
    258 #define	PIP_GBL_CTL_L4_MAL			UINT64_C(0x0000000000000100)
    259 #define	PIP_GBL_CTL_7_6				UINT64_C(0x00000000000000c0)
    260 #define	PIP_GBL_CTL_IP6_EEXT			UINT64_C(0x0000000000000030)
    261 #define	PIP_GBL_CTL_IP4_OPTS			UINT64_C(0x0000000000000008)
    262 #define	PIP_GBL_CTL_IP_HOP			UINT64_C(0x0000000000000004)
    263 #define	PIP_GBL_CTL_IP_MAL			UINT64_C(0x0000000000000002)
    264 #define	PIP_GBL_CTL_IP_CHK			UINT64_C(0x0000000000000001)
    265 
    266 /*
    267  * PIP_GBL_CFG
    268  */
    269 /* XXX 63_17 is reserved? */
    270 #define	PIP_GBL_CFG_63_19			UINT64_C(0xfffffffffff80000)
    271 #define	PIP_GBL_CFG_TAG_SYN			UINT64_C(0x0000000000040000)
    272 #define	PIP_GBL_CFG_IP6_UDP			UINT64_C(0x0000000000020000)
    273 #define	PIP_GBL_CFG_MAX_L2			UINT64_C(0x0000000000010000)
    274 #define	PIP_GBL_CFG_15_11			UINT64_C(0x000000000000f800)
    275 #define	PIP_GBL_CFG_RAW_SHF			UINT64_C(0x0000000000000700)
    276 #define	PIP_GBL_CFG_7_3				UINT64_C(0x00000000000000f8)
    277 #define	PIP_GBL_CFG_NIP_SHF			UINT64_C(0x0000000000000007)
    278 
    279 /*
    280  * PIP_SFT_RST
    281  */
    282 #define	PIP_SFT_RST_63_17			UINT64_C(0xfffffffffffffffe)
    283 #define	PIP_SFT_RST_RST				UINT64_C(0x0000000000000001)
    284 
    285 /*
    286  * PIP_IP_OFFSET
    287  */
    288 #define	PIP_IP_OFFSET_63_3			UINT64_C(0xfffffffffffffff8)
    289 /* PIP_IP_OFFSET_OFFSET is defined above - conflict! */
    290 #define	PIP_IP_OFFSET_MASK_OFFSET		UINT64_C(0x0000000000000007)
    291 
    292 /*
    293  * PIP_TAG_SECRET
    294  */
    295 #define	PIP_TAG_SECRET_63_3			UINT64_C(0xffffffff00000000)
    296 #define	PIP_TAG_SECRET_DST			UINT64_C(0x00000000ffff0000)
    297 #define	PIP_TAG_SECRET_SRC			UINT64_C(0x000000000000ffff)
    298 
    299 /*
    300  * PIP_TAG_MASK
    301  */
    302 #define	PIP_TAG_MASK_63_16			UINT64_C(0xffffffffffff0000)
    303 #define	PIP_TAG_MASK_MASK			UINT64_C(0x000000000000ffff)
    304 
    305 /*
    306  * PIP_DEC_IPSECN
    307  */
    308 #define	PIP_DEC_IPSECN_63_18			UINT64_C(0xfffffffffffc0000)
    309 #define	PIP_DEC_IPSECN_TCP			UINT64_C(0x0000000000020000)
    310 #define	PIP_DEC_IPSECN_UDP			UINT64_C(0x0000000000010000)
    311 #define	PIP_DEC_IPSECN_DPRT			UINT64_C(0x000000000000ffff)
    312 
    313 /*
    314  * PIP_RAW_WORD
    315  */
    316 #define	PIP_RAW_WORD_63_56			UINT64_C(0xff00000000000000)
    317 #define	PIP_RAW_WORD_WORD			UINT64_C(0x00ffffffffffffff)
    318 
    319 /*
    320  * PIP_QOS_VLAN
    321  */
    322 #define	PIP_QOS_VLAN_63_3			UINT64_C(0xfffffffffffffff8)
    323 #define	PIP_QOS_VLAN_QOS			UINT64_C(0x0000000000000007)
    324 
    325 /*
    326  * PIP_QOS_WATCHN
    327  */
    328 #define	PIP_QOS_WATCHN_63_48			UINT64_C(0xffff000000000000)
    329 #define	PIP_QOS_WATCHN_MASK			UINT64_C(0x0000ffff00000000)
    330 #define	PIP_QOS_WATCHN_31_28			UINT64_C(0x00000000f0000000)
    331 #define	PIP_QOS_WATCHN_GRP			UINT64_C(0x000000000f000000)
    332 #define	PIP_QOS_WATCHN_23			UINT64_C(0x0000000000800000)
    333 #define	PIP_QOS_WATCHN_WATCHER			UINT64_C(0x0000000000700000)
    334 #define	PIP_QOS_WATCHN_19_18			UINT64_C(0x00000000000c0000)
    335 #define	PIP_QOS_WATCHN_TYPE			UINT64_C(0x0000000000030000)
    336 #define	PIP_QOS_WATCHN_15_0			UINT64_C(0x000000000000ffff)
    337 
    338 /*
    339  * PIP_PRT_CFGN
    340  */
    341 #define	PIP_PRT_CFGN_63_53			UINT64_C(0xffe0000000000000)
    342 #define	PIP_PRT_CFGN_PAD_LEN			UINT64_C(0x0010000000000000)
    343 #define	PIP_PRT_CFGN_VLAN_LEN			UINT64_C(0x0008000000000000)
    344 #define	PIP_PRT_CFGN_LENERR_EN			UINT64_C(0x0004000000000000)
    345 #define	PIP_PRT_CFGN_MAXERR_EN			UINT64_C(0x0002000000000000)
    346 #define	PIP_PRT_CFGN_MINERR_EN			UINT64_C(0x0001000000000000)
    347 #define	PIP_PRT_CFGN_GRP_WAT_47			UINT64_C(0x0000f00000000000)
    348 #define	PIP_PRT_CFGN_QOS_WAT_47			UINT64_C(0x00000f0000000000)
    349 #define	PIP_PRT_CFGN_39_37			UINT64_C(0x000000e000000000)
    350 #define	PIP_PRT_CFGN_RAWDRP			UINT64_C(0x0000001000000000)
    351 #define	PIP_PRT_CFGN_TAG_INC			UINT64_C(0x0000000c00000000)
    352 #define	PIP_PRT_CFGN_DYN_RS			UINT64_C(0x0000000200000000)
    353 #define	PIP_PRT_CFGN_INST_HDR			UINT64_C(0x0000000100000000)
    354 #define	PIP_PRT_CFGN_GRP_WAT			UINT64_C(0x00000000f0000000)
    355 #define	PIP_PRT_CFGN_27				UINT64_C(0x0000000008000000)
    356 #define	PIP_PRT_CFGN_QOS			UINT64_C(0x0000000007000000)
    357 #define	PIP_PRT_CFGN_QOS_WAT			UINT64_C(0x0000000000f00000)
    358 #define	PIP_PRT_CFGN_19				UINT64_C(0x0000000000080000)
    359 #define	PIP_PRT_CFGN_SPARE			UINT64_C(0x0000000000040000)
    360 #define	PIP_PRT_CFGN_QOS_DIFF			UINT64_C(0x0000000000020000)
    361 #define	PIP_PRT_CFGN_QOS_VLAN			UINT64_C(0x0000000000010000)
    362 #define	PIP_PRT_CFGN_15_13			UINT64_C(0x000000000000e000)
    363 #define	PIP_PRT_CFGN_CRC_EN			UINT64_C(0x0000000000001000)
    364 #define	PIP_PRT_CFGN_11_10			UINT64_C(0x0000000000000c00)
    365 #define	PIP_PRT_CFGN_MODE			UINT64_C(0x0000000000000300)
    366 #define   PIP_PORT_CFG_MODE_NONE		  0
    367 #define   PIP_PORT_CFG_MODE_L2			  1
    368 #define   PIP_PORT_CFG_MODE_IP			  2
    369 #define   PIP_PORT_CFG_MODE_PCI			  3
    370 #define	PIP_PRT_CFGN_7				UINT64_C(0x0000000000000080)
    371 #define	PIP_PRT_CFGN_SKIP			UINT64_C(0x000000000000007f)
    372 
    373 /*
    374  * PIP_PRT_TAGN
    375  */
    376 #define	PIP_PRT_TAGN_63_40			UINT64_C(0xffffff0000000000)
    377 #define	PIP_PRT_TAGN_GRPTAGBASE			UINT64_C(0x000000f000000000)
    378 #define	PIP_PRT_TAGN_GRPTAGMASK			UINT64_C(0x0000000f00000000)
    379 #define	PIP_PRT_TAGN_GRPTAG			UINT64_C(0x0000000080000000)
    380 #define	PIP_PRT_TAGN_SPARE			UINT64_C(0x0000000040000000)
    381 #define	PIP_PRT_TAGN_TAG_MODE			UINT64_C(0x0000000030000000)
    382 #define	PIP_PRT_TAGN_INC_VS			UINT64_C(0x000000000c000000)
    383 #define	PIP_PRT_TAGN_INC_VLAN			UINT64_C(0x0000000002000000)
    384 #define	PIP_PRT_TAGN_INC_PRT			UINT64_C(0x0000000001000000)
    385 #define	PIP_PRT_TAGN_IP6_DPRT			UINT64_C(0x0000000000800000)
    386 #define	PIP_PRT_TAGN_IP4_DPRT			UINT64_C(0x0000000000400000)
    387 #define	PIP_PRT_TAGN_IP6_SPRT			UINT64_C(0x0000000000200000)
    388 #define	PIP_PRT_TAGN_IP4_SPRT			UINT64_C(0x0000000000100000)
    389 #define	PIP_PRT_TAGN_IP6_NXTH			UINT64_C(0x0000000000080000)
    390 #define	PIP_PRT_TAGN_IP4_PCTL			UINT64_C(0x0000000000040000)
    391 #define	PIP_PRT_TAGN_IP6_DST			UINT64_C(0x0000000000020000)
    392 #define	PIP_PRT_TAGN_IP4_SRC			UINT64_C(0x0000000000010000)
    393 #define	PIP_PRT_TAGN_IP6_SRC			UINT64_C(0x0000000000008000)
    394 #define	PIP_PRT_TAGN_IP4_DST			UINT64_C(0x0000000000004000)
    395 #define	PIP_PRT_TAGN_TCP6_TAG			UINT64_C(0x0000000000003000)
    396 #define	   PIP_PRT_TAGN_TCP6_TAG_ORDERED	  0
    397 #define	   PIP_PRT_TAGN_TCP6_TAG_ATOMIC		  1
    398 #define	   PIP_PRT_TAGN_TCP6_TAG_NULL		  2
    399 #define	   PIP_PRT_TAGN_TCP6_TAG_XXX_3		  3
    400 #define	PIP_PRT_TAGN_TCP4_TAG			UINT64_C(0x0000000000000c00)
    401 #define	   PIP_PRT_TAGN_TCP4_TAG_ORDERED	  0
    402 #define	   PIP_PRT_TAGN_TCP4_TAG_ATOMIC		  1
    403 #define	   PIP_PRT_TAGN_TCP4_TAG_NULL		  2
    404 #define	   PIP_PRT_TAGN_TCP4_TAG_XXX_3		  3
    405 #define	PIP_PRT_TAGN_IP6_TAG			UINT64_C(0x0000000000000300)
    406 #define	   PIP_PRT_TAGN_IP6_TAG_ORDERED		  0
    407 #define	   PIP_PRT_TAGN_IP6_TAG_ATOMIC		  1
    408 #define	   PIP_PRT_TAGN_IP6_TAG_NULL		  2
    409 #define	   PIP_PRT_TAGN_IP6_TAG_XXX_3		  3
    410 #define	PIP_PRT_TAGN_IP4_TAG			UINT64_C(0x00000000000000c0)
    411 #define	   PIP_PRT_TAGN_IP4_TAG_ORDERED		  0
    412 #define	   PIP_PRT_TAGN_IP4_TAG_ATOMIC		  1
    413 #define	   PIP_PRT_TAGN_IP4_TAG_NULL		  2
    414 #define	   PIP_PRT_TAGN_IP4_TAG_XXX_3		  3
    415 #define	PIP_PRT_TAGN_NON_TAG			UINT64_C(0x0000000000000030)
    416 #define	   PIP_PRT_TAGN_NON_TAG_ORDERED		  0
    417 #define	   PIP_PRT_TAGN_NON_TAG_ATOMIC		  1
    418 #define	   PIP_PRT_TAGN_NON_TAG_NULL		  2
    419 #define	   PIP_PRT_TAGN_NON_TAG_XXX_3		  3
    420 #define	PIP_PRT_TAGN_GRP			UINT64_C(0x000000000000000f)
    421 
    422 /*
    423  * PIP_QOS_DIFFN
    424  */
    425 #define	PIP_QOS_DIFF_63_3			UINT64_C(0xfffffffffffffff8)
    426 #define	PIP_QOS_DIFF_QOS			UINT64_C(0x0000000000000007)
    427 
    428 /*
    429  * PIP_TAG_INCN
    430  */
    431 #define	PIP_TAG_INCN_63_8			UINT64_C(0xffffffffffffff00)
    432 #define	PIP_TAG_INCN_EN				UINT64_C(0x00000000000000ff)
    433 
    434 /*
    435  * PIP_STAT0_PRTN
    436  */
    437 #define	PIP_STAT0_PRTN_DRP_PKTS			UINT64_C(0xffffffff00000000)
    438 #define	PIP_STAT0_PRTN_DRP_OCTS			UINT64_C(0x00000000ffffffff)
    439 
    440 /*
    441  * PIP_STAT1_PRTN
    442  */
    443 #define	PIP_STAT1_PRTN_63_48			UINT64_C(0xffff000000000000)
    444 #define	PIP_STAT1_PRTN_OCTS			UINT64_C(0x0000ffffffffffff)
    445 
    446 /*
    447  * PIP_STAT2_PRTN
    448  */
    449 #define	PIP_STAT2_PRTN_PKTS			UINT64_C(0xffffffff00000000)
    450 #define	PIP_STAT2_PRTN_RAW			UINT64_C(0x00000000ffffffff)
    451 
    452 /*
    453  * PIP_STAT3_PRTN
    454  */
    455 #define	PIP_STAT3_PRTN_BCST			UINT64_C(0xffffffff00000000)
    456 #define	PIP_STAT3_PRTN_MCST			UINT64_C(0x00000000ffffffff)
    457 
    458 /*
    459  * PIP_STAT4_PRTN
    460  */
    461 #define	PIP_STAT4_PRTN_H65TO127			UINT64_C(0xffffffff00000000)
    462 #define	PIP_STAT4_PRTN_H64			UINT64_C(0x00000000ffffffff)
    463 
    464 /*
    465  * PIP_STAT5_PRTN
    466  */
    467 #define	PIP_STAT5_PRTN_H256TO511		UINT64_C(0xffffffff00000000)
    468 #define	PIP_STAT5_PRTN_H128TO255		UINT64_C(0x00000000ffffffff)
    469 
    470 /*
    471  * PIP_STAT6_PRTN
    472  */
    473 #define	PIP_STAT6_PRTN_H1024TO1518		UINT64_C(0xffffffff00000000)
    474 #define	PIP_STAT6_PRTN_H512TO1023		UINT64_C(0x00000000ffffffff)
    475 
    476 /*
    477  * PIP_STAT7_PRTN
    478  */
    479 #define	PIP_STAT7_PRTN_FCS			UINT64_C(0xffffffff00000000)
    480 #define	PIP_STAT7_PRTN_H1519			UINT64_C(0x00000000ffffffff)
    481 
    482 /*
    483  * PIP_STAT8_PRTN
    484  */
    485 #define	PIP_STAT8_PRTN_FRAG			UINT64_C(0xffffffff00000000)
    486 #define	PIP_STAT8_PRTN_UNDERSZ			UINT64_C(0x00000000ffffffff)
    487 
    488 /*
    489  * PIP_STAT9_PRTN
    490  */
    491 #define	PIP_STAT9_PRTN_JABBER			UINT64_C(0xffffffff00000000)
    492 #define	PIP_STAT9_PRTN_OVERSZ			UINT64_C(0x00000000ffffffff)
    493 
    494 /*
    495  * PIP_STAT_INB_PKTN
    496  */
    497 #define	PIP_STAT_INB_PKTSN			UINT64_C(0xffffffff00000000)
    498 #define	PIP_STAT_INB_PKTSN_PKTS			UINT64_C(0x00000000ffffffff)
    499 
    500 /*
    501  * PIP_STAT_INB_OCTSN
    502  */
    503 #define	PIP_STAT_INB_OCTSN			UINT64_C(0xffff000000000000)
    504 #define	PIP_STAT_INB_OCTSN_OCTS			UINT64_C(0x0000ffffffffffff)
    505 
    506 /*
    507  * PIP_STAT_INB_ERRS
    508  */
    509 #define	PIP_STAT_INB_ERRSN			UINT64_C(0xffffffffffff0000)
    510 #define	PIP_STAT_INB_ERRSN_OCTS			UINT64_C(0x000000000000ffff)
    511 
    512 /*
    513  * Work-Queue Entry Format
    514  */
    515 /* WORD0 */
    516 #define PIP_WQE_WORD0_HW_CSUM			UINT64_C(0xffff000000000000)
    517 #define PIP_WQE_WORD0_47_40			UINT64_C(0x0000ff0000000000)
    518 #define PIP_WQE_WORD0_POW_NEXT_PTR		UINT64_C(0x000000ffffffffff)
    519 
    520 /* WORD 1 */
    521 #define PIP_WQE_WORD1_LEN			UINT64_C(0xffff000000000000)
    522 #define PIP_WQE_WORD1_IPRT			UINT64_C(0x0000fc0000000000)
    523 #define PIP_WQE_WORD1_QOS			UINT64_C(0x0000038000000000)
    524 #define PIP_WQE_WORD1_GRP			UINT64_C(0x0000007800000000)
    525 #define PIP_WQE_WORD1_TT			UINT64_C(0x0000000700000000)
    526 #define PIP_WQE_WORD1_TAG			UINT64_C(0x00000000ffffffff)
    527 
    528 /* WORD 2 */
    529 #define PIP_WQE_WORD2_RAWFULL_BUFS		UINT64_C(0xff00000000000000)
    530 #define PIP_WQE_WORD2_RAWFULL_PIP_RAW_WORD	UINT64_C(0x00ffffffffffffff)
    531 
    532 #define PIP_WQE_WORD2_IP_BUFS			UINT64_C(0xff00000000000000)
    533 #define PIP_WQE_WORD2_IP_OFFSET			UINT64_C(0x00ff000000000000)
    534 #define PIP_WQE_WORD2_IP_VV			UINT64_C(0x0000800000000000)
    535 #define PIP_WQE_WORD2_IP_VS			UINT64_C(0x0000400000000000)
    536 #define PIP_WQE_WORD2_IP_45			UINT64_C(0x0000200000000000)
    537 #define PIP_WQE_WORD2_IP_VC			UINT64_C(0x0000100000000000)
    538 #define PIP_WQE_WORD2_IP_VLAN_ID		UINT64_C(0x00000fff00000000)
    539 #define PIP_WQE_WORD2_IP_31_20			UINT64_C(0x00000000fff00000)
    540 #define PIP_WQE_WORD2_IP_CO			UINT64_C(0x0000000000080000)
    541 #define PIP_WQE_WORD2_IP_TU			UINT64_C(0x0000000000040000)
    542 #define PIP_WQE_WORD2_IP_SE			UINT64_C(0x0000000000020000)
    543 #define PIP_WQE_WORD2_IP_V6			UINT64_C(0x0000000000010000)
    544 #define PIP_WQE_WORD2_IP_15			UINT64_C(0x0000000000008000)
    545 #define PIP_WQE_WORD2_IP_LE			UINT64_C(0x0000000000004000)
    546 #define PIP_WQE_WORD2_IP_FR			UINT64_C(0x0000000000002000)
    547 #define PIP_WQE_WORD2_IP_IE			UINT64_C(0x0000000000001000)
    548 #define PIP_WQE_WORD2_IP_B			UINT64_C(0x0000000000000800)
    549 #define PIP_WQE_WORD2_IP_M			UINT64_C(0x0000000000000400)
    550 #define PIP_WQE_WORD2_IP_NI			UINT64_C(0x0000000000000200)
    551 #define PIP_WQE_WORD2_IP_RE			UINT64_C(0x0000000000000100)
    552 #define PIP_WQE_WORD2_IP_OPECODE		UINT64_C(0x00000000000000ff)
    553 
    554 #define PIP_WQE_WORD2_NOIP_BUFS			UINT64_C(0xff00000000000000)
    555 #define PIP_WQE_WORD2_NOIP_55_48		UINT64_C(0x00ff000000000000)
    556 #define PIP_WQE_WORD2_NOIP_VV			UINT64_C(0x0000800000000000)
    557 #define PIP_WQE_WORD2_NOIP_VS			UINT64_C(0x0000400000000000)
    558 #define PIP_WQE_WORD2_NOIP_45			UINT64_C(0x0000200000000000)
    559 #define PIP_WQE_WORD2_NOIP_VC			UINT64_C(0x0000100000000000)
    560 #define PIP_WQE_WORD2_NOIP_VLAN_ID		UINT64_C(0x00000fff00000000)
    561 #define PIP_WQE_WORD2_NOIP_31_14		UINT64_C(0x00000000ffffc000)
    562 #define PIP_WQE_WORD2_NOIP_IR			UINT64_C(0x0000000000002000)
    563 #define PIP_WQE_WORD2_NOIP_IA			UINT64_C(0x0000000000001000)
    564 #define PIP_WQE_WORD2_NOIP_B			UINT64_C(0x0000000000000800)
    565 #define PIP_WQE_WORD2_NOIP_M			UINT64_C(0x0000000000000400)
    566 #define PIP_WQE_WORD2_NOIP_NI			UINT64_C(0x0000000000000200)
    567 #define PIP_WQE_WORD2_NOIP_RE			UINT64_C(0x0000000000000100)
    568 #define PIP_WQE_WORD2_NOIP_OPECODE		UINT64_C(0x00000000000000ff)
    569 
    570 /* WORD 3 */
    571 #define PIP_WQE_WORD3_63			UINT64_C(0x8000000000000000)
    572 #define PIP_WQE_WORD3_BACK			UINT64_C(0x7800000000000000)
    573 #define PIP_WQE_WORD3_58_56			UINT64_C(0x0700000000000000)
    574 #define PIP_WQE_WORD3_SIZE			UINT64_C(0x00ffff0000000000)
    575 #define PIP_WQE_WORD3_ADDR			UINT64_C(0x000000ffffffffff)
    576 
    577 /* opcode for WORD2[LE] */
    578 #define PIP_WQE_WORD2_LE_OPCODE_MAL		1ULL
    579 #define PIP_WQE_WORD2_LE_OPCODE_CSUM		2ULL
    580 #define PIP_WQE_WORD2_LE_OPCODE_UDPLEN		3ULL
    581 #define PIP_WQE_WORD2_LE_OPCODE_PORT		4ULL
    582 #define PIP_WQE_WORD2_LE_OPCODE_XXX_5		5ULL
    583 #define PIP_WQE_WORD2_LE_OPCODE_XXX_6		6ULL
    584 #define PIP_WQE_WORD2_LE_OPCODE_XXX_7		7ULL
    585 #define PIP_WQE_WORD2_LE_OPCODE_FINO		8ULL
    586 #define PIP_WQE_WORD2_LE_OPCODE_NOFL		9ULL
    587 #define PIP_WQE_WORD2_LE_OPCODE_FINRST		10ULL
    588 #define PIP_WQE_WORD2_LE_OPCODE_SYNURG		11ULL
    589 #define PIP_WQE_WORD2_LE_OPCODE_SYNRST		12ULL
    590 #define PIP_WQE_WORD2_LE_OPCODE_SYNFIN		13ULL
    591 
    592 /* opcode for WORD2[IE] */
    593 #define PIP_WQE_WORD2_IE_OPCODE_NOTIP		1ULL
    594 #define PIP_WQE_WORD2_IE_OPCODE_CSUM		2ULL
    595 #define PIP_WQE_WORD2_IE_OPCODE_MALHDR		3ULL
    596 #define PIP_WQE_WORD2_IE_OPCODE_MAL		4ULL
    597 #define PIP_WQE_WORD2_IE_OPCODE_TTL		5ULL
    598 #define PIP_WQE_WORD2_IE_OPCODE_OPT		6ULL
    599 
    600 /* opcode for WORD2[RE] */
    601 #define PIP_WQE_WORD2_RE_OPCODE_PARTIAL		1ULL
    602 #define PIP_WQE_WORD2_RE_OPCODE_JABBER		2ULL
    603 #define PIP_WQE_WORD2_RE_OPCODE_OVRRUN		3ULL
    604 #define PIP_WQE_WORD2_RE_OPCODE_OVRSZ		4ULL
    605 #define PIP_WQE_WORD2_RE_OPCODE_ALIGN		5ULL
    606 #define PIP_WQE_WORD2_RE_OPCODE_FRAG		6ULL
    607 #define PIP_WQE_WORD2_RE_OPCODE_GMXFCS		7ULL
    608 #define PIP_WQE_WORD2_RE_OPCODE_UDRSZ		8ULL
    609 #define PIP_WQE_WORD2_RE_OPCODE_EXTEND		9ULL
    610 #define PIP_WQE_WORD2_RE_OPCODE_LENGTH		10ULL
    611 #define PIP_WQE_WORD2_RE_OPCODE_MIIRX		11ULL
    612 #define PIP_WQE_WORD2_RE_OPCODE_MIISKIP		12ULL
    613 #define PIP_WQE_WORD2_RE_OPCODE_MIINBL		13ULL
    614 #define PIP_WQE_WORD2_RE_OPCODE_XXX_14		14ULL
    615 #define PIP_WQE_WORD2_RE_OPCODE_XXX_15		15ULL
    616 #define PIP_WQE_WORD2_RE_OPCODE_XXX_16		16ULL
    617 #define PIP_WQE_WORD2_RE_OPCODE_SKIP		17ULL
    618 #define PIP_WQE_WORD2_RE_OPCODE_L2MAL		18ULL
    619 
    620 /* XXX backward compatibility */
    621 #define	PIP_OVER_ERR		PIP_WQE_WORD2_RE_OPCODE_OVRRUN
    622 #define	PIP_GMX_FCS_ERR		PIP_WQE_WORD2_RE_OPCODE_GMXFCS
    623 #define	PIP_ALIGN_ERR		PIP_WQE_WORD2_RE_OPCODE_ALIGN
    624 
    625 #define	PIP_BIST_STATUS_BITS \
    626 	"\177"		/* new format */ \
    627 	"\020"		/* hex display */ \
    628 	"\020"		/* %016x format */ \
    629 	"f\x12\x2e"	"63_13\0" \
    630 	"f\x00\x12"	"BIST\0"
    631 #define	PIP_INT_REG_BITS \
    632 	"\177"		/* new format */ \
    633 	"\020"		/* hex display */ \
    634 	"\020"		/* %016x format */ \
    635 	"f\x09\x37"	"63_9\0" \
    636 	"b\x08"		"BEPERR\0" \
    637 	"b\x07"		"FEPERR\0" \
    638 	"b\x06"		"6\0" \
    639 	"b\x05"		"SKPRUNT\0" \
    640 	"b\x04"		"BADTAG\0" \
    641 	"b\x03"		"PRTNXA\0" \
    642 	"f\x01\x02"	"2_1\0" \
    643 	"b\x00"		"PKTDRP\0"
    644 #define	PIP_INT_EN_BITS \
    645 	"\177"		/* new format */ \
    646 	"\020"		/* hex display */ \
    647 	"\020"		/* %016x format */ \
    648 	"f\x09\x37"	"63_9\0" \
    649 	"b\x08"		"BEPERR\0" \
    650 	"b\x07"		"FEPERR\0" \
    651 	"b\x06"		"6\0" \
    652 	"b\x05"		"SKPRUNT\0" \
    653 	"b\x04"		"BADTAG\0" \
    654 	"b\x03"		"PRTNXA\0" \
    655 	"f\x01\x02"	"2_1\0" \
    656 	"b\x00"		"PKTDRP\0"
    657 #define	PIP_STAT_CTL_BITS \
    658 	"\177"		/* new format */ \
    659 	"\020"		/* hex display */ \
    660 	"\020"		/* %016x format */ \
    661 	"f\x01\x3f"	"63_1\0" \
    662 	"b\x00"		"RDCLR\0"
    663 #define	PIP_GBL_CTL_BITS \
    664 	"\177"		/* new format */ \
    665 	"\020"		/* hex display */ \
    666 	"\020"		/* %016x format */ \
    667 	"f\x11\x2f"	"63_17\0" \
    668 	"b\x10"		"IGNRS\0" \
    669 	"b\x0f"		"VS_WQE\0" \
    670 	"b\x0e"		"VS_QOS\0" \
    671 	"b\x0d"		"L2MAL\0" \
    672 	"b\x0c"		"TCP_FLAG\0" \
    673 	"b\x0b"		"L4_LEN\0" \
    674 	"b\x0a"		"L4_CHK\0" \
    675 	"b\x09"		"L4_PRT\0" \
    676 	"b\x08"		"L4_MAL\0" \
    677 	"f\x06\x02"	"7_6\0" \
    678 	"f\x04\x02"	"IP6_EEXT\0" \
    679 	"b\x03"		"IP4_OPTS\0" \
    680 	"b\x02"		"IP_HOP\0" \
    681 	"b\x01"		"IP_MAL\0" \
    682 	"b\x00"		"IP_CHK\0"
    683 #define	PIP_GBL_CFG_BITS \
    684 	"\177"		/* new format */ \
    685 	"\020"		/* hex display */ \
    686 	"\020"		/* %016x format */ \
    687 	"f\x13\x2d"	"63_19\0" \
    688 	"b\x12"		"TAG_SYN\0" \
    689 	"b\x11"		"IP6_UDP\0" \
    690 	"b\x10"		"MAX_L2\0" \
    691 	"f\x0b\x05"	"15_11\0" \
    692 	"f\x08\x03"	"RAW_SHF\0" \
    693 	"f\x03\x05"	"7_3\0" \
    694 	"f\x00\x03"	"NIP_SHF\0"
    695 #define	PIP_SOFT_RST_BITS \
    696 	"\177"		/* new format */ \
    697 	"\020"		/* hex display */ \
    698 	"\020"		/* %016x format */ \
    699 
    700 #define	PIP_IP_OFFSET_BITS \
    701 	"\177"		/* new format */ \
    702 	"\020"		/* hex display */ \
    703 	"\020"		/* %016x format */ \
    704 	"f\x03\x3d"	"63_3\0" \
    705 	"f\x00\x03"	"MASK_OFFSET\0"
    706 #define	PIP_TAG_SECRET_BITS \
    707 	"\177"		/* new format */ \
    708 	"\020"		/* hex display */ \
    709 	"\020"		/* %016x format */ \
    710 	"f\x20\x20"	"63_3\0" \
    711 	"f\x10\x10"	"DST\0" \
    712 	"f\x00\x10"	"SRC\0"
    713 #define	PIP_TAG_MASK_BITS \
    714 	"\177"		/* new format */ \
    715 	"\020"		/* hex display */ \
    716 	"\020"		/* %016x format */ \
    717 	"f\x10\x30"	"63_16\0" \
    718 	"f\x00\x10"	"MASK\0"
    719 #define	PIP_DEC_IPSECN_BITS \
    720 	"\177"		/* new format */ \
    721 	"\020"		/* hex display */ \
    722 	"\020"		/* %016x format */ \
    723 	"f\x12\x2e"	"63_18\0" \
    724 	"b\x11"		"TCP\0" \
    725 	"b\x10"		"UDP\0" \
    726 	"f\x00\x10"	"DPRT\0"
    727 #define	PIP_DEC_IPSEC0_BITS		PIP_DEC_IPSECN_BITS
    728 #define	PIP_DEC_IPSEC1_BITS		PIP_DEC_IPSECN_BITS
    729 #define	PIP_DEC_IPSEC2_BITS		PIP_DEC_IPSECN_BITS
    730 #define	PIP_DEC_IPSEC3_BITS		PIP_DEC_IPSECN_BITS
    731 #define	PIP_RAW_WORD_BITS \
    732 	"\177"		/* new format */ \
    733 	"\020"		/* hex display */ \
    734 	"\020"		/* %016x format */ \
    735 	"f\x38\x08"	"63_56\0" \
    736 	"f\x00\x38"	"WORD\0"
    737 #define	PIP_QOS_VLANN_BITS \
    738 	"\177"		/* new format */ \
    739 	"\020"		/* hex display */ \
    740 	"\020"		/* %016x format */ \
    741 
    742 #define	PIP_QOS_VLAN0_BITS		PIP_QOS_VLANN_BITS
    743 #define	PIP_QOS_VLAN1_BITS		PIP_QOS_VLANN_BITS
    744 #define	PIP_QOS_VLAN2_BITS		PIP_QOS_VLANN_BITS
    745 #define	PIP_QOS_VLAN3_BITS		PIP_QOS_VLANN_BITS
    746 #define	PIP_QOS_VLAN4_BITS		PIP_QOS_VLANN_BITS
    747 #define	PIP_QOS_VLAN5_BITS		PIP_QOS_VLANN_BITS
    748 #define	PIP_QOS_VLAN6_BITS		PIP_QOS_VLANN_BITS
    749 #define	PIP_QOS_VLAN7_BITS		PIP_QOS_VLANN_BITS
    750 #define	PIP_QOS_WATCHN_BITS \
    751 	"\177"		/* new format */ \
    752 	"\020"		/* hex display */ \
    753 	"\020"		/* %016x format */ \
    754 	"f\x30\x10"	"63_48\0" \
    755 	"f\x20\x10"	"MASK\0" \
    756 	"f\x1c\x04"	"31_28\0" \
    757 	"f\x18\x04"	"GRP\0" \
    758 	"b\x17"		"23\0" \
    759 	"f\x14\x03"	"WATCHER\0" \
    760 	"f\x12\x02"	"19_18\0" \
    761 	"f\x10\x02"	"TYPE\0" \
    762 	"f\x00\x10"	"15_0\0"
    763 #define	PIP_QOS_WATCH0_BITS		PIP_QOS_WATCHN_BITS
    764 #define	PIP_QOS_WATCH1_BITS		PIP_QOS_WATCHN_BITS
    765 #define	PIP_QOS_WATCH2_BITS		PIP_QOS_WATCHN_BITS
    766 #define	PIP_QOS_WATCH3_BITS		PIP_QOS_WATCHN_BITS
    767 #define	PIP_PRT_CFGN_BITS \
    768 	"\177"		/* new format */ \
    769 	"\020"		/* hex display */ \
    770 	"\020"		/* %016x format */ \
    771 	"f\x35\x0b"	"63_53\0" \
    772 	"b\x34"		"PAD_LEN\0" \
    773 	"b\x33"		"VLAN_LEN\0" \
    774 	"b\x32"		"LENERR_EN\0" \
    775 	"b\x31"		"MAXERR_EN\0" \
    776 	"b\x30"		"MINERR_EN\0" \
    777 	"f\x2c\x04"	"GRP_WAT_47\0" \
    778 	"f\x28\x04"	"QOS_WAT_47\0" \
    779 	"f\x25\x03"	"39_37\0" \
    780 	"b\x24"		"RAWDRP\0" \
    781 	"f\x22\x02"	"TAG_INC\0" \
    782 	"b\x21"		"DYN_RS\0" \
    783 	"b\x20"		"INST_HDR\0" \
    784 	"f\x1c\x04"	"GRP_WAT\0" \
    785 	"b\x1b"		"27\0" \
    786 	"f\x18\x03"	"QOS\0" \
    787 	"f\x14\x04"	"QOS_WAT\0" \
    788 	"b\x13"		"19\0" \
    789 	"b\x12"		"SPARE\0" \
    790 	"b\x11"		"QOS_DIFF\0" \
    791 	"b\x10"		"QOS_VLAN\0" \
    792 	"f\x0d\x03"	"15_13\0" \
    793 	"b\x0c"		"CRC_EN\0" \
    794 	"f\x0a\x02"	"11_10\0" \
    795 	"f\x08\x02"	"MODE\0" \
    796 	"b\x07"		"7\0" \
    797 	"f\x00\x07"	"SKIP\0"
    798 #define	PIP_PRT_CFG0_BITS		PIP_PRT_CFGN_BITS
    799 #define	PIP_PRT_CFG1_BITS		PIP_PRT_CFGN_BITS
    800 #define	PIP_PRT_CFG2_BITS		PIP_PRT_CFGN_BITS
    801 #define	PIP_PRT_CFG32_BITS		PIP_PRT_CFGN_BITS
    802 #define	PIP_PRT_TAGN_BITS \
    803 	"\177"		/* new format */ \
    804 	"\020"		/* hex display */ \
    805 	"\020"		/* %016x format */ \
    806 	"f\x28\x18"	"63_40\0" \
    807 	"f\x24\x04"	"GRPTAGBASE\0" \
    808 	"f\x20\x04"	"GRPTAGMASK\0" \
    809 	"b\x1f"		"GRPTAG\0" \
    810 	"b\x1e"		"SPARE\0" \
    811 	"f\x1c\x02"	"TAG_MODE\0" \
    812 	"f\x1a\x02"	"INC_VS\0" \
    813 	"b\x19"		"INC_VLAN\0" \
    814 	"b\x18"		"INC_PRT\0" \
    815 	"b\x17"		"IP6_DPRT\0" \
    816 	"b\x16"		"IP4_DPRT\0" \
    817 	"b\x15"		"IP6_SPRT\0" \
    818 	"b\x14"		"IP4_SPRT\0" \
    819 	"b\x13"		"IP6_NXTH\0" \
    820 	"b\x12"		"IP4_PCTL\0" \
    821 	"b\x11"		"IP6_DST\0" \
    822 	"b\x10"		"IP4_SRC\0" \
    823 	"b\x0f"		"IP6_SRC\0" \
    824 	"b\x0e"		"IP4_DST\0" \
    825 	"f\x0c\x02"	"TCP6_TAG\0" \
    826 	"f\x0a\x02"	"TCP4_TAG\0" \
    827 	"f\x08\x02"	"IP6_TAG\0" \
    828 	"f\x06\x02"	"IP4_TAG\0" \
    829 	"f\x04\x02"	"NON_TAG\0" \
    830 	"f\x00\x04"	"GRP\0"
    831 #define	PIP_PRT_TAG0_BITS		PIP_PRT_TAGN_BITS
    832 #define	PIP_PRT_TAG1_BITS		PIP_PRT_TAGN_BITS
    833 #define	PIP_PRT_TAG2_BITS		PIP_PRT_TAGN_BITS
    834 #define	PIP_PRT_TAG32_BITS		PIP_PRT_TAGN_BITS
    835 /* PIP_QOS_DIFF[0-63] */
    836 #define	PIP_STAT0_PRTN_BITS \
    837 	"\177"		/* new format */ \
    838 	"\020"		/* hex display */ \
    839 	"\020"		/* %016x format */ \
    840 	"f\x20\x20"	"DRP_PKTS\0" \
    841 	"f\x00\x20"	"DRP_OCTS\0"
    842 #define	PIP_STAT0_PRT0_BITS		PIP_STAT0_PRTN_BITS
    843 #define	PIP_STAT0_PRT1_BITS		PIP_STAT0_PRTN_BITS
    844 #define	PIP_STAT0_PRT2_BITS		PIP_STAT0_PRTN_BITS
    845 #define	PIP_STAT0_PRT32_BITS		PIP_STAT0_PRTN_BITS
    846 #define	PIP_STAT1_PRTN_BITS \
    847 	"\177"		/* new format */ \
    848 	"\020"		/* hex display */ \
    849 	"\020"		/* %016x format */ \
    850 	"f\x30\x10"	"63_48\0" \
    851 	"f\x00\x30"	"OCTS\0"
    852 #define	PIP_STAT1_PRT0_BITS		PIP_STAT1_PRTN_BITS
    853 #define	PIP_STAT1_PRT1_BITS		PIP_STAT1_PRTN_BITS
    854 #define	PIP_STAT1_PRT2_BITS		PIP_STAT1_PRTN_BITS
    855 #define	PIP_STAT1_PRT32_BITS		PIP_STAT1_PRTN_BITS
    856 #define	PIP_STAT2_PRTN_BITS \
    857 	"\177"		/* new format */ \
    858 	"\020"		/* hex display */ \
    859 	"\020"		/* %016x format */ \
    860 	"f\x20\x20"	"PKTS\0" \
    861 	"f\x00\x20"	"RAW\0"
    862 #define	PIP_STAT2_PRT0_BITS		PIP_STAT2_PRTN_BITS
    863 #define	PIP_STAT2_PRT1_BITS		PIP_STAT2_PRTN_BITS
    864 #define	PIP_STAT2_PRT2_BITS		PIP_STAT2_PRTN_BITS
    865 #define	PIP_STAT2_PRT32_BITS		PIP_STAT2_PRTN_BITS
    866 #define	PIP_STAT3_PRTN_BITS \
    867 	"\177"		/* new format */ \
    868 	"\020"		/* hex display */ \
    869 	"\020"		/* %016x format */ \
    870 	"f\x20\x20"	"BCST\0" \
    871 	"f\x00\x20"	"MCST\0"
    872 #define	PIP_STAT3_PRT0_BITS		PIP_STAT3_PRTN_BITS
    873 #define	PIP_STAT3_PRT1_BITS		PIP_STAT3_PRTN_BITS
    874 #define	PIP_STAT3_PRT2_BITS		PIP_STAT3_PRTN_BITS
    875 #define	PIP_STAT3_PRT32_BITS		PIP_STAT3_PRTN_BITS
    876 #define	PIP_STAT4_PRTN_BITS \
    877 	"\177"		/* new format */ \
    878 	"\020"		/* hex display */ \
    879 	"\020"		/* %016x format */ \
    880 	"f\x20\x20"	"H65TO127\0" \
    881 	"f\x00\x20"	"H64\0"
    882 #define	PIP_STAT4_PRT0_BITS		PIP_STAT4_PRTN_BITS
    883 #define	PIP_STAT4_PRT1_BITS		PIP_STAT4_PRTN_BITS
    884 #define	PIP_STAT4_PRT2_BITS		PIP_STAT4_PRTN_BITS
    885 #define	PIP_STAT4_PRT32_BITS		PIP_STAT4_PRTN_BITS
    886 #define	PIP_STAT5_PRTN_BITS \
    887 	"\177"		/* new format */ \
    888 	"\020"		/* hex display */ \
    889 	"\020"		/* %016x format */ \
    890 	"f\x20\x20"	"H256TO511\0" \
    891 	"f\x00\x20"	"H128TO255\0"
    892 #define	PIP_STAT5_PRT0_BITS		PIP_STAT5_PRTN_BITS
    893 #define	PIP_STAT5_PRT1_BITS		PIP_STAT5_PRTN_BITS
    894 #define	PIP_STAT5_PRT2_BITS		PIP_STAT5_PRTN_BITS
    895 #define	PIP_STAT5_PRT32_BITS		PIP_STAT5_PRTN_BITS
    896 #define	PIP_STAT6_PRTN_BITS \
    897 	"\177"		/* new format */ \
    898 	"\020"		/* hex display */ \
    899 	"\020"		/* %016x format */ \
    900 	"f\x20\x20"	"H1024TO1518\0" \
    901 	"f\x00\x20"	"H512TO1023\0"
    902 #define	PIP_STAT6_PRT0_BITS		PIP_STAT6_PRTN_BITS
    903 #define	PIP_STAT6_PRT1_BITS		PIP_STAT6_PRTN_BITS
    904 #define	PIP_STAT6_PRT2_BITS		PIP_STAT6_PRTN_BITS
    905 #define	PIP_STAT6_PRT32_BITS		PIP_STAT6_PRTN_BITS
    906 #define	PIP_STAT7_PRTN_BITS \
    907 	"\177"		/* new format */ \
    908 	"\020"		/* hex display */ \
    909 	"\020"		/* %016x format */ \
    910 	"f\x20\x20"	"FCS\0" \
    911 	"f\x00\x20"	"H1519\0"
    912 #define	PIP_STAT7_PRT0_BITS		PIP_STAT7_PRTN_BITS
    913 #define	PIP_STAT7_PRT1_BITS		PIP_STAT7_PRTN_BITS
    914 #define	PIP_STAT7_PRT2_BITS		PIP_STAT7_PRTN_BITS
    915 #define	PIP_STAT7_PRT32_BITS		PIP_STAT7_PRTN_BITS
    916 #define	PIP_STAT8_PRTN_BITS \
    917 	"\177"		/* new format */ \
    918 	"\020"		/* hex display */ \
    919 	"\020"		/* %016x format */ \
    920 	"f\x20\x20"	"FRAG\0" \
    921 	"f\x00\x20"	"UNDERSZ\0"
    922 #define	PIP_STAT8_PRT0_BITS		PIP_STAT8_PRTN_BITS
    923 #define	PIP_STAT8_PRT1_BITS		PIP_STAT8_PRTN_BITS
    924 #define	PIP_STAT8_PRT2_BITS		PIP_STAT8_PRTN_BITS
    925 #define	PIP_STAT8_PRT32_BITS		PIP_STAT8_PRTN_BITS
    926 #define	PIP_STAT9_PRTN_BITS \
    927 	"\177"		/* new format */ \
    928 	"\020"		/* hex display */ \
    929 	"\020"		/* %016x format */ \
    930 	"f\x20\x20"	"JABBER\0" \
    931 	"f\x00\x20"	"OVERSZ\0"
    932 #define	PIP_STAT9_PRT0_BITS		PIP_STAT9_PRTN_BITS
    933 #define	PIP_STAT9_PRT1_BITS		PIP_STAT9_PRTN_BITS
    934 #define	PIP_STAT9_PRT2_BITS		PIP_STAT9_PRTN_BITS
    935 #define	PIP_STAT9_PRT32_BITS		PIP_STAT9_PRTN_BITS
    936 /* PIP_TAG_INC[0-63] */
    937 #define	PIP_STAT_INB_PKTSN_BITS \
    938 	"\177"		/* new format */ \
    939 	"\020"		/* hex display */ \
    940 	"\020"		/* %016x format */ \
    941 	"f\x20\x20"	"PIP_STAT_INB_PKTSN\0" \
    942 	"f\x00\x20"	"PKTS\0"
    943 #define	PIP_STAT_INB_PKTS0_BITS		PIP_STAT_INB_PKTSN_BITS
    944 #define	PIP_STAT_INB_PKTS1_BITS		PIP_STAT_INB_PKTSN_BITS
    945 #define	PIP_STAT_INB_PKTS2_BITS		PIP_STAT_INB_PKTSN_BITS
    946 #define	PIP_STAT_INB_PKTS32_BITS	PIP_STAT_INB_PKTSN_BITS
    947 #define	PIP_STAT_INB_OCTSN_BITS \
    948 	"\177"		/* new format */ \
    949 	"\020"		/* hex display */ \
    950 	"\020"		/* %016x format */ \
    951 	"f\x30\x10"	"PIP_STAT_INB_OCTSN\0" \
    952 	"f\x00\x30"	"OCTS\0"
    953 #define	PIP_STAT_INB_OCTS0_BITS		PIP_STAT_INB_OCTSN_BITS
    954 #define	PIP_STAT_INB_OCTS1_BITS		PIP_STAT_INB_OCTSN_BITS
    955 #define	PIP_STAT_INB_OCTS2_BITS		PIP_STAT_INB_OCTSN_BITS
    956 #define	PIP_STAT_INB_OCTS32_BITS	PIP_STAT_INB_OCTSN_BITS
    957 #define	PIP_STAT_INB_ERRSN_BITS \
    958 	"\177"		/* new format */ \
    959 	"\020"		/* hex display */ \
    960 	"\020"		/* %016x format */ \
    961 	"f\x10\x30"	"PIP_STAT_INB_ERRSN\0" \
    962 	"f\x00\x10"	"OCTS\0"
    963 #define	PIP_STAT_INB_ERRS0_BITS		PIP_STAT_INB_ERRSN_BITS
    964 #define	PIP_STAT_INB_ERRS1_BITS		PIP_STAT_INB_ERRSN_BITS
    965 #define	PIP_STAT_INB_ERRS2_BITS		PIP_STAT_INB_ERRSN_BITS
    966 #define	PIP_STAT_INB_ERRS32_BITS	PIP_STAT_INB_ERRSN_BITS
    967 
    968 #endif /* _OCTEON_PIPREG_H_ */
    969