rxpt_classify_info.h 15 KB

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