1 /* SPDX-License-Identifier: BSD-3-Clause 2 * Copyright(C) 2021 Marvell. 3 */ 4 5 #ifndef __NIX_HW_H__ 6 #define __NIX_HW_H__ 7 8 /* Register offsets */ 9 10 #define NIX_AF_CFG (0x0ull) 11 #define NIX_AF_STATUS (0x10ull) 12 #define NIX_AF_NDC_CFG (0x18ull) 13 #define NIX_AF_CONST (0x20ull) 14 #define NIX_AF_CONST1 (0x28ull) 15 #define NIX_AF_CONST2 (0x30ull) 16 #define NIX_AF_CONST3 (0x38ull) 17 #define NIX_AF_SQ_CONST (0x40ull) 18 #define NIX_AF_CQ_CONST (0x48ull) 19 #define NIX_AF_RQ_CONST (0x50ull) 20 #define NIX_AF_PL_CONST (0x58ull) /* [CN10K, .) */ 21 #define NIX_AF_PSE_CONST (0x60ull) 22 #define NIX_AF_TL1_CONST (0x70ull) 23 #define NIX_AF_TL2_CONST (0x78ull) 24 #define NIX_AF_TL3_CONST (0x80ull) 25 #define NIX_AF_TL4_CONST (0x88ull) 26 #define NIX_AF_MDQ_CONST (0x90ull) 27 #define NIX_AF_MC_MIRROR_CONST (0x98ull) 28 #define NIX_AF_LSO_CFG (0xa8ull) 29 #define NIX_AF_BLK_RST (0xb0ull) 30 #define NIX_AF_TX_TSTMP_CFG (0xc0ull) 31 #define NIX_AF_PL_TS (0xc8ull) /* [CN10K, .) */ 32 #define NIX_AF_RX_CFG (0xd0ull) 33 #define NIX_AF_AVG_DELAY (0xe0ull) 34 #define NIX_AF_CINT_DELAY (0xf0ull) 35 #define NIX_AF_VWQE_TIMER (0xf8ull) /* [CN10K, CN20K) */ 36 #define NIX_AF_RX_MCAST_BASE (0x100ull) 37 #define NIX_AF_RX_MCAST_CFG (0x110ull) 38 #define NIX_AF_RX_MCAST_BUF_BASE (0x120ull) 39 #define NIX_AF_RX_MCAST_BUF_CFG (0x130ull) 40 #define NIX_AF_RX_MIRROR_BUF_BASE (0x140ull) 41 #define NIX_AF_RX_MIRROR_BUF_CFG (0x148ull) 42 #define NIX_AF_LF_RST (0x150ull) 43 #define NIX_AF_GEN_INT (0x160ull) 44 #define NIX_AF_GEN_INT_W1S (0x168ull) 45 #define NIX_AF_GEN_INT_ENA_W1S (0x170ull) 46 #define NIX_AF_GEN_INT_ENA_W1C (0x178ull) 47 #define NIX_AF_ERR_INT (0x180ull) 48 #define NIX_AF_ERR_INT_W1S (0x188ull) 49 #define NIX_AF_ERR_INT_ENA_W1S (0x190ull) 50 #define NIX_AF_ERR_INT_ENA_W1C (0x198ull) 51 #define NIX_AF_RAS (0x1a0ull) 52 #define NIX_AF_RAS_W1S (0x1a8ull) 53 #define NIX_AF_RAS_ENA_W1S (0x1b0ull) 54 #define NIX_AF_RAS_ENA_W1C (0x1b8ull) 55 #define NIX_AF_RVU_INT (0x1c0ull) 56 #define NIX_AF_RVU_INT_W1S (0x1c8ull) 57 #define NIX_AF_RVU_INT_ENA_W1S (0x1d0ull) 58 #define NIX_AF_RVU_INT_ENA_W1C (0x1d8ull) 59 #define NIX_AF_TCP_TIMER (0x1e0ull) 60 /* [CN10k, .) */ 61 #define NIX_AF_RX_DEF_ETX(a) (0x1f0ull | (uint64_t)(a) << 3) 62 #define NIX_AF_RX_DEF_OL2 (0x200ull) 63 #define NIX_AF_RX_DEF_GEN0_COLOR (0x208ull) /* [CN10K, .) */ 64 #define NIX_AF_RX_DEF_OIP4 (0x210ull) 65 #define NIX_AF_RX_DEF_GEN1_COLOR (0x218ull) /* [CN10K, .) */ 66 #define NIX_AF_RX_DEF_IIP4 (0x220ull) 67 #define NIX_AF_RX_DEF_VLAN0_PCP_DEI (0x228ull) /* [CN10K, .) */ 68 #define NIX_AF_RX_DEF_OIP6 (0x230ull) 69 #define NIX_AF_RX_DEF_VLAN1_PCP_DEI (0x238ull) /* [CN10K, .) */ 70 #define NIX_AF_RX_DEF_IIP6 (0x240ull) 71 #define NIX_AF_RX_DEF_OTCP (0x250ull) 72 #define NIX_AF_RX_DEF_ITCP (0x260ull) 73 #define NIX_AF_RX_DEF_OUDP (0x270ull) 74 #define NIX_AF_RX_DEF_IUDP (0x280ull) 75 #define NIX_AF_RX_DEF_OSCTP (0x290ull) 76 #define NIX_AF_RX_DEF_CST_APAD_0 (0x298ull) /* [CN10K, .) */ 77 #define NIX_AF_RX_DEF_ISCTP (0x2a0ull) 78 #define NIX_AF_RX_DEF_CST_APAD_1 (0x2a8ull) /* [CN10K, .) */ 79 #define NIX_AF_RX_DEF_IPSECX(a) (0x2b0ull | (uint64_t)(a) << 3) 80 #define NIX_AF_RX_DEF_IIP4_DSCP (0x2e0ull) /* [CN10K, .) */ 81 #define NIX_AF_RX_DEF_OIP4_DSCP (0x2e8ull) /* [CN10K, .) */ 82 #define NIX_AF_RX_DEF_IIP6_DSCP (0x2f0ull) /* [CN10K, .) */ 83 #define NIX_AF_RX_DEF_OIP6_DSCP (0x2f8ull) /* [CN10K, .) */ 84 #define NIX_AF_RX_IPSEC_GEN_CFG (0x300ull) 85 #define NIX_AF_RX_IPSEC_VWQE_GEN_CFG (0x310ull) /* [CN10K, CN20K) */ 86 #define NIX_AF_RX_CPTX_INST_QSEL(a) (0x340ull | (uint64_t)(a) << 16) /* [CN20K, .) */ 87 #define NIX_AF_RX_CPTX_CREDIT(a) (0x380ull | (uint64_t)(a) << 16) /* [CN20K, .) */ 88 #define NIX_AF_CN9K_RX_CPTX_INST_QSEL(a)(0x320ull | (uint64_t)(a) << 3) /* [CN9K, CN20K) */ 89 #define NIX_AF_CN9K_RX_CPTX_CREDIT(a) (0x360ull | (uint64_t)(a) << 3) /* [CN9K, CN20K) */ 90 #define NIX_AF_NDC_RX_SYNC (0x3e0ull) 91 #define NIX_AF_NDC_TX_SYNC (0x3f0ull) 92 #define NIX_AF_AQ_CFG (0x400ull) 93 #define NIX_AF_AQ_BASE (0x410ull) 94 #define NIX_AF_AQ_STATUS (0x420ull) 95 #define NIX_AF_AQ_DOOR (0x430ull) 96 #define NIX_AF_AQ_DONE_WAIT (0x440ull) 97 #define NIX_AF_AQ_DONE (0x450ull) 98 #define NIX_AF_AQ_DONE_ACK (0x460ull) 99 #define NIX_AF_AQ_DONE_TIMER (0x470ull) 100 #define NIX_AF_AQ_DONE_ENA_W1S (0x490ull) 101 #define NIX_AF_AQ_DONE_ENA_W1C (0x498ull) 102 #define NIX_AF_RX_LINKX_CFG(a) (0x540ull | (uint64_t)(a) << 16) 103 #define NIX_AF_RX_SW_SYNC (0x550ull) 104 #define NIX_AF_RX_LINKX_WRR_CFG(a) (0x560ull | (uint64_t)(a) << 16) 105 #define NIX_AF_RQM_ECO (0x5a0ull) 106 #define NIX_AF_SEB_CFG (0x5f0ull) /* [CN10K, .) */ 107 #define NIX_AF_EXPR_TX_FIFO_STATUS (0x640ull) /* [CN9K, CN10K) */ 108 #define NIX_AF_NORM_TX_FIFO_STATUS (0x648ull) 109 #define NIX_AF_SDP_TX_FIFO_STATUS (0x650ull) 110 #define NIX_AF_TX_NPC_CAPTURE_CONFIG (0x660ull) 111 #define NIX_AF_TX_NPC_CAPTURE_INFO (0x668ull) 112 #define NIX_AF_SEB_COALESCE_DBGX(a) (0x670ull | (uint64_t)(a) << 3) 113 #define NIX_AF_TX_NPC_CAPTURE_RESPX(a) (0x680ull | (uint64_t)(a) << 3) 114 #define NIX_AF_SEB_ACTIVE_CYCLES_PCX(a) (0x6c0ull | (uint64_t)(a) << 3) 115 #define NIX_AF_SMQX_CFG(a) (0x700ull | (uint64_t)(a) << 16) 116 #define NIX_AF_SMQX_HEAD(a) (0x710ull | (uint64_t)(a) << 16) 117 #define NIX_AF_SMQX_TAIL(a) (0x720ull | (uint64_t)(a) << 16) 118 #define NIX_AF_SMQX_STATUS(a) (0x730ull | (uint64_t)(a) << 16) 119 #define NIX_AF_SMQX_NXT_HEAD(a) (0x740ull | (uint64_t)(a) << 16) 120 #define NIX_AF_SQM_ACTIVE_CYCLES_PC (0x770ull) 121 #define NIX_AF_SQM_SCLK_CNT (0x780ull) /* [CN10K, .) */ 122 #define NIX_AF_DWRR_MTUX(a) (0x790ull | (uint64_t)(a) << 16) 123 #define NIX_AF_DWRR_SDP_MTU (0x790ull) /* [CN10K, .) */ 124 #define NIX_AF_DWRR_RPM_MTU (0x7a0ull) /* [CN10K, .) */ 125 #define NIX_AF_PSE_CHANNEL_LEVEL (0x800ull) 126 #define NIX_AF_PSE_SHAPER_CFG (0x810ull) 127 #define NIX_AF_PSE_ACTIVE_CYCLES_PC (0x8c0ull) 128 #define NIX_AF_MARK_FORMATX_CTL(a) (0x900ull | (uint64_t)(a) << 18) 129 #define NIX_AF_TX_LINKX_NORM_CREDIT(a) (0xa00ull | (uint64_t)(a) << 16) 130 /* [CN9K, CN10K) */ 131 #define NIX_AF_TX_LINKX_EXPR_CREDIT(a) (0xa10ull | (uint64_t)(a) << 16) 132 /* [CN9K, CN10K) */ 133 #define NIX_AF_TX_LINKX_SW_XOFF(a) (0xa20ull | (uint64_t)(a) << 16) 134 /* [CN10K, .) */ 135 #define NIX_AF_TX_LINKX_NORM_CDT_ADJ(a) (0xa20ull | (uint64_t)(a) << 16) 136 #define NIX_AF_TX_LINKX_HW_XOFF(a) (0xa30ull | (uint64_t)(a) << 16) 137 #define NIX_AF_SDP_LINK_CREDIT (0xa40ull) 138 #define NIX_AF_SDP_LINK_CDT_ADJ (0xa50ull) /* [CN10K, .) */ 139 #define NIX_AF_LINK_CDT_ADJ_ERR (0xaa0ull) /* [CN10K, .) */ 140 /* [CN9K, CN10K) */ 141 #define NIX_AF_SDP_SW_XOFFX(a) (0xa60ull | (uint64_t)(a) << 3) 142 #define NIX_AF_SDP_HW_XOFFX(a) (0xac0ull | (uint64_t)(a) << 3) 143 #define NIX_AF_TL4X_BP_STATUS(a) (0xb00ull | (uint64_t)(a) << 16) 144 #define NIX_AF_TL4X_SDP_LINK_CFG(a) (0xb10ull | (uint64_t)(a) << 16) 145 #define NIX_AF_TL1_TW_ARB_CTL_DEBUG (0xbc0ull) /* [CN10K, .) */ 146 #define NIX_AF_TL1_TW_ARB_REQ_DEBUG (0xbc8ull) /* [CN10K, .) */ 147 #define NIX_AF_TL1X_SCHEDULE(a) (0xc00ull | (uint64_t)(a) << 16) 148 #define NIX_AF_TL1X_SHAPE(a) (0xc10ull | (uint64_t)(a) << 16) 149 #define NIX_AF_TL1X_CIR(a) (0xc20ull | (uint64_t)(a) << 16) 150 /* [CN9K, CN10K) */ 151 #define NIX_AF_TL1X_SHAPE_STATE(a) (0xc50ull | (uint64_t)(a) << 16) 152 /* [CN10K, .) */ 153 #define NIX_AF_TL1X_SHAPE_STATE_CIR(a) (0xc50ull | (uint64_t)(a) << 16) 154 #define NIX_AF_TL1X_SW_XOFF(a) (0xc70ull | (uint64_t)(a) << 16) 155 #define NIX_AF_TL1X_TOPOLOGY(a) (0xc80ull | (uint64_t)(a) << 16) 156 #define NIX_AF_TL1X_MD_DEBUG0(a) (0xcc0ull | (uint64_t)(a) << 16) 157 #define NIX_AF_TL1X_MD_DEBUG1(a) (0xcc8ull | (uint64_t)(a) << 16) 158 /* [CN9K, CN10K) */ 159 #define NIX_AF_TL1X_MD_DEBUG2(a) (0xcd0ull | (uint64_t)(a) << 16) 160 /* [CN10K, .) */ 161 #define NIX_AF_TL2X_SHAPE_STATE_CIR(a) (0xcd0ull | (uint64_t)(a) << 16) 162 /* [CN9K, CN10K) */ 163 #define NIX_AF_TL1X_MD_DEBUG3(a) (0xcd8ull | (uint64_t)(a) << 16) 164 #define NIX_AF_TL1X_DROPPED_PACKETS(a) (0xd20ull | (uint64_t)(a) << 16) 165 #define NIX_AF_TL1X_DROPPED_BYTES(a) (0xd30ull | (uint64_t)(a) << 16) 166 #define NIX_AF_TL1X_RED_PACKETS(a) (0xd40ull | (uint64_t)(a) << 16) 167 #define NIX_AF_TL1X_RED_BYTES(a) (0xd50ull | (uint64_t)(a) << 16) 168 #define NIX_AF_TL1X_YELLOW_PACKETS(a) (0xd60ull | (uint64_t)(a) << 16) 169 #define NIX_AF_TL1X_YELLOW_BYTES(a) (0xd70ull | (uint64_t)(a) << 16) 170 #define NIX_AF_TL1X_GREEN_PACKETS(a) (0xd80ull | (uint64_t)(a) << 16) 171 #define NIX_AF_TL1X_GREEN_BYTES(a) (0xd90ull | (uint64_t)(a) << 16) 172 #define NIX_AF_MDQ_MD_COUNT (0xda0ull) /* [CN10K, .) */ 173 /* [CN10K, .) */ 174 #define NIX_AF_MDQX_OUT_MD_COUNT(a) (0xdb0ull | (uint64_t)(a) << 16) 175 #define NIX_AF_TL2_TW_ARB_CTL_DEBUG (0xdc0ull) /* [CN10K, .) */ 176 /* [CN10K, .) */ 177 #define NIX_AF_TL2_TWX_ARB_REQ_DEBUG0(a) (0xdc8ull | (uint64_t)(a) << 16) 178 /* [CN10K, .) */ 179 #define NIX_AF_TL2_TWX_ARB_REQ_DEBUG1(a) (0xdd0ull | (uint64_t)(a) << 16) 180 #define NIX_AF_TL2X_SCHEDULE(a) (0xe00ull | (uint64_t)(a) << 16) 181 #define NIX_AF_TL2X_SHAPE(a) (0xe10ull | (uint64_t)(a) << 16) 182 #define NIX_AF_TL2X_CIR(a) (0xe20ull | (uint64_t)(a) << 16) 183 #define NIX_AF_TL2X_PIR(a) (0xe30ull | (uint64_t)(a) << 16) 184 #define NIX_AF_TL2X_SCHED_STATE(a) (0xe40ull | (uint64_t)(a) << 16) 185 /* [CN9K, CN10K) */ 186 #define NIX_AF_TL2X_SHAPE_STATE(a) (0xe50ull | (uint64_t)(a) << 16) 187 /* [CN10K, .) */ 188 #define NIX_AF_TL2X_SHAPE_STATE_PIR(a) (0xe50ull | (uint64_t)(a) << 16) 189 #define NIX_AF_TL2X_SW_XOFF(a) (0xe70ull | (uint64_t)(a) << 16) 190 #define NIX_AF_TL2X_TOPOLOGY(a) (0xe80ull | (uint64_t)(a) << 16) 191 #define NIX_AF_TL2X_PARENT(a) (0xe88ull | (uint64_t)(a) << 16) 192 #define NIX_AF_TL2X_MD_DEBUG0(a) (0xec0ull | (uint64_t)(a) << 16) 193 #define NIX_AF_TL2X_MD_DEBUG1(a) (0xec8ull | (uint64_t)(a) << 16) 194 /* [CN9K, CN10K) */ 195 #define NIX_AF_TL2X_MD_DEBUG2(a) (0xed0ull | (uint64_t)(a) << 16) 196 /* [CN10K, .) */ 197 #define NIX_AF_TL3X_SHAPE_STATE_CIR(a) (0xed0ull | (uint64_t)(a) << 16) 198 /* [CN9K, CN10K) */ 199 #define NIX_AF_TL2X_MD_DEBUG3(a) (0xed8ull | (uint64_t)(a) << 16) 200 #define NIX_AF_TL3_TW_ARB_CTL_DEBUG (0xfc0ull) /* [CN10K, .) */ 201 /* [CN10k, .) */ 202 #define NIX_AF_TL3_TWX_ARB_REQ_DEBUG0(a) (0xfc8ull | (uint64_t)(a) << 16) 203 /* [CN10K, .) */ 204 #define NIX_AF_TL3_TWX_ARB_REQ_DEBUG1(a) (0xfd0ull | (uint64_t)(a) << 16) 205 #define NIX_AF_TL3X_SCHEDULE(a) (0x1000ull | (uint64_t)(a) << 16) 206 #define NIX_AF_TL3X_SHAPE(a) (0x1010ull | (uint64_t)(a) << 16) 207 #define NIX_AF_TL3X_CIR(a) (0x1020ull | (uint64_t)(a) << 16) 208 #define NIX_AF_TL3X_PIR(a) (0x1030ull | (uint64_t)(a) << 16) 209 #define NIX_AF_TL3X_SCHED_STATE(a) (0x1040ull | (uint64_t)(a) << 16) 210 /* [CN9K, CN10K) */ 211 #define NIX_AF_TL3X_SHAPE_STATE(a) (0x1050ull | (uint64_t)(a) << 16) 212 /* [CN10K, .) */ 213 #define NIX_AF_TL3X_SHAPE_STATE_PIR(a) (0x1050ull | (uint64_t)(a) << 16) 214 #define NIX_AF_TL3X_SW_XOFF(a) (0x1070ull | (uint64_t)(a) << 16) 215 #define NIX_AF_TL3X_TOPOLOGY(a) (0x1080ull | (uint64_t)(a) << 16) 216 #define NIX_AF_TL3X_PARENT(a) (0x1088ull | (uint64_t)(a) << 16) 217 #define NIX_AF_TL3X_MD_DEBUG0(a) (0x10c0ull | (uint64_t)(a) << 16) 218 #define NIX_AF_TL3X_MD_DEBUG1(a) (0x10c8ull | (uint64_t)(a) << 16) 219 /* [CN9K, CN10K) */ 220 #define NIX_AF_TL3X_MD_DEBUG2(a) (0x10d0ull | (uint64_t)(a) << 16) 221 /* [CN10K, .) */ 222 #define NIX_AF_TL4X_SHAPE_STATE_CIR(a) (0x10d0ull | (uint64_t)(a) << 16) 223 /* [CN9K, CN10K) */ 224 #define NIX_AF_TL3X_MD_DEBUG3(a) (0x10d8ull | (uint64_t)(a) << 16) 225 #define NIX_AF_TL4_TW_ARB_CTL_DEBUG (0x11c0ull) /* [CN10K, .) */ 226 /* [CN10K, .) */ 227 #define NIX_AF_TL4_TWX_ARB_REQ_DEBUG0(a) (0x11c8ull | (uint64_t)(a) << 16) 228 /* [CN10K, .) */ 229 #define NIX_AF_TL4_TWX_ARB_REQ_DEBUG1(a) (0x11d0ull | (uint64_t)(a) << 16) 230 #define NIX_AF_TL4X_SCHEDULE(a) (0x1200ull | (uint64_t)(a) << 16) 231 #define NIX_AF_TL4X_SHAPE(a) (0x1210ull | (uint64_t)(a) << 16) 232 #define NIX_AF_TL4X_CIR(a) (0x1220ull | (uint64_t)(a) << 16) 233 #define NIX_AF_TL4X_PIR(a) (0x1230ull | (uint64_t)(a) << 16) 234 #define NIX_AF_TL4X_SCHED_STATE(a) (0x1240ull | (uint64_t)(a) << 16) 235 #define NIX_AF_TL4X_SHAPE_STATE_PIR(a) (0x1250ull | (uint64_t)(a) << 16) 236 #define NIX_AF_TL4X_SW_XOFF(a) (0x1270ull | (uint64_t)(a) << 16) 237 #define NIX_AF_TL4X_TOPOLOGY(a) (0x1280ull | (uint64_t)(a) << 16) 238 #define NIX_AF_TL4X_PARENT(a) (0x1288ull | (uint64_t)(a) << 16) 239 #define NIX_AF_TL4X_MD_DEBUG0(a) (0x12c0ull | (uint64_t)(a) << 16) 240 #define NIX_AF_TL4X_MD_DEBUG1(a) (0x12c8ull | (uint64_t)(a) << 16) 241 /* [CN9K, CN10K) */ 242 #define NIX_AF_TL4X_MD_DEBUG2(a) (0x12d0ull | (uint64_t)(a) << 16) 243 /* [CN10K, .) */ 244 #define NIX_AF_MDQX_SHAPE_STATE_CIR(a) (0x12d0ull | (uint64_t)(a) << 16) 245 /* [CN9K, CN10K) */ 246 #define NIX_AF_TL4X_MD_DEBUG3(a) (0x12d8ull | (uint64_t)(a) << 16) 247 #define NIX_AF_MDQ_TW_ARB_CTL_DEBUG (0x13c0ull) /* [CN10K, .) */ 248 /* [CN10K, .) */ 249 #define NIX_AF_MDQ_TWX_ARB_REQ_DEBUG0(a) (0x13c8ull | (uint64_t)(a) << 16) 250 /* [CN10K, .) */ 251 #define NIX_AF_MDQ_TWX_ARB_REQ_DEBUG1(a) (0x13d0ull | (uint64_t)(a) << 16) 252 #define NIX_AF_MDQX_SCHEDULE(a) (0x1400ull | (uint64_t)(a) << 16) 253 #define NIX_AF_MDQX_SHAPE(a) (0x1410ull | (uint64_t)(a) << 16) 254 #define NIX_AF_MDQX_CIR(a) (0x1420ull | (uint64_t)(a) << 16) 255 #define NIX_AF_MDQX_PIR(a) (0x1430ull | (uint64_t)(a) << 16) 256 #define NIX_AF_MDQX_SCHED_STATE(a) (0x1440ull | (uint64_t)(a) << 16) 257 /* [CN9K, CN10K) */ 258 #define NIX_AF_MDQX_SHAPE_STATE(a) (0x1450ull | (uint64_t)(a) << 16) 259 /* [CN10K, .) */ 260 #define NIX_AF_MDQX_SHAPE_STATE_PIR(a) (0x1450ull | (uint64_t)(a) << 16) 261 #define NIX_AF_MDQX_SW_XOFF(a) (0x1470ull | (uint64_t)(a) << 16) 262 #define NIX_AF_MDQX_PARENT(a) (0x1480ull | (uint64_t)(a) << 16) 263 #define NIX_AF_MDQX_MD_DEBUG(a) (0x14c0ull | (uint64_t)(a) << 16) 264 /* [CN10K, .) */ 265 #define NIX_AF_MDQX_IN_MD_COUNT(a) (0x14e0ull | (uint64_t)(a) << 16) 266 /* [CN9K, CN10K) */ 267 #define NIX_AF_TL3_TL2X_CFG(a) (0x1600ull | (uint64_t)(a) << 16) 268 #define NIX_AF_TL3_TL2X_BP_STATUS(a) (0x1610ull | (uint64_t)(a) << 16) 269 #define NIX_AF_TL3_TL2X_LINKX_CFG(a, b) \ 270 (0x1700ull | (uint64_t)(a) << 16 | (uint64_t)(b) << 3) 271 #define NIX_AF_RX_FLOW_KEY_ALGX_FIELDX(a, b) \ 272 (0x1800ull | (uint64_t)(a) << 18 | (uint64_t)(b) << 3) 273 #define NIX_AF_TX_MCASTX(a) (0x1900ull | (uint64_t)(a) << 15) 274 #define NIX_AF_TX_VTAG_DEFX_CTL(a) (0x1a00ull | (uint64_t)(a) << 16) 275 #define NIX_AF_TX_VTAG_DEFX_DATA(a) (0x1a10ull | (uint64_t)(a) << 16) 276 #define NIX_AF_RX_BPIDX_STATUS(a) (0x1a20ull | (uint64_t)(a) << 17) 277 #define NIX_AF_RX_CHANX_CFG(a) (0x1a30ull | (uint64_t)(a) << 15) 278 #define NIX_AF_CINT_TIMERX(a) (0x1a40ull | (uint64_t)(a) << 18) 279 #define NIX_AF_LSO_FORMATX_FIELDX(a, b) \ 280 (0x1b00ull | (uint64_t)(a) << 16 | (uint64_t)(b) << 3) 281 /* [CN10K, .) */ 282 #define NIX_AF_SPI_TO_SA_KEYX_WAYX(a, b) (0x1c00ull | (uint64_t)(a) << 16 | (uint64_t)(b) << 3) 283 #define NIX_AF_SPI_TO_SA_VALUEX_WAYX(a, b) (0x1c40ull | (uint64_t)(a) << 16 | (uint64_t)(b) << 3) 284 #define NIX_AF_SPI_TO_SA_CFG (0x1c80ull) 285 #define NIX_AF_SPI_TO_SA_CFG1 (0x1c88ull) 286 #define NIX_AF_SPI_TO_SA_HASH_KEY (0x1c90ull) 287 #define NIX_AF_SPI_TO_SA_HASH_VALUE (0x1ca0ull) 288 /* CN20K, .) */ 289 #define NIX_AF_RX_IPSEC_VLAN_CFGX(a) (0x1d00ull | (uint64_t)(a) << 3) 290 #define NIX_AF_RX_IPSEC_QMAPX_DSCPX(a, b) (0x1e00ull | (uint64_t)(a) << 6 | (uint64_t)(b) << 3) 291 #define NIX_AF_RX_SSO_GRPX_BP_CFG(a) (0x2000ull | (uint64_t)(a) << 3) 292 #define NIX_AF_RX_SSO_GRPX_BP_LEVEL(a) (0x3000ull | (uint64_t)(a) << 3) 293 #define NIX_AF_LFX_CFG(a) (0x4000ull | (uint64_t)(a) << 17) 294 /* [CN10K, .) */ 295 #define NIX_AF_LINKX_CFG(a) (0x4010ull | (uint64_t)(a) << 17) 296 #define NIX_AF_LFX_SQS_CFG(a) (0x4020ull | (uint64_t)(a) << 17) 297 #define NIX_AF_LFX_TX_CFG2(a) (0x4028ull | (uint64_t)(a) << 17) 298 #define NIX_AF_LFX_SQS_BASE(a) (0x4030ull | (uint64_t)(a) << 17) 299 #define NIX_AF_LFX_RQS_CFG(a) (0x4040ull | (uint64_t)(a) << 17) 300 #define NIX_AF_LFX_RQS_BASE(a) (0x4050ull | (uint64_t)(a) << 17) 301 #define NIX_AF_LFX_CQS_CFG(a) (0x4060ull | (uint64_t)(a) << 17) 302 #define NIX_AF_LFX_CQS_BASE(a) (0x4070ull | (uint64_t)(a) << 17) 303 #define NIX_AF_LFX_TX_CFG(a) (0x4080ull | (uint64_t)(a) << 17) 304 #define NIX_AF_LFX_TX_PARSE_CFG(a) (0x4090ull | (uint64_t)(a) << 17) 305 #define NIX_AF_LFX_RX_CFG(a) (0x40a0ull | (uint64_t)(a) << 17) 306 #define NIX_AF_LFX_RSS_CFG(a) (0x40c0ull | (uint64_t)(a) << 17) 307 #define NIX_AF_LFX_RSS_BASE(a) (0x40d0ull | (uint64_t)(a) << 17) 308 #define NIX_AF_LFX_QINTS_CFG(a) (0x4100ull | (uint64_t)(a) << 17) 309 #define NIX_AF_LFX_QINTS_BASE(a) (0x4110ull | (uint64_t)(a) << 17) 310 #define NIX_AF_LFX_CINTS_CFG(a) (0x4120ull | (uint64_t)(a) << 17) 311 #define NIX_AF_LFX_CINTS_BASE(a) (0x4130ull | (uint64_t)(a) << 17) 312 #define NIX_AF_LFX_RX_IPSEC_CFG0(a) (0x4140ull | (uint64_t)(a) << 17) 313 #define NIX_AF_LFX_RX_IPSEC_CFG1(a) (0x4148ull | (uint64_t)(a) << 17) 314 #define NIX_AF_LFX_RX_IPSEC_DYNO_CFG(a) (0x4150ull | (uint64_t)(a) << 17) 315 #define NIX_AF_LFX_RX_IPSEC_DYNO_BASE(a) (0x4158ull | (uint64_t)(a) << 17) 316 #define NIX_AF_LFX_RX_IPSEC_SA_BASE(a) (0x4170ull | (uint64_t)(a) << 17) 317 #define NIX_AF_LFX_TX_STATUS(a) (0x4180ull | (uint64_t)(a) << 17) 318 #define NIX_AF_LFX_RX_VTAG_TYPEX(a, b) \ 319 (0x4200ull | (uint64_t)(a) << 17 | (uint64_t)(b) << 3) 320 #define NIX_AF_LFX_LOCKX(a, b) \ 321 (0x4300ull | (uint64_t)(a) << 17 | (uint64_t)(b) << 3) 322 #define NIX_AF_LFX_TX_STATX(a, b) \ 323 (0x4400ull | (uint64_t)(a) << 17 | (uint64_t)(b) << 3) 324 #define NIX_AF_LFX_RX_STATX(a, b) \ 325 (0x4500ull | (uint64_t)(a) << 17 | (uint64_t)(b) << 3) 326 #define NIX_AF_LFX_RSS_GRPX(a, b) \ 327 (0x4600ull | (uint64_t)(a) << 17 | (uint64_t)(b) << 3) 328 #define NIX_AF_RX_NPC_MC_RCV (0x4700ull) 329 #define NIX_AF_RX_NPC_MC_DROP (0x4710ull) 330 #define NIX_AF_RX_NPC_MIRROR_RCV (0x4720ull) 331 #define NIX_AF_RX_NPC_MIRROR_DROP (0x4730ull) 332 /* [CN10K, .) */ 333 #define NIX_AF_LFX_VWQE_NORM_COMPL(a) (0x4740ull | (uint64_t)(a) << 17) 334 /* [CN10K, .) */ 335 #define NIX_AF_LFX_VWQE_RLS_TIMEOUT(a) (0x4750ull | (uint64_t)(a) << 17) 336 /* [CN10K, .) */ 337 #define NIX_AF_LFX_VWQE_HASH_FULL(a) (0x4760ull | (uint64_t)(a) << 17) 338 /* [CN10K, .) */ 339 #define NIX_AF_LFX_VWQE_SA_FULL(a) (0x4770ull | (uint64_t)(a) << 17) 340 #define NIX_AF_VWQE_HASH_FUNC_MASK (0x47a0ull) /* [CN10K, .) */ 341 #define NIX_AF_RX_ACTIVE_CYCLES_PCX(a) (0x4800ull | (uint64_t)(a) << 16) 342 /* [CN10K, .) */ 343 #define NIX_AF_RX_LINKX_WRR_OUT_CFG(a) (0x4a00ull | (uint64_t)(a) << 16) 344 #define NIX_PRIV_AF_INT_CFG (0x8000000ull) 345 #define NIX_PRIV_LFX_CFG(a) (0x8000010ull | (uint64_t)(a) << 8) 346 #define NIX_PRIV_LFX_INT_CFG(a) (0x8000020ull | (uint64_t)(a) << 8) 347 #define NIX_AF_RVU_LF_CFG_DEBUG (0x8000030ull) 348 349 #define NIX_LF_RX_SECRETX(a) (0x0ull | (uint64_t)(a) << 3) 350 #define NIX_LF_CFG (0x100ull) 351 #define NIX_LF_GINT (0x200ull) 352 #define NIX_LF_GINT_W1S (0x208ull) 353 #define NIX_LF_GINT_ENA_W1C (0x210ull) 354 #define NIX_LF_GINT_ENA_W1S (0x218ull) 355 #define NIX_LF_ERR_INT (0x220ull) 356 #define NIX_LF_ERR_INT_W1S (0x228ull) 357 #define NIX_LF_ERR_INT_ENA_W1C (0x230ull) 358 #define NIX_LF_ERR_INT_ENA_W1S (0x238ull) 359 #define NIX_LF_RAS (0x240ull) 360 #define NIX_LF_RAS_W1S (0x248ull) 361 #define NIX_LF_RAS_ENA_W1C (0x250ull) 362 #define NIX_LF_RAS_ENA_W1S (0x258ull) 363 #define NIX_LF_SQ_OP_ERR_DBG (0x260ull) 364 #define NIX_LF_MNQ_ERR_DBG (0x270ull) 365 #define NIX_LF_SEND_ERR_DBG (0x280ull) 366 #define NIX_LF_TX_STATX(a) (0x300ull | (uint64_t)(a) << 3) 367 #define NIX_LF_RX_STATX(a) (0x400ull | (uint64_t)(a) << 3) 368 #define NIX_LF_OP_SENDX(a) (0x800ull | (uint64_t)(a) << 3) 369 #define NIX_LF_PTP_CLOCK (0x8f8ull) /* [CN20K, .) */ 370 #define NIX_LF_RQ_OP_INT (0x900ull) 371 #define NIX_LF_RQ_OP_OCTS (0x910ull) 372 #define NIX_LF_RQ_OP_PKTS (0x920ull) 373 #define NIX_LF_RQ_OP_DROP_OCTS (0x930ull) 374 #define NIX_LF_RQ_OP_DROP_PKTS (0x940ull) 375 #define NIX_LF_RQ_OP_RE_PKTS (0x950ull) 376 #define NIX_LF_OP_IPSEC_DYNO_CNT (0x980ull) 377 #define NIX_LF_OP_VWQE_FLUSH (0x9a0ull) /* [CN10K, CN20K) */ 378 #define NIX_LF_PL_OP_BAND_PROF (0x9c0ull) /* [CN10K, .) */ 379 #define NIX_LF_SQ_OP_INT (0xa00ull) 380 #define NIX_LF_SQ_OP_OCTS (0xa10ull) 381 #define NIX_LF_SQ_OP_PKTS (0xa20ull) 382 #define NIX_LF_SQ_OP_STATUS (0xa30ull) 383 #define NIX_LF_SQ_OP_DROP_OCTS (0xa40ull) 384 #define NIX_LF_SQ_OP_DROP_PKTS (0xa50ull) 385 #define NIX_LF_SQ_OP_AGE_DROP_OCTS (0xa60ull) /* [CN10K, .) */ 386 #define NIX_LF_SQ_OP_AGE_DROP_PKTS (0xa70ull) /* [CN10K, .) */ 387 #define NIX_LF_CQ_OP_INT (0xb00ull) 388 #define NIX_LF_CQ_OP_DOOR (0xb30ull) 389 #define NIX_LF_CQ_OP_STATUS (0xb40ull) 390 #define NIX_LF_SSO_BP_OP_DOOR (0xb50ull) /* [CN20K, .) */ 391 #define NIX_LF_SSO_BP_OP_LEVEL (0xb58ull) /* [CN20K, .) */ 392 #define NIX_LF_SSO_BP_OP_INT (0xb60ull) /* [CN20K, .) */ 393 #define NIX_LF_QINTX_CNT(a) (0xc00ull | (uint64_t)(a) << 12) 394 #define NIX_LF_QINTX_INT(a) (0xc10ull | (uint64_t)(a) << 12) 395 #define NIX_LF_QINTX_ENA_W1S(a) (0xc20ull | (uint64_t)(a) << 12) 396 #define NIX_LF_QINTX_ENA_W1C(a) (0xc30ull | (uint64_t)(a) << 12) 397 #define NIX_LF_CINTX_CNT(a) (0xd00ull | (uint64_t)(a) << 12) 398 #define NIX_LF_CINTX_WAIT(a) (0xd10ull | (uint64_t)(a) << 12) 399 #define NIX_LF_CINTX_INT(a) (0xd20ull | (uint64_t)(a) << 12) 400 #define NIX_LF_CINTX_INT_W1S(a) (0xd30ull | (uint64_t)(a) << 12) 401 #define NIX_LF_CINTX_ENA_W1S(a) (0xd40ull | (uint64_t)(a) << 12) 402 #define NIX_LF_CINTX_ENA_W1C(a) (0xd50ull | (uint64_t)(a) << 12) 403 /* [CN10K, .) */ 404 #define NIX_LF_RX_GEN_COLOR_CONVX(a) (0x4740ull | (uint64_t)(a) << 3) 405 #define NIX_LF_RX_VLAN0_COLOR_CONV (0x4760ull) /* [CN10K, .) */ 406 #define NIX_LF_RX_VLAN1_COLOR_CONV (0x4768ull) /* [CN10K, .) */ 407 #define NIX_LF_RX_IIP_COLOR_CONV_LO (0x4770ull) /* [CN10K, .) */ 408 #define NIX_LF_RX_IIP_COLOR_CONV_HI (0x4778ull) /* [CN10K, .) */ 409 #define NIX_LF_RX_OIP_COLOR_CONV_LO (0x4780ull) /* [CN10K, .) */ 410 #define NIX_LF_RX_OIP_COLOR_CONV_HI (0x4788ull) /* [CN10K, .) */ 411 412 /* Enum offsets */ 413 414 #define NIX_SSOERRINT_DOOR_ERR (0x0ull) /*[CN20K, .) */ 415 416 #define NIX_STAT_LF_TX_TX_UCAST (0x0ull) 417 #define NIX_STAT_LF_TX_TX_BCAST (0x1ull) 418 #define NIX_STAT_LF_TX_TX_MCAST (0x2ull) 419 #define NIX_STAT_LF_TX_TX_DROP (0x3ull) 420 #define NIX_STAT_LF_TX_TX_OCTS (0x4ull) 421 422 #define NIX_STAT_LF_RX_RX_OCTS (0x0ull) 423 #define NIX_STAT_LF_RX_RX_UCAST (0x1ull) 424 #define NIX_STAT_LF_RX_RX_BCAST (0x2ull) 425 #define NIX_STAT_LF_RX_RX_MCAST (0x3ull) 426 #define NIX_STAT_LF_RX_RX_DROP (0x4ull) 427 #define NIX_STAT_LF_RX_RX_DROP_OCTS (0x5ull) 428 #define NIX_STAT_LF_RX_RX_FCS (0x6ull) 429 #define NIX_STAT_LF_RX_RX_ERR (0x7ull) 430 #define NIX_STAT_LF_RX_RX_DRP_BCAST (0x8ull) 431 #define NIX_STAT_LF_RX_RX_DRP_MCAST (0x9ull) 432 #define NIX_STAT_LF_RX_RX_DRP_L3BCAST (0xaull) 433 #define NIX_STAT_LF_RX_RX_DRP_L3MCAST (0xbull) 434 435 #define NIX_STAT_LF_RX_RX_GC_OCTS_PASSED (0xcull) /* [CN10K, .) */ 436 #define NIX_STAT_LF_RX_RX_GC_PKTS_PASSED (0xdull) /* [CN10K, .) */ 437 #define NIX_STAT_LF_RX_RX_YC_OCTS_PASSED (0xeull) /* [CN10K, .) */ 438 #define NIX_STAT_LF_RX_RX_YC_PKTS_PASSED (0xfull) /* [CN10K, .) */ 439 #define NIX_STAT_LF_RX_RX_RC_OCTS_PASSED (0x10ull) /* [CN10K, .) */ 440 #define NIX_STAT_LF_RX_RX_RC_PKTS_PASSED (0x11ull) /* [CN10K, .) */ 441 #define NIX_STAT_LF_RX_RX_GC_OCTS_DROP (0x12ull) /* [CN10K, .) */ 442 #define NIX_STAT_LF_RX_RX_GC_PKTS_DROP (0x13ull) /* [CN10K, .) */ 443 #define NIX_STAT_LF_RX_RX_YC_OCTS_DROP (0x14ull) /* [CN10K, .) */ 444 #define NIX_STAT_LF_RX_RX_YC_PKTS_DROP (0x15ull) /* [CN10K, .) */ 445 #define NIX_STAT_LF_RX_RX_RC_OCTS_DROP (0x16ull) /* [CN10K, .) */ 446 #define NIX_STAT_LF_RX_RX_RC_PKTS_DROP (0x17ull) /* [CN10K, .) */ 447 #define NIX_STAT_LF_RX_RX_CPT_DROP_PKTS (0x18ull) /* [CN10K, .) */ 448 #define NIX_STAT_LF_RX_RX_IPSECD_DROP_PKTS (0x19ull) /* [CN10K, .) */ 449 450 #define CGX_RX_PKT_CNT (0x0ull) /* [CN9K, CN10K) */ 451 #define CGX_RX_OCT_CNT (0x1ull) /* [CN9K, CN10K) */ 452 #define CGX_RX_PAUSE_PKT_CNT (0x2ull) /* [CN9K, CN10K) */ 453 #define CGX_RX_PAUSE_OCT_CNT (0x3ull) /* [CN9K, CN10K) */ 454 #define CGX_RX_DMAC_FILT_PKT_CNT (0x4ull) /* [CN9K, CN10K) */ 455 #define CGX_RX_DMAC_FILT_OCT_CNT (0x5ull) /* [CN9K, CN10K) */ 456 #define CGX_RX_FIFO_DROP_PKT_CNT (0x6ull) /* [CN9K, CN10K) */ 457 #define CGX_RX_FIFO_DROP_OCT_CNT (0x7ull) /* [CN9K, CN10K) */ 458 #define CGX_RX_ERR_CNT (0x8ull) /* [CN9K, CN10K) */ 459 460 #define CGX_TX_COLLISION_DROP (0x0ull) /* [CN9K, CN10K) */ 461 #define CGX_TX_FRAME_DEFER_CNT (0x1ull) /* [CN9K, CN10K) */ 462 #define CGX_TX_MULTIPLE_COLLISION (0x2ull) /* [CN9K, CN10K) */ 463 #define CGX_TX_SINGLE_COLLISION (0x3ull) /* [CN9K, CN10K) */ 464 #define CGX_TX_OCT_CNT (0x4ull) /* [CN9K, CN10K) */ 465 #define CGX_TX_PKT_CNT (0x5ull) /* [CN9K, CN10K) */ 466 #define CGX_TX_1_63_PKT_CNT (0x6ull) /* [CN9K, CN10K) */ 467 #define CGX_TX_64_PKT_CNT (0x7ull) /* [CN9K, CN10K) */ 468 #define CGX_TX_65_127_PKT_CNT (0x8ull) /* [CN9K, CN10K) */ 469 #define CGX_TX_128_255_PKT_CNT (0x9ull) /* [CN9K, CN10K) */ 470 #define CGX_TX_256_511_PKT_CNT (0xaull) /* [CN9K, CN10K) */ 471 #define CGX_TX_512_1023_PKT_CNT (0xbull) /* [CN9K, CN10K) */ 472 #define CGX_TX_1024_1518_PKT_CNT (0xcull) /* [CN9K, CN10K) */ 473 #define CGX_TX_1519_MAX_PKT_CNT (0xdull) /* [CN9K, CN10K) */ 474 #define CGX_TX_BCAST_PKTS (0xeull) /* [CN9K, CN10K) */ 475 #define CGX_TX_MCAST_PKTS (0xfull) /* [CN9K, CN10K) */ 476 #define CGX_TX_UFLOW_PKTS (0x10ull) /* [CN9K, CN10K) */ 477 #define CGX_TX_PAUSE_PKTS (0x11ull) /* [CN9K, CN10K) */ 478 479 #define RPM_MTI_STAT_RX_OCT_CNT (0x0ull) /* [CN10K, .) */ 480 #define RPM_MTI_STAT_RX_OCT_RECV_OK (0x1ull) /* [CN10K, .) */ 481 #define RPM_MTI_STAT_RX_ALIG_ERR (0x2ull) /* [CN10K, .) */ 482 #define RPM_MTI_STAT_RX_CTRL_FRM_RECV (0x3ull) /* [CN10K, .) */ 483 #define RPM_MTI_STAT_RX_FRM_LONG (0x4ull) /* [CN10K, .) */ 484 #define RPM_MTI_STAT_RX_LEN_ERR (0x5ull) /* [CN10K, .) */ 485 #define RPM_MTI_STAT_RX_FRM_RECV (0x6ull) /* [CN10K, .) */ 486 #define RPM_MTI_STAT_RX_FRM_SEQ_ERR (0x7ull) /* [CN10K, .) */ 487 #define RPM_MTI_STAT_RX_VLAN_OK (0x8ull) /* [CN10K, .) */ 488 #define RPM_MTI_STAT_RX_IN_ERR (0x9ull) /* [CN10K, .) */ 489 #define RPM_MTI_STAT_RX_IN_UCAST_PKT (0xaull) /* [CN10K, .) */ 490 #define RPM_MTI_STAT_RX_IN_MCAST_PKT (0xbull) /* [CN10K, .) */ 491 #define RPM_MTI_STAT_RX_IN_BCAST_PKT (0xcull) /* [CN10K, .) */ 492 #define RPM_MTI_STAT_RX_DRP_EVENTS (0xdull) /* [CN10K, .) */ 493 #define RPM_MTI_STAT_RX_PKT (0xeull) /* [CN10K, .) */ 494 #define RPM_MTI_STAT_RX_UNDER_SIZE (0xfull) /* [CN10K, .) */ 495 #define RPM_MTI_STAT_RX_1_64_PKT_CNT (0x10ull) /* [CN10K, .) */ 496 #define RPM_MTI_STAT_RX_65_127_PKT_CNT (0x11ull) /* [CN10K, .) */ 497 #define RPM_MTI_STAT_RX_128_255_PKT_CNT (0x12ull) /* [CN10K, .) */ 498 #define RPM_MTI_STAT_RX_256_511_PKT_CNT (0x13ull) /* [CN10K, .) */ 499 #define RPM_MTI_STAT_RX_512_1023_PKT_CNT (0x14ull) /* [CN10K, .) */ 500 #define RPM_MTI_STAT_RX_1024_1518_PKT_CNT (0x15ull) /* [CN10K, .) */ 501 #define RPM_MTI_STAT_RX_1519_MAX_PKT_CNT (0x16ull) /* [CN10K, .) */ 502 #define RPM_MTI_STAT_RX_OVER_SIZE (0x17ull) /* [CN10K, .) */ 503 #define RPM_MTI_STAT_RX_JABBER (0x18ull) /* [CN10K, .) */ 504 #define RPM_MTI_STAT_RX_ETH_FRAGS (0x19ull) /* [CN10K, .) */ 505 #define RPM_MTI_STAT_RX_CBFC_CLASS_0 (0x1aull) /* [CN10K, .) */ 506 #define RPM_MTI_STAT_RX_CBFC_CLASS_1 (0x1bull) /* [CN10K, .) */ 507 #define RPM_MTI_STAT_RX_CBFC_CLASS_2 (0x1cull) /* [CN10K, .) */ 508 #define RPM_MTI_STAT_RX_CBFC_CLASS_3 (0x1dull) /* [CN10K, .) */ 509 #define RPM_MTI_STAT_RX_CBFC_CLASS_4 (0x1eull) /* [CN10K, .) */ 510 #define RPM_MTI_STAT_RX_CBFC_CLASS_5 (0x1full) /* [CN10K, .) */ 511 #define RPM_MTI_STAT_RX_CBFC_CLASS_6 (0x20ull) /* [CN10K, .) */ 512 #define RPM_MTI_STAT_RX_CBFC_CLASS_7 (0x21ull) /* [CN10K, .) */ 513 #define RPM_MTI_STAT_RX_CBFC_CLASS_8 (0x22ull) /* [CN10K, .) */ 514 #define RPM_MTI_STAT_RX_CBFC_CLASS_9 (0x23ull) /* [CN10K, .) */ 515 #define RPM_MTI_STAT_RX_CBFC_CLASS_10 (0x24ull) /* [CN10K, .) */ 516 #define RPM_MTI_STAT_RX_CBFC_CLASS_11 (0x25ull) /* [CN10K, .) */ 517 #define RPM_MTI_STAT_RX_CBFC_CLASS_12 (0x26ull) /* [CN10K, .) */ 518 #define RPM_MTI_STAT_RX_CBFC_CLASS_13 (0x27ull) /* [CN10K, .) */ 519 #define RPM_MTI_STAT_RX_CBFC_CLASS_14 (0x28ull) /* [CN10K, .) */ 520 #define RPM_MTI_STAT_RX_CBFC_CLASS_15 (0x29ull) /* [CN10K, .) */ 521 #define RPM_MTI_STAT_RX_MAC_CONTROL (0x2aull) /* [CN10K, .) */ 522 523 #define RPM_MTI_STAT_TX_OCT_CNT (0x0ull) /* [CN10K, .) */ 524 #define RPM_MTI_STAT_TX_OCT_TX_OK (0x1ull) /* [CN10K, .) */ 525 #define RPM_MTI_STAT_TX_PAUSE_MAC_CTRL (0x2ull) /* [CN10K, .) */ 526 #define RPM_MTI_STAT_TX_FRAMES_OK (0x3ull) /* [CN10K, .) */ 527 #define RPM_MTI_STAT_TX_VLAN_OK (0x4ull) /* [CN10K, .) */ 528 #define RPM_MTI_STAT_TX_OUT_ERR (0x5ull) /* [CN10K, .) */ 529 #define RPM_MTI_STAT_TX_UCAST_PKT_CNT (0x6ull) /* [CN10K, .) */ 530 #define RPM_MTI_STAT_TX_MCAST_PKT_CNT (0x7ull) /* [CN10K, .) */ 531 #define RPM_MTI_STAT_TX_BCAST_PKT_CNT (0x8ull) /* [CN10K, .) */ 532 #define RPM_MTI_STAT_TX_1_64_PKT_CNT (0x9ull) /* [CN10K, .) */ 533 #define RPM_MTI_STAT_TX_65_127_PKT_CNT (0xaull) /* [CN10K, .) */ 534 #define RPM_MTI_STAT_TX_128_255_PKT_CNT (0xbull) /* [CN10K, .) */ 535 #define RPM_MTI_STAT_TX_256_511_PKT_CNT (0xcull) /* [CN10K, .) */ 536 #define RPM_MTI_STAT_TX_512_1023_PKT_CNT (0xdull) /* [CN10K, .) */ 537 #define RPM_MTI_STAT_TX_1024_1518_PKT_CNT (0xeull) /* [CN10K, .) */ 538 #define RPM_MTI_STAT_TX_1519_MAX_PKT_CNT (0xfull) /* [CN10K, .) */ 539 #define RPM_MTI_STAT_TX_CBFC_CLASS_0 (0x10ull) /* [CN10K, .) */ 540 #define RPM_MTI_STAT_TX_CBFC_CLASS_1 (0x11ull) /* [CN10K, .) */ 541 #define RPM_MTI_STAT_TX_CBFC_CLASS_2 (0x12ull) /* [CN10K, .) */ 542 #define RPM_MTI_STAT_TX_CBFC_CLASS_3 (0x13ull) /* [CN10K, .) */ 543 #define RPM_MTI_STAT_TX_CBFC_CLASS_4 (0x14ull) /* [CN10K, .) */ 544 #define RPM_MTI_STAT_TX_CBFC_CLASS_5 (0x15ull) /* [CN10K, .) */ 545 #define RPM_MTI_STAT_TX_CBFC_CLASS_6 (0x16ull) /* [CN10K, .) */ 546 #define RPM_MTI_STAT_TX_CBFC_CLASS_7 (0x17ull) /* [CN10K, .) */ 547 #define RPM_MTI_STAT_TX_CBFC_CLASS_8 (0x18ull) /* [CN10K, .) */ 548 #define RPM_MTI_STAT_TX_CBFC_CLASS_9 (0x19ull) /* [CN10K, .) */ 549 #define RPM_MTI_STAT_TX_CBFC_CLASS_10 (0x1aull) /* [CN10K, .) */ 550 #define RPM_MTI_STAT_TX_CBFC_CLASS_11 (0x1bull) /* [CN10K, .) */ 551 #define RPM_MTI_STAT_TX_CBFC_CLASS_12 (0x1cull) /* [CN10K, .) */ 552 #define RPM_MTI_STAT_TX_CBFC_CLASS_13 (0x1dull) /* [CN10K, .) */ 553 #define RPM_MTI_STAT_TX_CBFC_CLASS_14 (0x1eull) /* [CN10K, .) */ 554 #define RPM_MTI_STAT_TX_CBFC_CLASS_15 (0x1full) /* [CN10K, .) */ 555 #define RPM_MTI_STAT_TX_MAC_CONTROL_FRAMES (0x20ull) /* [CN10K, .) */ 556 #define RPM_MTI_STAT_TX_PKT_CNT (0x21ull) /* [CN10K, .) */ 557 558 #define NIX_SQOPERR_SQ_OOR (0x0ull) 559 #define NIX_SQOPERR_SQ_CTX_FAULT (0x1ull) 560 #define NIX_SQOPERR_SQ_CTX_POISON (0x2ull) 561 #define NIX_SQOPERR_SQ_DISABLED (0x3ull) 562 #define NIX_SQOPERR_MAX_SQE_SIZE_ERR (0x4ull) 563 #define NIX_SQOPERR_SQE_OFLOW (0x5ull) 564 #define NIX_SQOPERR_SQB_NULL (0x6ull) 565 #define NIX_SQOPERR_SQB_FAULT (0x7ull) 566 #define NIX_SQOPERR_SQE_SIZEM1_ZERO (0x8ull) /* [CN10K, .) */ 567 568 #define NIX_SQINT_LMT_ERR (0x0ull) 569 #define NIX_SQINT_MNQ_ERR (0x1ull) 570 #define NIX_SQINT_SEND_ERR (0x2ull) 571 #define NIX_SQINT_SQB_ALLOC_FAIL (0x3ull) 572 573 #define NIX_SEND_STATUS_GOOD (0x0ull) 574 #define NIX_SEND_STATUS_SQ_CTX_FAULT (0x1ull) 575 #define NIX_SEND_STATUS_SQ_CTX_POISON (0x2ull) 576 #define NIX_SEND_STATUS_SQB_FAULT (0x3ull) 577 #define NIX_SEND_STATUS_SQB_POISON (0x4ull) 578 #define NIX_SEND_STATUS_SEND_HDR_ERR (0x5ull) 579 #define NIX_SEND_STATUS_SEND_EXT_ERR (0x6ull) 580 #define NIX_SEND_STATUS_JUMP_FAULT (0x7ull) 581 #define NIX_SEND_STATUS_JUMP_POISON (0x8ull) 582 #define NIX_SEND_STATUS_SEND_CRC_ERR (0x10ull) 583 #define NIX_SEND_STATUS_SEND_IMM_ERR (0x11ull) 584 #define NIX_SEND_STATUS_SEND_SG_ERR (0x12ull) 585 #define NIX_SEND_STATUS_SEND_MEM_ERR (0x13ull) 586 #define NIX_SEND_STATUS_INVALID_SUBDC (0x14ull) 587 #define NIX_SEND_STATUS_SUBDC_ORDER_ERR (0x15ull) 588 #define NIX_SEND_STATUS_DATA_FAULT (0x16ull) 589 #define NIX_SEND_STATUS_DATA_POISON (0x17ull) 590 #define NIX_SEND_STATUS_NPC_DROP_ACTION (0x20ull) 591 #define NIX_SEND_STATUS_LOCK_VIOL (0x21ull) 592 #define NIX_SEND_STATUS_NPC_UCAST_CHAN_ERR (0x22ull) 593 #define NIX_SEND_STATUS_NPC_MCAST_CHAN_ERR (0x23ull) 594 #define NIX_SEND_STATUS_NPC_MCAST_ABORT (0x24ull) 595 #define NIX_SEND_STATUS_NPC_VTAG_PTR_ERR (0x25ull) 596 #define NIX_SEND_STATUS_NPC_VTAG_SIZE_ERR (0x26ull) 597 #define NIX_SEND_STATUS_SEND_MEM_FAULT (0x27ull) 598 #define NIX_SEND_STATUS_SEND_STATS_ERR (0x28ull) 599 #define NIX_SEND_STATUS_SEND_HDR_DROP (0x29ull) /* [CN20K, .) */ 600 601 #define NIX_SENDSTATSALG_NOP (0x0ull) 602 #define NIX_SENDSTATSALG_ADD_PKT_CNT (0x1ull) 603 #define NIX_SENDSTATSALG_ADD_BYTE_CNT (0x2ull) 604 #define NIX_SENDSTATSALG_ADD_PKT_BYTE_CNT (0x3ull) 605 #define NIX_SENDSTATSALG_UPDATE_PKT_CNT_ON_DROP (0x4ull) 606 #define NIX_SENDSTATSALG_UPDATE_BYTE_CNT_ON_DROP (0x5ull) 607 #define NIX_SENDSTATSALG_UPDATE_PKT_BYTE_CNT_ON_DROP (0x6ull) 608 609 #define NIX_SENDMEMDSZ_B64 (0x0ull) 610 #define NIX_SENDMEMDSZ_B32 (0x1ull) 611 #define NIX_SENDMEMDSZ_B16 (0x2ull) 612 #define NIX_SENDMEMDSZ_B8 (0x3ull) 613 614 #define NIX_SENDMEMALG_SET (0x0ull) 615 #define NIX_SENDMEMALG_SETTSTMP (0x1ull) 616 #define NIX_SENDMEMALG_SETRSLT (0x2ull) 617 #define NIX_SENDMEMALG_ADD (0x8ull) 618 #define NIX_SENDMEMALG_SUB (0x9ull) 619 #define NIX_SENDMEMALG_ADDLEN (0xaull) 620 #define NIX_SENDMEMALG_SUBLEN (0xbull) 621 #define NIX_SENDMEMALG_ADDMBUF (0xcull) 622 #define NIX_SENDMEMALG_SUBMBUF (0xdull) 623 624 #define NIX_SUBDC_NOP (0x0ull) 625 #define NIX_SUBDC_EXT (0x1ull) 626 #define NIX_SUBDC_CRC (0x2ull) 627 #define NIX_SUBDC_IMM (0x3ull) 628 #define NIX_SUBDC_SG (0x4ull) 629 #define NIX_SUBDC_MEM (0x5ull) 630 #define NIX_SUBDC_JUMP (0x6ull) 631 #define NIX_SUBDC_WORK (0x7ull) 632 #define NIX_SUBDC_SG2 (0x8ull) /* [CN10K, .) */ 633 #define NIX_SUBDC_AGE_AND_STATS (0x9ull) /* [CN10K, .) */ 634 #define NIX_SUBDC_COMPID (0xaull) /* [CN20K, .) */ 635 #define NIX_SUBDC_SOD (0xfull) 636 637 #define NIX_STYPE_STF (0x0ull) 638 #define NIX_STYPE_STT (0x1ull) 639 #define NIX_STYPE_STP (0x2ull) 640 641 #define NIX_RX_ACTIONOP_DROP (0x0ull) 642 #define NIX_RX_ACTIONOP_UCAST (0x1ull) 643 #define NIX_RX_ACTIONOP_UCAST_IPSEC (0x2ull) 644 #define NIX_RX_ACTIONOP_MCAST (0x3ull) 645 #define NIX_RX_ACTIONOP_RSS (0x4ull) 646 #define NIX_RX_ACTIONOP_PF_FUNC_DROP (0x5ull) 647 #define NIX_RX_ACTIONOP_MIRROR (0x6ull) 648 #define NIX_RX_ACTIONOP_DEFAULT (0xfull) 649 650 #define NIX_RX_VTAGACTION_VTAG0_RELPTR (0x0ull) 651 #define NIX_RX_VTAGACTION_VTAG1_RELPTR (0x4ull) 652 #define NIX_RX_VTAGACTION_VTAG_VALID (0x1ull) 653 #define NIX_TX_VTAGACTION_VTAG0_RELPTR (sizeof(struct nix_inst_hdr_s) + 2 * 6) 654 #define NIX_TX_VTAGACTION_VTAG1_RELPTR \ 655 (sizeof(struct nix_inst_hdr_s) + 2 * 6 + 4) 656 #define NIX_RQINT_DROP (0x0ull) 657 #define NIX_RQINT_RED (0x1ull) 658 #define NIX_RQINT_R2 (0x2ull) 659 #define NIX_RQINT_R3 (0x3ull) 660 #define NIX_RQINT_R4 (0x4ull) 661 #define NIX_RQINT_R5 (0x5ull) 662 #define NIX_RQINT_R6 (0x6ull) 663 #define NIX_RQINT_R7 (0x7ull) 664 665 #define NIX_MAXSQESZ_W16 (0x0ull) 666 #define NIX_MAXSQESZ_W8 (0x1ull) 667 668 #define NIX_LSOALG_NOP (0x0ull) 669 #define NIX_LSOALG_ADD_SEGNUM (0x1ull) 670 #define NIX_LSOALG_ADD_PAYLEN (0x2ull) 671 #define NIX_LSOALG_ADD_OFFSET (0x3ull) 672 #define NIX_LSOALG_TCP_FLAGS (0x4ull) 673 #define NIX_LSOALG_ALT_FLAGS (0x5ull) /* [CN20K, .) */ 674 675 #define NIX_METER_CFG_RFC_2698 (0x0ull) /* [CN20K, .) */ 676 #define NIX_METER_CFG_RFC_2697 (0x1ull) /* [CN20K, .) */ 677 #define NIX_METER_CFG_RFC_4115 (0x2ull) /* [CN20K, .) */ 678 679 #define NIX_NDC_RX_PORT_AQ (0x0ull) 680 #define NIX_NDC_RX_PORT_C (0x1ull) 681 #define NIX_NDC_RX_PORT_CINT (0x2ull) 682 #define NIX_NDC_RX_PORT_MC (0x3ull) 683 #define NIX_NDC_RX_PORT_PKT (0x4ull) 684 #define NIX_NDC_RX_PORT_RQ (0x5ull) 685 686 #define NIX_MNQERR_SQ_CTX_FAULT (0x0ull) 687 #define NIX_MNQERR_SQ_CTX_POISON (0x1ull) 688 #define NIX_MNQERR_SQB_FAULT (0x2ull) 689 #define NIX_MNQERR_SQB_POISON (0x3ull) 690 #define NIX_MNQERR_TOTAL_ERR (0x4ull) 691 #define NIX_MNQERR_LSO_ERR (0x5ull) 692 #define NIX_MNQERR_CQ_QUERY_ERR (0x6ull) 693 #define NIX_MNQERR_MAX_SQE_SIZE_ERR (0x7ull) 694 #define NIX_MNQERR_MAXLEN_ERR (0x8ull) 695 #define NIX_MNQERR_SQE_SIZEM1_ZERO (0x9ull) 696 697 #define NIX_MDTYPE_RSVD (0x0ull) 698 #define NIX_MDTYPE_FLUSH (0x1ull) 699 #define NIX_MDTYPE_PMD (0x2ull) 700 701 #define NIX_NDC_TX_PORT_LMT (0x0ull) 702 #define NIX_NDC_TX_PORT_ENQ (0x1ull) 703 #define NIX_NDC_TX_PORT_MNQ (0x2ull) 704 #define NIX_NDC_TX_PORT_DEQ (0x3ull) 705 #define NIX_NDC_TX_PORT_DMA (0x4ull) 706 #define NIX_NDC_TX_PORT_XQE (0x5ull) 707 708 #define NIX_NDC_RX_PORT_AQ (0x0ull) 709 #define NIX_NDC_RX_PORT_CQ (0x1ull) 710 #define NIX_NDC_RX_PORT_CINT (0x2ull) 711 #define NIX_NDC_RX_PORT_MC (0x3ull) 712 #define NIX_NDC_RX_PORT_PKT (0x4ull) 713 #define NIX_NDC_RX_PORT_RQ (0x5ull) 714 715 #define NIX_RE_OPCODE_RE_NONE (0x0ull) 716 #define NIX_RE_OPCODE_RE_PARTIAL (0x1ull) 717 #define NIX_RE_OPCODE_RE_JABBER (0x2ull) 718 #define NIX_RE_OPCODE_RE_FCS (0x7ull) 719 #define NIX_RE_OPCODE_RE_FCS_RCV (0x8ull) 720 #define NIX_RE_OPCODE_RE_TERMINATE (0x9ull) 721 #define NIX_RE_OPCODE_RE_RX_CTL (0xbull) 722 #define NIX_RE_OPCODE_RE_SKIP (0xcull) 723 #define NIX_RE_OPCODE_RE_DMAPKT (0xfull) 724 #define NIX_RE_OPCODE_UNDERSIZE (0x10ull) 725 #define NIX_RE_OPCODE_OVERSIZE (0x11ull) 726 #define NIX_RE_OPCODE_OL2_LENMISM (0x12ull) 727 728 #define NIX_REDALG_STD (0x0ull) 729 #define NIX_REDALG_SEND (0x1ull) 730 #define NIX_REDALG_STALL (0x2ull) 731 #define NIX_REDALG_DISCARD (0x3ull) 732 733 #define NIX_RX_BAND_PROF_ACTIONRESULT_PASS (0x0ull) /* [CN10K, .) */ 734 #define NIX_RX_BAND_PROF_ACTIONRESULT_DROP (0x1ull) /* [CN10K, .) */ 735 #define NIX_RX_BAND_PROF_ACTIONRESULT_RED (0x2ull) /* [CN10K, .) */ 736 737 #define NIX_RX_BAND_PROF_LAYER_LEAF (0x0ull) /* [CN10K, .) */ 738 #define NIX_RX_BAND_PROF_LAYER_INVALID (0x1ull) /* [CN10K, .) */ 739 #define NIX_RX_BAND_PROF_LAYER_MIDDLE (0x2ull) /* [CN10K, .) */ 740 #define NIX_RX_BAND_PROF_LAYER_TOP (0x3ull) /* [CN10K, .) */ 741 #define NIX_RX_BAND_PROF_LAYER_MAX (0x4ull) /* [CN10K, .) */ 742 743 #define NIX_RX_BAND_PROF_PC_MODE_VLAN (0x0ull) /* [CN10K, .) */ 744 #define NIX_RX_BAND_PROF_PC_MODE_DSCP (0x1ull) /* [CN10K, .) */ 745 #define NIX_RX_BAND_PROF_PC_MODE_GEN (0x2ull) /* [CN10K, .) */ 746 #define NIX_RX_BAND_PROF_PC_MODE_RSVD (0x3ull) /* [CN10K, .) */ 747 748 #define NIX_RX_COLORRESULT_GREEN (0x0ull) /* [CN10K, .) */ 749 #define NIX_RX_COLORRESULT_YELLOW (0x1ull) /* [CN10K, .) */ 750 #define NIX_RX_COLORRESULT_RED (0x2ull) /* [CN10K, .) */ 751 752 #define NIX_RX_MCOP_RQ (0x0ull) 753 #define NIX_RX_MCOP_RSS (0x1ull) 754 755 #define NIX_RX_PERRCODE_NPC_RESULT_ERR (0x2ull) 756 #define NIX_RX_PERRCODE_MCAST_FAULT (0x4ull) 757 #define NIX_RX_PERRCODE_MIRROR_FAULT (0x5ull) 758 #define NIX_RX_PERRCODE_MCAST_POISON (0x6ull) 759 #define NIX_RX_PERRCODE_MIRROR_POISON (0x7ull) 760 #define NIX_RX_PERRCODE_DATA_FAULT (0x8ull) 761 #define NIX_RX_PERRCODE_MEMOUT (0x9ull) 762 #define NIX_RX_PERRCODE_BUFS_OFLOW (0xaull) 763 #define NIX_RX_PERRCODE_OL3_LEN (0x10ull) 764 #define NIX_RX_PERRCODE_OL4_LEN (0x11ull) 765 #define NIX_RX_PERRCODE_OL4_CHK (0x12ull) 766 #define NIX_RX_PERRCODE_OL4_PORT (0x13ull) 767 #define NIX_RX_PERRCODE_IL3_LEN (0x20ull) 768 #define NIX_RX_PERRCODE_IL4_LEN (0x21ull) 769 #define NIX_RX_PERRCODE_IL4_CHK (0x22ull) 770 #define NIX_RX_PERRCODE_IL4_PORT (0x23ull) 771 772 #define NIX_SA_ALG_NON_MS (0x0ull) /* [CN10K, .) */ 773 #define NIX_SA_ALG_MS_31_28 (0x1ull) /* [CN10K, .) */ 774 #define NIX_SA_ALG_MS_27_25 (0x2ull) /* [CN10K, .) */ 775 #define NIX_SA_ALG_MS_28_25 (0x3ull) /* [CN10K, .) */ 776 777 #define NIX_SENDCRCALG_CRC32 (0x0ull) 778 #define NIX_SENDCRCALG_CRC32C (0x1ull) 779 #define NIX_SENDCRCALG_ONES16 (0x2ull) 780 #define NIX_SENDCRCALG_INVCRC (0x3ull) /* [CN10K, .) */ 781 782 #define NIX_SENDL3TYPE_NONE (0x0ull) 783 #define NIX_SENDL3TYPE_IP4 (0x2ull) 784 #define NIX_SENDL3TYPE_IP4_CKSUM (0x3ull) 785 #define NIX_SENDL3TYPE_IP6 (0x4ull) 786 787 #define NIX_SENDL4TYPE_NONE (0x0ull) 788 #define NIX_SENDL4TYPE_TCP_CKSUM (0x1ull) 789 #define NIX_SENDL4TYPE_SCTP_CKSUM (0x2ull) 790 #define NIX_SENDL4TYPE_UDP_CKSUM (0x3ull) 791 792 #define NIX_SENDLDTYPE_LDD (0x0ull) 793 #define NIX_SENDLDTYPE_LDT (0x1ull) 794 #define NIX_SENDLDTYPE_LDWB (0x2ull) 795 796 #define NIX_XQESZ_W64 (0x0ull) 797 #define NIX_XQESZ_W16 (0x1ull) 798 799 #define NIX_XQE_TYPE_INVALID (0x0ull) 800 #define NIX_XQE_TYPE_RX (0x1ull) 801 #define NIX_XQE_TYPE_RX_IPSECS (0x2ull) 802 #define NIX_XQE_TYPE_RX_IPSECH (0x3ull) 803 #define NIX_XQE_TYPE_RX_IPSECD (0x4ull) 804 #define NIX_XQE_TYPE_RX_VWQE (0x5ull) /* [CN10K, CN20K) */ 805 #define NIX_XQE_TYPE_RES_6 (0x6ull) 806 #define NIX_XQE_TYPE_RES_7 (0x7ull) 807 #define NIX_XQE_TYPE_SEND (0x8ull) 808 #define NIX_XQE_TYPE_RES_9 (0x9ull) 809 #define NIX_XQE_TYPE_RES_A (0xAull) 810 #define NIX_XQE_TYPE_RES_B (0xBull) 811 #define NIX_XQE_TYPE_RES_C (0xCull) 812 #define NIX_XQE_TYPE_RES_D (0xDull) 813 #define NIX_XQE_TYPE_RES_E (0xEull) 814 #define NIX_XQE_TYPE_RES_F (0xFull) 815 816 #define NIX_TX_VTAGOP_NOP (0x0ull) 817 #define NIX_TX_VTAGOP_INSERT (0x1ull) 818 #define NIX_TX_VTAGOP_REPLACE (0x2ull) 819 820 #define NIX_VTAGSIZE_T4 (0x0ull) 821 #define NIX_VTAGSIZE_T8 (0x1ull) 822 823 #define NIX_TXLAYER_OL3 (0x0ull) 824 #define NIX_TXLAYER_OL4 (0x1ull) 825 #define NIX_TXLAYER_IL3 (0x2ull) 826 #define NIX_TXLAYER_IL4 (0x3ull) 827 828 #define NIX_TX_ACTIONOP_DROP (0x0ull) 829 #define NIX_TX_ACTIONOP_UCAST_DEFAULT (0x1ull) 830 #define NIX_TX_ACTIONOP_UCAST_CHAN (0x2ull) 831 #define NIX_TX_ACTIONOP_MCAST (0x3ull) 832 #define NIX_TX_ACTIONOP_DROP_VIOL (0x5ull) 833 834 #define NIX_AQ_COMP_NOTDONE (0x0ull) 835 #define NIX_AQ_COMP_GOOD (0x1ull) 836 #define NIX_AQ_COMP_SWERR (0x2ull) 837 #define NIX_AQ_COMP_CTX_POISON (0x3ull) 838 #define NIX_AQ_COMP_CTX_FAULT (0x4ull) 839 #define NIX_AQ_COMP_LOCKERR (0x5ull) 840 #define NIX_AQ_COMP_SQB_ALLOC_FAIL (0x6ull) 841 842 #define NIX_AF_INT_VEC_RVU (0x0ull) 843 #define NIX_AF_INT_VEC_GEN (0x1ull) 844 #define NIX_AF_INT_VEC_AQ_DONE (0x2ull) 845 #define NIX_AF_INT_VEC_AF_ERR (0x3ull) 846 #define NIX_AF_INT_VEC_POISON (0x4ull) 847 848 #define NIX_AQINT_GEN_RX_MCAST_DROP (0x0ull) 849 #define NIX_AQINT_GEN_RX_MIRROR_DROP (0x1ull) 850 #define NIX_AQINT_GEN_TL1_DRAIN (0x3ull) 851 #define NIX_AQINT_GEN_SMQ_FLUSH_DONE (0x4ull) 852 853 #define NIX_AQ_INSTOP_NOP (0x0ull) 854 #define NIX_AQ_INSTOP_INIT (0x1ull) 855 #define NIX_AQ_INSTOP_WRITE (0x2ull) 856 #define NIX_AQ_INSTOP_READ (0x3ull) 857 #define NIX_AQ_INSTOP_LOCK (0x4ull) 858 #define NIX_AQ_INSTOP_UNLOCK (0x5ull) 859 860 #define NIX_AQ_CTYPE_RQ (0x0ull) 861 #define NIX_AQ_CTYPE_SQ (0x1ull) 862 #define NIX_AQ_CTYPE_CQ (0x2ull) 863 #define NIX_AQ_CTYPE_MCE (0x3ull) 864 #define NIX_AQ_CTYPE_RSS (0x4ull) 865 #define NIX_AQ_CTYPE_DYNO (0x5ull) 866 #define NIX_AQ_CTYPE_BAND_PROF (0x6ull) /* [CN10K, .) */ 867 868 #define NIX_CQERRINT_DOOR_ERR (0x0ull) 869 #define NIX_CQERRINT_WR_FULL (0x1ull) 870 #define NIX_CQERRINT_CQE_FAULT (0x2ull) 871 #define NIX_CQERRINT_CPT_DROP (0x3ull) /* [CN10KB, .) */ 872 873 #define NIX_COLORRESULT_GREEN (0x0ull) 874 #define NIX_COLORRESULT_YELLOW (0x1ull) 875 #define NIX_COLORRESULT_RED_SEND (0x2ull) 876 #define NIX_COLORRESULT_RED_DROP (0x3ull) 877 878 #define NIX_CHAN_LBKX_CHX(a, b) \ 879 (0x000ull | ((uint64_t)(a) << 8) | (uint64_t)(b)) 880 #define NIX_CHAN_CPT_CH_END (0x4ffull) /* [CN10K, .) */ 881 #define NIX_CHAN_CPT_CH_START (0x800ull) /* [CN10K, .) */ 882 #define NIX_CHAN_R4 (0x400ull) /* [CN9K, CN10K) */ 883 #define NIX_CHAN_R5 (0x500ull) 884 #define NIX_CHAN_R6 (0x600ull) 885 #define NIX_CHAN_SDP_CH_END (0x7ffull) 886 #define NIX_CHAN_SDP_CH_START (0x700ull) 887 /* [CN9K, CN10K) */ 888 #define NIX_CHAN_CGXX_LMACX_CHX(a, b, c) \ 889 (0x800ull | ((uint64_t)(a) << 8) | ((uint64_t)(b) << 4) | (uint64_t)(c)) 890 /* [CN10K, .) */ 891 #define NIX_CHAN_RPMX_LMACX_CHX(a, b, c) \ 892 (0x800ull | ((uint64_t)(a) << 8) | ((uint64_t)(b) << 4) | (uint64_t)(c)) 893 894 #define NIX_INTF_SDP (0x4ull) 895 #define NIX_INTF_CGX0 (0x0ull) /* [CN9K, CN10K) */ 896 #define NIX_INTF_CGX1 (0x1ull) /* [CN9K, CN10K) */ 897 #define NIX_INTF_CGX2 (0x2ull) /* [CN9K, CN10K) */ 898 #define NIX_INTF_RPM0 (0x0ull) /* [CN10K, .) */ 899 #define NIX_INTF_RPM1 (0x1ull) /* [CN10K, .) */ 900 #define NIX_INTF_RPM2 (0x2ull) /* [CN10K, .) */ 901 #define NIX_INTF_LBK0 (0x3ull) 902 #define NIX_INTF_CPT0 (0x5ull) /* [CN10K, .) */ 903 904 #define NIX_LINK_SDP (0xdull) /* [CN10K, .) */ 905 #define NIX_LINK_CPT (0xeull) /* [CN10K, .) */ 906 #define NIX_LINK_MC (0xfull) /* [CN10K, .) */ 907 /* [CN10K, .) */ 908 #define NIX_LINK_RPMX_LMACX(a, b) \ 909 (0x00ull | ((uint64_t)(a) << 2) | (uint64_t)(b)) 910 #define NIX_LINK_LBK0 (0xcull) 911 912 #define NIX_LF_INT_VEC_GINT (0x80ull) 913 #define NIX_LF_INT_VEC_ERR_INT (0x81ull) 914 #define NIX_LF_INT_VEC_POISON (0x82ull) 915 #define NIX_LF_INT_VEC_QINT_END (0x3full) 916 #define NIX_LF_INT_VEC_QINT_START (0x0ull) 917 #define NIX_LF_INT_VEC_CINT_END (0x7full) 918 #define NIX_LF_INT_VEC_CINT_START (0x40ull) 919 920 #define NIX_INTF_RX (0x0ull) 921 #define NIX_INTF_TX (0x1ull) 922 923 /* Enums definitions */ 924 925 /* Structures definitions */ 926 927 /* NIX aging and send stats subdescriptor structure */ 928 struct nix_age_and_send_stats_s { 929 uint64_t threshold : 29; 930 uint64_t latency_drop : 1; 931 uint64_t aging : 1; 932 uint64_t coas_en : 1; 933 uint64_t ooffset : 12; 934 uint64_t ioffset : 12; 935 uint64_t sel : 1; 936 uint64_t alg : 3; 937 uint64_t subdc : 4; 938 uint64_t addr : 64; /* W1 */ 939 }; 940 941 /* NIX admin queue instruction structure */ 942 struct nix_aq_inst_s { 943 uint64_t op : 4; 944 uint64_t ctype : 4; 945 uint64_t lf : 9; 946 uint64_t rsvd_23_17 : 7; 947 uint64_t cindex : 20; 948 uint64_t rsvd_62_44 : 19; 949 uint64_t doneint : 1; 950 uint64_t res_addr : 64; /* W1 */ 951 }; 952 953 /* NIX admin queue result structure */ 954 struct nix_aq_res_s { 955 uint64_t op : 4; 956 uint64_t ctype : 4; 957 uint64_t compcode : 8; 958 uint64_t doneint : 1; 959 uint64_t rsvd_63_17 : 47; 960 uint64_t rsvd_127_64 : 64; /* W1 */ 961 }; 962 963 /* NIX bandwidth profile structure */ 964 struct nix_band_prof_s { 965 uint64_t pc_mode : 2; /* W0 */ 966 uint64_t icolor : 2; 967 uint64_t tnl_ena : 1; 968 uint64_t rsvd_7_5 : 3; 969 uint64_t peir_exponent : 5; 970 uint64_t rsvd_15_13 : 3; 971 uint64_t pebs_exponent : 5; 972 uint64_t rsvd_23_21 : 3; 973 uint64_t cir_exponent : 5; 974 uint64_t rsvd_31_29 : 3; 975 uint64_t cbs_exponent : 5; 976 uint64_t rsvd_39_37 : 3; 977 uint64_t peir_mantissa : 8; 978 uint64_t pebs_mantissa : 8; 979 uint64_t cir_mantissa : 8; 980 uint64_t cbs_mantissa : 8; /* W1 */ 981 uint64_t lmode : 1; 982 uint64_t l_sellect : 3; 983 uint64_t rdiv : 4; 984 uint64_t adjust_exponent : 5; 985 uint64_t rsvd_86_85 : 2; 986 uint64_t adjust_mantissa : 9; 987 uint64_t gc_action : 2; 988 uint64_t yc_action : 2; 989 uint64_t rc_action : 2; 990 uint64_t meter_algo : 2; 991 uint64_t band_prof_id : 11; 992 uint64_t rsvd_118_115 : 4; 993 uint64_t hl_en : 1; 994 uint64_t rsvd_127_120 : 8; 995 uint64_t ts : 48; /* W2 */ 996 uint64_t rsvd_191_176 : 16; 997 uint64_t pe_accum : 32; /* W3 */ 998 uint64_t c_accum : 32; 999 uint64_t green_pkt_pass : 48; /* W4 */ 1000 uint64_t rsvd_319_304 : 16; 1001 uint64_t yellow_pkt_pass : 48; /* W5 */ 1002 uint64_t rsvd_383_368 : 16; 1003 uint64_t red_pkt_pass : 48; /* W6 */ 1004 uint64_t rsvd_447_432 : 16; 1005 uint64_t green_octs_pass : 48; /* W7 */ 1006 uint64_t rsvd_511_496 : 16; 1007 uint64_t yellow_octs_pass : 48; /* W8 */ 1008 uint64_t rsvd_575_560 : 16; 1009 uint64_t red_octs_pass : 48; /* W9 */ 1010 uint64_t rsvd_639_624 : 16; 1011 uint64_t green_pkt_drop : 48; /* W10 */ 1012 uint64_t rsvd_703_688 : 16; 1013 uint64_t yellow_pkt_drop : 48; /* W11 */ 1014 uint64_t rsvd_767_752 : 16; 1015 uint64_t red_pkt_drop : 48; /* W12 */ 1016 uint64_t rsvd_831_816 : 16; 1017 uint64_t green_octs_drop : 48; /* W13 */ 1018 uint64_t rsvd_895_880 : 16; 1019 uint64_t yellow_octs_drop : 48; /* W14 */ 1020 uint64_t rsvd_959_944 : 16; 1021 uint64_t red_octs_drop : 48; /* W15 */ 1022 uint64_t rsvd_1023_1008 : 16; 1023 }; 1024 1025 /* NIX completion interrupt context hardware structure */ 1026 struct nix_cint_hw_s { 1027 uint64_t ecount : 32; 1028 uint64_t qcount : 16; 1029 uint64_t intr : 1; 1030 uint64_t ena : 1; 1031 uint64_t timer_idx : 8; 1032 uint64_t rsvd_63_58 : 6; 1033 uint64_t ecount_wait : 32; 1034 uint64_t qcount_wait : 16; 1035 uint64_t time_wait : 8; 1036 uint64_t rsvd_127_120 : 8; 1037 }; 1038 1039 /* NIX completion queue entry header structure */ 1040 struct nix_cqe_hdr_s { 1041 uint64_t tag : 32; 1042 uint64_t q : 20; 1043 uint64_t long_send_comp : 1; 1044 uint64_t rsvd_57_53 : 5; 1045 uint64_t node : 2; 1046 uint64_t cqe_type : 4; 1047 }; 1048 1049 /* [CN20K, .) NIX Completion queue context structure */ 1050 struct nix_cn20k_cq_ctx_s { 1051 uint64_t base : 64; /* W0 */ 1052 uint64_t lbp_ena : 1; /* W1 */ 1053 uint64_t lbpid_low : 3; 1054 uint64_t bp_ena : 1; 1055 uint64_t lbpid_med : 3; 1056 uint64_t bpid : 9; 1057 uint64_t lbpid_high : 3; 1058 uint64_t qint_idx : 7; 1059 uint64_t cq_err : 1; 1060 uint64_t cint_idx : 7; 1061 uint64_t avg_con : 9; 1062 uint64_t wrptr : 20; 1063 uint64_t tail : 20; /* W2 */ 1064 uint64_t head : 20; 1065 uint64_t avg_level : 8; 1066 uint64_t update_time : 16; 1067 uint64_t bp : 8; /* W3 */ 1068 uint64_t drop : 8; 1069 uint64_t drop_ena : 1; 1070 uint64_t ena : 1; 1071 uint64_t cpt_drop_err_en : 1; 1072 uint64_t reserved_211_211 : 1; 1073 uint64_t msh_dst : 11; 1074 uint64_t msh_valid : 1; 1075 uint64_t stash_thresh : 4; 1076 uint64_t lbp_frac : 4; 1077 uint64_t caching : 1; 1078 uint64_t stashing : 1; 1079 uint64_t reserved_234_235 : 2; 1080 uint64_t qsize : 4; 1081 uint64_t cq_err_int : 8; 1082 uint64_t cq_err_int_ena : 8; 1083 uint64_t bpid_ext : 2; /* W4 */ 1084 uint64_t reserved_258_259 : 2; 1085 uint64_t lbpid_ext : 2; 1086 uint64_t reserved_262_319 : 58; 1087 uint64_t reserved_320_383 : 64; /* W5 */ 1088 uint64_t reserved_384_447 : 64; /* W6 */ 1089 uint64_t reserved_448_511 : 64; /* W7 */ 1090 }; 1091 1092 /* NIX completion queue context structure */ 1093 struct nix_cq_ctx_s { 1094 uint64_t base : 64; /* W0 */ 1095 uint64_t lbp_ena : 1; 1096 uint64_t lbpid_low : 3; 1097 uint64_t bp_ena : 1; 1098 uint64_t lbpid_med : 3; 1099 uint64_t bpid : 9; 1100 uint64_t lbpid_high : 3; 1101 uint64_t qint_idx : 7; 1102 uint64_t cq_err : 1; 1103 uint64_t cint_idx : 7; 1104 uint64_t avg_con : 9; 1105 uint64_t wrptr : 20; 1106 uint64_t tail : 20; 1107 uint64_t head : 20; 1108 uint64_t avg_level : 8; 1109 uint64_t update_time : 16; 1110 uint64_t bp : 8; 1111 uint64_t drop : 8; 1112 uint64_t drop_ena : 1; 1113 uint64_t ena : 1; 1114 uint64_t cpt_drop_err_en : 1; 1115 uint64_t rsvd_211 : 1; 1116 uint64_t substream : 12; 1117 uint64_t stash_thresh : 4; 1118 uint64_t lbp_frac : 4; 1119 uint64_t caching : 1; 1120 uint64_t stashing : 1; 1121 uint64_t rsvd_235_234 : 2; 1122 uint64_t qsize : 4; 1123 uint64_t cq_err_int : 8; 1124 uint64_t cq_err_int_ena : 8; 1125 }; 1126 1127 /* NIX instruction header structure */ 1128 struct nix_inst_hdr_s { 1129 uint64_t pf_func : 16; 1130 uint64_t sq : 20; 1131 uint64_t rsvd_63_36 : 28; 1132 }; 1133 1134 /* NIX i/o virtual address structure */ 1135 struct nix_iova_s { 1136 uint64_t addr : 64; /* W0 */ 1137 }; 1138 1139 /* NIX IPsec dynamic ordering counter structure */ 1140 struct nix_ipsec_dyno_s { 1141 uint32_t count : 32; /* W0 */ 1142 }; 1143 1144 /* NIX memory value structure */ 1145 struct nix_mem_result_s { 1146 uint64_t v : 1; 1147 uint64_t color : 2; 1148 uint64_t rsvd_63_3 : 61; 1149 }; 1150 1151 /* NIX statistics operation write data structure */ 1152 struct nix_op_q_wdata_s { 1153 uint64_t rsvd_31_0 : 32; 1154 uint64_t q : 20; 1155 uint64_t rsvd_63_52 : 12; 1156 }; 1157 1158 /* NIX queue interrupt context hardware structure */ 1159 struct nix_qint_hw_s { 1160 uint32_t count : 22; 1161 uint32_t rsvd_30_22 : 9; 1162 uint32_t ena : 1; 1163 }; 1164 1165 /* [CN20K, .) NIX receive queue context structure */ 1166 struct nix_cn20k_rq_ctx_hw_s { 1167 uint64_t ena : 1; /* W0 */ 1168 uint64_t sso_ena : 1; 1169 uint64_t ipsech_ena : 1; 1170 uint64_t ena_wqwd : 1; 1171 uint64_t cq : 20; 1172 uint64_t rsvd_34_24 : 11; 1173 uint64_t port_il4_dis : 1; 1174 uint64_t port_ol4_dis : 1; 1175 uint64_t lenerr_dis : 1; 1176 uint64_t csum_il4_dis : 1; 1177 uint64_t csum_ol4_dis : 1; 1178 uint64_t len_il4_dis : 1; 1179 uint64_t len_il3_dis : 1; 1180 uint64_t len_ol4_dis : 1; 1181 uint64_t len_ol3_dis : 1; 1182 uint64_t wqe_aura : 20; 1183 uint64_t spb_aura : 20; /* W1 */ 1184 uint64_t lpb_aura : 20; 1185 uint64_t sso_grp : 10; 1186 uint64_t sso_tt : 2; 1187 uint64_t pb_caching : 2; 1188 uint64_t wqe_caching : 1; 1189 uint64_t xqe_drop_ena : 1; 1190 uint64_t spb_drop_ena : 1; 1191 uint64_t lpb_drop_ena : 1; 1192 uint64_t pb_stashing : 1; 1193 uint64_t ipsecd_drop_en : 1; 1194 uint64_t chi_ena : 1; 1195 uint64_t rsvd_127_125 : 3; 1196 uint64_t band_prof_id_l : 10; /* W2 */ 1197 uint64_t sso_drop_ena : 1; 1198 uint64_t policer_ena : 1; 1199 uint64_t spb_sizem1 : 6; 1200 uint64_t wqe_skip : 2; 1201 uint64_t spb_high_sizem1 : 3; 1202 uint64_t spb_ena : 1; 1203 uint64_t lpb_sizem1 : 12; 1204 uint64_t first_skip : 7; 1205 uint64_t sso_bp_ena : 1; 1206 uint64_t later_skip : 6; 1207 uint64_t xqe_imm_size : 6; 1208 uint64_t band_prof_id_h : 4; 1209 uint64_t rsvd_189_188 : 2; 1210 uint64_t xqe_imm_copy : 1; 1211 uint64_t xqe_hdr_split : 1; 1212 uint64_t xqe_drop : 8; /* W3 */ 1213 uint64_t xqe_pass : 8; 1214 uint64_t wqe_pool_drop : 8; 1215 uint64_t wqe_pool_pass : 8; 1216 uint64_t spb_aura_drop : 8; 1217 uint64_t spb_aura_pass : 8; 1218 uint64_t spb_pool_drop : 8; 1219 uint64_t spb_pool_pass : 8; 1220 uint64_t lpb_aura_drop : 8; /* W4 */ 1221 uint64_t lpb_aura_pass : 8; 1222 uint64_t lpb_pool_drop : 8; 1223 uint64_t lpb_pool_pass : 8; 1224 uint64_t rsvd_319_288 : 32; 1225 uint64_t ltag : 24; /* W5 */ 1226 uint64_t good_utag : 8; 1227 uint64_t bad_utag : 8; 1228 uint64_t flow_tagw : 6; 1229 uint64_t rsvd_366 : 1; 1230 uint64_t rsvd_367 : 1; 1231 uint64_t rsvd_375_368 : 8; 1232 uint64_t rsvd_379_376 : 4; 1233 uint64_t rsvd_381_380 : 2; 1234 uint64_t rsvd_383_382 : 2; 1235 uint64_t octs : 48; /* W6 */ 1236 uint64_t rsvd_447_432 : 16; 1237 uint64_t pkts : 48; /* W7 */ 1238 uint64_t rsvd_511_496 : 16; 1239 uint64_t drop_octs : 48; /* W8 */ 1240 uint64_t rsvd_575_560 : 16; 1241 uint64_t drop_pkts : 48; /* W9 */ 1242 uint64_t rsvd_639_624 : 16; 1243 uint64_t re_pkts : 48; /* W10 */ 1244 uint64_t rsvd_702_688 : 15; 1245 uint64_t ena_copy : 1; 1246 uint64_t rsvd_739_704 : 36; /* W11 */ 1247 uint64_t rq_int : 8; 1248 uint64_t rq_int_ena : 8; 1249 uint64_t qint_idx : 7; 1250 uint64_t rsvd_767_763 : 5; 1251 uint64_t rsvd_831_768 : 64; /* W12 */ 1252 uint64_t rsvd_895_832 : 64; /* W13 */ 1253 uint64_t rsvd_959_896 : 64; /* W14 */ 1254 uint64_t rsvd_1023_960 : 64; /* W15 */ 1255 }; 1256 1257 /* [CN20K, .) NIX Receive queue context structure */ 1258 struct nix_cn20k_rq_ctx_s { 1259 uint64_t ena : 1; /* W0 */ 1260 uint64_t sso_ena : 1; 1261 uint64_t ipsech_ena : 1; 1262 uint64_t ena_wqwd : 1; 1263 uint64_t cq : 20; 1264 uint64_t reserved_24_34 : 11; 1265 uint64_t port_il4_dis : 1; 1266 uint64_t port_ol4_dis : 1; 1267 uint64_t lenerr_dis : 1; 1268 uint64_t csum_il4_dis : 1; 1269 uint64_t csum_ol4_dis : 1; 1270 uint64_t len_il4_dis : 1; 1271 uint64_t len_il3_dis : 1; 1272 uint64_t len_ol4_dis : 1; 1273 uint64_t len_ol3_dis : 1; 1274 uint64_t wqe_aura : 20; 1275 uint64_t spb_aura : 20; /* W1 */ 1276 uint64_t lpb_aura : 20; 1277 uint64_t sso_grp : 10; 1278 uint64_t sso_tt : 2; 1279 uint64_t pb_caching : 2; 1280 uint64_t wqe_caching : 1; 1281 uint64_t xqe_drop_ena : 1; 1282 uint64_t spb_drop_ena : 1; 1283 uint64_t lpb_drop_ena : 1; 1284 uint64_t pb_stashing : 1; 1285 uint64_t ipsecd_drop_en : 1; 1286 uint64_t chi_ena : 1; 1287 uint64_t reserved_125_127 : 3; 1288 uint64_t band_prof_id_l : 10; /* W2 */ 1289 uint64_t sso_fc_ena : 1; 1290 uint64_t policer_ena : 1; 1291 uint64_t spb_sizem1 : 6; 1292 uint64_t wqe_skip : 2; 1293 uint64_t spb_high_sizem1 : 3; 1294 uint64_t spb_ena : 1; 1295 uint64_t lpb_sizem1 : 12; 1296 uint64_t first_skip : 7; 1297 uint64_t sso_bp_ena : 1; 1298 uint64_t later_skip : 6; 1299 uint64_t xqe_imm_size : 6; 1300 uint64_t band_prof_id_h : 4; 1301 uint64_t reserved_188_189 : 2; 1302 uint64_t xqe_imm_copy : 1; 1303 uint64_t xqe_hdr_split : 1; 1304 uint64_t xqe_drop : 8; /* W3 */ 1305 uint64_t xqe_pass : 8; 1306 uint64_t wqe_pool_drop : 8; 1307 uint64_t wqe_pool_pass : 8; 1308 uint64_t spb_aura_drop : 8; 1309 uint64_t spb_aura_pass : 8; 1310 uint64_t spb_pool_drop : 8; 1311 uint64_t spb_pool_pass : 8; 1312 uint64_t lpb_aura_drop : 8; /* W4 */ 1313 uint64_t lpb_aura_pass : 8; 1314 uint64_t lpb_pool_drop : 8; 1315 uint64_t lpb_pool_pass : 8; 1316 uint64_t reserved_288_291 : 4; 1317 uint64_t rq_int : 8; 1318 uint64_t rq_int_ena : 8; 1319 uint64_t qint_idx : 7; 1320 uint64_t reserved_315_319 : 5; 1321 uint64_t ltag : 24; /* W5 */ 1322 uint64_t good_utag : 8; 1323 uint64_t bad_utag : 8; 1324 uint64_t flow_tagw : 6; 1325 uint64_t reserved_366_383 : 18; 1326 uint64_t octs : 48; /* W6 */ 1327 uint64_t reserved_432_447 : 16; 1328 uint64_t pkts : 48; /* W7 */ 1329 uint64_t reserved_496_511 : 16; 1330 uint64_t drop_octs : 48; /* W8 */ 1331 uint64_t reserved_560_575 : 16; 1332 uint64_t drop_pkts : 48; /* W9 */ 1333 uint64_t reserved_624_639 : 16; 1334 uint64_t re_pkts : 48; /* W10 */ 1335 uint64_t reserved_688_703 : 16; 1336 uint64_t reserved_704_767 : 64; /* W11 */ 1337 uint64_t reserved_768_831 : 64; /* W12 */ 1338 uint64_t reserved_832_895 : 64; /* W13 */ 1339 uint64_t reserved_896_959 : 64; /* W14 */ 1340 uint64_t reserved_960_1023 : 64; /* W15 */ 1341 }; 1342 1343 /* [CN10K, .) NIX receive queue context structure */ 1344 struct nix_cn10k_rq_ctx_hw_s { 1345 uint64_t ena : 1; 1346 uint64_t sso_ena : 1; 1347 uint64_t ipsech_ena : 1; 1348 uint64_t ena_wqwd : 1; 1349 uint64_t cq : 20; 1350 uint64_t rsvd_36_24 : 13; 1351 uint64_t lenerr_dis : 1; 1352 uint64_t csum_il4_dis : 1; 1353 uint64_t csum_ol4_dis : 1; 1354 uint64_t len_il4_dis : 1; 1355 uint64_t len_il3_dis : 1; 1356 uint64_t len_ol4_dis : 1; 1357 uint64_t len_ol3_dis : 1; 1358 uint64_t wqe_aura : 20; 1359 uint64_t spb_aura : 20; 1360 uint64_t lpb_aura : 20; 1361 uint64_t sso_grp : 10; 1362 uint64_t sso_tt : 2; 1363 uint64_t pb_caching : 2; 1364 uint64_t wqe_caching : 1; 1365 uint64_t xqe_drop_ena : 1; 1366 uint64_t spb_drop_ena : 1; 1367 uint64_t lpb_drop_ena : 1; 1368 uint64_t pb_stashing : 1; 1369 uint64_t ipsecd_drop_en : 1; 1370 uint64_t chi_ena : 1; 1371 uint64_t rsvd_127_125 : 3; 1372 uint64_t band_prof_id : 10; 1373 uint64_t rsvd_138 : 1; 1374 uint64_t policer_ena : 1; 1375 uint64_t spb_sizem1 : 6; 1376 uint64_t wqe_skip : 2; 1377 uint64_t spb_high_sizem1 : 3; 1378 uint64_t spb_ena : 1; 1379 uint64_t lpb_sizem1 : 12; 1380 uint64_t first_skip : 7; 1381 uint64_t rsvd_171 : 1; 1382 uint64_t later_skip : 6; 1383 uint64_t xqe_imm_size : 6; 1384 uint64_t rsvd_189_184 : 6; 1385 uint64_t xqe_imm_copy : 1; 1386 uint64_t xqe_hdr_split : 1; 1387 uint64_t xqe_drop : 8; 1388 uint64_t xqe_pass : 8; 1389 uint64_t wqe_pool_drop : 8; 1390 uint64_t wqe_pool_pass : 8; 1391 uint64_t spb_aura_drop : 8; 1392 uint64_t spb_aura_pass : 8; 1393 uint64_t spb_pool_drop : 8; 1394 uint64_t spb_pool_pass : 8; 1395 uint64_t lpb_aura_drop : 8; 1396 uint64_t lpb_aura_pass : 8; 1397 uint64_t lpb_pool_drop : 8; 1398 uint64_t lpb_pool_pass : 8; 1399 uint64_t rsvd_319_288 : 32; 1400 uint64_t ltag : 24; 1401 uint64_t good_utag : 8; 1402 uint64_t bad_utag : 8; 1403 uint64_t flow_tagw : 6; 1404 uint64_t ipsec_vwqe : 1; 1405 uint64_t vwqe_ena : 1; 1406 uint64_t vtime_wait : 8; 1407 uint64_t max_vsize_exp : 4; 1408 uint64_t vwqe_skip : 2; 1409 uint64_t rsvd_383_382 : 2; 1410 uint64_t octs : 48; 1411 uint64_t rsvd_447_432 : 16; 1412 uint64_t pkts : 48; 1413 uint64_t rsvd_511_496 : 16; 1414 uint64_t drop_octs : 48; 1415 uint64_t rsvd_575_560 : 16; 1416 uint64_t drop_pkts : 48; 1417 uint64_t rsvd_639_624 : 16; 1418 uint64_t re_pkts : 48; 1419 uint64_t rsvd_702_688 : 15; 1420 uint64_t ena_copy : 1; 1421 uint64_t rsvd_739_704 : 36; 1422 uint64_t rq_int : 8; 1423 uint64_t rq_int_ena : 8; 1424 uint64_t qint_idx : 7; 1425 uint64_t rsvd_767_763 : 5; 1426 uint64_t rsvd_831_768 : 64; /* W12 */ 1427 uint64_t rsvd_895_832 : 64; /* W13 */ 1428 uint64_t rsvd_959_896 : 64; /* W14 */ 1429 uint64_t rsvd_1023_960 : 64; /* W15 */ 1430 }; 1431 1432 /* NIX receive queue context structure */ 1433 struct nix_rq_ctx_hw_s { 1434 uint64_t ena : 1; 1435 uint64_t sso_ena : 1; 1436 uint64_t ipsech_ena : 1; 1437 uint64_t ena_wqwd : 1; 1438 uint64_t cq : 20; 1439 uint64_t substream : 20; 1440 uint64_t wqe_aura : 20; 1441 uint64_t spb_aura : 20; 1442 uint64_t lpb_aura : 20; 1443 uint64_t sso_grp : 10; 1444 uint64_t sso_tt : 2; 1445 uint64_t pb_caching : 2; 1446 uint64_t wqe_caching : 1; 1447 uint64_t xqe_drop_ena : 1; 1448 uint64_t spb_drop_ena : 1; 1449 uint64_t lpb_drop_ena : 1; 1450 uint64_t wqe_skip : 2; 1451 uint64_t rsvd_127_124 : 4; 1452 uint64_t rsvd_139_128 : 12; 1453 uint64_t spb_sizem1 : 6; 1454 uint64_t rsvd_150_146 : 5; 1455 uint64_t spb_ena : 1; 1456 uint64_t lpb_sizem1 : 12; 1457 uint64_t first_skip : 7; 1458 uint64_t rsvd_171 : 1; 1459 uint64_t later_skip : 6; 1460 uint64_t xqe_imm_size : 6; 1461 uint64_t rsvd_189_184 : 6; 1462 uint64_t xqe_imm_copy : 1; 1463 uint64_t xqe_hdr_split : 1; 1464 uint64_t xqe_drop : 8; 1465 uint64_t xqe_pass : 8; 1466 uint64_t wqe_pool_drop : 8; 1467 uint64_t wqe_pool_pass : 8; 1468 uint64_t spb_aura_drop : 8; 1469 uint64_t spb_aura_pass : 8; 1470 uint64_t spb_pool_drop : 8; 1471 uint64_t spb_pool_pass : 8; 1472 uint64_t lpb_aura_drop : 8; 1473 uint64_t lpb_aura_pass : 8; 1474 uint64_t lpb_pool_drop : 8; 1475 uint64_t lpb_pool_pass : 8; 1476 uint64_t rsvd_319_288 : 32; 1477 uint64_t ltag : 24; 1478 uint64_t good_utag : 8; 1479 uint64_t bad_utag : 8; 1480 uint64_t flow_tagw : 6; 1481 uint64_t rsvd_383_366 : 18; 1482 uint64_t octs : 48; 1483 uint64_t rsvd_447_432 : 16; 1484 uint64_t pkts : 48; 1485 uint64_t rsvd_511_496 : 16; 1486 uint64_t drop_octs : 48; 1487 uint64_t rsvd_575_560 : 16; 1488 uint64_t drop_pkts : 48; 1489 uint64_t rsvd_639_624 : 16; 1490 uint64_t re_pkts : 48; 1491 uint64_t rsvd_702_688 : 15; 1492 uint64_t ena_copy : 1; 1493 uint64_t rsvd_739_704 : 36; 1494 uint64_t rq_int : 8; 1495 uint64_t rq_int_ena : 8; 1496 uint64_t qint_idx : 7; 1497 uint64_t rsvd_767_763 : 5; 1498 uint64_t rsvd_831_768 : 64; /* W12 */ 1499 uint64_t rsvd_895_832 : 64; /* W13 */ 1500 uint64_t rsvd_959_896 : 64; /* W14 */ 1501 uint64_t rsvd_1023_960 : 64; /* W15 */ 1502 }; 1503 1504 /* [CN10K, .) NIX Receive queue context structure */ 1505 struct nix_cn10k_rq_ctx_s { 1506 uint64_t ena : 1; 1507 uint64_t sso_ena : 1; 1508 uint64_t ipsech_ena : 1; 1509 uint64_t ena_wqwd : 1; 1510 uint64_t cq : 20; 1511 uint64_t rsvd_34_24 : 11; 1512 uint64_t port_ol4_dis : 1; 1513 uint64_t port_il4_dis : 1; 1514 uint64_t lenerr_dis : 1; 1515 uint64_t csum_il4_dis : 1; 1516 uint64_t csum_ol4_dis : 1; 1517 uint64_t len_il4_dis : 1; 1518 uint64_t len_il3_dis : 1; 1519 uint64_t len_ol4_dis : 1; 1520 uint64_t len_ol3_dis : 1; 1521 uint64_t wqe_aura : 20; 1522 uint64_t spb_aura : 20; 1523 uint64_t lpb_aura : 20; 1524 uint64_t sso_grp : 10; 1525 uint64_t sso_tt : 2; 1526 uint64_t pb_caching : 2; 1527 uint64_t wqe_caching : 1; 1528 uint64_t xqe_drop_ena : 1; 1529 uint64_t spb_drop_ena : 1; 1530 uint64_t lpb_drop_ena : 1; 1531 uint64_t pb_stashing : 1; 1532 uint64_t ipsecd_drop_en : 1; 1533 uint64_t chi_ena : 1; 1534 uint64_t rsvd_127_125 : 3; 1535 uint64_t band_prof_id : 10; 1536 uint64_t rsvd_138 : 1; 1537 uint64_t policer_ena : 1; 1538 uint64_t spb_sizem1 : 6; 1539 uint64_t wqe_skip : 2; 1540 uint64_t spb_high_sizem1 : 3; 1541 uint64_t spb_ena : 1; 1542 uint64_t lpb_sizem1 : 12; 1543 uint64_t first_skip : 7; 1544 uint64_t rsvd_171 : 1; 1545 uint64_t later_skip : 6; 1546 uint64_t xqe_imm_size : 6; 1547 uint64_t rsvd_189_184 : 6; 1548 uint64_t xqe_imm_copy : 1; 1549 uint64_t xqe_hdr_split : 1; 1550 uint64_t xqe_drop : 8; 1551 uint64_t xqe_pass : 8; 1552 uint64_t wqe_pool_drop : 8; 1553 uint64_t wqe_pool_pass : 8; 1554 uint64_t spb_aura_drop : 8; 1555 uint64_t spb_aura_pass : 8; 1556 uint64_t spb_pool_drop : 8; 1557 uint64_t spb_pool_pass : 8; 1558 uint64_t lpb_aura_drop : 8; 1559 uint64_t lpb_aura_pass : 8; 1560 uint64_t lpb_pool_drop : 8; 1561 uint64_t lpb_pool_pass : 8; 1562 uint64_t rsvd_291_288 : 4; 1563 uint64_t rq_int : 8; 1564 uint64_t rq_int_ena : 8; 1565 uint64_t qint_idx : 7; 1566 uint64_t rsvd_319_315 : 5; 1567 uint64_t ltag : 24; 1568 uint64_t good_utag : 8; 1569 uint64_t bad_utag : 8; 1570 uint64_t flow_tagw : 6; 1571 uint64_t ipsec_vwqe : 1; 1572 uint64_t vwqe_ena : 1; 1573 uint64_t vtime_wait : 8; 1574 uint64_t max_vsize_exp : 4; 1575 uint64_t vwqe_skip : 2; 1576 uint64_t rsvd_383_382 : 2; 1577 uint64_t octs : 48; 1578 uint64_t rsvd_447_432 : 16; 1579 uint64_t pkts : 48; 1580 uint64_t rsvd_511_496 : 16; 1581 uint64_t drop_octs : 48; 1582 uint64_t rsvd_575_560 : 16; 1583 uint64_t drop_pkts : 48; 1584 uint64_t rsvd_639_624 : 16; 1585 uint64_t re_pkts : 48; 1586 uint64_t rsvd_703_688 : 16; 1587 uint64_t rsvd_767_704 : 64; /* W11 */ 1588 uint64_t rsvd_831_768 : 64; /* W12 */ 1589 uint64_t rsvd_895_832 : 64; /* W13 */ 1590 uint64_t rsvd_959_896 : 64; /* W14 */ 1591 uint64_t rsvd_1023_960 : 64; /* W15 */ 1592 }; 1593 1594 /* NIX receive queue context structure */ 1595 struct nix_rq_ctx_s { 1596 uint64_t ena : 1; 1597 uint64_t sso_ena : 1; 1598 uint64_t ipsech_ena : 1; 1599 uint64_t ena_wqwd : 1; 1600 uint64_t cq : 20; 1601 uint64_t substream : 20; 1602 uint64_t wqe_aura : 20; 1603 uint64_t spb_aura : 20; 1604 uint64_t lpb_aura : 20; 1605 uint64_t sso_grp : 10; 1606 uint64_t sso_tt : 2; 1607 uint64_t pb_caching : 2; 1608 uint64_t wqe_caching : 1; 1609 uint64_t xqe_drop_ena : 1; 1610 uint64_t spb_drop_ena : 1; 1611 uint64_t lpb_drop_ena : 1; 1612 uint64_t rsvd_127_122 : 6; 1613 uint64_t rsvd_139_128 : 12; 1614 uint64_t spb_sizem1 : 6; 1615 uint64_t wqe_skip : 2; 1616 uint64_t rsvd_150_148 : 3; 1617 uint64_t spb_ena : 1; 1618 uint64_t lpb_sizem1 : 12; 1619 uint64_t first_skip : 7; 1620 uint64_t rsvd_171 : 1; 1621 uint64_t later_skip : 6; 1622 uint64_t xqe_imm_size : 6; 1623 uint64_t rsvd_189_184 : 6; 1624 uint64_t xqe_imm_copy : 1; 1625 uint64_t xqe_hdr_split : 1; 1626 uint64_t xqe_drop : 8; 1627 uint64_t xqe_pass : 8; 1628 uint64_t wqe_pool_drop : 8; 1629 uint64_t wqe_pool_pass : 8; 1630 uint64_t spb_aura_drop : 8; 1631 uint64_t spb_aura_pass : 8; 1632 uint64_t spb_pool_drop : 8; 1633 uint64_t spb_pool_pass : 8; 1634 uint64_t lpb_aura_drop : 8; 1635 uint64_t lpb_aura_pass : 8; 1636 uint64_t lpb_pool_drop : 8; 1637 uint64_t lpb_pool_pass : 8; 1638 uint64_t rsvd_291_288 : 4; 1639 uint64_t rq_int : 8; 1640 uint64_t rq_int_ena : 8; 1641 uint64_t qint_idx : 7; 1642 uint64_t rsvd_319_315 : 5; 1643 uint64_t ltag : 24; 1644 uint64_t good_utag : 8; 1645 uint64_t bad_utag : 8; 1646 uint64_t flow_tagw : 6; 1647 uint64_t rsvd_383_366 : 18; 1648 uint64_t octs : 48; 1649 uint64_t rsvd_447_432 : 16; 1650 uint64_t pkts : 48; 1651 uint64_t rsvd_511_496 : 16; 1652 uint64_t drop_octs : 48; 1653 uint64_t rsvd_575_560 : 16; 1654 uint64_t drop_pkts : 48; 1655 uint64_t rsvd_639_624 : 16; 1656 uint64_t re_pkts : 48; 1657 uint64_t rsvd_703_688 : 16; 1658 uint64_t rsvd_767_704 : 64; /* W11 */ 1659 uint64_t rsvd_831_768 : 64; /* W12 */ 1660 uint64_t rsvd_895_832 : 64; /* W13 */ 1661 uint64_t rsvd_959_896 : 64; /* W14 */ 1662 uint64_t rsvd_1023_960 : 64; /* W15 */ 1663 }; 1664 1665 /* NIX receive side scaling entry structure */ 1666 struct nix_rsse_s { 1667 uint32_t rq : 20; 1668 uint32_t rsvd_31_20 : 12; 1669 }; 1670 1671 /* NIX receive action structure */ 1672 struct nix_rx_action_s { 1673 uint64_t op : 4; 1674 uint64_t pf_func : 16; 1675 uint64_t index : 20; 1676 uint64_t match_id : 16; 1677 uint64_t flow_key_alg : 5; 1678 uint64_t rsvd_63_61 : 3; 1679 }; 1680 1681 /* NIX receive immediate sub descriptor structure */ 1682 struct nix_rx_imm_s { 1683 uint64_t size : 16; 1684 uint64_t apad : 3; 1685 uint64_t rsvd_59_19 : 41; 1686 uint64_t subdc : 4; 1687 }; 1688 1689 /* NIX receive multicast/mirror entry structure */ 1690 struct nix_rx_mce_s { 1691 uint64_t op : 2; 1692 uint64_t rsvd_2 : 1; 1693 uint64_t eol : 1; 1694 uint64_t index : 20; 1695 uint64_t rsvd_31_24 : 8; 1696 uint64_t pf_func : 16; 1697 uint64_t next : 16; 1698 }; 1699 1700 /* NIX receive parse structure */ 1701 union nix_rx_parse_u { 1702 struct { 1703 uint64_t chan : 12; 1704 uint64_t desc_sizem1 : 5; 1705 uint64_t imm_copy : 1; 1706 uint64_t express : 1; 1707 uint64_t wqwd : 1; 1708 uint64_t errlev : 4; 1709 uint64_t errcode : 8; 1710 uint64_t latype : 4; 1711 uint64_t lbtype : 4; 1712 uint64_t lctype : 4; 1713 uint64_t ldtype : 4; 1714 uint64_t letype : 4; 1715 uint64_t lftype : 4; 1716 uint64_t lgtype : 4; 1717 uint64_t lhtype : 4; 1718 uint64_t pkt_lenm1 : 16; 1719 uint64_t l2m : 1; 1720 uint64_t l2b : 1; 1721 uint64_t l3m : 1; 1722 uint64_t l3b : 1; 1723 uint64_t vtag0_valid : 1; 1724 uint64_t vtag0_gone : 1; 1725 uint64_t vtag1_valid : 1; 1726 uint64_t vtag1_gone : 1; 1727 uint64_t pkind : 6; 1728 uint64_t nix_idx : 2; 1729 uint64_t vtag0_tci : 16; 1730 uint64_t vtag1_tci : 16; 1731 uint64_t laflags : 8; 1732 uint64_t lbflags : 8; 1733 uint64_t lcflags : 8; 1734 uint64_t ldflags : 8; 1735 uint64_t leflags : 8; 1736 uint64_t lfflags : 8; 1737 uint64_t lgflags : 8; 1738 uint64_t lhflags : 8; 1739 uint64_t eoh_ptr : 8; 1740 uint64_t wqe_aura : 20; 1741 uint64_t pb_aura : 20; 1742 uint64_t match_id : 16; 1743 uint64_t laptr : 8; 1744 uint64_t lbptr : 8; 1745 uint64_t lcptr : 8; 1746 uint64_t ldptr : 8; 1747 uint64_t leptr : 8; 1748 uint64_t lfptr : 8; 1749 uint64_t lgptr : 8; 1750 uint64_t lhptr : 8; 1751 uint64_t vtag0_ptr : 8; 1752 uint64_t vtag1_ptr : 8; 1753 uint64_t flow_key_alg : 6; 1754 uint64_t rsvd_349_342 : 8; 1755 uint64_t rsvd_353_350 : 4; 1756 uint64_t rsvd_359_354 : 6; 1757 uint64_t color : 2; 1758 uint64_t mcs_mdata : 14; 1759 uint64_t rsvd_381_376 : 6; 1760 uint64_t rsvd_382 : 1; 1761 uint64_t rsvd_383 : 1; 1762 uint64_t rsvd_447_384 : 64; /* W6 */ 1763 }; 1764 struct { 1765 uint64_t chan : 12; 1766 uint64_t desc_sizem1 : 5; 1767 uint64_t imm_copy : 1; 1768 uint64_t express : 1; 1769 uint64_t wqwd : 1; 1770 uint64_t errlev : 4; 1771 uint64_t errcode : 8; 1772 uint64_t latype : 4; 1773 uint64_t lbtype : 4; 1774 uint64_t lctype : 4; 1775 uint64_t ldtype : 4; 1776 uint64_t letype : 4; 1777 uint64_t lftype : 4; 1778 uint64_t lgtype : 4; 1779 uint64_t lhtype : 4; 1780 uint64_t pkt_lenm1 : 16; 1781 uint64_t l2m : 1; 1782 uint64_t l2b : 1; 1783 uint64_t l3m : 1; 1784 uint64_t l3b : 1; 1785 uint64_t vtag0_valid : 1; 1786 uint64_t vtag0_gone : 1; 1787 uint64_t vtag1_valid : 1; 1788 uint64_t vtag1_gone : 1; 1789 uint64_t pkind : 6; 1790 uint64_t rsvd_95_94 : 2; 1791 uint64_t vtag0_tci : 16; 1792 uint64_t vtag1_tci : 16; 1793 uint64_t laflags : 8; 1794 uint64_t lbflags : 8; 1795 uint64_t lcflags : 8; 1796 uint64_t ldflags : 8; 1797 uint64_t leflags : 8; 1798 uint64_t lfflags : 8; 1799 uint64_t lgflags : 8; 1800 uint64_t lhflags : 8; 1801 uint64_t eoh_ptr : 8; 1802 uint64_t wqe_aura : 20; 1803 uint64_t pb_aura : 20; 1804 uint64_t match_id : 16; 1805 uint64_t laptr : 8; 1806 uint64_t lbptr : 8; 1807 uint64_t lcptr : 8; 1808 uint64_t ldptr : 8; 1809 uint64_t leptr : 8; 1810 uint64_t lfptr : 8; 1811 uint64_t lgptr : 8; 1812 uint64_t lhptr : 8; 1813 uint64_t vtag0_ptr : 8; 1814 uint64_t vtag1_ptr : 8; 1815 uint64_t flow_key_alg : 5; 1816 uint64_t rsvd_383_341 : 43; 1817 uint64_t rsvd_447_384 : 64; /* W6 */ 1818 } cn9k; 1819 }; 1820 1821 /* NIX receive scatter/gather sub descriptor structure */ 1822 struct nix_rx_sg_s { 1823 uint64_t seg1_size : 16; 1824 uint64_t seg2_size : 16; 1825 uint64_t seg3_size : 16; 1826 uint64_t segs : 2; 1827 uint64_t rsvd_59_50 : 10; 1828 uint64_t subdc : 4; 1829 }; 1830 1831 /* NIX receive vtag action structure */ 1832 union nix_rx_vtag_action_u { 1833 struct { 1834 uint64_t vtag0_relptr : 8; 1835 uint64_t vtag0_lid : 3; 1836 uint64_t sa_xor : 1; 1837 uint64_t vtag0_type : 3; 1838 uint64_t vtag0_valid : 1; 1839 uint64_t sa_lo : 16; 1840 uint64_t vtag1_relptr : 8; 1841 uint64_t vtag1_lid : 3; 1842 uint64_t rsvd_43 : 1; 1843 uint64_t vtag1_type : 3; 1844 uint64_t vtag1_valid : 1; 1845 uint64_t sa_hi : 16; 1846 }; 1847 struct { 1848 uint64_t vtag0_relptr : 8; 1849 uint64_t vtag0_lid : 3; 1850 uint64_t rsvd_11 : 1; 1851 uint64_t vtag0_type : 3; 1852 uint64_t vtag0_valid : 1; 1853 uint64_t rsvd_31_16 : 16; 1854 uint64_t vtag1_relptr : 8; 1855 uint64_t vtag1_lid : 3; 1856 uint64_t rsvd_43 : 1; 1857 uint64_t vtag1_type : 3; 1858 uint64_t vtag1_valid : 1; 1859 uint64_t rsvd_63_48 : 16; 1860 } cn9k; 1861 }; 1862 1863 /* NIX send completion structure */ 1864 struct nix_send_comp_s { 1865 uint64_t status : 8; 1866 uint64_t sqe_id : 16; 1867 uint64_t rsvd_63_24 : 40; 1868 }; 1869 1870 /* NIX send CRC sub descriptor structure */ 1871 struct nix_send_crc_s { 1872 uint64_t size : 16; 1873 uint64_t start : 16; 1874 uint64_t insert : 16; 1875 uint64_t rsvd_57_48 : 10; 1876 uint64_t alg : 2; 1877 uint64_t subdc : 4; 1878 uint64_t iv : 32; 1879 uint64_t rsvd_127_96 : 32; 1880 }; 1881 1882 /* NIX send extended header sub descriptor structure */ 1883 union nix_send_ext_w0_u { 1884 uint64_t u; 1885 struct { 1886 uint64_t lso_mps : 14; 1887 uint64_t lso : 1; 1888 uint64_t tstmp : 1; 1889 uint64_t lso_sb : 8; 1890 uint64_t lso_format : 5; 1891 uint64_t rsvd_31_29 : 3; 1892 uint64_t shp_chg : 9; 1893 uint64_t shp_dis : 1; 1894 uint64_t shp_ra : 2; 1895 uint64_t markptr : 8; 1896 uint64_t markform : 7; 1897 uint64_t mark_en : 1; 1898 uint64_t subdc : 4; 1899 }; 1900 }; 1901 1902 union nix_send_ext_w1_u { 1903 uint64_t u; 1904 struct { 1905 uint64_t vlan0_ins_ptr : 8; 1906 uint64_t vlan0_ins_tci : 16; 1907 uint64_t vlan1_ins_ptr : 8; 1908 uint64_t vlan1_ins_tci : 16; 1909 uint64_t vlan0_ins_ena : 1; 1910 uint64_t vlan1_ins_ena : 1; 1911 uint64_t init_color : 2; 1912 uint64_t flow_id : 7; 1913 uint64_t flow_override : 1; 1914 uint64_t rsvd_127_124 : 4; 1915 }; 1916 struct { 1917 uint64_t vlan0_ins_ptr : 8; 1918 uint64_t vlan0_ins_tci : 16; 1919 uint64_t vlan1_ins_ptr : 8; 1920 uint64_t vlan1_ins_tci : 16; 1921 uint64_t vlan0_ins_ena : 1; 1922 uint64_t vlan1_ins_ena : 1; 1923 uint64_t rsvd_127_114 : 14; 1924 } cn9k; 1925 }; 1926 1927 struct nix_send_ext_s { 1928 union nix_send_ext_w0_u w0; 1929 union nix_send_ext_w1_u w1; 1930 }; 1931 1932 /* NIX send header sub descriptor structure */ 1933 union nix_send_hdr_w0_u { 1934 uint64_t u; 1935 struct { 1936 uint64_t total : 18; 1937 uint64_t cpt_error : 1; 1938 uint64_t df : 1; 1939 uint64_t aura : 20; 1940 uint64_t sizem1 : 3; 1941 uint64_t pnc : 1; 1942 uint64_t sq : 20; 1943 }; 1944 }; 1945 1946 union nix_send_hdr_w1_u { 1947 uint64_t u; 1948 struct { 1949 uint64_t ol3ptr : 8; 1950 uint64_t ol4ptr : 8; 1951 uint64_t il3ptr : 8; 1952 uint64_t il4ptr : 8; 1953 uint64_t ol3type : 4; 1954 uint64_t ol4type : 4; 1955 uint64_t il3type : 4; 1956 uint64_t il4type : 4; 1957 uint64_t sqe_id : 16; 1958 }; 1959 }; 1960 1961 struct nix_send_hdr_s { 1962 union nix_send_hdr_w0_u w0; 1963 union nix_send_hdr_w1_u w1; 1964 }; 1965 1966 /* NIX send immediate sub descriptor structure */ 1967 struct nix_send_imm_s { 1968 uint64_t size : 16; 1969 uint64_t apad : 3; 1970 uint64_t rsvd_59_19 : 41; 1971 uint64_t subdc : 4; 1972 }; 1973 1974 /* NIX send jump sub descriptor structure */ 1975 struct nix_send_jump_s { 1976 uint64_t sizem1 : 7; 1977 uint64_t rsvd_13_7 : 7; 1978 uint64_t ld_type : 2; 1979 uint64_t aura : 20; 1980 uint64_t refcnt_en : 1; 1981 uint64_t rsvd_58_37 : 22; 1982 uint64_t f : 1; 1983 uint64_t subdc : 4; 1984 uint64_t addr : 64; /* W1 */ 1985 }; 1986 1987 /* NIX send memory sub descriptor structure */ 1988 union nix_send_mem_w0_u { 1989 uint64_t u; 1990 struct { 1991 uint64_t offset : 16; 1992 uint64_t base_ns : 32; 1993 uint64_t step_type : 1; 1994 uint64_t rsvd_50_49 : 2; 1995 uint64_t coas_en : 1; 1996 uint64_t per_lso_seg : 1; 1997 uint64_t wmem : 1; 1998 uint64_t dsz : 2; 1999 uint64_t alg : 4; 2000 uint64_t subdc : 4; 2001 }; 2002 struct { 2003 uint64_t offset : 16; 2004 uint64_t rsvd_52_16 : 37; 2005 uint64_t wmem : 1; 2006 uint64_t dsz : 2; 2007 uint64_t alg : 4; 2008 uint64_t subdc : 4; 2009 } cn9k; 2010 }; 2011 2012 struct nix_send_mem_s { 2013 union nix_send_mem_w0_u w0; 2014 uint64_t addr : 64; /* W1 */ 2015 }; 2016 2017 /* NIX send scatter/gather sub descriptor structure */ 2018 union nix_send_sg2_s { 2019 uint64_t u; 2020 struct { 2021 uint64_t seg1_size : 16; 2022 uint64_t aura : 20; 2023 uint64_t i1 : 1; 2024 uint64_t fabs : 1; 2025 uint64_t foff : 8; 2026 uint64_t refcnt_en1 : 1; 2027 uint64_t rsvd_57_47 : 11; 2028 uint64_t ld_type : 2; 2029 uint64_t subdc : 4; 2030 }; 2031 }; 2032 2033 union nix_send_sg_s { 2034 uint64_t u; 2035 struct { 2036 uint64_t seg1_size : 16; 2037 uint64_t seg2_size : 16; 2038 uint64_t seg3_size : 16; 2039 uint64_t segs : 2; 2040 uint64_t rsvd_51_50 : 2; 2041 uint64_t refcnt_en1 : 1; 2042 uint64_t refcnt_en2 : 1; 2043 uint64_t refcnt_en3 : 1; 2044 uint64_t i1 : 1; 2045 uint64_t i2 : 1; 2046 uint64_t i3 : 1; 2047 uint64_t ld_type : 2; 2048 uint64_t subdc : 4; 2049 }; 2050 }; 2051 2052 /* NIX send work sub descriptor structure */ 2053 struct nix_send_work_s { 2054 uint64_t tag : 32; 2055 uint64_t tt : 2; 2056 uint64_t grp : 10; 2057 uint64_t rsvd_59_44 : 16; 2058 uint64_t subdc : 4; 2059 uint64_t addr : 64; /* W1 */ 2060 }; 2061 2062 /* [CN20K, .) NIX sq context hardware structure */ 2063 struct nix_cn20k_sq_ctx_hw_s { 2064 uint64_t ena : 1; 2065 uint64_t substream : 20; 2066 uint64_t max_sqe_size : 2; 2067 uint64_t sqe_way_mask : 16; 2068 uint64_t sqb_aura : 20; 2069 uint64_t gbl_rsvd1 : 5; 2070 uint64_t cq_id : 20; /* W1 */ 2071 uint64_t cq_ena : 1; 2072 uint64_t qint_idx : 6; 2073 uint64_t gbl_rsvd2 : 1; 2074 uint64_t sq_int : 8; 2075 uint64_t sq_int_ena : 8; 2076 uint64_t xoff : 1; 2077 uint64_t sqe_stype : 2; 2078 uint64_t gbl_rsvd : 17; 2079 uint64_t head_sqb : 64; /* W2 */ 2080 uint64_t head_offset : 6; /* W3 */ 2081 uint64_t sqb_dequeue_count : 16; 2082 uint64_t default_chan : 12; 2083 uint64_t sdp_mcast : 1; 2084 uint64_t sso_ena : 1; 2085 uint64_t dse_rsvd1 : 28; 2086 uint64_t sqb_enqueue_count : 16; /* W4 */ 2087 uint64_t tail_offset : 6; 2088 uint64_t lmt_dis : 1; 2089 uint64_t smq_rr_weight : 14; 2090 uint64_t dnq_rsvd1 : 27; 2091 uint64_t tail_sqb : 64; /* W5 */ 2092 uint64_t next_sqb : 64; /* W6 */ 2093 uint64_t smq : 11; /* W7 */ 2094 uint64_t smq_pend : 1; 2095 uint64_t smq_next_sq : 20; 2096 uint64_t smq_next_sq_vld : 1; 2097 uint64_t mnq_dis : 1; 2098 uint64_t scm1_rsvd2 : 30; 2099 uint64_t smenq_sqb : 64; /* W8 */ 2100 uint64_t smenq_offset : 6; /* W9 */ 2101 uint64_t cq_limit : 8; 2102 uint64_t smq_rr_count : 32; 2103 uint64_t scm_lso_rem : 18; 2104 uint64_t smq_lso_segnum : 8; /* W10 */ 2105 uint64_t vfi_lso_total : 18; 2106 uint64_t vfi_lso_sizem1 : 3; 2107 uint64_t vfi_lso_sb : 8; 2108 uint64_t vfi_lso_mps : 14; 2109 uint64_t vfi_lso_vlan0_ins_ena : 1; 2110 uint64_t vfi_lso_vlan1_ins_ena : 1; 2111 uint64_t vfi_lso_vld : 1; 2112 uint64_t smenq_next_sqb_vld : 1; 2113 uint64_t scm_dq_rsvd1 : 9; 2114 uint64_t smenq_next_sqb : 64; /* W11 */ 2115 uint64_t age_drop_octs : 32; /* W12 */ 2116 uint64_t age_drop_pkts : 32; 2117 uint64_t drop_pkts : 48; /* W13 */ 2118 uint64_t drop_octs_lsw : 16; 2119 uint64_t drop_octs_msw : 32; /* W14 */ 2120 uint64_t pkts_lsw : 32; 2121 uint64_t pkts_msw : 16; /* W15 */ 2122 uint64_t octs : 48; 2123 }; 2124 2125 /* [CN20K, .) NIX Send queue context structure */ 2126 struct nix_cn20k_sq_ctx_s { 2127 uint64_t ena : 1; /* W0 */ 2128 uint64_t qint_idx : 6; 2129 uint64_t substream : 20; 2130 uint64_t sdp_mcast : 1; 2131 uint64_t cq : 20; 2132 uint64_t sqe_way_mask : 16; 2133 uint64_t smq : 11; /* W1 */ 2134 uint64_t cq_ena : 1; 2135 uint64_t xoff : 1; 2136 uint64_t sso_ena : 1; 2137 uint64_t smq_rr_weight : 14; 2138 uint64_t default_chan : 12; 2139 uint64_t sqb_count : 16; 2140 uint64_t reserved_120_120 : 1; 2141 uint64_t smq_rr_count_lb : 7; 2142 uint64_t smq_rr_count_ub : 25; /* W2 */ 2143 uint64_t sqb_aura : 20; 2144 uint64_t sq_int : 8; 2145 uint64_t sq_int_ena : 8; 2146 uint64_t sqe_stype : 2; 2147 uint64_t reserved_191_191 : 1; 2148 uint64_t max_sqe_size : 2; /* W3 */ 2149 uint64_t cq_limit : 8; 2150 uint64_t lmt_dis : 1; 2151 uint64_t mnq_dis : 1; 2152 uint64_t smq_next_sq : 20; 2153 uint64_t smq_lso_segnum : 8; 2154 uint64_t tail_offset : 6; 2155 uint64_t smenq_offset : 6; 2156 uint64_t head_offset : 6; 2157 uint64_t smenq_next_sqb_vld : 1; 2158 uint64_t smq_pend : 1; 2159 uint64_t smq_next_sq_vld : 1; 2160 uint64_t reserved_253_255 : 3; 2161 uint64_t next_sqb : 64; /* W4 */ 2162 uint64_t tail_sqb : 64; /* W5 */ 2163 uint64_t smenq_sqb : 64; /* W6 */ 2164 uint64_t smenq_next_sqb : 64; /* W7 */ 2165 uint64_t head_sqb : 64; /* W8 */ 2166 uint64_t reserved_576_583 : 8; /* W9 */ 2167 uint64_t vfi_lso_total : 18; 2168 uint64_t vfi_lso_sizem1 : 3; 2169 uint64_t vfi_lso_sb : 8; 2170 uint64_t vfi_lso_mps : 14; 2171 uint64_t vfi_lso_vlan0_ins_ena : 1; 2172 uint64_t vfi_lso_vlan1_ins_ena : 1; 2173 uint64_t vfi_lso_vld : 1; 2174 uint64_t reserved_630_639 : 10; 2175 uint64_t scm_lso_rem : 18; /* W10 */ 2176 uint64_t reserved_658_703 : 46; 2177 uint64_t octs : 48; /* W11 */ 2178 uint64_t reserved_752_767 : 16; 2179 uint64_t pkts : 48; /* W12 */ 2180 uint64_t reserved_816_831 : 16; 2181 uint64_t aged_drop_octs : 32; /* W13 */ 2182 uint64_t aged_drop_pkts : 32; 2183 uint64_t drop_octs : 48; /* W14 */ 2184 uint64_t reserved_944_959 : 16; 2185 uint64_t drop_pkts : 48; /* W15 */ 2186 uint64_t reserved_1008_1023 : 16; 2187 }; 2188 2189 /* [CN10K, .) NIX sq context hardware structure */ 2190 struct nix_cn10k_sq_ctx_hw_s { 2191 uint64_t ena : 1; 2192 uint64_t substream : 20; 2193 uint64_t max_sqe_size : 2; 2194 uint64_t sqe_way_mask : 16; 2195 uint64_t sqb_aura : 20; 2196 uint64_t gbl_rsvd1 : 5; 2197 uint64_t cq_id : 20; 2198 uint64_t cq_ena : 1; 2199 uint64_t qint_idx : 6; 2200 uint64_t gbl_rsvd2 : 1; 2201 uint64_t sq_int : 8; 2202 uint64_t sq_int_ena : 8; 2203 uint64_t xoff : 1; 2204 uint64_t sqe_stype : 2; 2205 uint64_t gbl_rsvd : 17; 2206 uint64_t head_sqb : 64; /* W2 */ 2207 uint64_t head_offset : 6; 2208 uint64_t sqb_dequeue_count : 16; 2209 uint64_t default_chan : 12; 2210 uint64_t sdp_mcast : 1; 2211 uint64_t sso_ena : 1; 2212 uint64_t dse_rsvd1 : 28; 2213 uint64_t sqb_enqueue_count : 16; 2214 uint64_t tail_offset : 6; 2215 uint64_t lmt_dis : 1; 2216 uint64_t smq_rr_weight : 14; 2217 uint64_t dnq_rsvd1 : 27; 2218 uint64_t tail_sqb : 64; /* W5 */ 2219 uint64_t next_sqb : 64; /* W6 */ 2220 uint64_t smq : 10; 2221 uint64_t smq_pend : 1; 2222 uint64_t smq_next_sq : 20; 2223 uint64_t smq_next_sq_vld : 1; 2224 uint64_t mnq_dis : 1; 2225 uint64_t scm1_rsvd2 : 31; 2226 uint64_t smenq_sqb : 64; /* W8 */ 2227 uint64_t smenq_offset : 6; 2228 uint64_t cq_limit : 8; 2229 uint64_t smq_rr_count : 32; 2230 uint64_t scm_lso_rem : 18; 2231 uint64_t smq_lso_segnum : 8; 2232 uint64_t vfi_lso_total : 18; 2233 uint64_t vfi_lso_sizem1 : 3; 2234 uint64_t vfi_lso_sb : 8; 2235 uint64_t vfi_lso_mps : 14; 2236 uint64_t vfi_lso_vlan0_ins_ena : 1; 2237 uint64_t vfi_lso_vlan1_ins_ena : 1; 2238 uint64_t vfi_lso_vld : 1; 2239 uint64_t smenq_next_sqb_vld : 1; 2240 uint64_t scm_dq_rsvd1 : 9; 2241 uint64_t smenq_next_sqb : 64; /* W11 */ 2242 uint64_t age_drop_octs : 32; 2243 uint64_t age_drop_pkts : 32; 2244 uint64_t drop_pkts : 48; 2245 uint64_t drop_octs_lsw : 16; 2246 uint64_t drop_octs_msw : 32; 2247 uint64_t pkts_lsw : 32; 2248 uint64_t pkts_msw : 16; 2249 uint64_t octs : 48; 2250 }; 2251 2252 /* NIX sq context hardware structure */ 2253 struct nix_sq_ctx_hw_s { 2254 uint64_t ena : 1; 2255 uint64_t substream : 20; 2256 uint64_t max_sqe_size : 2; 2257 uint64_t sqe_way_mask : 16; 2258 uint64_t sqb_aura : 20; 2259 uint64_t gbl_rsvd1 : 5; 2260 uint64_t cq_id : 20; 2261 uint64_t cq_ena : 1; 2262 uint64_t qint_idx : 6; 2263 uint64_t gbl_rsvd2 : 1; 2264 uint64_t sq_int : 8; 2265 uint64_t sq_int_ena : 8; 2266 uint64_t xoff : 1; 2267 uint64_t sqe_stype : 2; 2268 uint64_t gbl_rsvd : 17; 2269 uint64_t head_sqb : 64; /* W2 */ 2270 uint64_t head_offset : 6; 2271 uint64_t sqb_dequeue_count : 16; 2272 uint64_t default_chan : 12; 2273 uint64_t sdp_mcast : 1; 2274 uint64_t sso_ena : 1; 2275 uint64_t dse_rsvd1 : 28; 2276 uint64_t sqb_enqueue_count : 16; 2277 uint64_t tail_offset : 6; 2278 uint64_t lmt_dis : 1; 2279 uint64_t smq_rr_quantum : 24; 2280 uint64_t dnq_rsvd1 : 17; 2281 uint64_t tail_sqb : 64; /* W5 */ 2282 uint64_t next_sqb : 64; /* W6 */ 2283 uint64_t mnq_dis : 1; 2284 uint64_t smq : 9; 2285 uint64_t smq_pend : 1; 2286 uint64_t smq_next_sq : 20; 2287 uint64_t smq_next_sq_vld : 1; 2288 uint64_t scm1_rsvd2 : 32; 2289 uint64_t smenq_sqb : 64; /* W8 */ 2290 uint64_t smenq_offset : 6; 2291 uint64_t cq_limit : 8; 2292 uint64_t smq_rr_count : 25; 2293 uint64_t scm_lso_rem : 18; 2294 uint64_t scm_dq_rsvd0 : 7; 2295 uint64_t smq_lso_segnum : 8; 2296 uint64_t vfi_lso_total : 18; 2297 uint64_t vfi_lso_sizem1 : 3; 2298 uint64_t vfi_lso_sb : 8; 2299 uint64_t vfi_lso_mps : 14; 2300 uint64_t vfi_lso_vlan0_ins_ena : 1; 2301 uint64_t vfi_lso_vlan1_ins_ena : 1; 2302 uint64_t vfi_lso_vld : 1; 2303 uint64_t smenq_next_sqb_vld : 1; 2304 uint64_t scm_dq_rsvd1 : 9; 2305 uint64_t smenq_next_sqb : 64; /* W11 */ 2306 uint64_t seb_rsvd1 : 64; /* W12 */ 2307 uint64_t drop_pkts : 48; 2308 uint64_t drop_octs_lsw : 16; 2309 uint64_t drop_octs_msw : 32; 2310 uint64_t pkts_lsw : 32; 2311 uint64_t pkts_msw : 16; 2312 uint64_t octs : 48; 2313 }; 2314 2315 /* [CN10K, .) NIX Send queue context structure */ 2316 struct nix_cn10k_sq_ctx_s { 2317 uint64_t ena : 1; 2318 uint64_t qint_idx : 6; 2319 uint64_t substream : 20; 2320 uint64_t sdp_mcast : 1; 2321 uint64_t cq : 20; 2322 uint64_t sqe_way_mask : 16; 2323 uint64_t smq : 10; 2324 uint64_t cq_ena : 1; 2325 uint64_t xoff : 1; 2326 uint64_t sso_ena : 1; 2327 uint64_t smq_rr_weight : 14; 2328 uint64_t default_chan : 12; 2329 uint64_t sqb_count : 16; 2330 uint64_t rsvd_120_119 : 2; 2331 uint64_t smq_rr_count_lb : 7; 2332 uint64_t smq_rr_count_ub : 25; 2333 uint64_t sqb_aura : 20; 2334 uint64_t sq_int : 8; 2335 uint64_t sq_int_ena : 8; 2336 uint64_t sqe_stype : 2; 2337 uint64_t rsvd_191 : 1; 2338 uint64_t max_sqe_size : 2; 2339 uint64_t cq_limit : 8; 2340 uint64_t lmt_dis : 1; 2341 uint64_t mnq_dis : 1; 2342 uint64_t smq_next_sq : 20; 2343 uint64_t smq_lso_segnum : 8; 2344 uint64_t tail_offset : 6; 2345 uint64_t smenq_offset : 6; 2346 uint64_t head_offset : 6; 2347 uint64_t smenq_next_sqb_vld : 1; 2348 uint64_t smq_pend : 1; 2349 uint64_t smq_next_sq_vld : 1; 2350 uint64_t rsvd_255_253 : 3; 2351 uint64_t next_sqb : 64; /* W4 */ 2352 uint64_t tail_sqb : 64; /* W5 */ 2353 uint64_t smenq_sqb : 64; /* W6 */ 2354 uint64_t smenq_next_sqb : 64; /* W7 */ 2355 uint64_t head_sqb : 64; /* W8 */ 2356 uint64_t rsvd_583_576 : 8; 2357 uint64_t vfi_lso_total : 18; 2358 uint64_t vfi_lso_sizem1 : 3; 2359 uint64_t vfi_lso_sb : 8; 2360 uint64_t vfi_lso_mps : 14; 2361 uint64_t vfi_lso_vlan0_ins_ena : 1; 2362 uint64_t vfi_lso_vlan1_ins_ena : 1; 2363 uint64_t vfi_lso_vld : 1; 2364 uint64_t rsvd_639_630 : 10; 2365 uint64_t scm_lso_rem : 18; 2366 uint64_t rsvd_703_658 : 46; 2367 uint64_t octs : 48; 2368 uint64_t rsvd_767_752 : 16; 2369 uint64_t pkts : 48; 2370 uint64_t rsvd_831_816 : 16; 2371 uint64_t aged_drop_octs : 32; 2372 uint64_t aged_drop_pkts : 32; 2373 uint64_t drop_octs : 48; 2374 uint64_t rsvd_959_944 : 16; 2375 uint64_t drop_pkts : 48; 2376 uint64_t rsvd_1023_1008 : 16; 2377 }; 2378 2379 /* NIX send queue context structure */ 2380 struct nix_sq_ctx_s { 2381 uint64_t ena : 1; 2382 uint64_t qint_idx : 6; 2383 uint64_t substream : 20; 2384 uint64_t sdp_mcast : 1; 2385 uint64_t cq : 20; 2386 uint64_t sqe_way_mask : 16; 2387 uint64_t smq : 9; 2388 uint64_t cq_ena : 1; 2389 uint64_t xoff : 1; 2390 uint64_t sso_ena : 1; 2391 uint64_t smq_rr_quantum : 24; 2392 uint64_t default_chan : 12; 2393 uint64_t sqb_count : 16; 2394 uint64_t smq_rr_count : 25; 2395 uint64_t sqb_aura : 20; 2396 uint64_t sq_int : 8; 2397 uint64_t sq_int_ena : 8; 2398 uint64_t sqe_stype : 2; 2399 uint64_t rsvd_191 : 1; 2400 uint64_t max_sqe_size : 2; 2401 uint64_t cq_limit : 8; 2402 uint64_t lmt_dis : 1; 2403 uint64_t mnq_dis : 1; 2404 uint64_t smq_next_sq : 20; 2405 uint64_t smq_lso_segnum : 8; 2406 uint64_t tail_offset : 6; 2407 uint64_t smenq_offset : 6; 2408 uint64_t head_offset : 6; 2409 uint64_t smenq_next_sqb_vld : 1; 2410 uint64_t smq_pend : 1; 2411 uint64_t smq_next_sq_vld : 1; 2412 uint64_t rsvd_255_253 : 3; 2413 uint64_t next_sqb : 64; /* W4 */ 2414 uint64_t tail_sqb : 64; /* W5 */ 2415 uint64_t smenq_sqb : 64; /* W6 */ 2416 uint64_t smenq_next_sqb : 64; /* W7 */ 2417 uint64_t head_sqb : 64; /* W8 */ 2418 uint64_t rsvd_583_576 : 8; 2419 uint64_t vfi_lso_total : 18; 2420 uint64_t vfi_lso_sizem1 : 3; 2421 uint64_t vfi_lso_sb : 8; 2422 uint64_t vfi_lso_mps : 14; 2423 uint64_t vfi_lso_vlan0_ins_ena : 1; 2424 uint64_t vfi_lso_vlan1_ins_ena : 1; 2425 uint64_t vfi_lso_vld : 1; 2426 uint64_t rsvd_639_630 : 10; 2427 uint64_t scm_lso_rem : 18; 2428 uint64_t rsvd_703_658 : 46; 2429 uint64_t octs : 48; 2430 uint64_t rsvd_767_752 : 16; 2431 uint64_t pkts : 48; 2432 uint64_t rsvd_831_816 : 16; 2433 uint64_t rsvd_895_832 : 64; /* W13 */ 2434 uint64_t drop_octs : 48; 2435 uint64_t rsvd_959_944 : 16; 2436 uint64_t drop_pkts : 48; 2437 uint64_t rsvd_1023_1008 : 16; 2438 }; 2439 2440 /* NIX transmit action structure */ 2441 struct nix_tx_action_s { 2442 uint64_t op : 4; 2443 uint64_t rsvd_11_4 : 8; 2444 uint64_t index : 20; 2445 uint64_t match_id : 16; 2446 uint64_t rsvd_63_48 : 16; 2447 }; 2448 2449 /* NIX transmit vtag action structure */ 2450 struct nix_tx_vtag_action_s { 2451 uint64_t vtag0_relptr : 8; 2452 uint64_t vtag0_lid : 3; 2453 uint64_t rsvd_11 : 1; 2454 uint64_t vtag0_op : 2; 2455 uint64_t rsvd_15_14 : 2; 2456 uint64_t vtag0_def : 10; 2457 uint64_t rsvd_31_26 : 6; 2458 uint64_t vtag1_relptr : 8; 2459 uint64_t vtag1_lid : 3; 2460 uint64_t rsvd_43 : 1; 2461 uint64_t vtag1_op : 2; 2462 uint64_t rsvd_47_46 : 2; 2463 uint64_t vtag1_def : 10; 2464 uint64_t rsvd_63_58 : 6; 2465 }; 2466 2467 /* NIX work queue entry header structure */ 2468 struct nix_wqe_hdr_s { 2469 uint64_t tag : 32; 2470 uint64_t tt : 2; 2471 uint64_t grp : 10; 2472 uint64_t node : 2; 2473 uint64_t q : 14; 2474 uint64_t wqe_type : 4; 2475 }; 2476 2477 /* NIX Rx flow key algorithm field structure */ 2478 struct nix_rx_flowkey_alg { 2479 uint64_t key_offset : 6; 2480 uint64_t ln_mask : 1; 2481 uint64_t fn_mask : 1; 2482 uint64_t hdr_offset : 8; 2483 uint64_t bytesm1 : 5; 2484 uint64_t lid : 3; 2485 uint64_t reserved_24_24 : 1; 2486 uint64_t ena : 1; 2487 uint64_t sel_chan : 1; 2488 uint64_t ltype_mask : 4; 2489 uint64_t ltype_match : 4; 2490 uint64_t reserved_35_63 : 29; 2491 }; 2492 2493 /* NIX LSO format field structure */ 2494 struct nix_lso_format { 2495 uint64_t offset : 8; 2496 uint64_t layer : 2; 2497 uint64_t rsvd_10_11 : 2; 2498 uint64_t sizem1 : 2; 2499 uint64_t rsvd_14_15 : 2; 2500 uint64_t alg : 3; 2501 uint64_t rsvd_19_63 : 45; 2502 }; 2503 2504 #define NIX_LSO_FIELD_MAX (8) 2505 #define NIX_LSO_FIELD_ALG_MASK GENMASK(18, 16) 2506 #define NIX_LSO_FIELD_SZ_MASK GENMASK(13, 12) 2507 #define NIX_LSO_FIELD_LY_MASK GENMASK(9, 8) 2508 #define NIX_LSO_FIELD_OFF_MASK GENMASK(7, 0) 2509 2510 #define NIX_LSO_FIELD_MASK \ 2511 (NIX_LSO_FIELD_OFF_MASK | NIX_LSO_FIELD_LY_MASK | \ 2512 NIX_LSO_FIELD_SZ_MASK | NIX_LSO_FIELD_ALG_MASK) 2513 2514 #define NIX_CN9K_MAX_HW_FRS 9212UL 2515 #define NIX_LBK_MAX_HW_FRS 65535UL 2516 #define NIX_SDP_MAX_HW_FRS 65535UL 2517 #define NIX_SDP_16K_HW_FRS 16380UL 2518 #define NIX_RPM_MAX_HW_FRS 16380UL 2519 #define NIX_MIN_HW_FRS 40UL 2520 2521 /** NIX policer rate limits */ 2522 #define NIX_BPF_MAX_RATE_DIV_EXP 12 2523 #define NIX_BPF_MAX_RATE_EXPONENT 0x16 2524 #define NIX_BPF_MAX_RATE_MANTISSA 0xff 2525 2526 #define NIX_BPF_RATE_CONST 8000000000ULL 2527 2528 /* NIX rate calculation in Bits/Sec 2529 * PIR_ADD = ((256 + NIX_*_PIR[RATE_MANTISSA]) 2530 * << NIX_*_PIR[RATE_EXPONENT]) / 256 2531 * PIR = (2E6 * PIR_ADD / (1 << NIX_*_PIR[RATE_DIVIDER_EXPONENT])) 2532 * 2533 * CIR_ADD = ((256 + NIX_*_CIR[RATE_MANTISSA]) 2534 * << NIX_*_CIR[RATE_EXPONENT]) / 256 2535 * CIR = (2E6 * CIR_ADD / (CCLK_TICKS << NIX_*_CIR[RATE_DIVIDER_EXPONENT])) 2536 */ 2537 #define NIX_BPF_RATE(policer_timeunit, exponent, mantissa, div_exp) \ 2538 ((NIX_BPF_RATE_CONST * ((256 + (mantissa)) << (exponent))) / \ 2539 (((1ull << (div_exp)) * 256 * policer_timeunit))) 2540 2541 #define NIX_BPF_DEFAULT_ADJUST_MANTISSA 511 2542 #define NIX_BPF_DEFAULT_ADJUST_EXPONENT 0 2543 2544 /** NIX burst limits */ 2545 #define NIX_BPF_MAX_BURST_EXPONENT 0xf 2546 #define NIX_BPF_MAX_BURST_MANTISSA 0xff 2547 2548 /* NIX burst calculation 2549 * PIR_BURST = ((256 + NIX_*_PIR[BURST_MANTISSA]) 2550 * << (NIX_*_PIR[BURST_EXPONENT] + 1)) 2551 * / 256 2552 * 2553 * CIR_BURST = ((256 + NIX_*_CIR[BURST_MANTISSA]) 2554 * << (NIX_*_CIR[BURST_EXPONENT] + 1)) 2555 * / 256 2556 */ 2557 #define NIX_BPF_BURST(exponent, mantissa) \ 2558 (((256 + (mantissa)) << ((exponent) + 1)) / 256) 2559 2560 /** Meter burst limits */ 2561 #define NIX_BPF_BURST_MIN NIX_BPF_BURST(0, 0) 2562 #define NIX_BPF_BURST_MAX \ 2563 NIX_BPF_BURST(NIX_BPF_MAX_BURST_EXPONENT, NIX_BPF_MAX_BURST_MANTISSA) 2564 2565 /* NIX rate limits */ 2566 #define NIX_TM_MAX_RATE_DIV_EXP 12 2567 #define NIX_TM_MAX_RATE_EXPONENT 0xf 2568 #define NIX_TM_MAX_RATE_MANTISSA 0xff 2569 2570 #define NIX_TM_SHAPER_RATE_CONST ((uint64_t)2E6) 2571 2572 /* NIX rate calculation in Bits/Sec 2573 * PIR_ADD = ((256 + NIX_*_PIR[RATE_MANTISSA]) 2574 * << NIX_*_PIR[RATE_EXPONENT]) / 256 2575 * PIR = (2E6 * PIR_ADD / (1 << NIX_*_PIR[RATE_DIVIDER_EXPONENT])) 2576 * 2577 * CIR_ADD = ((256 + NIX_*_CIR[RATE_MANTISSA]) 2578 * << NIX_*_CIR[RATE_EXPONENT]) / 256 2579 * CIR = (2E6 * CIR_ADD / (CCLK_TICKS << NIX_*_CIR[RATE_DIVIDER_EXPONENT])) 2580 */ 2581 #define NIX_TM_SHAPER_RATE(exponent, mantissa, div_exp) \ 2582 ((NIX_TM_SHAPER_RATE_CONST * ((256 + (mantissa)) << (exponent))) / \ 2583 (((1ull << (div_exp)) * 256))) 2584 2585 /* Rate limit in Bits/Sec */ 2586 #define NIX_TM_MIN_SHAPER_RATE NIX_TM_SHAPER_RATE(0, 0, NIX_TM_MAX_RATE_DIV_EXP) 2587 2588 #define NIX_TM_MAX_SHAPER_RATE \ 2589 NIX_TM_SHAPER_RATE(NIX_TM_MAX_RATE_EXPONENT, NIX_TM_MAX_RATE_MANTISSA, \ 2590 0) 2591 2592 #define NIX_TM_MIN_SHAPER_PPS_RATE 25 2593 #define NIX_TM_MAX_SHAPER_PPS_RATE (100ul << 20) 2594 2595 /* NIX burst limits */ 2596 #define NIX_TM_MAX_BURST_EXPONENT 0xful 2597 #define NIX_TM_MAX_BURST_MANTISSA 0x7ffful 2598 #define NIX_CN9K_TM_MAX_BURST_MANTISSA 0xfful 2599 2600 /* NIX burst calculation 2601 * PIR_BURST = ((256 + NIX_*_PIR[BURST_MANTISSA]) 2602 * << (NIX_*_PIR[BURST_EXPONENT] + 1)) 2603 * / 256 2604 * 2605 * CIR_BURST = ((256 + NIX_*_CIR[BURST_MANTISSA]) 2606 * << (NIX_*_CIR[BURST_EXPONENT] + 1)) 2607 * / 256 2608 */ 2609 #define NIX_TM_SHAPER_BURST(exponent, mantissa) \ 2610 (((256ul + (mantissa)) << ((exponent) + 1)) / 256ul) 2611 2612 /* Burst limit in Bytes */ 2613 #define NIX_TM_MIN_SHAPER_BURST NIX_TM_SHAPER_BURST(0, 0) 2614 2615 #define NIX_TM_MAX_SHAPER_BURST \ 2616 NIX_TM_SHAPER_BURST(NIX_TM_MAX_BURST_EXPONENT, \ 2617 NIX_TM_MAX_BURST_MANTISSA) 2618 2619 #define NIX_CN9K_TM_MAX_SHAPER_BURST \ 2620 NIX_TM_SHAPER_BURST(NIX_TM_MAX_BURST_EXPONENT, \ 2621 NIX_CN9K_TM_MAX_BURST_MANTISSA) 2622 2623 /* Min is limited so that NIX_AF_SMQX_CFG[MINLEN]+ADJUST is not -ve */ 2624 #define NIX_TM_LENGTH_ADJUST_MIN ((int)-NIX_MIN_HW_FRS + 1) 2625 #define NIX_TM_LENGTH_ADJUST_MAX 255 2626 2627 #define NIX_TM_TLX_SP_PRIO_MAX 10 2628 #define NIX_CN9K_TM_RR_QUANTUM_MAX (BIT_ULL(24) - 1) 2629 #define NIX_TM_RR_WEIGHT_MAX (BIT_ULL(14) - 1) 2630 2631 /* [CN9K, .) */ 2632 #define NIX_TXSCH_LVL_TL1_MAX 28 2633 #define NIX_TXSCH_LVL_TL2_MAX 256 2634 2635 /* CN9K */ 2636 #define NIX_CN9K_TXSCH_LVL_TL3_MAX 256 2637 #define NIX_CN9K_TXSCH_LVL_TL4_MAX 512 2638 #define NIX_CN9K_TXSCH_LVL_SMQ_MAX 512 2639 2640 /* CN10K */ 2641 #define NIX_CN10K_TXSCH_LVL_TL3_MAX 256 2642 #define NIX_CN10K_TXSCH_LVL_TL4_MAX 512 2643 #define NIX_CN10K_TXSCH_LVL_SMQ_MAX 832 2644 2645 /* [CN20K, .) */ 2646 #define NIX_TXSCH_LVL_TL3_MAX 512 2647 #define NIX_TXSCH_LVL_TL4_MAX 1280 2648 #define NIX_TXSCH_LVL_SMQ_MAX 2048 2649 2650 #define NIX_CQ_OP_STAT_OP_ERR 63 2651 #define NIX_CQ_OP_STAT_CQ_ERR 46 2652 2653 #define NIX_RQ_CN10K_SPB_MAX_SIZE 4096 2654 2655 /* [CN9K, .) */ 2656 #define NIX_LSO_SEG_MAX 256 2657 #define NIX_LSO_MPS_MAX (BIT_ULL(14) - 1) 2658 2659 /* Software defined LSO base format IDX */ 2660 #define NIX_LSO_FORMAT_IDX_TSOV4 0 2661 #define NIX_LSO_FORMAT_IDX_TSOV6 1 2662 2663 /* [CN10K, .) */ 2664 #define NIX_SENDSTATALG_MASK 0x7 2665 #define NIX_SENDSTATALG_SEL_MASK 0x8 2666 #define NIX_SENDSTAT_IOFFSET_MASK 0xFFF 2667 #define NIX_SENDSTAT_OOFFSET_MASK 0xFFF 2668 2669 /* The mask is to extract lower 10-bits of channel number 2670 * which CPT will pass to X2P. 2671 */ 2672 #define NIX_CHAN_CPT_X2P_MASK (0x3ffull) 2673 2674 #endif /* __NIX_HW_H__ */ 2675