wlan_dp_cfg.h 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. /*
  2. * Copyright (c) 2022 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. #endif /* WLAN_DP_CFG_H__ */