rxpt_classify_info.h 14 KB

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