rxpt_classify_info.h 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522
  1. /*
  2. * Copyright (c) 2020 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. // DO NOT EDIT! This file is automatically generated
  20. // These definitions are tied to a particular hardware layout
  21. #ifndef _RXPT_CLASSIFY_INFO_H_
  22. #define _RXPT_CLASSIFY_INFO_H_
  23. #if !defined(__ASSEMBLER__)
  24. #endif
  25. // ################ START SUMMARY #################
  26. //
  27. // Dword Fields
  28. // 0 reo_destination_indication[4:0], lmac_peer_id_msb[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. #define NUM_OF_DWORDS_RXPT_CLASSIFY_INFO 1
  32. struct rxpt_classify_info {
  33. uint32_t reo_destination_indication : 5, //[4:0]
  34. lmac_peer_id_msb : 2, //[6:5]
  35. use_flow_id_toeplitz_clfy : 1, //[7]
  36. pkt_selection_fp_ucast_data : 1, //[8]
  37. pkt_selection_fp_mcast_data : 1, //[9]
  38. pkt_selection_fp_1000 : 1, //[10]
  39. rxdma0_source_ring_selection : 2, //[12:11]
  40. rxdma0_destination_ring_selection: 2, //[14:13]
  41. reserved_0b : 17; //[31:15]
  42. };
  43. /*
  44. reo_destination_indication
  45. The ID of the REO exit ring where the MSDU frame shall
  46. push after (MPDU level) reordering has finished.
  47. <enum 0 reo_destination_tcl> Reo will push the frame
  48. into the REO2TCL ring
  49. <enum 1 reo_destination_sw1> Reo will push the frame
  50. into the REO2SW1 ring
  51. <enum 2 reo_destination_sw2> Reo will push the frame
  52. into the REO2SW2 ring
  53. <enum 3 reo_destination_sw3> Reo will push the frame
  54. into the REO2SW3 ring
  55. <enum 4 reo_destination_sw4> Reo will push the frame
  56. into the REO2SW4 ring
  57. <enum 5 reo_destination_release> Reo will push the frame
  58. into the REO_release ring
  59. <enum 6 reo_destination_fw> Reo will push the frame into
  60. the REO2FW ring
  61. <enum 7 reo_destination_sw5> Reo will push the frame
  62. into the REO2SW5 ring (REO remaps this in chips without
  63. REO2SW5 ring, e.g. Pine)
  64. <enum 8 reo_destination_sw6> Reo will push the frame
  65. into the REO2SW6 ring (REO remaps this in chips without
  66. REO2SW6 ring, e.g. Pine)
  67. <enum 9 reo_destination_9> REO remaps this <enum 10
  68. reo_destination_10> REO remaps this
  69. <enum 11 reo_destination_11> REO remaps this
  70. <enum 12 reo_destination_12> REO remaps this <enum 13
  71. reo_destination_13> REO remaps this
  72. <enum 14 reo_destination_14> REO remaps this
  73. <enum 15 reo_destination_15> REO remaps this
  74. <enum 16 reo_destination_16> REO remaps this
  75. <enum 17 reo_destination_17> REO remaps this
  76. <enum 18 reo_destination_18> REO remaps this
  77. <enum 19 reo_destination_19> REO remaps this
  78. <enum 20 reo_destination_20> REO remaps this
  79. <enum 21 reo_destination_21> REO remaps this
  80. <enum 22 reo_destination_22> REO remaps this
  81. <enum 23 reo_destination_23> REO remaps this
  82. <enum 24 reo_destination_24> REO remaps this
  83. <enum 25 reo_destination_25> REO remaps this
  84. <enum 26 reo_destination_26> REO remaps this
  85. <enum 27 reo_destination_27> REO remaps this
  86. <enum 28 reo_destination_28> REO remaps this
  87. <enum 29 reo_destination_29> REO remaps this
  88. <enum 30 reo_destination_30> REO remaps this
  89. <enum 31 reo_destination_31> REO remaps this
  90. <legal all>
  91. lmac_peer_id_msb
  92. If use_flow_id_toeplitz_clfy is set and lmac_peer_id_'sb
  93. is 2'b00, Rx OLE uses a REO desination indicati'n of {1'b1,
  94. hash[3:0]} using the chosen Toeplitz hash from Common Parser
  95. if flow search fails.
  96. If use_flow_id_toeplitz_clfy is set and lmac_peer_id_msb
  97. 's not 2'b00, Rx OLE uses a REO desination indication of
  98. {lmac_peer_id_msb, hash[2:0]} using the chosen Toeplitz hash
  99. from Common Parser if flow search fails.
  100. This LMAC/peer-based routing is not supported in
  101. Hastings80 and HastingsPrime.
  102. <legal all>
  103. use_flow_id_toeplitz_clfy
  104. Indication to Rx OLE to enable REO destination routing
  105. based on the chosen Toeplitz hash from Common Parser, in
  106. case flow search fails
  107. <legal all>
  108. pkt_selection_fp_ucast_data
  109. Filter pass Unicast data frame (matching
  110. rxpcu_filter_pass and sw_frame_group_Unicast_data) routing
  111. selection
  112. 1'b0: source and destination rings are selected from the
  113. RxOLE register settings for the packet type
  114. 1'b1: source ring and destination ring is selected from
  115. the rxdma0_source_ring_selection and
  116. rxdma0_destination_ring_selection fields in this STRUCT
  117. <legal all>
  118. pkt_selection_fp_mcast_data
  119. Filter pass Multicast data frame (matching
  120. rxpcu_filter_pass and sw_frame_group_Multicast_data) routing
  121. selection
  122. 1'b0: source and destination rings are selected from the
  123. RxOLE register settings for the packet type
  124. 1'b1: source ring and destination ring is selected from
  125. the rxdma0_source_ring_selection and
  126. rxdma0_destination_ring_selection fields in this STRUCT
  127. <legal all>
  128. pkt_selection_fp_1000
  129. Filter pass BAR frame (matching rxpcu_filter_pass and
  130. sw_frame_group_ctrl_1000) routing selection
  131. 1'b0: source and destination rings are selected from the
  132. RxOLE register settings for the packet type
  133. 1'b1: source ring and destination ring is selected from
  134. the rxdma0_source_ring_selection and
  135. rxdma0_destination_ring_selection fields in this STRUCT
  136. <legal all>
  137. rxdma0_source_ring_selection
  138. Field only valid when for the received frame type the
  139. corresponding pkt_selection_fp_... bit is set
  140. <enum 0 wbm2rxdma_buf_source_ring> The data buffer for
  141. <enum 1 fw2rxdma_buf_source_ring> The data buffer for
  142. this frame shall be sourced by fw2rxdma buffer source ring.
  143. <enum 2 sw2rxdma_buf_source_ring> The data buffer for
  144. this frame shall be sourced by sw2rxdma buffer source ring.
  145. <enum 3 no_buffer_ring> The frame shall not be written
  146. to any data buffer.
  147. <legal all>
  148. rxdma0_destination_ring_selection
  149. Field only valid when for the received frame type the
  150. corresponding pkt_selection_fp_... bit is set
  151. <enum 0 rxdma_release_ring> RXDMA0 shall push the frame
  152. to the Release ring. Effectively this means the frame needs
  153. to be dropped.
  154. <enum 1 rxdma2fw_ring> RXDMA0 shall push the frame to
  155. the FW ring.
  156. <enum 2 rxdma2sw_ring> RXDMA0 shall push the frame to
  157. the SW ring.
  158. <enum 3 rxdma2reo_ring> RXDMA0 shall push the frame to
  159. the REO entrance ring.
  160. <legal all>
  161. reserved_0b
  162. <legal 0>
  163. */
  164. /* Description RXPT_CLASSIFY_INFO_0_REO_DESTINATION_INDICATION
  165. The ID of the REO exit ring where the MSDU frame shall
  166. push after (MPDU level) reordering has finished.
  167. <enum 0 reo_destination_tcl> Reo will push the frame
  168. into the REO2TCL ring
  169. <enum 1 reo_destination_sw1> Reo will push the frame
  170. into the REO2SW1 ring
  171. <enum 2 reo_destination_sw2> Reo will push the frame
  172. into the REO2SW2 ring
  173. <enum 3 reo_destination_sw3> Reo will push the frame
  174. into the REO2SW3 ring
  175. <enum 4 reo_destination_sw4> Reo will push the frame
  176. into the REO2SW4 ring
  177. <enum 5 reo_destination_release> Reo will push the frame
  178. into the REO_release ring
  179. <enum 6 reo_destination_fw> Reo will push the frame into
  180. the REO2FW ring
  181. <enum 7 reo_destination_sw5> Reo will push the frame
  182. into the REO2SW5 ring (REO remaps this in chips without
  183. REO2SW5 ring, e.g. Pine)
  184. <enum 8 reo_destination_sw6> Reo will push the frame
  185. into the REO2SW6 ring (REO remaps this in chips without
  186. REO2SW6 ring, e.g. Pine)
  187. <enum 9 reo_destination_9> REO remaps this <enum 10
  188. reo_destination_10> REO remaps this
  189. <enum 11 reo_destination_11> REO remaps this
  190. <enum 12 reo_destination_12> REO remaps this <enum 13
  191. reo_destination_13> REO remaps this
  192. <enum 14 reo_destination_14> REO remaps this
  193. <enum 15 reo_destination_15> REO remaps this
  194. <enum 16 reo_destination_16> REO remaps this
  195. <enum 17 reo_destination_17> REO remaps this
  196. <enum 18 reo_destination_18> REO remaps this
  197. <enum 19 reo_destination_19> REO remaps this
  198. <enum 20 reo_destination_20> REO remaps this
  199. <enum 21 reo_destination_21> REO remaps this
  200. <enum 22 reo_destination_22> REO remaps this
  201. <enum 23 reo_destination_23> REO remaps this
  202. <enum 24 reo_destination_24> REO remaps this
  203. <enum 25 reo_destination_25> REO remaps this
  204. <enum 26 reo_destination_26> REO remaps this
  205. <enum 27 reo_destination_27> REO remaps this
  206. <enum 28 reo_destination_28> REO remaps this
  207. <enum 29 reo_destination_29> REO remaps this
  208. <enum 30 reo_destination_30> REO remaps this
  209. <enum 31 reo_destination_31> REO remaps this
  210. <legal all>
  211. */
  212. #define RXPT_CLASSIFY_INFO_0_REO_DESTINATION_INDICATION_OFFSET 0x00000000
  213. #define RXPT_CLASSIFY_INFO_0_REO_DESTINATION_INDICATION_LSB 0
  214. #define RXPT_CLASSIFY_INFO_0_REO_DESTINATION_INDICATION_MASK 0x0000001f
  215. /* Description RXPT_CLASSIFY_INFO_0_LMAC_PEER_ID_MSB
  216. If use_flow_id_toeplitz_clfy is set and lmac_peer_id_'sb
  217. is 2'b00, Rx OLE uses a REO desination indicati'n of {1'b1,
  218. hash[3:0]} using the chosen Toeplitz hash from Common Parser
  219. if flow search fails.
  220. If use_flow_id_toeplitz_clfy is set and lmac_peer_id_msb
  221. 's not 2'b00, Rx OLE uses a REO desination indication of
  222. {lmac_peer_id_msb, hash[2:0]} using the chosen Toeplitz hash
  223. from Common Parser if flow search fails.
  224. This LMAC/peer-based routing is not supported in
  225. Hastings80 and HastingsPrime.
  226. <legal all>
  227. */
  228. #define RXPT_CLASSIFY_INFO_0_LMAC_PEER_ID_MSB_OFFSET 0x00000000
  229. #define RXPT_CLASSIFY_INFO_0_LMAC_PEER_ID_MSB_LSB 5
  230. #define RXPT_CLASSIFY_INFO_0_LMAC_PEER_ID_MSB_MASK 0x00000060
  231. /* Description RXPT_CLASSIFY_INFO_0_USE_FLOW_ID_TOEPLITZ_CLFY
  232. Indication to Rx OLE to enable REO destination routing
  233. based on the chosen Toeplitz hash from Common Parser, in
  234. case flow search fails
  235. <legal all>
  236. */
  237. #define RXPT_CLASSIFY_INFO_0_USE_FLOW_ID_TOEPLITZ_CLFY_OFFSET 0x00000000
  238. #define RXPT_CLASSIFY_INFO_0_USE_FLOW_ID_TOEPLITZ_CLFY_LSB 7
  239. #define RXPT_CLASSIFY_INFO_0_USE_FLOW_ID_TOEPLITZ_CLFY_MASK 0x00000080
  240. /* Description RXPT_CLASSIFY_INFO_0_PKT_SELECTION_FP_UCAST_DATA
  241. Filter pass Unicast data frame (matching
  242. rxpcu_filter_pass and sw_frame_group_Unicast_data) routing
  243. selection
  244. 1'b0: source and destination rings are selected from the
  245. RxOLE register settings for the packet type
  246. 1'b1: source ring and destination ring is selected from
  247. the rxdma0_source_ring_selection and
  248. rxdma0_destination_ring_selection fields in this STRUCT
  249. <legal all>
  250. */
  251. #define RXPT_CLASSIFY_INFO_0_PKT_SELECTION_FP_UCAST_DATA_OFFSET 0x00000000
  252. #define RXPT_CLASSIFY_INFO_0_PKT_SELECTION_FP_UCAST_DATA_LSB 8
  253. #define RXPT_CLASSIFY_INFO_0_PKT_SELECTION_FP_UCAST_DATA_MASK 0x00000100
  254. /* Description RXPT_CLASSIFY_INFO_0_PKT_SELECTION_FP_MCAST_DATA
  255. Filter pass Multicast data frame (matching
  256. rxpcu_filter_pass and sw_frame_group_Multicast_data) routing
  257. selection
  258. 1'b0: source and destination rings are selected from the
  259. RxOLE register settings for the packet type
  260. 1'b1: source ring and destination ring is selected from
  261. the rxdma0_source_ring_selection and
  262. rxdma0_destination_ring_selection fields in this STRUCT
  263. <legal all>
  264. */
  265. #define RXPT_CLASSIFY_INFO_0_PKT_SELECTION_FP_MCAST_DATA_OFFSET 0x00000000
  266. #define RXPT_CLASSIFY_INFO_0_PKT_SELECTION_FP_MCAST_DATA_LSB 9
  267. #define RXPT_CLASSIFY_INFO_0_PKT_SELECTION_FP_MCAST_DATA_MASK 0x00000200
  268. /* Description RXPT_CLASSIFY_INFO_0_PKT_SELECTION_FP_1000
  269. Filter pass BAR frame (matching rxpcu_filter_pass and
  270. sw_frame_group_ctrl_1000) routing selection
  271. 1'b0: source and destination rings are selected from the
  272. RxOLE register settings for the packet type
  273. 1'b1: source ring and destination ring is selected from
  274. the rxdma0_source_ring_selection and
  275. rxdma0_destination_ring_selection fields in this STRUCT
  276. <legal all>
  277. */
  278. #define RXPT_CLASSIFY_INFO_0_PKT_SELECTION_FP_1000_OFFSET 0x00000000
  279. #define RXPT_CLASSIFY_INFO_0_PKT_SELECTION_FP_1000_LSB 10
  280. #define RXPT_CLASSIFY_INFO_0_PKT_SELECTION_FP_1000_MASK 0x00000400
  281. /* Description RXPT_CLASSIFY_INFO_0_RXDMA0_SOURCE_RING_SELECTION
  282. Field only valid when for the received frame type the
  283. corresponding pkt_selection_fp_... bit is set
  284. <enum 0 wbm2rxdma_buf_source_ring> The data buffer for
  285. <enum 1 fw2rxdma_buf_source_ring> The data buffer for
  286. this frame shall be sourced by fw2rxdma buffer source ring.
  287. <enum 2 sw2rxdma_buf_source_ring> The data buffer for
  288. this frame shall be sourced by sw2rxdma buffer source ring.
  289. <enum 3 no_buffer_ring> The frame shall not be written
  290. to any data buffer.
  291. <legal all>
  292. */
  293. #define RXPT_CLASSIFY_INFO_0_RXDMA0_SOURCE_RING_SELECTION_OFFSET 0x00000000
  294. #define RXPT_CLASSIFY_INFO_0_RXDMA0_SOURCE_RING_SELECTION_LSB 11
  295. #define RXPT_CLASSIFY_INFO_0_RXDMA0_SOURCE_RING_SELECTION_MASK 0x00001800
  296. /* Description RXPT_CLASSIFY_INFO_0_RXDMA0_DESTINATION_RING_SELECTION
  297. Field only valid when for the received frame type the
  298. corresponding pkt_selection_fp_... bit is set
  299. <enum 0 rxdma_release_ring> RXDMA0 shall push the frame
  300. to the Release ring. Effectively this means the frame needs
  301. to be dropped.
  302. <enum 1 rxdma2fw_ring> RXDMA0 shall push the frame to
  303. the FW ring.
  304. <enum 2 rxdma2sw_ring> RXDMA0 shall push the frame to
  305. the SW ring.
  306. <enum 3 rxdma2reo_ring> RXDMA0 shall push the frame to
  307. the REO entrance ring.
  308. <legal all>
  309. */
  310. #define RXPT_CLASSIFY_INFO_0_RXDMA0_DESTINATION_RING_SELECTION_OFFSET 0x00000000
  311. #define RXPT_CLASSIFY_INFO_0_RXDMA0_DESTINATION_RING_SELECTION_LSB 13
  312. #define RXPT_CLASSIFY_INFO_0_RXDMA0_DESTINATION_RING_SELECTION_MASK 0x00006000
  313. /* Description RXPT_CLASSIFY_INFO_0_RESERVED_0B
  314. <legal 0>
  315. */
  316. #define RXPT_CLASSIFY_INFO_0_RESERVED_0B_OFFSET 0x00000000
  317. #define RXPT_CLASSIFY_INFO_0_RESERVED_0B_LSB 15
  318. #define RXPT_CLASSIFY_INFO_0_RESERVED_0B_MASK 0xffff8000
  319. #endif // _RXPT_CLASSIFY_INFO_H_