rte_ioctl.h 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. /*
  2. * HND Run Time Environment ioctl.
  3. *
  4. * Portions of this code are copyright (c) 2020 Cypress Semiconductor Corporation
  5. *
  6. * Copyright (C) 1999-2020, Broadcom Corporation
  7. *
  8. * Unless you and Broadcom execute a separate written software license
  9. * agreement governing use of this software, this software is licensed to you
  10. * under the terms of the GNU General Public License version 2 (the "GPL"),
  11. * available at http://www.broadcom.com/licenses/GPLv2.php, with the
  12. * following added to such license:
  13. *
  14. * As a special exception, the copyright holders of this software give you
  15. * permission to link this software with independent modules, and to copy and
  16. * distribute the resulting executable under terms of your choice, provided that
  17. * you also meet, for each linked independent module, the terms and conditions of
  18. * the license of that module. An independent module is a module which is not
  19. * derived from this software. The special exception does not apply to any
  20. * modifications of the software.
  21. *
  22. * Notwithstanding the above, under no circumstances may you combine this
  23. * software in any way with any other Broadcom software provided under a license
  24. * other than the GPL, without Broadcom's express prior written consent.
  25. *
  26. *
  27. * <<Broadcom-WL-IPTag/Open:>>
  28. *
  29. * $Id: rte_ioctl.h 699094 2017-05-11 22:41:10Z $
  30. */
  31. #ifndef _rte_ioctl_h_
  32. #define _rte_ioctl_h_
  33. /* RTE IOCTL definitions for generic ether devices */
  34. #define RTEGHWADDR 0x8901
  35. #define RTESHWADDR 0x8902
  36. #define RTEGMTU 0x8903
  37. #define RTEGSTATS 0x8904
  38. #define RTEGALLMULTI 0x8905
  39. #define RTESALLMULTI 0x8906
  40. #define RTEGPROMISC 0x8907
  41. #define RTESPROMISC 0x8908
  42. #define RTESMULTILIST 0x8909
  43. #define RTEGUP 0x890A
  44. #define RTEGPERMADDR 0x890B
  45. #define RTEDEVPWRSTCHG 0x890C /* Device pwr state change for PCIedev */
  46. #define RTEDEVPMETOGGLE 0x890D /* Toggle PME# to wake up the host */
  47. #define RTEDEVTIMESYNC 0x890E /* Device TimeSync */
  48. #define RTEDEVDSNOTIFY 0x890F /* Bus DS state notification */
  49. #define RTED11DMALPBK_INIT 0x8910 /* D11 DMA loopback init */
  50. #define RTED11DMALPBK_UNINIT 0x8911 /* D11 DMA loopback uninit */
  51. #define RTED11DMALPBK_RUN 0x8912 /* D11 DMA loopback run */
  52. #define RTEDEVTSBUFPOST 0x8913 /* Async interface for tsync buffer post */
  53. #define RTE_IOCTL_QUERY 0x00
  54. #define RTE_IOCTL_SET 0x01
  55. #define RTE_IOCTL_OVL_IDX_MASK 0x1e
  56. #define RTE_IOCTL_OVL_RSV 0x20
  57. #define RTE_IOCTL_OVL 0x40
  58. #define RTE_IOCTL_OVL_IDX_SHIFT 1
  59. enum hnd_ioctl_cmd {
  60. HND_RTE_DNGL_IS_SS = 1, /* true if device connected at super speed */
  61. /* PCIEDEV specific wl <--> bus ioctls */
  62. BUS_GET_VAR = 2,
  63. BUS_SET_VAR = 3,
  64. BUS_FLUSH_RXREORDER_Q = 4,
  65. BUS_SET_LTR_STATE = 5,
  66. BUS_FLUSH_CHAINED_PKTS = 6,
  67. BUS_SET_COPY_COUNT = 7,
  68. BUS_UPDATE_FLOW_PKTS_MAX = 8,
  69. BUS_UPDATE_EXTRA_TXLFRAGS = 9,
  70. BUS_UPDATE_FRWD_RESRV_BUFCNT = 10,
  71. BUS_PCIE_CONFIG_ACCESS = 11
  72. };
  73. #define SDPCMDEV_SET_MAXTXPKTGLOM 1
  74. #define RTE_MEMUSEINFO_VER 0x00
  75. typedef struct memuse_info {
  76. uint16 ver; /* version of this struct */
  77. uint16 len; /* length in bytes of this structure */
  78. uint32 tot; /* Total memory */
  79. uint32 text_len; /* Size of Text segment memory */
  80. uint32 data_len; /* Size of Data segment memory */
  81. uint32 bss_len; /* Size of BSS segment memory */
  82. uint32 arena_size; /* Total Heap size */
  83. uint32 arena_free; /* Heap memory available or free */
  84. uint32 inuse_size; /* Heap memory currently in use */
  85. uint32 inuse_hwm; /* High watermark of memory - reclaimed memory */
  86. uint32 inuse_overhead; /* tally of allocated mem_t blocks */
  87. uint32 inuse_total; /* Heap in-use + Heap overhead memory */
  88. uint32 free_lwm; /* Least free size since reclaim */
  89. uint32 mf_count; /* Malloc failure count */
  90. } memuse_info_t;
  91. /* For D11 DMA loopback test */
  92. typedef struct d11_dmalpbk_args {
  93. uint8 *buf;
  94. int32 len;
  95. } d11_dmalpbk_args_t;
  96. #endif /* _rte_ioctl_h_ */