cfg_ipa.h 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250
  1. /*
  2. * Copyright (c) 2012-2019 The Linux Foundation. All rights reserved.
  3. * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
  4. *
  5. * Permission to use, copy, modify, and/or distribute this software for
  6. * any purpose with or without fee is hereby granted, provided that the
  7. * above copyright notice and this permission notice appear in all
  8. * copies.
  9. *
  10. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
  11. * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
  12. * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
  13. * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
  14. * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
  15. * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  16. * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  17. * PERFORMANCE OF THIS SOFTWARE.
  18. */
  19. /**
  20. * DOC: This file contains definitions of Data Path configuration.
  21. */
  22. #ifndef _CFG_IPA_H_
  23. #define _CFG_IPA_H_
  24. #include "cfg_define.h"
  25. /* DP INI Declarations */
  26. /*
  27. * IPA Offload configuration - Each bit enables a feature
  28. * bit0 - IPA Enable
  29. * bit1 - IPA Pre filter enable
  30. * bit2 - IPv6 enable
  31. * bit3 - IPA Resource Manager (RM) enable
  32. * bit4 - IPA Clock scaling enable
  33. */
  34. /*
  35. * <ini>
  36. * gIPAConfig - IPA configuration
  37. * @Min: 0
  38. * @Max: 0xFFFFFFFF
  39. * @Default: 0
  40. *
  41. * This ini specifies the IPA configuration
  42. *
  43. * Related: N/A
  44. *
  45. * Supported Feature: IPA
  46. *
  47. * Usage: Internal
  48. *
  49. * </ini>
  50. */
  51. #define CFG_DP_IPA_OFFLOAD_CONFIG \
  52. CFG_INI_UINT("gIPAConfig", \
  53. 0, \
  54. 0xFFFFFFFF, \
  55. 0, \
  56. CFG_VALUE_OR_DEFAULT, "IPA offload configuration")
  57. /*
  58. * <ini>
  59. * gIPADescSize - IPA descriptor size
  60. * @Min: 800
  61. * @Max: 8000
  62. * @Default: 800
  63. *
  64. * This ini specifies the IPA descriptor size
  65. *
  66. * Related: N/A
  67. *
  68. * Supported Feature: IPA
  69. *
  70. * Usage: Internal
  71. *
  72. * </ini>
  73. */
  74. #define CFG_DP_IPA_DESC_SIZE \
  75. CFG_INI_UINT("gIPADescSize", \
  76. 800, \
  77. 8000, \
  78. 800, \
  79. CFG_VALUE_OR_DEFAULT, "IPA DESC SIZE")
  80. /*
  81. * <ini>
  82. * gIPAHighBandwidthMbps - IPA high bw threshold
  83. * @Min: 200
  84. * @Max: 1000
  85. * @Default: 400
  86. *
  87. * This ini specifies the IPA high bw threshold
  88. *
  89. * Related: N/A
  90. *
  91. * Supported Feature: IPA
  92. *
  93. * Usage: Internal
  94. *
  95. * </ini>
  96. */
  97. #define CFG_DP_IPA_HIGH_BANDWIDTH_MBPS \
  98. CFG_INI_UINT("gIPAHighBandwidthMbps", \
  99. 200, \
  100. 1000, \
  101. 400, \
  102. CFG_VALUE_OR_DEFAULT, "IPA high bw threshold")
  103. /*
  104. * <ini>
  105. * gIPAMediumBandwidthMbps - IPA medium bw threshold
  106. * @Min: 100
  107. * @Max: 400
  108. * @Default: 200
  109. *
  110. * This ini specifies the IPA medium bw threshold
  111. *
  112. * Related: N/A
  113. *
  114. * Supported Feature: IPA
  115. *
  116. * Usage: Internal
  117. *
  118. * </ini>
  119. */
  120. #define CFG_DP_IPA_MEDIUM_BANDWIDTH_MBPS \
  121. CFG_INI_UINT("gIPAMediumBandwidthMbps", \
  122. 100, \
  123. 400, \
  124. 200, \
  125. CFG_VALUE_OR_DEFAULT, "IPA medium bw threshold")
  126. /*
  127. * <ini>
  128. * gIPALowBandwidthMbps - IPA low bw threshold
  129. * @Min: 0
  130. * @Max: 100
  131. * @Default: 100
  132. *
  133. * This ini specifies the IPA low bw threshold
  134. *
  135. * Related: N/A
  136. *
  137. * Supported Feature: IPA
  138. *
  139. * Usage: Internal
  140. *
  141. * </ini>
  142. */
  143. #define CFG_DP_IPA_LOW_BANDWIDTH_MBPS \
  144. CFG_INI_UINT("gIPALowBandwidthMbps", \
  145. 0, \
  146. 100, \
  147. 100, \
  148. CFG_VALUE_OR_DEFAULT, "IPA low bw threshold")
  149. /*
  150. * <ini>
  151. * gIPAForceVotingEnable - IPA force voting enable
  152. * @Default: false
  153. *
  154. * This ini specifies to enable IPA force voting
  155. *
  156. * Related: N/A
  157. *
  158. * Supported Feature: IPA
  159. *
  160. * Usage: Internal
  161. *
  162. * </ini>
  163. */
  164. #define CFG_DP_IPA_ENABLE_FORCE_VOTING \
  165. CFG_INI_BOOL("gIPAForceVotingEnable", \
  166. false, "Ctrl to enable force voting")
  167. /*
  168. * <ini>
  169. * IpaUcTxBufCount - IPA tx buffer count
  170. * @Min: 0
  171. * @Max: 2048
  172. * @Default: 512
  173. *
  174. * This ini specifies the IPA tx buffer count
  175. *
  176. * Related: N/A
  177. *
  178. * Supported Feature: IPA
  179. *
  180. * Usage: Internal
  181. *
  182. * </ini>
  183. */
  184. #define CFG_DP_IPA_UC_TX_BUF_COUNT \
  185. CFG_INI_UINT("IpaUcTxBufCount", \
  186. 0, \
  187. 2048, \
  188. 512, \
  189. CFG_VALUE_OR_DEFAULT, "IPA tx buffer count")
  190. /*
  191. * <ini>
  192. * gIPAWds - IPA WDS Enable
  193. * @Default: false
  194. *
  195. * This ini specifies to enable WDS for IPA
  196. *
  197. * Related: N/A
  198. *
  199. * Supported Feature: IPA
  200. *
  201. * Usage: Internal
  202. *
  203. * </ini>
  204. */
  205. #define CFG_DP_IPA_WDS_STATUS \
  206. CFG_INI_BOOL("gIPAWds", \
  207. false, "Ctrl to enable WDS for EasyMesh")
  208. /*
  209. * <ini>
  210. * gIPAVlanEnable - IPA vlan support enable
  211. * @Default: false
  212. *
  213. * This ini specifies to enable IPA vlan support
  214. *
  215. * Related: N/A
  216. *
  217. * Supported Feature: IPA
  218. *
  219. * Usage: Internal
  220. *
  221. * </ini>
  222. */
  223. #define CFG_DP_IPA_ENABLE_VLAN_SUPPORT \
  224. CFG_INI_BOOL("gIPAVlanEnable", \
  225. false, "Ctrl to enable vlan support with IPA Offload")
  226. #define CFG_IPA \
  227. CFG(CFG_DP_IPA_OFFLOAD_CONFIG) \
  228. CFG(CFG_DP_IPA_DESC_SIZE) \
  229. CFG(CFG_DP_IPA_HIGH_BANDWIDTH_MBPS) \
  230. CFG(CFG_DP_IPA_MEDIUM_BANDWIDTH_MBPS) \
  231. CFG(CFG_DP_IPA_LOW_BANDWIDTH_MBPS) \
  232. CFG(CFG_DP_IPA_ENABLE_FORCE_VOTING) \
  233. CFG(CFG_DP_IPA_UC_TX_BUF_COUNT) \
  234. CFG(CFG_DP_IPA_WDS_STATUS) \
  235. CFG(CFG_DP_IPA_ENABLE_VLAN_SUPPORT)
  236. #endif /* _CFG_IPA_H_ */