wlan_dp_cfg.h 34 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364
  1. /*
  2. * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. 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 WLAN_DP_CFG_H__
  19. #define WLAN_DP_CFG_H__
  20. #define CFG_DP_RPS_RX_QUEUE_CPU_MAP_LIST_LEN 30
  21. #ifdef CONFIG_DP_TRACE
  22. /* Max length of gDptraceConfig string. e.g.- "1, 6, 1, 62" */
  23. #define DP_TRACE_CONFIG_STRING_LENGTH (20)
  24. /* At max 4 DP Trace config parameters are allowed. Refer - gDptraceConfig */
  25. #define DP_TRACE_CONFIG_NUM_PARAMS (4)
  26. /*
  27. * Default value of live mode in case it cannot be determined from cfg string
  28. * gDptraceConfig
  29. */
  30. #define DP_TRACE_CONFIG_DEFAULT_LIVE_MODE (1)
  31. /*
  32. * Default value of thresh (packets/second) beyond which DP Trace is disabled.
  33. * Use this default in case the value cannot be determined from cfg string
  34. * gDptraceConfig
  35. */
  36. #define DP_TRACE_CONFIG_DEFAULT_THRESH (6)
  37. /*
  38. * Number of intervals of BW timer to wait before enabling/disabling DP Trace.
  39. * Since throughput threshold to disable live logging for DP Trace is very low,
  40. * we calculate throughput based on # packets received in a second.
  41. * For example assuming bandwidth timer interval is 100ms, and if more than 6
  42. * prints are received in 10 * 100 ms interval, we want to disable DP Trace
  43. * live logging. DP_TRACE_CONFIG_DEFAULT_THRESH_TIME_LIMIT is the default
  44. * value, to be used in case the real value cannot be derived from
  45. * bw timer interval
  46. */
  47. #define DP_TRACE_CONFIG_DEFAULT_THRESH_TIME_LIMIT (10)
  48. /* Default proto bitmap in case its missing in gDptraceConfig string */
  49. #define DP_TRACE_CONFIG_DEFAULT_BITMAP \
  50. (QDF_NBUF_PKT_TRAC_TYPE_EAPOL |\
  51. QDF_NBUF_PKT_TRAC_TYPE_DHCP |\
  52. QDF_NBUF_PKT_TRAC_TYPE_MGMT_ACTION |\
  53. QDF_NBUF_PKT_TRAC_TYPE_ARP |\
  54. QDF_NBUF_PKT_TRAC_TYPE_ICMP |\
  55. QDF_NBUF_PKT_TRAC_TYPE_ICMPv6)\
  56. /* Default verbosity, in case its missing in gDptraceConfig string*/
  57. #define DP_TRACE_CONFIG_DEFAULT_VERBOSTY QDF_DP_TRACE_VERBOSITY_LOW
  58. #endif
  59. #define CFG_ENABLE_RX_THREAD BIT(0)
  60. #define CFG_ENABLE_RPS BIT(1)
  61. #define CFG_ENABLE_NAPI BIT(2)
  62. #define CFG_ENABLE_DYNAMIC_RPS BIT(3)
  63. #define CFG_ENABLE_DP_RX_THREADS BIT(4)
  64. #define CFG_RX_MODE_MAX (CFG_ENABLE_RX_THREAD | \
  65. CFG_ENABLE_RPS | \
  66. CFG_ENABLE_NAPI | \
  67. CFG_ENABLE_DYNAMIC_RPS | \
  68. CFG_ENABLE_DP_RX_THREADS)
  69. #ifdef MDM_PLATFORM
  70. #define CFG_RX_MODE_DEFAULT 0
  71. #elif defined(HELIUMPLUS)
  72. #define CFG_RX_MODE_DEFAULT CFG_ENABLE_NAPI
  73. #endif
  74. #ifndef CFG_RX_MODE_DEFAULT
  75. #if defined(FEATURE_WLAN_DP_RX_THREADS)
  76. #define CFG_RX_MODE_DEFAULT (CFG_ENABLE_DP_RX_THREADS | CFG_ENABLE_NAPI)
  77. #else
  78. #define CFG_RX_MODE_DEFAULT (CFG_ENABLE_RX_THREAD | CFG_ENABLE_NAPI)
  79. #endif
  80. #endif
  81. /* Max # of packets to be processed in 1 tx comp loop */
  82. #define CFG_DP_TX_COMP_LOOP_PKT_LIMIT_DEFAULT 64
  83. #define CFG_DP_TX_COMP_LOOP_PKT_LIMIT_MAX (1024 * 1024)
  84. /*Max # of packets to be processed in 1 rx reap loop */
  85. #define CFG_DP_RX_REAP_LOOP_PKT_LIMIT_DEFAULT 64
  86. #define CFG_DP_RX_REAP_LOOP_PKT_LIMIT_MAX (1024 * 1024)
  87. /* Max # of HP OOS (out of sync) updates */
  88. #define CFG_DP_RX_HP_OOS_UPDATE_LIMIT_DEFAULT 0
  89. #define CFG_DP_RX_HP_OOS_UPDATE_LIMIT_MAX 1024
  90. /* Max Yield time duration for RX Softirq */
  91. #define CFG_DP_RX_SOFTIRQ_MAX_YIELD_TIME_NS_DEFAULT (500 * 1000)
  92. #define CFG_DP_RX_SOFTIRQ_MAX_YIELD_TIME_NS_MAX (10 * 1000 * 1000)
  93. #ifdef WLAN_FEATURE_DP_BUS_BANDWIDTH
  94. /*
  95. * <ini>
  96. * gBusBandwidthSuperHighThreshold - bus bandwidth super high threshold
  97. *
  98. * @Min: 0
  99. * @Max: 4294967295UL
  100. * @Default: 22000
  101. *
  102. * This ini specifies the bus bandwidth super high threshold
  103. *
  104. * Usage: Internal
  105. *
  106. * </ini>
  107. */
  108. #define CFG_DP_BUS_BANDWIDTH_SUPER_HIGH_THRESHOLD \
  109. CFG_INI_UINT( \
  110. "gBusBandwidthSuperHighThreshold", \
  111. 0, \
  112. 4294967295UL, \
  113. 22000, \
  114. CFG_VALUE_OR_DEFAULT, \
  115. "Bus bandwidth super high threshold")
  116. /*
  117. * <ini>
  118. * gBusBandwidthUltraHighThreshold - bus bandwidth ultra high threshold
  119. *
  120. * @Min: 0
  121. * @Max: 4294967295UL
  122. * @Default: 12000
  123. *
  124. * This ini specifies the bus bandwidth very high threshold
  125. *
  126. * Usage: Internal
  127. *
  128. * </ini>
  129. */
  130. #define CFG_DP_BUS_BANDWIDTH_ULTRA_HIGH_THRESHOLD \
  131. CFG_INI_UINT( \
  132. "gBusBandwidthUltraHighThreshold", \
  133. 0, \
  134. 4294967295UL, \
  135. 12000, \
  136. CFG_VALUE_OR_DEFAULT, \
  137. "Bus bandwidth ultra high threshold")
  138. /*
  139. * <ini>
  140. * gBusBandwidthVeryHighThreshold - bus bandwidth very high threshold
  141. *
  142. * @Min: 0
  143. * @Max: 4294967295UL
  144. * @Default: 10000
  145. *
  146. * This ini specifies the bus bandwidth very high threshold
  147. *
  148. * Usage: Internal
  149. *
  150. * </ini>
  151. */
  152. #define CFG_DP_BUS_BANDWIDTH_VERY_HIGH_THRESHOLD \
  153. CFG_INI_UINT( \
  154. "gBusBandwidthVeryHighThreshold", \
  155. 0, \
  156. 4294967295UL, \
  157. 10000, \
  158. CFG_VALUE_OR_DEFAULT, \
  159. "Bus bandwidth very high threshold")
  160. /*
  161. * <ini>
  162. * gBusBandwidthMidHighThreshold - bus bandwidth high HE cases threshold
  163. *
  164. * @Min: 0
  165. * @Max: 4294967295UL
  166. * @Default: 0
  167. *
  168. * This ini specifies the bus bandwidth high HE cases threshold
  169. *
  170. * Usage: Internal
  171. *
  172. * </ini>
  173. */
  174. #define CFG_DP_BUS_BANDWIDTH_MID_HIGH_THRESHOLD \
  175. CFG_INI_UINT( \
  176. "gBusBandwidthMidHighThreshold", \
  177. 0, \
  178. 4294967295UL, \
  179. 0, \
  180. CFG_VALUE_OR_DEFAULT, \
  181. "Bus bandwidth high threshold")
  182. /*
  183. * <ini>
  184. * gBusBandwidthDBSThreshold - bus bandwidth for DBS mode threshold
  185. *
  186. * @Min: 0
  187. * @Max: 4294967295UL
  188. * @Default: 6000
  189. *
  190. * This ini specifies the bus bandwidth high threshold
  191. *
  192. * Usage: Internal
  193. *
  194. * </ini>
  195. */
  196. #define CFG_DP_BUS_BANDWIDTH_DBS_THRESHOLD \
  197. CFG_INI_UINT( \
  198. "gBusBandwidthDBSThreshold", \
  199. 0, \
  200. 4294967295UL, \
  201. 6000, \
  202. CFG_VALUE_OR_DEFAULT, \
  203. "Bus bandwidth DBS mode threshold")
  204. /*
  205. * <ini>
  206. * gBusBandwidthHighThreshold - bus bandwidth high threshold
  207. *
  208. * @Min: 0
  209. * @Max: 4294967295UL
  210. * @Default: 2000
  211. *
  212. * This ini specifies the bus bandwidth high threshold
  213. *
  214. * Usage: Internal
  215. *
  216. * </ini>
  217. */
  218. #define CFG_DP_BUS_BANDWIDTH_HIGH_THRESHOLD \
  219. CFG_INI_UINT( \
  220. "gBusBandwidthHighThreshold", \
  221. 0, \
  222. 4294967295UL, \
  223. 2000, \
  224. CFG_VALUE_OR_DEFAULT, \
  225. "Bus bandwidth high threshold")
  226. /*
  227. * <ini>
  228. * gBusBandwidthMediumThreshold - bus bandwidth medium threshold
  229. *
  230. * @Min: 0
  231. * @Max: 4294967295UL
  232. * @Default: 500
  233. *
  234. * This ini specifies the bus bandwidth medium threshold
  235. *
  236. * Usage: Internal
  237. *
  238. * </ini>
  239. */
  240. #define CFG_DP_BUS_BANDWIDTH_MEDIUM_THRESHOLD \
  241. CFG_INI_UINT( \
  242. "gBusBandwidthMediumThreshold", \
  243. 0, \
  244. 4294967295UL, \
  245. 500, \
  246. CFG_VALUE_OR_DEFAULT, \
  247. "Bus bandwidth medium threshold")
  248. /*
  249. * <ini>
  250. * gBusBandwidthLowThreshold - bus bandwidth low threshold
  251. *
  252. * @Min: 0
  253. * @Max: 4294967295UL
  254. * @Default: 150
  255. *
  256. * This ini specifies the bus bandwidth low threshold
  257. *
  258. * Usage: Internal
  259. *
  260. * </ini>
  261. */
  262. #define CFG_DP_BUS_BANDWIDTH_LOW_THRESHOLD \
  263. CFG_INI_UINT( \
  264. "gBusBandwidthLowThreshold", \
  265. 0, \
  266. 4294967295UL, \
  267. 150, \
  268. CFG_VALUE_OR_DEFAULT, \
  269. "Bus bandwidth low threshold")
  270. /*
  271. * <ini>
  272. * gBusBandwidthComputeInterval - bus bandwidth compute interval
  273. *
  274. * @Min: 0
  275. * @Max: 10000
  276. * @Default: 100
  277. *
  278. * This ini specifies thebus bandwidth compute interval
  279. *
  280. * Usage: Internal
  281. *
  282. * </ini>
  283. */
  284. #define CFG_DP_BUS_BANDWIDTH_COMPUTE_INTERVAL \
  285. CFG_INI_UINT( \
  286. "gBusBandwidthComputeInterval", \
  287. 0, \
  288. 10000, \
  289. 100, \
  290. CFG_VALUE_OR_DEFAULT, \
  291. "Bus bandwidth compute interval")
  292. /*
  293. * <ini>
  294. * gTcpLimitOutputEnable - Control to enable TCP limit output byte
  295. * @Default: true
  296. *
  297. * This ini is used to enable dynamic configuration of TCP limit output bytes
  298. * tcp_limit_output_bytes param. Enabling this will let driver post message to
  299. * cnss-daemon, accordingly cnss-daemon will modify the tcp_limit_output_bytes.
  300. *
  301. * Supported Feature: Tcp limit output bytes
  302. *
  303. * Usage: Internal
  304. *
  305. * </ini>
  306. */
  307. #define CFG_DP_ENABLE_TCP_LIMIT_OUTPUT \
  308. CFG_INI_BOOL( \
  309. "gTcpLimitOutputEnable", \
  310. true, \
  311. "Control to enable TCP limit output byte")
  312. /*
  313. * <ini>
  314. * gTcpAdvWinScaleEnable - Control to enable TCP adv window scaling
  315. * @Default: true
  316. *
  317. * This ini is used to enable dynamic configuration of TCP adv window scaling
  318. * system parameter.
  319. *
  320. * Supported Feature: Tcp Advance Window Scaling
  321. *
  322. * Usage: Internal
  323. *
  324. * </ini>
  325. */
  326. #define CFG_DP_ENABLE_TCP_ADV_WIN_SCALE \
  327. CFG_INI_BOOL( \
  328. "gTcpAdvWinScaleEnable", \
  329. true, \
  330. "Control to enable TCP adv window scaling")
  331. /*
  332. * <ini>
  333. * gTcpDelAckEnable - Control to enable Dynamic Configuration of Tcp Delayed Ack
  334. * @Default: true
  335. *
  336. * This ini is used to enable Dynamic Configuration of Tcp Delayed Ack
  337. *
  338. * Related: gTcpDelAckThresholdHigh, gTcpDelAckThresholdLow,
  339. * gTcpDelAckTimerCount
  340. *
  341. * Supported Feature: Tcp Delayed Ack
  342. *
  343. * Usage: Internal
  344. *
  345. * </ini>
  346. */
  347. #define CFG_DP_ENABLE_TCP_DELACK \
  348. CFG_INI_BOOL( \
  349. "gTcpDelAckEnable", \
  350. true, \
  351. "Control to enable Dynamic Config of Tcp Delayed Ack")
  352. /*
  353. * <ini>
  354. * gTcpDelAckThresholdHigh - High Threshold inorder to trigger TCP Del Ack
  355. * indication
  356. * @Min: 0
  357. * @Max: 16000
  358. * @Default: 500
  359. *
  360. * This ini is used to mention the High Threshold inorder to trigger TCP Del Ack
  361. * indication i.e the threshold of packets received over a period of 100 ms.
  362. * i.e to have a low RX throughput requirement
  363. * Related: gTcpDelAckEnable, gTcpDelAckThresholdLow, gTcpDelAckTimerCount
  364. *
  365. * Supported Feature: Tcp Delayed Ack
  366. *
  367. * Usage: Internal
  368. *
  369. * </ini>
  370. */
  371. #define CFG_DP_TCP_DELACK_THRESHOLD_HIGH \
  372. CFG_INI_UINT( \
  373. "gTcpDelAckThresholdHigh", \
  374. 0, \
  375. 16000, \
  376. 500, \
  377. CFG_VALUE_OR_DEFAULT, \
  378. "High Threshold inorder to trigger TCP Del Ack")
  379. /*
  380. * <ini>
  381. * gTcpDelAckThresholdLow - Low Threshold inorder to trigger TCP Del Ack
  382. * indication
  383. * @Min: 0
  384. * @Max: 10000
  385. * @Default: 1000
  386. *
  387. * This ini is used to mention the Low Threshold inorder to trigger TCP Del Ack
  388. * indication i.e the threshold of packets received over a period of 100 ms.
  389. * i.e to have a low RX throughput requirement
  390. *
  391. * Related: gTcpDelAckEnable, gTcpDelAckThresholdHigh, gTcpDelAckTimerCount
  392. *
  393. * Supported Feature: Tcp Delayed Ack
  394. *
  395. * Usage: Internal
  396. *
  397. * </ini>
  398. */
  399. #define CFG_DP_TCP_DELACK_THRESHOLD_LOW \
  400. CFG_INI_UINT( \
  401. "gTcpDelAckThresholdLow", \
  402. 0, \
  403. 10000, \
  404. 1000, \
  405. CFG_VALUE_OR_DEFAULT, \
  406. "Low Threshold inorder to trigger TCP Del Ack")
  407. /*
  408. * <ini>
  409. * gTcpDelAckTimerCount - Del Ack Timer Count inorder to trigger TCP Del Ack
  410. * indication
  411. * @Min: 1
  412. * @Max: 1000
  413. * @Default: 30
  414. *
  415. * This ini is used to mention the Del Ack Timer Count inorder to
  416. * trigger TCP Del Ack indication i.e number of 100 ms periods
  417. *
  418. * Related: gTcpDelAckEnable, gTcpDelAckThresholdHigh, gTcpDelAckThresholdLow
  419. *
  420. * Supported Feature: Tcp Delayed Ack
  421. *
  422. * Usage: Internal
  423. *
  424. * </ini>
  425. */
  426. #define CFG_DP_TCP_DELACK_TIMER_COUNT \
  427. CFG_INI_UINT( \
  428. "gTcpDelAckTimerCount", \
  429. 1, \
  430. 1000, \
  431. 30, \
  432. CFG_VALUE_OR_DEFAULT, \
  433. "Del Ack Timer Count inorder to trigger TCP Del Ack")
  434. /*
  435. * <ini>
  436. * gTcpTxHighTputThreshold - High Threshold inorder to trigger High
  437. * Tx Throughput requirement.
  438. * @Min: 0
  439. * @Max: 16000
  440. * @Default: 500
  441. *
  442. * This ini specifies the threshold of packets transmitted
  443. * over a period of 100 ms beyond which TCP can be considered to have a high
  444. * TX throughput requirement. The driver uses this condition to tweak TCP TX
  445. * specific parameters (via cnss-daemon)
  446. *
  447. * Supported Feature: To tweak TCP TX n/w parameters
  448. *
  449. * Usage: Internal
  450. *
  451. * </ini>
  452. */
  453. #define CFG_DP_TCP_TX_HIGH_TPUT_THRESHOLD \
  454. CFG_INI_UINT( \
  455. "gTcpTxHighTputThreshold", \
  456. 0, \
  457. 16000, \
  458. 500, \
  459. CFG_VALUE_OR_DEFAULT, \
  460. "High Threshold inorder to trigger High Tx Tp")
  461. /*
  462. * <ini>
  463. * gBusLowTputCntThreshold - Threshold count to trigger low Tput
  464. * GRO flush skip
  465. * @Min: 0
  466. * @Max: 200
  467. * @Default: 10
  468. *
  469. * This ini is a threshold that if count of times for bus Tput level
  470. * PLD_BUS_WIDTH_LOW in bus_bw_timer() >= this threshold, will enable skipping
  471. * GRO flush, current default threshold is 10, then will delay GRO flush-skip
  472. * 1 second for low Tput level.
  473. *
  474. * Supported Feature: GRO flush skip when low T-put
  475. *
  476. * Usage: Internal
  477. *
  478. * </ini>
  479. */
  480. #define CFG_DP_BUS_LOW_BW_CNT_THRESHOLD \
  481. CFG_INI_UINT( \
  482. "gBusLowTputCntThreshold", \
  483. 0, \
  484. 200, \
  485. 10, \
  486. CFG_VALUE_OR_DEFAULT, \
  487. "Threshold to trigger GRO flush skip for low T-put")
  488. /*
  489. * <ini>
  490. * gHandleLatencyCriticalClients - Enable the handling of latency critical
  491. * clients in bus bandwidth timer.
  492. * @Default: false
  493. *
  494. * This ini enables the handling of latency critical clients, eg: 11g/a
  495. * clients, when they are running their corresponding peak throughput.
  496. *
  497. * Supported Feature: Latency critical clients in host
  498. *
  499. * Usage: External
  500. *
  501. * </ini>
  502. */
  503. #define CFG_DP_BUS_HANDLE_LATENCY_CRITICAL_CLIENTS \
  504. CFG_INI_BOOL( \
  505. "gHandleLatencyCriticalClients", \
  506. false, \
  507. "Control to enable latency critical clients")
  508. #endif /*WLAN_FEATURE_DP_BUS_BANDWIDTH*/
  509. #ifdef QCA_SUPPORT_TXRX_DRIVER_TCP_DEL_ACK
  510. /*
  511. * <ini>
  512. * gDriverDelAckHighThreshold - High Threshold inorder to trigger TCP
  513. * delay ack feature in the host.
  514. * @Min: 0
  515. * @Max: 70000
  516. * @Default: 300
  517. *
  518. * This ini specifies the threshold of RX packets transmitted
  519. * over a period of 100 ms beyond which TCP delay ack can be enabled
  520. * to improve TCP RX throughput requirement.
  521. *
  522. * Supported Feature: Tcp Delayed Ack in the host
  523. *
  524. * Usage: Internal
  525. *
  526. * </ini>
  527. */
  528. #define CFG_DP_DRIVER_TCP_DELACK_HIGH_THRESHOLD \
  529. CFG_INI_UINT( \
  530. "gDriverDelAckHighThreshold", \
  531. 0, \
  532. 70000, \
  533. 300, \
  534. CFG_VALUE_OR_DEFAULT, \
  535. "TCP delack high threshold")
  536. /*
  537. * <ini>
  538. * gDriverDelAckLowThreshold - Low Threshold inorder to disable TCP
  539. * delay ack feature in the host.
  540. * @Min: 0
  541. * @Max: 70000
  542. * @Default: 100
  543. *
  544. * This ini is used to mention the Low Threshold inorder to disable TCP Del
  545. * Ack feature in the host.
  546. *
  547. * Supported Feature: Tcp Delayed Ack in the host
  548. *
  549. * Usage: Internal
  550. *
  551. * </ini>
  552. */
  553. #define CFG_DP_DRIVER_TCP_DELACK_LOW_THRESHOLD \
  554. CFG_INI_UINT( \
  555. "gDriverDelAckLowThreshold", \
  556. 0, \
  557. 70000, \
  558. 100, \
  559. CFG_VALUE_OR_DEFAULT, \
  560. "TCP delack low threshold")
  561. /*
  562. * <ini>
  563. * gDriverDelAckTimerValue - Timeout value (ms) to send out all TCP del
  564. * ack frames
  565. * @Min: 1
  566. * @Max: 15
  567. * @Default: 3
  568. *
  569. * This ini specifies the time out value to send out all pending TCP delay
  570. * ACK frames.
  571. *
  572. * Supported Feature: Tcp Delayed Ack in the host
  573. *
  574. * Usage: Internal
  575. *
  576. * </ini>
  577. */
  578. #define CFG_DP_DRIVER_TCP_DELACK_TIMER_VALUE \
  579. CFG_INI_UINT( \
  580. "gDriverDelAckTimerValue", \
  581. 1, \
  582. 15, \
  583. 3, \
  584. CFG_VALUE_OR_DEFAULT, \
  585. "Send out all TCP Del Acks if time out")
  586. /*
  587. * <ini>
  588. * gDriverDelAckPktCount - The maximum number of TCP delay ack frames
  589. * @Min: 0
  590. * @Max: 50
  591. * @Default: 20
  592. *
  593. * This ini specifies the maximum number of TCP delayed ack frames.
  594. *
  595. * Supported Feature: Tcp Delayed Ack in the host
  596. *
  597. * Usage: Internal
  598. *
  599. * </ini>
  600. */
  601. #define CFG_DP_DRIVER_TCP_DELACK_PKT_CNT \
  602. CFG_INI_UINT( \
  603. "gDriverDelAckPktCount", \
  604. 0, \
  605. 50, \
  606. 20, \
  607. CFG_VALUE_OR_DEFAULT, \
  608. "No of TCP Del ACK count")
  609. /*
  610. * <ini>
  611. * gDriverDelAckEnable - Control to enable Dynamic Configuration of Tcp
  612. * Delayed Ack in the host.
  613. * @Default: true
  614. *
  615. * This ini is used to enable Dynamic Configuration of Tcp Delayed Ack
  616. * in the host.
  617. *
  618. * Related: gDriverDelAckHighThreshold, gDriverDelAckLowThreshold,
  619. * gDriverDelAckPktCount, gDriverDelAckTimerValue
  620. *
  621. * Supported Feature: Tcp Delayed Ack in the host
  622. *
  623. * Usage: Internal
  624. *
  625. * </ini>
  626. */
  627. #define CFG_DP_DRIVER_TCP_DELACK_ENABLE \
  628. CFG_INI_BOOL( \
  629. "gDriverDelAckEnable", \
  630. true, \
  631. "Enable tcp del ack in the driver")
  632. #endif
  633. /*
  634. * <ini>
  635. * RX_THREAD_CPU_AFFINITY_MASK - CPU mask to affine Rx_thread
  636. *
  637. * @Min: 0
  638. * @Max: 0xFF
  639. * @Default: 0x02
  640. *
  641. * This ini is used to set Rx_thread CPU affinity
  642. *
  643. * Supported Feature: Rx_thread
  644. *
  645. * Usage: Internal
  646. *
  647. * </ini>
  648. */
  649. #ifdef RX_PERFORMANCE
  650. #define CFG_DP_RX_THREAD_CPU_MASK \
  651. CFG_INI_UINT( \
  652. "RX_THREAD_CPU_AFFINITY_MASK", \
  653. 0, \
  654. 0xFF, \
  655. 0xFE, \
  656. CFG_VALUE_OR_DEFAULT, \
  657. "CPU mask to affine Rx_thread")
  658. #else
  659. #define CFG_DP_RX_THREAD_CPU_MASK \
  660. CFG_INI_UINT( \
  661. "RX_THREAD_CPU_AFFINITY_MASK", \
  662. 0, \
  663. 0xFF, \
  664. 0, \
  665. CFG_VALUE_OR_DEFAULT, \
  666. "CPU mask to affine Rx_thread")
  667. #endif
  668. /*
  669. * <ini>
  670. * RX_THREAD_UL_CPU_AFFINITY_MASK - CPU mask to affine Rx_thread
  671. *
  672. * @Min: 0
  673. * @Max: 0xFF
  674. * @Default: 0x0
  675. *
  676. * This ini is used to set Rx_thread CPU affinity for uplink traffic
  677. *
  678. * Supported Feature: Rx_thread
  679. *
  680. * Usage: Internal
  681. *
  682. * </ini>
  683. */
  684. #define CFG_DP_RX_THREAD_UL_CPU_MASK \
  685. CFG_INI_UINT( \
  686. "RX_THREAD_UL_CPU_AFFINITY_MASK", \
  687. 0, \
  688. 0xFF, \
  689. 0x0, \
  690. CFG_VALUE_OR_DEFAULT, \
  691. "CPU mask to affine Rx_thread for uplink traffic")
  692. /*
  693. * <ini>
  694. * rpsRxQueueCpuMapList - RPS map for different RX queues
  695. *
  696. * @Default: e
  697. *
  698. * This ini is used to set RPS map for different RX queues.
  699. *
  700. * List of RPS CPU maps for different rx queues registered by WLAN driver
  701. * Ref - Kernel/Documentation/networking/scaling.txt
  702. * RPS CPU map for a particular RX queue, selects CPU(s) for bottom half
  703. * processing of RX packets. For example, for a system with 4 CPUs,
  704. * 0xe: Use CPU1 - CPU3 and donot use CPU0.
  705. * 0x0: RPS is disabled, packets are processed on the interrupting CPU.
  706. .*
  707. * WLAN driver registers NUM_TX_QUEUES queues for tx and rx each during
  708. * alloc_netdev_mq. Hence, we need to have a cpu mask for each of the rx queues.
  709. *
  710. * For example, if the NUM_TX_QUEUES is 4, a sample WLAN ini entry may look like
  711. * rpsRxQueueCpuMapList=a b c d
  712. * For a 4 CPU system (CPU0 - CPU3), this implies:
  713. * 0xa - (1010) use CPU1, CPU3 for rx queue 0
  714. * 0xb - (1011) use CPU0, CPU1 and CPU3 for rx queue 1
  715. * 0xc - (1100) use CPU2, CPU3 for rx queue 2
  716. * 0xd - (1101) use CPU0, CPU2 and CPU3 for rx queue 3
  717. * In practice, we may want to avoid the cores which are heavily loaded.
  718. *
  719. * Default value of rpsRxQueueCpuMapList. Different platforms may have
  720. * different configurations for NUM_TX_QUEUES and # of cpus, and will need to
  721. * configure an appropriate value via ini file. Setting default value to 'e' to
  722. * avoid use of CPU0 (since its heavily used by other system processes) by rx
  723. * queue 0, which is currently being used for rx packet processing.
  724. *
  725. * Maximum length of string used to hold a list of cpu maps for various rx
  726. * queues. Considering a 16 core system with 5 rx queues, a RPS CPU map
  727. * list may look like -
  728. * rpsRxQueueCpuMapList = ffff ffff ffff ffff ffff
  729. * (all 5 rx queues can be processed on all 16 cores)
  730. * max string len = 24 + 1(for '\0'). Considering 30 to be on safe side.
  731. *
  732. * Supported Feature: Rx_thread
  733. *
  734. * Usage: Internal
  735. * </ini>
  736. */
  737. #define CFG_DP_RPS_RX_QUEUE_CPU_MAP_LIST \
  738. CFG_INI_STRING( \
  739. "rpsRxQueueCpuMapList", \
  740. 1, \
  741. 30, \
  742. "e", \
  743. "specify RPS map for different RX queues")
  744. /*
  745. * <ini>
  746. * gEnableTxOrphan- Enable/Disable orphaning of Tx packets
  747. * @Default: false
  748. *
  749. * This ini is used to enable/disable orphaning of Tx packets.
  750. *
  751. * Related: None
  752. *
  753. * Usage: External
  754. *
  755. * </ini>
  756. */
  757. #define CFG_DP_TX_ORPHAN_ENABLE \
  758. CFG_INI_BOOL( \
  759. "gEnableTxOrphan", \
  760. false, \
  761. "orphaning of Tx packets")
  762. /*
  763. * <ini>
  764. * rx_mode - Control to decide rx mode for packet processing
  765. *
  766. * @Min: 0
  767. * @Max: (CFG_ENABLE_RX_THREAD | CFG_ENABLE_RPS | CFG_ENABLE_NAPI | \
  768. * CFG_ENABLE_DYNAMIC_RPS)
  769. *
  770. * Some possible configurations:
  771. * rx_mode=0 - Uses tasklets for bottom half
  772. * CFG_ENABLE_NAPI (rx_mode=4) - Uses NAPI for bottom half
  773. * CFG_ENABLE_RX_THREAD | CFG_ENABLE_NAPI (rx_mode=5) - NAPI for bottom half,
  774. * rx_thread for stack. Single threaded.
  775. * CFG_ENABLE_DP_RX_THREAD | CFG_ENABLE_NAPI (rx_mode=10) - NAPI for bottom
  776. * half, dp_rx_thread for stack processing. Supports multiple rx threads.
  777. *
  778. * Usage: Internal
  779. *
  780. * </ini>
  781. */
  782. #define CFG_DP_RX_MODE \
  783. CFG_INI_UINT("rx_mode", \
  784. 0, CFG_RX_MODE_MAX, CFG_RX_MODE_DEFAULT, \
  785. CFG_VALUE_OR_DEFAULT, \
  786. "Control to decide rx mode for packet processing")
  787. /*
  788. * <ini>
  789. * tx_comp_loop_pkt_limit - Control to decide max # of packets to be processed
  790. * in 1 tx comp loop
  791. *
  792. * @Min: 8
  793. * @Max: CFG_DP_TX_COMP_LOOP_PKT_LIMIT_MAX
  794. *
  795. * Usage: Internal
  796. *
  797. * </ini>
  798. */
  799. #define CFG_DP_TX_COMP_LOOP_PKT_LIMIT \
  800. CFG_INI_UINT("tx_comp_loop_pkt_limit", \
  801. 1, CFG_DP_TX_COMP_LOOP_PKT_LIMIT_MAX, \
  802. CFG_DP_TX_COMP_LOOP_PKT_LIMIT_DEFAULT, \
  803. CFG_VALUE_OR_DEFAULT, \
  804. "Control to decide tx comp loop pkt limit")
  805. /*
  806. * <ini>
  807. * rx_reap_loop_pkt_limit - Control to decide max # of packets to be reaped
  808. * in 1 dp_rx_process reap loop
  809. *
  810. * @Min: 8
  811. * @Max: CFG_DP_RX_REAP_LOOP_PKT_LIMIT_MAX
  812. *
  813. * Usage: Internal
  814. *
  815. * </ini>
  816. */
  817. #define CFG_DP_RX_REAP_LOOP_PKT_LIMIT \
  818. CFG_INI_UINT("rx_reap_loop_pkt_limit", \
  819. 0, CFG_DP_RX_REAP_LOOP_PKT_LIMIT_MAX, \
  820. CFG_DP_RX_REAP_LOOP_PKT_LIMIT_DEFAULT, \
  821. CFG_VALUE_OR_DEFAULT, \
  822. "Control to decide rx reap loop packet limit")
  823. /*
  824. * <ini>
  825. * rx_hp_oos_update_limit - Control to decide max # of HP OOS (out of sync)
  826. * updates
  827. *
  828. * @Min: 0
  829. * @Max: CFG_DP_RX_HP_OOS_UPDATE_LIMIT_MAX
  830. *
  831. * Usage: Internal
  832. *
  833. * </ini>
  834. */
  835. #define CFG_DP_RX_HP_OOS_UPDATE_LIMIT \
  836. CFG_INI_UINT("rx_hp_oos_update_limit", \
  837. 0, CFG_DP_RX_HP_OOS_UPDATE_LIMIT_MAX, \
  838. CFG_DP_RX_HP_OOS_UPDATE_LIMIT_DEFAULT, \
  839. CFG_VALUE_OR_DEFAULT, \
  840. "Control to decide HP OOS update limit")
  841. /*
  842. * <ini>
  843. * rx_softirq_max_yield_duration_ns - Control to decide max duration for RX
  844. * softirq
  845. *
  846. * @Min: 100 * 1000 , 100us
  847. * @Max: CFG_DP_RX_SOFTIRQ_MAX_YIELD_TIME_NS_MAX
  848. *
  849. * Usage: Internal
  850. *
  851. * </ini>
  852. */
  853. #define CFG_DP_RX_SOFTIRQ_MAX_YIELD_TIME_NS \
  854. CFG_INI_UINT("rx_softirq_max_yield_duration_ns", \
  855. 100 * 1000, CFG_DP_RX_SOFTIRQ_MAX_YIELD_TIME_NS_MAX, \
  856. CFG_DP_RX_SOFTIRQ_MAX_YIELD_TIME_NS_DEFAULT, \
  857. CFG_VALUE_OR_DEFAULT, \
  858. "max yield time duration for RX Softirq")
  859. /*
  860. * <ini>
  861. * enable_multicast_replay_filter - Enable filtering of replayed multicast
  862. * packets
  863. *
  864. * In a typical infrastructure setup, it is quite normal to receive
  865. * replayed multicast packets. These packets may cause more harm than
  866. * help if not handled properly. Providing a configuration option
  867. * to enable filtering of such packets
  868. *
  869. * </ini>
  870. */
  871. #define CFG_DP_FILTER_MULTICAST_REPLAY \
  872. CFG_INI_BOOL("enable_multicast_replay_filter", \
  873. true, "Enable filtering of replayed multicast packets")
  874. /*
  875. * <ini>
  876. * rx_wakelock_timeout - Amount of time to hold wakelock for RX unicast packets
  877. * @Min: 0
  878. * @Max: 100
  879. * @Default: 50
  880. *
  881. * This ini item configures the amount of time, in milliseconds, that the driver
  882. * should prevent system power collapse after receiving an RX unicast packet.
  883. * A conigured value of 0 disables the RX Wakelock feature completely.
  884. *
  885. * Related: None.
  886. *
  887. * Supported Feature: RX Wakelock
  888. *
  889. * Usage: Internal/External
  890. *
  891. * </ini>
  892. */
  893. #define CFG_DP_RX_WAKELOCK_TIMEOUT \
  894. CFG_INI_UINT("rx_wakelock_timeout", \
  895. 0, 100, 50, CFG_VALUE_OR_DEFAULT, \
  896. "Amount of time to hold wakelock for RX unicast packets")
  897. /*
  898. * <ini>
  899. * num_dp_rx_threads - Control to set the number of dp rx threads
  900. *
  901. * @Min: 1
  902. * @Max: 4
  903. * @Default: 1
  904. *
  905. * Usage: Internal
  906. *
  907. * </ini>
  908. */
  909. #define CFG_DP_NUM_DP_RX_THREADS \
  910. CFG_INI_UINT("num_dp_rx_threads", \
  911. 1, 4, 1, CFG_VALUE_OR_DEFAULT, \
  912. "Control to set the number of dp rx threads")
  913. /*
  914. * <ini>
  915. * ce_service_max_rx_ind_flush - Maximum number of HTT messages
  916. * to be processed per NAPI poll
  917. *
  918. * @Min: 1
  919. * @Max: 32
  920. * @Default: 1
  921. *
  922. * Usage: Internal
  923. *
  924. * </ini>
  925. */
  926. #define CFG_DP_CE_SERVICE_MAX_RX_IND_FLUSH \
  927. CFG_INI_UINT("ce_service_max_rx_ind_flush", \
  928. 1, 32, 1, \
  929. CFG_VALUE_OR_DEFAULT, "Ctrl to set ce service max rx ind flsh")
  930. /*
  931. * <ini>
  932. * ce_service_max_yield_time - Time in microseconds after which
  933. * a NAPI poll must yield
  934. *
  935. * @Min: 500
  936. * @Max: 10000
  937. * @Default: 500
  938. *
  939. * Usage: Internal
  940. *
  941. * </ini>
  942. */
  943. #define CFG_DP_CE_SERVICE_MAX_YIELD_TIME \
  944. CFG_INI_UINT("ce_service_max_yield_time", \
  945. 500, 10000, 500, \
  946. CFG_VALUE_OR_DEFAULT, "Ctrl to set ce service max yield time")
  947. #ifdef WLAN_FEATURE_FASTPATH
  948. #define CFG_DP_ENABLE_FASTPATH \
  949. CFG_INI_BOOL("gEnableFastPath", \
  950. false, "Ctrl to enable fastpath feature")
  951. #define CFG_DP_ENABLE_FASTPATH_ALL \
  952. CFG(CFG_DP_ENABLE_FASTPATH)
  953. #else
  954. #define CFG_DP_ENABLE_FASTPATH_ALL
  955. #endif
  956. #define CFG_DP_ENABLE_TCP_PARAM_UPDATE \
  957. CFG_INI_BOOL("enable_tcp_param_update", \
  958. false, "configure TCP param through Wi-Fi HAL")
  959. /*
  960. * <ini>
  961. *
  962. * Enable/disable DPTRACE
  963. * Enabling this might have performance impact.
  964. *
  965. * Config DPTRACE
  966. * The sequence of params is important. If some param is missing, defaults are
  967. * considered.
  968. * Param 1: Enable/Disable DP Trace live mode (uint8_t)
  969. * Param 2: DP Trace live mode high bandwidth thresh.(uint8_t)
  970. * (packets/second) beyond which DP Trace is disabled. Decimal Val.
  971. * MGMT, DHCP, EAPOL, ARP pkts are not counted. ICMP and Data are.
  972. * Param 3: Default Verbosity (0-4)
  973. * Param 4: Proto Bitmap (uint8_t). Decimal Value.
  974. * (decimal 62 = 0x3e)
  975. * e.g., to disable live mode, use the following param in the ini file.
  976. * gDptraceConfig = 0
  977. * e.g., to enable dptrace live mode and set the thresh as 6,
  978. * use the following param in the ini file.
  979. * gDptraceConfig = 1, 6
  980. *
  981. * </ini>
  982. */
  983. #ifdef CONFIG_DP_TRACE
  984. #define CFG_DP_ENABLE_DP_TRACE \
  985. CFG_INI_BOOL("enable_dp_trace", \
  986. true, "Ctrl to enable dp trace feature")
  987. #define CFG_DP_DP_TRACE_CONFIG \
  988. CFG_INI_STRING( \
  989. "gDptraceConfig", \
  990. 1, \
  991. 20, \
  992. "1, 6, 2, 126", \
  993. "dp trace configuration string")
  994. /*
  995. * <ini>
  996. * dp_proto_event_bitmap - Control for which protocol packet diag event should
  997. * be sent to user space.
  998. * @Min: 0
  999. * @Max: 0x17
  1000. * @Default: 0x6
  1001. *
  1002. * This ini is used to control for which protocol packet diag event should be
  1003. * sent to user space.
  1004. *
  1005. * QDF_NBUF_PKT_TRAC_TYPE_DNS 0x01
  1006. * QDF_NBUF_PKT_TRAC_TYPE_EAPOL 0x02
  1007. * QDF_NBUF_PKT_TRAC_TYPE_DHCP 0x04
  1008. * QDF_NBUF_PKT_TRAC_TYPE_ARP 0x10
  1009. *
  1010. * Related: None
  1011. *
  1012. * Supported Feature: STA, SAP
  1013. *
  1014. * Usage: Internal
  1015. *
  1016. * <ini>
  1017. */
  1018. #define CFG_DP_PROTO_EVENT_BITMAP \
  1019. CFG_INI_UINT("dp_proto_event_bitmap", \
  1020. 0, 0x17, 0x17, \
  1021. CFG_VALUE_OR_DEFAULT, \
  1022. "Control for which protocol type diag log should be sent")
  1023. #define CFG_DP_CONFIG_DP_TRACE_ALL \
  1024. CFG(CFG_DP_ENABLE_DP_TRACE) \
  1025. CFG(CFG_DP_DP_TRACE_CONFIG) \
  1026. CFG(CFG_DP_PROTO_EVENT_BITMAP)
  1027. #else
  1028. #define CFG_DP_CONFIG_DP_TRACE_ALL
  1029. #endif
  1030. #ifdef WLAN_NUD_TRACKING
  1031. /*
  1032. * <ini>
  1033. * gEnableNUDTracking - Will enable or disable NUD tracking within driver
  1034. * @Min: 0
  1035. * @Max: 3
  1036. * @Default: 2
  1037. *
  1038. * This ini is used to specify the behaviour of the driver for NUD tracking.
  1039. * If the ini value is:-
  1040. * 0: Driver will not track the NUD failures, and ignore the same.
  1041. * 1: Driver will track the NUD failures and if honoured will disconnect from
  1042. * the connected BSSID.
  1043. * 2: Driver will track the NUD failures and if honoured will roam away from
  1044. * the connected BSSID to a new BSSID to retain the data connectivity.
  1045. * 3: Driver will try to roam to a new AP but if roam fails, disconnect.
  1046. * Related: None
  1047. *
  1048. * Supported Feature: STA
  1049. *
  1050. * Usage: External
  1051. *
  1052. * <ini>
  1053. */
  1054. #define CFG_DP_ENABLE_NUD_TRACKING \
  1055. CFG_INI_UINT("gEnableNUDTracking", \
  1056. 0, \
  1057. 3, \
  1058. 2, \
  1059. CFG_VALUE_OR_DEFAULT, "Driver NUD tracking behaviour")
  1060. #define CFG_DP_ENABLE_NUD_TRACKING_ALL \
  1061. CFG(CFG_DP_ENABLE_NUD_TRACKING)
  1062. #else
  1063. #define CFG_DP_ENABLE_NUD_TRACKING_ALL
  1064. #endif
  1065. #ifdef WLAN_SUPPORT_TXRX_HL_BUNDLE
  1066. #define CFG_DP_HL_BUNDLE_HIGH_TH \
  1067. CFG_INI_UINT( \
  1068. "tx_bundle_high_threashold", \
  1069. 0, \
  1070. 70000, \
  1071. 4330, \
  1072. CFG_VALUE_OR_DEFAULT, \
  1073. "tx bundle high threashold")
  1074. #define CFG_DP_HL_BUNDLE_LOW_TH \
  1075. CFG_INI_UINT( \
  1076. "tx_bundle_low_threashold", \
  1077. 0, \
  1078. 70000, \
  1079. 4000, \
  1080. CFG_VALUE_OR_DEFAULT, \
  1081. "tx bundle low threashold")
  1082. #define CFG_DP_HL_BUNDLE_TIMER_VALUE \
  1083. CFG_INI_UINT( \
  1084. "tx_bundle_timer_in_ms", \
  1085. 10, \
  1086. 10000, \
  1087. 100, \
  1088. CFG_VALUE_OR_DEFAULT, \
  1089. "tx bundle timer value in ms")
  1090. #define CFG_DP_HL_BUNDLE_SIZE \
  1091. CFG_INI_UINT( \
  1092. "tx_bundle_size", \
  1093. 0, \
  1094. 64, \
  1095. 16, \
  1096. CFG_VALUE_OR_DEFAULT, \
  1097. "tx bundle size")
  1098. #endif
  1099. #define WLAN_CFG_ICMP_REQ_TO_FW_MARK_ALL (-1)
  1100. #define WLAN_CFG_ICMP_REQ_TO_FW_MARK_INTERVAL 0
  1101. #define WLAN_CFG_ICMP_REQ_TO_FW_MARK_INTERVAL_MIN (-1)
  1102. #define WLAN_CFG_ICMP_REQ_TO_FW_MARK_INTERVAL_MAX 100000
  1103. /*
  1104. * <ini>
  1105. * icmp_req_to_fw_mark_interval - Interval to mark the ICMP Request packet
  1106. * to be sent to FW.
  1107. * @Min: -1
  1108. * @Max: 100000
  1109. * @Default: 0
  1110. *
  1111. * This ini is used to control DP Software to mark the ICMP request packets
  1112. * to be sent to FW at certain interval (in milliseconds).
  1113. * The value 0 is used to disable marking of ICMP requests to be sent to FW.
  1114. * The value -1 is used to mark all the ICMP requests to be sent to FW.
  1115. * Any value greater than zero indicates the time interval (in milliseconds)
  1116. * at which ICMP requests are marked to be sent to FW.
  1117. *
  1118. * Supported modes: All modes
  1119. *
  1120. * Usage: External
  1121. *
  1122. * </ini>
  1123. */
  1124. #define CFG_DP_ICMP_REQ_TO_FW_MARK_INTERVAL \
  1125. CFG_INI_INT("icmp_req_to_fw_mark_interval", \
  1126. WLAN_CFG_ICMP_REQ_TO_FW_MARK_INTERVAL_MIN, \
  1127. WLAN_CFG_ICMP_REQ_TO_FW_MARK_INTERVAL_MAX, \
  1128. WLAN_CFG_ICMP_REQ_TO_FW_MARK_INTERVAL, \
  1129. CFG_VALUE_OR_DEFAULT, \
  1130. "Interval to mark ICMP Request packets to be sent to FW")
  1131. /*
  1132. * <ini>
  1133. * enable_direct_link_ut_cmd - Enable direct link unit testing
  1134. * @Min: 0
  1135. * @Max: 1
  1136. * @Default: 0
  1137. *
  1138. * This ini is used to enable direct link unit test
  1139. *
  1140. * Supported feature: Direct link
  1141. *
  1142. * Usage: Internal
  1143. *
  1144. * </ini>
  1145. */
  1146. #define CFG_ENABLE_DIRECT_LINK_UT_CMD \
  1147. CFG_INI_BOOL("enable_direct_link_ut_cmd", false, \
  1148. "enable/disable direct link unit test")
  1149. /*
  1150. * <ini>
  1151. * dp_apply_mem_profile - Apply mem profile config
  1152. * @Min: 0
  1153. * @Max: 1
  1154. * @Default: 0
  1155. *
  1156. * This ini is used to apply DP mem profile config
  1157. *
  1158. * Supported feature: All modes
  1159. *
  1160. * Usage: Internal
  1161. *
  1162. * </ini>
  1163. */
  1164. #define CFG_DP_APPLY_MEM_PROFILE \
  1165. CFG_INI_BOOL("dp_apply_mem_profile", false, \
  1166. "enable/disable dp mem profile")
  1167. #ifdef WLAN_SUPPORT_RX_FISA
  1168. /*
  1169. * <ini>
  1170. * dp_rx_fisa_enable - Control Rx datapath FISA
  1171. * @Min: 0
  1172. * @Max: 1
  1173. * @Default: 1
  1174. *
  1175. * This ini is used to enable DP Rx FISA feature
  1176. *
  1177. * Related: dp_rx_flow_search_table_size
  1178. *
  1179. * Supported Feature: STA,P2P and SAP IPA disabled terminating
  1180. *
  1181. * Usage: Internal
  1182. *
  1183. * </ini>
  1184. */
  1185. #define CFG_DP_RX_FISA_ENABLE \
  1186. CFG_INI_BOOL("dp_rx_fisa_enable", true, \
  1187. "Enable/Disable DP Rx FISA")
  1188. /*
  1189. * <ini>
  1190. * dp_rx_fisa_lru_del_enable - Control Rx datapath FISA
  1191. * @Min: 0
  1192. * @Max: 1
  1193. * @Default: 1
  1194. *
  1195. * This ini is used to enable DP Rx FISA lru deletion feature
  1196. *
  1197. * Related: dp_rx_fisa_enable
  1198. *
  1199. * Supported Feature: STA,P2P and SAP IPA disabled terminating
  1200. *
  1201. * Usage: Internal
  1202. *
  1203. * </ini>
  1204. */
  1205. #define CFG_DP_RX_FISA_LRU_DEL_ENABLE \
  1206. CFG_INI_BOOL("dp_rx_fisa_lru_del_enable", true, \
  1207. "Enable/Disable DP Rx FISA LRU deletion")
  1208. #define CFG_DP_FISA \
  1209. CFG(CFG_DP_RX_FISA_ENABLE) \
  1210. CFG(CFG_DP_RX_FISA_LRU_DEL_ENABLE)
  1211. #else
  1212. #define CFG_DP_FISA
  1213. #endif
  1214. /*TODO Flow control part to be moved to DP later*/
  1215. #ifdef WLAN_FEATURE_DP_BUS_BANDWIDTH
  1216. #define CFG_DP_BUS_BANDWIDTH \
  1217. CFG(CFG_DP_BUS_BANDWIDTH_SUPER_HIGH_THRESHOLD) \
  1218. CFG(CFG_DP_BUS_BANDWIDTH_ULTRA_HIGH_THRESHOLD) \
  1219. CFG(CFG_DP_BUS_BANDWIDTH_VERY_HIGH_THRESHOLD) \
  1220. CFG(CFG_DP_BUS_BANDWIDTH_MID_HIGH_THRESHOLD) \
  1221. CFG(CFG_DP_BUS_BANDWIDTH_DBS_THRESHOLD) \
  1222. CFG(CFG_DP_BUS_BANDWIDTH_HIGH_THRESHOLD) \
  1223. CFG(CFG_DP_BUS_BANDWIDTH_MEDIUM_THRESHOLD) \
  1224. CFG(CFG_DP_BUS_BANDWIDTH_LOW_THRESHOLD) \
  1225. CFG(CFG_DP_BUS_BANDWIDTH_COMPUTE_INTERVAL) \
  1226. CFG(CFG_DP_ENABLE_TCP_LIMIT_OUTPUT) \
  1227. CFG(CFG_DP_ENABLE_TCP_ADV_WIN_SCALE) \
  1228. CFG(CFG_DP_ENABLE_TCP_DELACK) \
  1229. CFG(CFG_DP_TCP_DELACK_THRESHOLD_HIGH) \
  1230. CFG(CFG_DP_TCP_DELACK_THRESHOLD_LOW) \
  1231. CFG(CFG_DP_TCP_DELACK_TIMER_COUNT) \
  1232. CFG(CFG_DP_TCP_TX_HIGH_TPUT_THRESHOLD) \
  1233. CFG(CFG_DP_BUS_LOW_BW_CNT_THRESHOLD) \
  1234. CFG(CFG_DP_BUS_HANDLE_LATENCY_CRITICAL_CLIENTS)
  1235. #else
  1236. #define CFG_DP_BUS_BANDWIDTH
  1237. #endif
  1238. #ifdef QCA_SUPPORT_TXRX_DRIVER_TCP_DEL_ACK
  1239. #define CFG_DP_DRIVER_TCP_DELACK \
  1240. CFG(CFG_DP_DRIVER_TCP_DELACK_HIGH_THRESHOLD) \
  1241. CFG(CFG_DP_DRIVER_TCP_DELACK_LOW_THRESHOLD) \
  1242. CFG(CFG_DP_DRIVER_TCP_DELACK_TIMER_VALUE) \
  1243. CFG(CFG_DP_DRIVER_TCP_DELACK_PKT_CNT) \
  1244. CFG(CFG_DP_DRIVER_TCP_DELACK_ENABLE)
  1245. #else
  1246. #define CFG_DP_DRIVER_TCP_DELACK
  1247. #endif
  1248. #ifdef WLAN_SUPPORT_TXRX_HL_BUNDLE
  1249. #define CFG_DP_HL_BUNDLE \
  1250. CFG(CFG_DP_HL_BUNDLE_HIGH_TH) \
  1251. CFG(CFG_DP_HL_BUNDLE_LOW_TH) \
  1252. CFG(CFG_DP_HL_BUNDLE_TIMER_VALUE) \
  1253. CFG(CFG_DP_HL_BUNDLE_SIZE)
  1254. #else
  1255. #define CFG_DP_HL_BUNDLE
  1256. #endif
  1257. #define CFG_DP_ALL \
  1258. CFG(CFG_DP_RX_THREAD_CPU_MASK) \
  1259. CFG(CFG_DP_RX_THREAD_UL_CPU_MASK) \
  1260. CFG(CFG_DP_RPS_RX_QUEUE_CPU_MAP_LIST) \
  1261. CFG(CFG_DP_TX_ORPHAN_ENABLE) \
  1262. CFG(CFG_DP_RX_MODE) \
  1263. CFG(CFG_DP_TX_COMP_LOOP_PKT_LIMIT)\
  1264. CFG(CFG_DP_RX_REAP_LOOP_PKT_LIMIT)\
  1265. CFG(CFG_DP_RX_HP_OOS_UPDATE_LIMIT)\
  1266. CFG(CFG_DP_RX_SOFTIRQ_MAX_YIELD_TIME_NS)\
  1267. CFG(CFG_DP_CE_SERVICE_MAX_RX_IND_FLUSH) \
  1268. CFG(CFG_DP_CE_SERVICE_MAX_YIELD_TIME) \
  1269. CFG(CFG_DP_ENABLE_TCP_PARAM_UPDATE) \
  1270. CFG(CFG_DP_FILTER_MULTICAST_REPLAY) \
  1271. CFG(CFG_DP_RX_WAKELOCK_TIMEOUT) \
  1272. CFG(CFG_DP_NUM_DP_RX_THREADS) \
  1273. CFG(CFG_DP_ICMP_REQ_TO_FW_MARK_INTERVAL) \
  1274. CFG(CFG_ENABLE_DIRECT_LINK_UT_CMD) \
  1275. CFG(CFG_DP_APPLY_MEM_PROFILE) \
  1276. CFG_DP_ENABLE_FASTPATH_ALL \
  1277. CFG_DP_BUS_BANDWIDTH \
  1278. CFG_DP_DRIVER_TCP_DELACK \
  1279. CFG_DP_ENABLE_NUD_TRACKING_ALL \
  1280. CFG_DP_CONFIG_DP_TRACE_ALL \
  1281. CFG_DP_HL_BUNDLE \
  1282. CFG_DP_FISA
  1283. #endif /* WLAN_DP_CFG_H__ */