1 /* 2 * Copyright (c) 2018 The Linux Foundation. All rights reserved. 3 * 4 * Permission to use, copy, modify, and/or distribute this software for 5 * any purpose with or without fee is hereby granted, provided that the 6 * above copyright notice and this permission notice appear in all 7 * copies. 8 * 9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL 10 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED 11 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE 12 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL 13 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR 14 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 15 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 16 * PERFORMANCE OF THIS SOFTWARE. 17 */ 18 19 #ifndef _RXPT_CLASSIFY_INFO_H_ 20 #define _RXPT_CLASSIFY_INFO_H_ 21 #if !defined(__ASSEMBLER__) 22 #endif 23 24 25 // ################ START SUMMARY ################# 26 // 27 // Dword Fields 28 // 0 reo_destination_indication[4:0], reserved_0a[6:5], use_flow_id_toeplitz_clfy[7], pkt_selection_fp_ucast_data[8], pkt_selection_fp_mcast_data[9], pkt_selection_fp_1000[10], rxdma0_source_ring_selection[12:11], rxdma0_destination_ring_selection[14:13], reserved_0b[31:15] 29 // 30 // ################ END SUMMARY ################# 31 32 #define NUM_OF_DWORDS_RXPT_CLASSIFY_INFO 1 33 34 struct rxpt_classify_info { 35 uint32_t reo_destination_indication : 5, //[4:0] 36 reserved_0a : 2, //[6:5] 37 use_flow_id_toeplitz_clfy : 1, //[7] 38 pkt_selection_fp_ucast_data : 1, //[8] 39 pkt_selection_fp_mcast_data : 1, //[9] 40 pkt_selection_fp_1000 : 1, //[10] 41 rxdma0_source_ring_selection : 2, //[12:11] 42 rxdma0_destination_ring_selection: 2, //[14:13] 43 reserved_0b : 17; //[31:15] 44 }; 45 46 /* 47 48 reo_destination_indication 49 50 The ID of the REO exit ring where the MSDU frame shall 51 push after (MPDU level) reordering has finished. 52 53 54 55 <enum 0 reo_destination_tcl> Reo will push the frame 56 into the REO2TCL ring 57 58 <enum 1 reo_destination_sw1> Reo will push the frame 59 into the REO2SW1 ring 60 61 <enum 2 reo_destination_sw2> Reo will push the frame 62 into the REO2SW1 ring 63 64 <enum 3 reo_destination_sw3> Reo will push the frame 65 into the REO2SW1 ring 66 67 <enum 4 reo_destination_sw4> Reo will push the frame 68 into the REO2SW1 ring 69 70 <enum 5 reo_destination_release> Reo will push the frame 71 into the REO_release ring 72 73 <enum 6 reo_destination_fw> Reo will push the frame into 74 the REO2FW ring 75 76 <enum 7 reo_destination_7> REO remaps this 77 78 <enum 8 reo_destination_8> REO remaps this <enum 9 79 reo_destination_9> REO remaps this <enum 10 80 reo_destination_10> REO remaps this 81 82 <enum 11 reo_destination_11> REO remaps this 83 84 <enum 12 reo_destination_12> REO remaps this <enum 13 85 reo_destination_13> REO remaps this 86 87 <enum 14 reo_destination_14> REO remaps this 88 89 <enum 15 reo_destination_15> REO remaps this 90 91 <enum 16 reo_destination_16> REO remaps this 92 93 <enum 17 reo_destination_17> REO remaps this 94 95 <enum 18 reo_destination_18> REO remaps this 96 97 <enum 19 reo_destination_19> REO remaps this 98 99 <enum 20 reo_destination_20> REO remaps this 100 101 <enum 21 reo_destination_21> REO remaps this 102 103 <enum 22 reo_destination_22> REO remaps this 104 105 <enum 23 reo_destination_23> REO remaps this 106 107 <enum 24 reo_destination_24> REO remaps this 108 109 <enum 25 reo_destination_25> REO remaps this 110 111 <enum 26 reo_destination_26> REO remaps this 112 113 <enum 27 reo_destination_27> REO remaps this 114 115 <enum 28 reo_destination_28> REO remaps this 116 117 <enum 29 reo_destination_29> REO remaps this 118 119 <enum 30 reo_destination_30> REO remaps this 120 121 <enum 31 reo_destination_31> REO remaps this 122 123 124 125 <legal all> 126 127 reserved_0a 128 129 <legal 0> 130 131 use_flow_id_toeplitz_clfy 132 133 Indication to Rx OLE to enable classification based on 134 the chosen Toeplitz hash from Common Parser, in case flow 135 search fails 136 137 <legal all> 138 139 pkt_selection_fp_ucast_data 140 141 Filter pass Unicast data frame (matching 142 rxpcu_filter_pass and sw_frame_group_Unicast_data) routing 143 selection 144 145 146 147 1'b0: source and destination rings are selected from the 148 RxOLE register settings for the packet type 149 150 151 152 1'b1: source ring and destination ring is selected from 153 the rxdma0_source_ring_selection and 154 rxdma0_destination_ring_selection fields in this STRUCT 155 156 <legal all> 157 158 pkt_selection_fp_mcast_data 159 160 Filter pass Multicast data frame (matching 161 rxpcu_filter_pass and sw_frame_group_Multicast_data) routing 162 selection 163 164 165 166 1'b0: source and destination rings are selected from the 167 RxOLE register settings for the packet type 168 169 170 171 1'b1: source ring and destination ring is selected from 172 the rxdma0_source_ring_selection and 173 rxdma0_destination_ring_selection fields in this STRUCT 174 175 <legal all> 176 177 pkt_selection_fp_1000 178 179 Filter pass BAR frame (matching rxpcu_filter_pass and 180 sw_frame_group_ctrl_1000) routing selection 181 182 183 184 1'b0: source and destination rings are selected from the 185 RxOLE register settings for the packet type 186 187 188 189 1'b1: source ring and destination ring is selected from 190 the rxdma0_source_ring_selection and 191 rxdma0_destination_ring_selection fields in this STRUCT 192 193 <legal all> 194 195 rxdma0_source_ring_selection 196 197 Field only valid when for the received frame type the 198 corresponding pkt_selection_fp_... bit is set 199 200 201 202 <enum 0 wbm2rxdma_buf_source_ring> The data buffer for 203 204 <enum 1 fw2rxdma_buf_source_ring> The data buffer for 205 this frame shall be sourced by fw2rxdma buffer source ring. 206 207 <enum 2 sw2rxdma_buf_source_ring> The data buffer for 208 this frame shall be sourced by sw2rxdma buffer source ring. 209 210 <enum 3 no_buffer_ring> The frame shall not be written 211 to any data buffer. 212 213 214 215 <legal all> 216 217 rxdma0_destination_ring_selection 218 219 Field only valid when for the received frame type the 220 corresponding pkt_selection_fp_... bit is set 221 222 223 224 <enum 0 rxdma_release_ring> RXDMA0 shall push the frame 225 to the Release ring. Effectively this means the frame needs 226 to be dropped. 227 228 <enum 1 rxdma2fw_ring> RXDMA0 shall push the frame to 229 the FW ring. 230 231 <enum 2 rxdma2sw_ring> RXDMA0 shall push the frame to 232 the SW ring. 233 234 <enum 3 rxdma2reo_ring> RXDMA0 shall push the frame to 235 the REO entrance ring. 236 237 238 239 <legal all> 240 241 reserved_0b 242 243 <legal 0> 244 */ 245 246 247 /* Description RXPT_CLASSIFY_INFO_0_REO_DESTINATION_INDICATION 248 249 The ID of the REO exit ring where the MSDU frame shall 250 push after (MPDU level) reordering has finished. 251 252 253 254 <enum 0 reo_destination_tcl> Reo will push the frame 255 into the REO2TCL ring 256 257 <enum 1 reo_destination_sw1> Reo will push the frame 258 into the REO2SW1 ring 259 260 <enum 2 reo_destination_sw2> Reo will push the frame 261 into the REO2SW1 ring 262 263 <enum 3 reo_destination_sw3> Reo will push the frame 264 into the REO2SW1 ring 265 266 <enum 4 reo_destination_sw4> Reo will push the frame 267 into the REO2SW1 ring 268 269 <enum 5 reo_destination_release> Reo will push the frame 270 into the REO_release ring 271 272 <enum 6 reo_destination_fw> Reo will push the frame into 273 the REO2FW ring 274 275 <enum 7 reo_destination_7> REO remaps this 276 277 <enum 8 reo_destination_8> REO remaps this <enum 9 278 reo_destination_9> REO remaps this <enum 10 279 reo_destination_10> REO remaps this 280 281 <enum 11 reo_destination_11> REO remaps this 282 283 <enum 12 reo_destination_12> REO remaps this <enum 13 284 reo_destination_13> REO remaps this 285 286 <enum 14 reo_destination_14> REO remaps this 287 288 <enum 15 reo_destination_15> REO remaps this 289 290 <enum 16 reo_destination_16> REO remaps this 291 292 <enum 17 reo_destination_17> REO remaps this 293 294 <enum 18 reo_destination_18> REO remaps this 295 296 <enum 19 reo_destination_19> REO remaps this 297 298 <enum 20 reo_destination_20> REO remaps this 299 300 <enum 21 reo_destination_21> REO remaps this 301 302 <enum 22 reo_destination_22> REO remaps this 303 304 <enum 23 reo_destination_23> REO remaps this 305 306 <enum 24 reo_destination_24> REO remaps this 307 308 <enum 25 reo_destination_25> REO remaps this 309 310 <enum 26 reo_destination_26> REO remaps this 311 312 <enum 27 reo_destination_27> REO remaps this 313 314 <enum 28 reo_destination_28> REO remaps this 315 316 <enum 29 reo_destination_29> REO remaps this 317 318 <enum 30 reo_destination_30> REO remaps this 319 320 <enum 31 reo_destination_31> REO remaps this 321 322 323 324 <legal all> 325 */ 326 #define RXPT_CLASSIFY_INFO_0_REO_DESTINATION_INDICATION_OFFSET 0x00000000 327 #define RXPT_CLASSIFY_INFO_0_REO_DESTINATION_INDICATION_LSB 0 328 #define RXPT_CLASSIFY_INFO_0_REO_DESTINATION_INDICATION_MASK 0x0000001f 329 330 /* Description RXPT_CLASSIFY_INFO_0_RESERVED_0A 331 332 <legal 0> 333 */ 334 #define RXPT_CLASSIFY_INFO_0_RESERVED_0A_OFFSET 0x00000000 335 #define RXPT_CLASSIFY_INFO_0_RESERVED_0A_LSB 5 336 #define RXPT_CLASSIFY_INFO_0_RESERVED_0A_MASK 0x00000060 337 338 /* Description RXPT_CLASSIFY_INFO_0_USE_FLOW_ID_TOEPLITZ_CLFY 339 340 Indication to Rx OLE to enable classification based on 341 the chosen Toeplitz hash from Common Parser, in case flow 342 search fails 343 344 <legal all> 345 */ 346 #define RXPT_CLASSIFY_INFO_0_USE_FLOW_ID_TOEPLITZ_CLFY_OFFSET 0x00000000 347 #define RXPT_CLASSIFY_INFO_0_USE_FLOW_ID_TOEPLITZ_CLFY_LSB 7 348 #define RXPT_CLASSIFY_INFO_0_USE_FLOW_ID_TOEPLITZ_CLFY_MASK 0x00000080 349 350 /* Description RXPT_CLASSIFY_INFO_0_PKT_SELECTION_FP_UCAST_DATA 351 352 Filter pass Unicast data frame (matching 353 rxpcu_filter_pass and sw_frame_group_Unicast_data) routing 354 selection 355 356 357 358 1'b0: source and destination rings are selected from the 359 RxOLE register settings for the packet type 360 361 362 363 1'b1: source ring and destination ring is selected from 364 the rxdma0_source_ring_selection and 365 rxdma0_destination_ring_selection fields in this STRUCT 366 367 <legal all> 368 */ 369 #define RXPT_CLASSIFY_INFO_0_PKT_SELECTION_FP_UCAST_DATA_OFFSET 0x00000000 370 #define RXPT_CLASSIFY_INFO_0_PKT_SELECTION_FP_UCAST_DATA_LSB 8 371 #define RXPT_CLASSIFY_INFO_0_PKT_SELECTION_FP_UCAST_DATA_MASK 0x00000100 372 373 /* Description RXPT_CLASSIFY_INFO_0_PKT_SELECTION_FP_MCAST_DATA 374 375 Filter pass Multicast data frame (matching 376 rxpcu_filter_pass and sw_frame_group_Multicast_data) routing 377 selection 378 379 380 381 1'b0: source and destination rings are selected from the 382 RxOLE register settings for the packet type 383 384 385 386 1'b1: source ring and destination ring is selected from 387 the rxdma0_source_ring_selection and 388 rxdma0_destination_ring_selection fields in this STRUCT 389 390 <legal all> 391 */ 392 #define RXPT_CLASSIFY_INFO_0_PKT_SELECTION_FP_MCAST_DATA_OFFSET 0x00000000 393 #define RXPT_CLASSIFY_INFO_0_PKT_SELECTION_FP_MCAST_DATA_LSB 9 394 #define RXPT_CLASSIFY_INFO_0_PKT_SELECTION_FP_MCAST_DATA_MASK 0x00000200 395 396 /* Description RXPT_CLASSIFY_INFO_0_PKT_SELECTION_FP_1000 397 398 Filter pass BAR frame (matching rxpcu_filter_pass and 399 sw_frame_group_ctrl_1000) routing selection 400 401 402 403 1'b0: source and destination rings are selected from the 404 RxOLE register settings for the packet type 405 406 407 408 1'b1: source ring and destination ring is selected from 409 the rxdma0_source_ring_selection and 410 rxdma0_destination_ring_selection fields in this STRUCT 411 412 <legal all> 413 */ 414 #define RXPT_CLASSIFY_INFO_0_PKT_SELECTION_FP_1000_OFFSET 0x00000000 415 #define RXPT_CLASSIFY_INFO_0_PKT_SELECTION_FP_1000_LSB 10 416 #define RXPT_CLASSIFY_INFO_0_PKT_SELECTION_FP_1000_MASK 0x00000400 417 418 /* Description RXPT_CLASSIFY_INFO_0_RXDMA0_SOURCE_RING_SELECTION 419 420 Field only valid when for the received frame type the 421 corresponding pkt_selection_fp_... bit is set 422 423 424 425 <enum 0 wbm2rxdma_buf_source_ring> The data buffer for 426 427 <enum 1 fw2rxdma_buf_source_ring> The data buffer for 428 this frame shall be sourced by fw2rxdma buffer source ring. 429 430 <enum 2 sw2rxdma_buf_source_ring> The data buffer for 431 this frame shall be sourced by sw2rxdma buffer source ring. 432 433 <enum 3 no_buffer_ring> The frame shall not be written 434 to any data buffer. 435 436 437 438 <legal all> 439 */ 440 #define RXPT_CLASSIFY_INFO_0_RXDMA0_SOURCE_RING_SELECTION_OFFSET 0x00000000 441 #define RXPT_CLASSIFY_INFO_0_RXDMA0_SOURCE_RING_SELECTION_LSB 11 442 #define RXPT_CLASSIFY_INFO_0_RXDMA0_SOURCE_RING_SELECTION_MASK 0x00001800 443 444 /* Description RXPT_CLASSIFY_INFO_0_RXDMA0_DESTINATION_RING_SELECTION 445 446 Field only valid when for the received frame type the 447 corresponding pkt_selection_fp_... bit is set 448 449 450 451 <enum 0 rxdma_release_ring> RXDMA0 shall push the frame 452 to the Release ring. Effectively this means the frame needs 453 to be dropped. 454 455 <enum 1 rxdma2fw_ring> RXDMA0 shall push the frame to 456 the FW ring. 457 458 <enum 2 rxdma2sw_ring> RXDMA0 shall push the frame to 459 the SW ring. 460 461 <enum 3 rxdma2reo_ring> RXDMA0 shall push the frame to 462 the REO entrance ring. 463 464 465 466 <legal all> 467 */ 468 #define RXPT_CLASSIFY_INFO_0_RXDMA0_DESTINATION_RING_SELECTION_OFFSET 0x00000000 469 #define RXPT_CLASSIFY_INFO_0_RXDMA0_DESTINATION_RING_SELECTION_LSB 13 470 #define RXPT_CLASSIFY_INFO_0_RXDMA0_DESTINATION_RING_SELECTION_MASK 0x00006000 471 472 /* Description RXPT_CLASSIFY_INFO_0_RESERVED_0B 473 474 <legal 0> 475 */ 476 #define RXPT_CLASSIFY_INFO_0_RESERVED_0B_OFFSET 0x00000000 477 #define RXPT_CLASSIFY_INFO_0_RESERVED_0B_LSB 15 478 #define RXPT_CLASSIFY_INFO_0_RESERVED_0B_MASK 0xffff8000 479 480 481 #endif // _RXPT_CLASSIFY_INFO_H_ 482